|
Friendly LWM2M client
|
The InstSubject class represents a subject that allows subscribers to be notified about various events related to instance resources. More...
#include <InstSubject.h>
Inheritance diagram for wpp::InstSubject:
Collaboration diagram for wpp::InstSubject:Public Member Functions | |
| void | opSubscribe (InstOpObserver *observer) |
| Subscribes an observer to receive notifications about instance resource operations. More... | |
| void | opUnsubscribe (InstOpObserver *observer) |
| Unsubscribes an observer from receiving notifications about instance resource operations. More... | |
| void | eventSubscribe (InstEventObserver *observer) |
| Subscribes an observer to receive notifications about custom instance events. More... | |
| void | eventUnsubscribe (InstEventObserver *observer) |
| Unsubscribes an observer from receiving notifications about custom instance events. More... | |
Protected Member Functions | |
| void | operationNotify (Instance &inst, const ResLink &resLink, ItemOp::TYPE type) |
| Notifies the observers about an operation on an instance resource. More... | |
| void | eventNotify (Instance &inst, EVENT_ID_T eventId) |
| Notifies the observers about a custom instance event. More... | |
The InstSubject class represents a subject that allows subscribers to be notified about various events related to instance resources.
This class provides functionality for subscribing and unsubscribing observers to receive notifications about operations, block operations, and custom events. The observers will be notified when there are write, delete, replace, and execute operations on instance resources initiated by the server. Custom instance events can also be subscribed to and unsubscribed from.
The InstSubject class is designed to be inherited by other classes that need to provide observer functionality for instance resources.
Definition at line 21 of file InstSubject.h.
|
inlineprotected |
Notifies the observers about a custom instance event.
This function is called internally to notify the subscribed observers about a custom instance event.
| inst | The instance object on which the event occurred. |
| eventId | The ID of the event. |
Definition at line 100 of file InstSubject.h.
|
inline |
Subscribes an observer to receive notifications about custom instance events.
The observer will be notified when there are custom events related to the instance.
| observer | A pointer to the observer object. |
Definition at line 52 of file InstSubject.h.
|
inline |
Unsubscribes an observer from receiving notifications about custom instance events.
| observer | A pointer to the observer object. |
Definition at line 63 of file InstSubject.h.
|
inlineprotected |
Notifies the observers about an operation on an instance resource.
This function is called internally to notify the subscribed observers about an operation on an instance resource. The type of operation (read, write, replace, execute) is specified by the 'type' parameter.
| inst | The instance object on which the operation is performed. |
| resId | The resource link of the instance resource. |
| type | The type of operation. |
Definition at line 78 of file InstSubject.h.
Here is the caller graph for this function:
|
inline |
Subscribes an observer to receive notifications about instance resource operations.
The observer will be notified when there are write, delete, replace, and execute operations on instance resources initiated by the server.
| observer | A pointer to the observer object. |
Definition at line 30 of file InstSubject.h.
|
inline |
Unsubscribes an observer from receiving notifications about instance resource operations.
| observer | A pointer to the observer object. |
Definition at line 41 of file InstSubject.h.