The QKnxDatapointTypeFactory class is used to create QKnxDatapointType objects based on their main number and sub number. 更多...
头: | #include <QKnxDatapointTypeFactory> |
qmake: | QT += knx |
bool | containsMainType (int mainType ) const |
bool | containsSubType (int mainType , int subType ) const |
QKnxDatapointType * | createType (int mainType , int subType ) const |
QKnxDatapointType * | createType (QKnxDatapointType::Type type ) const |
QList<int> | mainTypes () const |
void | registerType (int mainType , int subType , int size ) |
QList<int> | subTypes (int mainType ) const |
QKnxDatapointTypeFactory & | instance () |
int | typeSize (int mainType ) |
You can register one or more datapoints with this factory and query them based on the main number and sub number.
This class follows the singleton design pattern. Only one instance of this class can be created and its reference can be fetched from the instance () 方法。
The KNX datapoint types are identified by a 16-bit main number and a 16-bit sub number.
另请参阅 Qt KNX Datapoint Type Classes .
Queries the factory for a the given
mainType
and if it is registered, returns
true
;
false
否则。
Queries the factory for a the given
mainType
and
subType
and if the type is registered, returns
true
;
false
否则。
Returns a new instance of a QKnxDatapointType subclass. The instantiation of the subclass depends on the mainType and subType given as arguments to this function.
注意: The ownership of the created object remains with the programmer.
Returns a new instance of a QKnxDatapointType subclass. The instantiation of the subclass depends on the type given as an argument to this function.
注意: The ownership of the created object remains with the programmer.
[static]
QKnxDatapointTypeFactory
&QKnxDatapointTypeFactory::
实例
()
Returns a reference to the datapoint type factory.
Returns a list of registered main datapoint types.
Registers a datapoint type with the main type mainType , sub type subType , and size size .
Returns a list of registered sub datapoint types for the given mainType .
[static]
int
QKnxDatapointTypeFactory::
typeSize
(
int
mainType
)
Returns the size in bytes for the given mainType .