OpenZWave::Driver Class Reference

The Driver class handles communication between OpenZWave and a device attached via a serial port (typically a controller). More...

`#include <Driver.h>`

## Classes

struct | DriverData

## Public Types

enum | ControllerInterface { ControllerInterface_Unknown = 0, ControllerInterface_Serial, ControllerInterface_Hid }

enum

ControllerCommand {
ControllerCommand_None = 0, ControllerCommand_AddDevice, ControllerCommand_CreateNewPrimary, ControllerCommand_ReceiveConfiguration,
ControllerCommand_RemoveDevice, ControllerCommand_RemoveFailedNode, ControllerCommand_HasNodeFailed, ControllerCommand_ReplaceFailedNode,
ControllerCommand_TransferPrimaryRole, ControllerCommand_RequestNetworkUpdate, ControllerCommand_RequestNodeNeighborUpdate, ControllerCommand_AssignReturnRoute,
ControllerCommand_DeleteAllReturnRoutes, ControllerCommand_SendNodeInformation, ControllerCommand_ReplicationSend, ControllerCommand_CreateButton,
ControllerCommand_DeleteButton
}

enum | ControllerState { ControllerState_Normal = 0, ControllerState_Starting, ControllerState_Cancel, ControllerState_Error, ControllerState_Waiting, ControllerState_Sleeping, ControllerState_InProgress, ControllerState_Completed, ControllerState_Failed, ControllerState_NodeOK, ControllerState_NodeFailed }
enum | ControllerError { ControllerError_None = 0, ControllerError_ButtonNotFound, ControllerError_NodeNotFound, ControllerError_NotBridge, ControllerError_NotSUC, ControllerError_NotSecondary, ControllerError_NotPrimary, ControllerError_IsPrimary, ControllerError_NotFound, ControllerError_Busy, ControllerError_Failed, ControllerError_Disabled, ControllerError_Overflow }
enum | MsgQueue { MsgQueue_Command = 0, MsgQueue_Security, MsgQueue_NoOp, MsgQueue_Controller, MsgQueue_WakeUp, MsgQueue_Send, MsgQueue_Query, MsgQueue_Poll, MsgQueue_Count }
typedef void(* | pfnControllerCallback_t) (ControllerState _state, ControllerError _err, void *_context)

## Public Member Functions

uint8 | GetNodeNumber (Msg const *_msg) const
void | SendMsg (Msg *_msg, MsgQueue const _queue)
uint8 | GetTransmitOptions () const
void | LogDriverStatistics ()
aes_encrypt_ctx * | GetAuthKey ()
aes_encrypt_ctx * | GetEncKey ()
bool | isNetworkKeySet ()

## Friends

class | Manager
class | Node
class | Group
class | CommandClass
class | ControllerReplication
class | Value
class | ValueStore
class | ValueButton
class | Association
class | Basic
class | ManufacturerSpecific
class | MultiChannelAssociation
class | NodeNaming
class | NoOperation
class | SceneActivation
class | WakeUp
class | Security
class | Msg

## Detailed Description

The Driver class handles communication between OpenZWave and a device attached via a serial port (typically a controller).

## Member Typedef Documentation

## pfnControllerCallback_t

typedef void(* OpenZWave::Driver::pfnControllerCallback_t) (ControllerState _state, ControllerError _err, void *_context)

## Member Enumeration Documentation

## ControllerCommand

enum OpenZWave::Driver::ControllerCommand

Controller Commands. Commands to be used with the BeginControllerCommand method.

See also
  Manager::BeginControllerCommand

Enumerator
ControllerCommand_None | No command.
ControllerCommand_AddDevice | Add a new device or controller to the Z-Wave network.
ControllerCommand_CreateNewPrimary | Add a new controller to the Z-Wave network. Used when old primary fails. Requires SUC.
ControllerCommand_ReceiveConfiguration | Receive Z-Wave network configuration information from another controller.
ControllerCommand_RemoveDevice | Remove a device or controller from the Z-Wave network.
ControllerCommand_RemoveFailedNode | Move a node to the controller's failed nodes list. This command will only work if the node cannot respond.
ControllerCommand_HasNodeFailed | Check whether a node is in the controller's failed nodes list.
ControllerCommand_ReplaceFailedNode | Replace a non-responding node with another. The node must be in the controller's list of failed nodes for this command to succeed.
ControllerCommand_TransferPrimaryRole | Make a different controller the primary.
ControllerCommand_RequestNetworkUpdate | Request network information from the SUC/SIS.
ControllerCommand_RequestNodeNeighborUpdate | Get a node to rebuild its neighbour list. This method also does RequestNodeNeighbors
ControllerCommand_AssignReturnRoute | Assign a network return routes to a device.
ControllerCommand_DeleteAllReturnRoutes | Delete all return routes from a device.
ControllerCommand_SendNodeInformation | Send a node information frame
ControllerCommand_ReplicationSend | Send information from primary to secondary
ControllerCommand_CreateButton | Create an id that tracks handheld button presses
ControllerCommand_DeleteButton | Delete id that tracks handheld button presses

