OpenZWave Library  1.4.3190
Classes | Public Types | Public Member Functions | Friends | List of all members
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_ctxGetAuthKey ()
 
aes_encrypt_ctxGetEncKey ()
 
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

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

Member Enumeration Documentation

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

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

Enumerator
ControllerInterface_Unknown 
ControllerInterface_Serial 
ControllerInterface_Hid 

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.

Enumerator
MsgQueue_Command 
MsgQueue_Security 
MsgQueue_NoOp 
MsgQueue_Controller 
MsgQueue_WakeUp 
MsgQueue_Send 
MsgQueue_Query 
MsgQueue_Poll 
MsgQueue_Count 

Member Function Documentation

aes_encrypt_ctx * Driver::GetAuthKey ( )
aes_encrypt_ctx * Driver::GetEncKey ( )
uint8 OpenZWave::Driver::GetNodeNumber ( Msg const *  _msg) const
inline
uint8 OpenZWave::Driver::GetTransmitOptions ( ) const
inline

Fetch the transmit options

bool Driver::isNetworkKeySet ( )
void Driver::LogDriverStatistics ( )
void Driver::SendMsg ( Msg _msg,
MsgQueue const  _queue 
)

Friends And Related Function Documentation

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

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