| OpenZWave Library 1.6.0

Public Types | Public Member Functions | Friends | List of all members
OpenZWave::Notification Class Reference

Provides a container for data sent via the notification callback handler installed by a call to Manager::AddWatcher. More...

`#include <Notification.h>`

## Public Types
enum | NotificationType { Type_ValueAdded = 0, Type_ValueRemoved, Type_ValueChanged, Type_ValueRefreshed, Type_Group, Type_NodeNew, Type_NodeAdded, Type_NodeRemoved, Type_NodeProtocolInfo, Type_NodeNaming, Type_NodeEvent, Type_PollingDisabled, Type_PollingEnabled, Type_SceneEvent, Type_CreateButton, Type_DeleteButton, Type_ButtonOn, Type_ButtonOff, Type_DriverReady, Type_DriverFailed, Type_DriverReset, Type_EssentialNodeQueriesComplete, Type_NodeQueriesComplete, Type_AwakeNodesQueried, Type_AllNodesQueriedSomeDead, Type_AllNodesQueried, Type_Notification, Type_DriverRemoved, Type_ControllerCommand, Type_NodeReset, Type_UserAlerts, Type_ManufacturerSpecificDBReady }
enum | NotificationCode { Code_MsgComplete = 0, Code_Timeout, Code_NoOperation, Code_Awake, Code_Sleep, Code_Dead, Code_Alive }
enum | UserAlertNofification { Alert_None, Alert_ConfigOutOfDate, Alert_MFSOutOfDate, Alert_ConfigFileDownloadFailed, Alert_DNSError, Alert_NodeReloadReqired, Alert_UnsupportedController, Alert_ApplicationStatus_Retry, Alert_ApplicationStatus_Queued, Alert_ApplicationStatus_Rejected }

## Public Member Functions
NotificationType | GetType () const
uint32 | GetHomeId () const
uint8 | GetNodeId () const
ValueID const & | GetValueID () const
uint8 | GetGroupIdx () const
uint8 | GetEvent () const
uint8 | GetButtonId () const
DEPRECATED uint8 | GetSceneId () const
uint8 | GetNotification () const
uint8 | GetCommand () const
uint8 | GetByte () const
uint8 | GetRetry () const
string | GetAsString () const
UserAlertNofification | GetUserAlertType () const
string | GetComPort () const

## Friends
class | Manager
class | Driver
class | Node
class | Group
class | Value
class | ValueStore
class | Basic
class | ManufacturerSpecific
class | NodeNaming
class | NoOperation
class | SceneActivation
class | WakeUp
class | ApplicationStatus
class | ManufacturerSpecificDB

## Detailed Description

Provides a container for data sent via the notification callback handler installed by a call to Manager::AddWatcher.

A notification object is only ever created or deleted internally by OpenZWave.

## Member Enumeration Documentation

## ◆ NotificationCode

enum OpenZWave::Notification::NotificationCode

Notification codes. Notifications of the type Type_Notification convey some extra information defined here.

Enumerator
Code_MsgComplete | Completed messages
Code_Timeout | Messages that timeout will send a Notification with this code.
Code_NoOperation | Report on NoOperation message sent completion
Code_Awake | Report when a sleeping node wakes up
Code_Sleep | Report when a node goes to sleep
Code_Dead | Report when a node is presumed dead
Code_Alive | Report when a node is revived

## ◆ NotificationType

enum OpenZWave::Notification::NotificationType

Notification types. Notifications of various Z-Wave events sent to the watchers registered with the Manager::AddWatcher method.

See also
  Manager::AddWatcher
  Manager::BeginControllerCommand

