OpenZWave Library  1.6.885
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_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

Internal::TimerThreadGetTimer ()
 
uint8 GetNodeNumber (Internal::Msg const *_msg) const
 
void SendMsg (Internal::Msg *_msg, MsgQueue const _queue)
 
uint8 GetTransmitOptions () const
 
void LogDriverStatistics ()
 
aes_encrypt_ctx * GetAuthKey ()
 
aes_encrypt_ctx * GetEncKey ()
 
bool isNetworkKeySet ()
 
bool CheckNodeConfigRevision (Node *)
 
bool CheckMFSConfigRevision ()
 
void ReloadNode (uint8 const _nodeId)
 
bool setHttpClient (Internal::i_HttpClient *client)
 
string const GetMetaData (uint8 const _nodeId, Node::MetaDataFields _metadata)
 
Node::ChangeLogEntry const GetChangeLog (uint8 const _nodeId, uint32_t revision)
 
Internal::ManufacturerSpecificDBGetManufacturerSpecificDB ()
 
bool downloadConfigRevision (Node *)
 
bool downloadMFSRevision ()
 

Friends

class Manager
 
class Node
 
class Group
 
class Internal::CC::CommandClass
 
class Internal::CC::ControllerReplication
 
class Internal::DNSThread
 
class Internal::i_HttpClient
 
class Internal::VC::Value
 
class Internal::VC::ValueStore
 
class Internal::CC::Basic
 
class Internal::CC::ManufacturerSpecific
 
class Internal::CC::MultiChannelAssociation
 
class Internal::CC::NodeNaming
 
class Internal::CC::SceneActivation
 
class Internal::CC::WakeUp
 
class Internal::CC::ApplicationStatus
 
class Internal::CC::Security
 
class Internal::Msg
 
class Internal::ManufacturerSpecificDB
 
class TimerThread
 

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

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

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

Enumerator
ControllerInterface_Unknown 
ControllerInterface_Serial 
ControllerInterface_Hid 

◆ 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

Enumerator
MsgQueue_Command 
MsgQueue_NoOp 
MsgQueue_Controller 
MsgQueue_WakeUp 
MsgQueue_Send 
MsgQueue_Query 
MsgQueue_Poll 
MsgQueue_Count 

Member Function Documentation

◆ CheckMFSConfigRevision()

bool Driver::CheckMFSConfigRevision ( )

◆ CheckNodeConfigRevision()

bool Driver::CheckNodeConfigRevision ( Node node)

◆ downloadConfigRevision()

bool Driver::downloadConfigRevision ( Node node)

◆ downloadMFSRevision()

bool Driver::downloadMFSRevision ( )

◆ GetAuthKey()

aes_encrypt_ctx * Driver::GetAuthKey ( )

◆ GetChangeLog()

Node::ChangeLogEntry const Driver::GetChangeLog ( uint8 const  _nodeId,
uint32_t  revision 
)

◆ GetEncKey()

aes_encrypt_ctx * Driver::GetEncKey ( )

◆ GetManufacturerSpecificDB()

Internal::ManufacturerSpecificDB * Driver::GetManufacturerSpecificDB ( )

◆ GetMetaData()

string const Driver::GetMetaData ( uint8 const  _nodeId,
Node::MetaDataFields  _metadata 
)

◆ GetNodeNumber()

uint8 OpenZWave::Driver::GetNodeNumber ( Internal::Msg const *  _msg) const
inline

◆ GetTimer()

Internal::TimerThread* OpenZWave::Driver::GetTimer ( )
inline

◆ GetTransmitOptions()

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

Fetch the transmit options

◆ isNetworkKeySet()

bool Driver::isNetworkKeySet ( )

◆ LogDriverStatistics()

void Driver::LogDriverStatistics ( )

◆ ReloadNode()

void Driver::ReloadNode ( uint8 const  _nodeId)

◆ SendMsg()

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

◆ setHttpClient()

bool Driver::setHttpClient ( Internal::i_HttpClient client)

Friends And Related Function Documentation

◆ Group

friend class Group
friend

◆ Internal::CC::ApplicationStatus

friend class Internal::CC::ApplicationStatus
friend

◆ Internal::CC::Basic

friend class Internal::CC::Basic
friend

◆ Internal::CC::CommandClass

friend class Internal::CC::CommandClass
friend

◆ Internal::CC::ControllerReplication

◆ Internal::CC::ManufacturerSpecific

◆ Internal::CC::MultiChannelAssociation

◆ Internal::CC::NodeNaming

friend class Internal::CC::NodeNaming
friend

◆ Internal::CC::SceneActivation

friend class Internal::CC::SceneActivation
friend

◆ Internal::CC::Security

friend class Internal::CC::Security
friend

◆ Internal::CC::WakeUp

friend class Internal::CC::WakeUp
friend

◆ Internal::DNSThread

friend class Internal::DNSThread
friend

◆ Internal::i_HttpClient

friend class Internal::i_HttpClient
friend

◆ Internal::ManufacturerSpecificDB

friend class Internal::ManufacturerSpecificDB
friend

◆ Internal::Msg

friend class Internal::Msg
friend

◆ Internal::VC::Value

friend class Internal::VC::Value
friend

◆ Internal::VC::ValueStore

friend class Internal::VC::ValueStore
friend

◆ Manager

friend class Manager
friend

◆ Node

friend class Node
friend

◆ TimerThread

friend class TimerThread
friend

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