## ControllerError

enum OpenZWave::Driver::ControllerError

Controller Errors Provide some more information about controller failures.

Enumerator
ControllerError_None |
ControllerError_ButtonNotFound | Button
ControllerError_NodeNotFound | Button
ControllerError_NotBridge | Button
ControllerError_NotSUC | CreateNewPrimary
ControllerError_NotSecondary | CreateNewPrimary
ControllerError_NotPrimary | RemoveFailedNode, AddNodeToNetwork
ControllerError_IsPrimary | ReceiveConfiguration
ControllerError_NotFound | RemoveFailedNode
ControllerError_Busy | RemoveFailedNode, RequestNetworkUpdate
ControllerError_Failed | RemoveFailedNode, RequestNetworkUpdate
ControllerError_Disabled | RequestNetworkUpdate error
ControllerError_Overflow | RequestNetworkUpdate error

## ControllerInterface

enum OpenZWave::Driver::ControllerInterface

Enumerator
ControllerInterface_Unknown |
ControllerInterface_Serial |
ControllerInterface_Hid |

## ControllerState

enum OpenZWave::Driver::ControllerState

Controller States. States reported via the callback handler passed into the BeginControllerCommand method.

See also
  Manager::BeginControllerCommand

Enumerator
ControllerState_Normal | No command in progress.
ControllerState_Starting | The command is starting.
ControllerState_Cancel | The command was canceled.
ControllerState_Error | Command invocation had error(s) and was aborted
ControllerState_Waiting | Controller is waiting for a user action.
ControllerState_Sleeping | Controller command is on a sleep queue wait for device.
ControllerState_InProgress | The controller is communicating with the other device to carry out the command.
ControllerState_Completed | The command has completed successfully.
ControllerState_Failed | The command has failed.
ControllerState_NodeOK | Used only with ControllerCommand_HasNodeFailed to indicate that the controller thinks the node is OK.
ControllerState_NodeFailed | Used only with ControllerCommand_HasNodeFailed to indicate that the controller thinks the node has failed.

## MsgQueue

enum OpenZWave::Driver::MsgQueue

Enumerator
MsgQueue_Command |
MsgQueue_Security |
MsgQueue_NoOp |
MsgQueue_Controller |
MsgQueue_WakeUp |
MsgQueue_Send |
MsgQueue_Query |
MsgQueue_Poll |
MsgQueue_Count |

## Member Function Documentation

## GetAuthKey()

aes_encrypt_ctx * Driver::GetAuthKey | ( |  | ) |

## GetEncKey()

aes_encrypt_ctx * Driver::GetEncKey | ( |  | ) |

## GetNodeNumber()

uint8 OpenZWave::Driver::GetNodeNumber | ( | Msg const * | _msg | ) | const

inline

## GetTransmitOptions()

uint8 OpenZWave::Driver::GetTransmitOptions | ( |  | ) | const

inline

Fetch the transmit options

## isNetworkKeySet()

bool Driver::isNetworkKeySet | ( |  | ) |

## LogDriverStatistics()

void Driver::LogDriverStatistics | ( |  | ) |

## SendMsg()

void Driver::SendMsg | ( | Msg * | _msg,
|  | MsgQueue const | _queue
| ) |  |

## Friends And Related Function Documentation

## Association

friend class Association

friend

## Basic

friend class Basic

friend

## CommandClass

friend class CommandClass

friend

## ControllerReplication

friend class ControllerReplication

friend

## Group

friend class Group

friend

## Manager

friend class Manager

friend

## ManufacturerSpecific

friend class ManufacturerSpecific

friend

## Msg

friend class Msg

friend

## MultiChannelAssociation

friend class MultiChannelAssociation

friend

## Node

friend class Node

friend

## NodeNaming

friend class NodeNaming

friend

## NoOperation

friend class NoOperation

friend

## SceneActivation

friend class SceneActivation

friend

## Security

friend class Security

friend

## Value

friend class Value

friend

## ValueButton

friend class ValueButton

friend

## ValueStore

friend class ValueStore

friend

## WakeUp

friend class WakeUp

friend

The documentation for this class was generated from the following files:

- Driver.h
- Driver.cpp