Enumerator
Type_ValueAdded | A new node value has been added to OpenZWave's list. These notifications occur after a node has been discovered, and details of its command classes have been received. Each command class may generate one or more values depending on the complexity of the item being represented.
Type_ValueRemoved | A node value has been removed from OpenZWave's list. This only occurs when a node is removed.
Type_ValueChanged | A node value has been updated from the Z-Wave network and it is different from the previous value.
Type_ValueRefreshed | A node value has been updated from the Z-Wave network.
Type_Group | The associations for the node have changed. The application should rebuild any group information it holds about the node.
Type_NodeNew | A new node has been found (not already stored in zwcfg*.xml file)
Type_NodeAdded | A new node has been added to OpenZWave's list. This may be due to a device being added to the Z-Wave network, or because the application is initializing itself.
Type_NodeRemoved | A node has been removed from OpenZWave's list. This may be due to a device being removed from the Z-Wave network, or because the application is closing.
Type_NodeProtocolInfo | Basic node information has been received, such as whether the node is a listening device, a routing device and its baud rate and basic, generic and specific types. It is after this notification that you can call Manager::GetNodeType to obtain a label containing the device description.
Type_NodeNaming | One of the node names has changed (name, manufacturer, product).
Type_NodeEvent | A node has triggered an event. This is commonly caused when a node sends a Basic_Set command to the controller. The event value is stored in the notification.
Type_PollingDisabled | Polling of a node has been successfully turned off by a call to Manager::DisablePoll
Type_PollingEnabled | Polling of a node has been successfully turned on by a call to Manager::EnablePoll
Type_SceneEvent | Scene Activation Set received (Depreciated in 1.8)
Type_CreateButton | Handheld controller button event created
Type_DeleteButton | Handheld controller button event deleted
Type_ButtonOn | Handheld controller button on pressed event
Type_ButtonOff | Handheld controller button off pressed event
Type_DriverReady | A driver for a PC Z-Wave controller has been added and is ready to use. The notification will contain the controller's Home ID, which is needed to call most of the Manager methods.
Type_DriverFailed | Driver failed to load
Type_DriverReset | All nodes and values for this driver have been removed. This is sent instead of potentially hundreds of individual node and value notifications.
Type_EssentialNodeQueriesComplete | The queries on a node that are essential to its operation have been completed. The node can now handle incoming messages.
Type_NodeQueriesComplete | All the initialization queries on a node have been completed.
Type_AwakeNodesQueried | All awake nodes have been queried, so client application can expected complete data for these nodes.
Type_AllNodesQueriedSomeDead | All nodes have been queried but some dead nodes found.
Type_AllNodesQueried | All nodes have been queried, so client application can expected complete data.
Type_Notification | An error has occurred that we need to report.
Type_DriverRemoved | The Driver is being removed. (either due to Error or by request) Do Not Call Any Driver Related Methods after receiving this call
Type_ControllerCommand | When Controller Commands are executed, Notifications of Success/Failure etc are communicated via this Notification Notification::GetEvent returns Driver::ControllerCommand and Notification::GetNotification returns Driver::ControllerState
Type_NodeReset | The Device has been reset and thus removed from the NodeList in OZW
Type_UserAlerts | Warnings and Notifications Generated by the library that should be displayed to the user (eg, out of date config files)
Type_ManufacturerSpecificDBReady | The ManufacturerSpecific Database Is Ready

## ◆ UserAlertNofification

enum OpenZWave::Notification::UserAlertNofification

User Alert Types - These are messages that should be displayed to users to inform them of potential issues such as Out of Date configuration files etc

Enumerator
Alert_None | No Alert Currently Present
Alert_ConfigOutOfDate | One of the Config Files is out of date. Use GetNodeId to determine which node is affected.
Alert_MFSOutOfDate | the manufacturer_specific.xml file is out of date.
Alert_ConfigFileDownloadFailed | A Config File failed to download
Alert_DNSError | A error occurred performing a DNS Lookup
Alert_NodeReloadReqired | A new Config file has been discovered for this node, and its pending a Reload to Take Effect
Alert_UnsupportedController | The Controller is not running a Firmware Library we support
Alert_ApplicationStatus_Retry | Application Status CC returned a Retry Later Message
Alert_ApplicationStatus_Queued | Command Has been Queued for execution later
Alert_ApplicationStatus_Rejected | Command has been rejected

## Member Function Documentation

## ◆ GetAsString()

string Notification::GetAsString | ( |  | ) | const

Helper Function to return the Notification as a String

Returns
  A string representation of this Notification

## ◆ GetButtonId()

uint8 OpenZWave::Notification::GetButtonId | ( |  | ) | const
| inline

