Home2L - C/C++ API  v1.2-2-ga4fe (2023-04-15)
Smart Tools for a Private Home
Classes | Typedefs | Enumerations
Subscriptions

Description

Subscribing to resources to read their values.

Event model

The event model allows even remote hosts to securely catch all events reported by the driver. This is important, if a sensor (e.g. a push button) may change its value very quickly, but event quick changes need to be processed. If this property cannot be guaranteed (e.g. because a host is temporarily down or the network connection lost), evens of type 'retDisconnected' and hopefully later 'retConnected' are dispatched, so that the subscriber is informed about this situation.

Collaboration diagram for Subscriptions:

Classes

class  CRcEvent
 Events delivered by a subscriber or to a driver. More...
 
class  CRcEventProcessor
 Event processor. More...
 
class  CRcEventTimer
 Timer that sends 'rceTimer' events over the event system. More...
 
class  CRcSubscriber
 Subscriber to follow an arbitrary set of resources. More...
 

Typedefs

typedef bool FRcEventFunc(class CRcEventProcessor *, CRcEvent *, void *)
 Event processor callback function. Example: bool OnEventFunc (CRcEventProcessor *ep, CRcEvent *ev, void *data);
 

Enumerations

enum  ERcEventType {
  rceNone = 0 , rceTimer , rceValueStateChanged , rceRequestChanged ,
  rceDisconnected , rceConnected , rceDriveValue
}
 Event type. More...
 

Enumeration Type Documentation

◆ ERcEventType

Event type.

Enumerator
rceNone 

None (for dummy events)

rceTimer 

[timer] Timer alarm

rceValueStateChanged 

[subscriber] Value or state has changed

rceRequestChanged 

[subscriber] Request has changed

rceDisconnected 

[subscriber] Connection to resource was lost

rceConnected 

[subscriber] Connection to resource is (re-)established

rceDriveValue 

[driver] Drive a new value

Definition at line 1534 of file resources.H.