|
deCONZ C++ API v2.6.1
|
Provides APSDE-DATA service and access to node cache. More...
#include <aps_controller.h>
Inherits QObject.
Signals | |
| void | apsdeDataConfirm (const deCONZ::ApsDataConfirm &) |
| Is emitted on the reception of a APSDE-DATA.confirm primitive. | |
| void | apsdeDataIndication (const deCONZ::ApsDataIndication &) |
| Is emitted on the reception of a APSDE-DATA.indication primitive. | |
| void | apsdeDataRequestEnqueued (const deCONZ::ApsDataRequest &) |
| Is emitted when a APSDE-DATA.request primitive was added to the queue. | |
| void | nodeEvent (const deCONZ::NodeEvent &) |
| Is emitted on changes in the nodecache or user interactions. | |
| void | configurationChanged () |
| Is emitted when the configuration changed via deCONZ network settings or any other means. | |
| void | networkStateChangeRequest (bool) |
| Is emitted when the user requested network state change. | |
| void | sourceRouteCreated (const deCONZ::SourceRoute &) |
| Is emitted when a new source route is created. | |
| void | sourceRouteChanged (const deCONZ::SourceRoute &) |
| Is emitted when a source route was changed. | |
| void | sourceRouteDeleted (const QString &uuid) |
| Is emitted when a source route is deleted. | |
| void | nodesRestored () |
| Is emitted when the controller has restored all nodes from database. | |
Public Member Functions | |
| ApsController (QObject *parent) | |
| Constructor. | |
| virtual | ~ApsController () |
| Deconstructor. | |
| virtual State | networkState ()=0 |
| Returns the current network state. | |
| virtual int | setNetworkState (State state)=0 |
| Sets the current network state. | |
| virtual int | setPermitJoin (uint8_t duration)=0 |
| Sets the permit join duration. | |
| virtual int | apsQueueSize ()=0 |
| Returns number of enqueued APS requests. | |
| virtual int | apsdeDataRequest (const ApsDataRequest &req)=0 |
| Send a APSDE-DATA.request to the network. | |
| virtual int | resolveAddress (Address &addr)=0 |
| Fills in missing network or extended IEEE address information. | |
| virtual int | getNode (int index, const Node **node)=0 |
| Iterates through the internal node cache. | |
| virtual bool | updateNode (const Node &node)=0 |
| TODO: return object instead of pointer ... | |
| virtual uint8_t | getParameter (U8Parameter parameter)=0 |
| Returns a 8-bit parameter. | |
| virtual bool | setParameter (U8Parameter parameter, uint8_t value)=0 |
| Sets a 8-bit parameter. | |
| virtual bool | setParameter (U16Parameter parameter, uint16_t value)=0 |
| Sets a 16-bit parameter. | |
| virtual bool | setParameter (U32Parameter parameter, uint32_t value)=0 |
| Sets a 32-bit parameter. | |
| virtual bool | setParameter (U64Parameter parameter, uint64_t value)=0 |
| Sets a 64-bit parameter. | |
| virtual bool | setParameter (ArrayParameter parameter, QByteArray value)=0 |
| Sets a byte array parameter. | |
| virtual bool | setParameter (VariantMapParameter parameter, QVariantMap value)=0 |
| Sets a VariantMap parameter. | |
| virtual bool | setParameter (StringParameter parameter, const QString &value)=0 |
| Sets a string parameter. | |
| virtual uint16_t | getParameter (U16Parameter parameter)=0 |
| Returns a 16-bit parameter. | |
| virtual uint32_t | getParameter (U32Parameter parameter)=0 |
| Returns a 32-bit parameter. | |
| virtual uint64_t | getParameter (U64Parameter parameter)=0 |
| Returns a 64-bit parameter. | |
| virtual QString | getParameter (StringParameter parameter)=0 |
| Returns a string parameter. | |
| virtual QByteArray | getParameter (ArrayParameter parameter)=0 |
| Returns a byte array parameter. | |
| virtual QVariantMap | getParameter (VariantMapParameter parameter, int index)=0 |
| Returns a variant map parameter. | |
| virtual void | activateSourceRoute (const SourceRoute &sourceRoute)=0 |
| Activate a source route, also called when restored from database. | |
| virtual void | addBinding (const deCONZ::Binding &binding)=0 |
| Adds a binding, if not already exists, to a nodes binding table. | |
| virtual void | removeBinding (const deCONZ::Binding &binding)=0 |
| Removes a binding to a nodes binding table. | |
| virtual uint8_t | nextRequestId ()=0 |
| Alloctes a new APS request id. | |
Static Public Member Functions | |
| static ApsController * | instance () |
| Get the singleton instance of the ApsController. | |
Provides APSDE-DATA service and access to node cache.
|
pure virtual |
Activate a source route, also called when restored from database.
| sourceRoute | - the source route |
|
pure virtual |
Adds a binding, if not already exists, to a nodes binding table.
| binding | - the binding, the node is determinded by Binding::srcAddress() |
|
signal |
Is emitted on the reception of a APSDE-DATA.confirm primitive.
|
signal |
Is emitted on the reception of a APSDE-DATA.indication primitive.
A indication might be received at any time and is not necessarily releated to a former request.
No filtering is done by the application any indication which is received will be forwarded.
|
pure virtual |
Send a APSDE-DATA.request to the network.
Multible requests could be send in parallel. It is guaranteed that for each request a apsdeDataConfirm() signal is emitted after the request is processed.
The confirmation might take from 5 milliseconds up to serval seconds depending on if a new route must be found or the destination is not available.
To match the request to the confirmation compare their ids, ApsDataRequest::id() == ApsDataConfirm::id().
| Success | the request is enqueued and will be processed |
| ErrorNotConnected | if not connected to a network |
| ErrorQueueIsFull | request queue is full |
| ErrorNodeIsZombie | destionation node is zombie node, only ZDP requests are allowed |
|
signal |
Is emitted when a APSDE-DATA.request primitive was added to the queue.
|
signal |
Is emitted when the configuration changed via deCONZ network settings or any other means.
|
pure virtual |
Iterates through the internal node cache.
The node with the index 0 is always the own node.
| index | a index >= 0 |
| node | a pointer to a user provides deCONZ::Node pointer |
| 0 | if node points to a valid deCONZ::Node |
| -1 | if no node is available for index |
|
pure virtual |
Returns a byte array parameter.
| parameter | - the parameter identifier |
|
pure virtual |
Returns a string parameter.
| parameter | - the parameter identifier |
|
pure virtual |
Returns a 16-bit parameter.
| parameter | - the parameter identifier |
|
pure virtual |
Returns a 32-bit parameter.
| parameter | - the parameter identifier |
|
pure virtual |
Returns a 64-bit parameter.
| parameter | - the parameter identifier |
|
pure virtual |
Returns a 8-bit parameter.
| parameter | - the parameter identifier |
|
pure virtual |
Returns a variant map parameter.
| parameter | - the parameter identifier |
| index | (optional) |
|
signal |
Is emitted when the user requested network state change.
true = connect; false = disconnect.
|
pure virtual |
Alloctes a new APS request id.
|
signal |
Is emitted when the controller has restored all nodes from database.
|
pure virtual |
Removes a binding to a nodes binding table.
| binding | - the binding, the node is determinded by Binding::srcAddress() |
|
pure virtual |
Fills in missing network or extended IEEE address information.
| addr | at least nwk() or ext() must be set |
| Success | on success |
| ErrorNotFound | if the missing address part was not available |
|
pure virtual |
Sets the current network state.
| state | either NotInNetwork or InNetwork |
| Success | the request is enqueued and will be processed |
| ErrorNotConnected | if not connected to device |
|
pure virtual |
Sets a byte array parameter.
| parameter | - the parameter identifier |
| value | - the parameter value |
|
pure virtual |
Sets a string parameter.
| parameter | - the parameter identifier |
| value | - the parameter value |
|
pure virtual |
Sets a 16-bit parameter.
| parameter | - the parameter identifier |
| value | - the parameter value |
|
pure virtual |
Sets a 32-bit parameter.
| parameter | - the parameter identifier |
| value | - the parameter value |
|
pure virtual |
Sets a 64-bit parameter.
| parameter | - the parameter identifier |
| value | - the parameter value |
|
pure virtual |
Sets a 8-bit parameter.
| parameter | - the parameter identifier |
| value | - the parameter value |
|
pure virtual |
Sets a VariantMap parameter.
| parameter | - the parameter identifier |
| value | - the parameter value |
|
pure virtual |
Sets the permit join duration.
| duration | 0..255 (in seconds) |
| Success | the request is enqueued and will be processed |
| ErrorNotConnected | if not connected to a network |
|
signal |
Is emitted when a source route was changed.
|
signal |
Is emitted when a new source route is created.
|
signal |
Is emitted when a source route is deleted.
|
pure virtual |
TODO: return object instead of pointer ...
Updates the data of a node in the internal node cache.
| node | a node which must have a extended IEEE address |