Get the button id of a notification. Only valid in Notification::Type_CreateButton, Notification::Type_DeleteButton, Notification::Type_ButtonOn and Notification::Type_ButtonOff notifications.

Returns
  the button id.

## ◆ GetByte()

uint8 OpenZWave::Notification::GetByte | ( |  | ) | const
| inline

Helper function to simplify wrapping the notification class. Should not normally need to be called.

Returns
  the internal byte value of the notification.

## ◆ GetCommand()

uint8 OpenZWave::Notification::GetCommand | ( |  | ) | const
| inline

Get the (controller) command from a notification. Only valid for Notification::Type_ControllerCommand notifications.

Returns
  the (controller) command code.

## ◆ GetComPort()

string OpenZWave::Notification::GetComPort | ( |  | ) | const
| inline

Return the Comport associated with the DriverFailed Message

Returns
  a string representing the Comport

## ◆ GetEvent()

uint8 OpenZWave::Notification::GetEvent | ( |  | ) | const
| inline

Get the event value of a notification. Only valid in Notification::Type_NodeEvent and Notification::Type_ControllerCommand notifications.

Returns
  the event value.

## ◆ GetGroupIdx()

uint8 OpenZWave::Notification::GetGroupIdx | ( |  | ) | const
| inline

Get the index of the association group that has been changed. Only valid in Notification::Type_Group notifications.

Returns
  the group index.

## ◆ GetHomeId()

uint32 OpenZWave::Notification::GetHomeId | ( |  | ) | const
| inline

Get the Home ID of the driver sending this notification.

Returns
  the driver Home ID

## ◆ GetNodeId()

uint8 OpenZWave::Notification::GetNodeId | ( |  | ) | const
| inline

Get the ID of any node involved in this notification.

Returns
  the node's ID

## ◆ GetNotification()

uint8 OpenZWave::Notification::GetNotification | ( |  | ) | const
| inline

Get the notification code from a notification. Only valid for Notification::Type_Notification or Notification::Type_ControllerCommand notifications.

Returns
  the notification code.

## ◆ GetRetry()

uint8 OpenZWave::Notification::GetRetry | ( |  | ) | const
| inline

Helper function to return the Timeout to wait for. Only valid for Notification::Type_UserAlerts - Notification::Alert_ApplicationStatus_Retry

Returns
  The time to wait before retrying

## ◆ GetSceneId()

DEPRECATED uint8 OpenZWave::Notification::GetSceneId | ( |  | ) | const
| inline

Get the scene Id of a notification. Only valid in Notification::Type_SceneEvent notifications. The SceneActivation CC now exposes ValueID's that convey this information

Returns
  the event value.

## ◆ GetType()

NotificationType OpenZWave::Notification::GetType | ( |  | ) | const
| inline

Get the type of this notification.

Returns
  the notification type.

See also
  NotificationType

## ◆ GetUserAlertType()

UserAlertNofification OpenZWave::Notification::GetUserAlertType | ( |  | ) | const
| inline

Retrieve the User Alert Type Enum to determine what this message is about

Returns
  UserAlertNotification Enum describing the Alert Type

## ◆ GetValueID()

ValueID const& OpenZWave::Notification::GetValueID | ( |  | ) | const
| inline

Get the unique ValueID of any value involved in this notification.

Returns
  the value's ValueID

## Friends And Related Function Documentation

## ◆ ApplicationStatus

friend class ApplicationStatus
| friend

## ◆ Basic

friend class Basic
| friend

## ◆ Driver

friend class Driver
| friend

## ◆ Group

friend class Group
| friend

## ◆ Manager

friend class Manager
| friend

## ◆ ManufacturerSpecific

friend class ManufacturerSpecific
| friend

## ◆ ManufacturerSpecificDB

friend class ManufacturerSpecificDB
| friend

## ◆ Node

friend class Node
| friend

## ◆ NodeNaming

friend class NodeNaming
| friend

## ◆ NoOperation

friend class NoOperation
| friend

## ◆ SceneActivation

friend class SceneActivation
| friend

## ◆ Value

friend class Value
| friend

## ◆ ValueStore

friend class ValueStore
| friend

## ◆ WakeUp

friend class WakeUp
| friend

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

- Notification.h
- Notification.cpp