|
Friendly LWM2M client
|
The ObjectImpl class is a template class that represents an implementation of an object in the Wakaama library. More...
#include <ObjectImpl.h>
Inheritance diagram for wpp::ObjectImpl< T >:
Collaboration diagram for wpp::ObjectImpl< T >:Public Member Functions | |
| ObjectImpl (lwm2m_context_t &context) | |
| ObjectImpl (lwm2m_context_t &context, const ObjectInfo &info) | |
| Constructs an ObjectImpl object. More... | |
| ~ObjectImpl () | |
| Instance * | createInstance (ID_T instanceID=ID_T_MAX_VAL) override |
| Creates a new instance of the object. More... | |
Public Member Functions inherited from wpp::Object | |
| Object (lwm2m_context_t &context) | |
| Object (lwm2m_context_t &context, const ObjectInfo &info) | |
| Constructs an Object instance. More... | |
| virtual | ~Object () |
| Destroys the Object instance. More... | |
| OBJ_ID | getObjectID () const |
| Gets the object ID. More... | |
| const ObjectInfo & | getObjectInfo () const |
| Gets the object information. More... | |
| lwm2m_object_t & | getLwm2mObject () |
| Gets the lwm2m_object_t object. More... | |
| lwm2m_context_t & | getContext () |
| Return context that can be used by derived class. More... | |
| WppClient & | getClient () |
| Helpfull methods to get client instances. More... | |
| WppRegistry & | getRegistry () |
| Helpfull methods to get registry instances. More... | |
| bool | remove (ID_T instanceID) |
| Removes an instance of the object. More... | |
| void | clear () |
| Clears the object. More... | |
| Instance * | instance (ID_T instanceID=ID_T_MAX_VAL) |
| Gets an instance of the object. More... | |
| const std::vector< Instance * > & | instances () |
| Gets all instances of the object. More... | |
| size_t | instanceCnt () |
| Gets the number of instances of the object. More... | |
| bool | isExist (ID_T instanceID) |
| Checks if an instance exists. More... | |
Public Member Functions inherited from wpp::ObjSubject | |
| void | opSubscribe (ObjOpObserver *observer) |
| Subscribes an observer to receive notifications about object operations. More... | |
| void | opUnsubscribe (ObjOpObserver *observer) |
| Unsubscribes an observer from receiving notifications about object operations. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from wpp::Object | |
| std::vector< Instance * >::iterator | getInstIter (ID_T instanceID) |
| Gets the iterator to the instance. More... | |
| ID_T | getFirstAvailableInstanceID () |
| Gets the first available instance ID. More... | |
Protected Member Functions inherited from wpp::ObjSubject | |
| void | operationNotify (Object &obj, ID_T instanceId, ItemOp::TYPE type) |
| Notifies observers about object operations. More... | |
Static Protected Member Functions inherited from wpp::Object | |
| static uint8_t | serverRead_clb (lwm2m_context_t *contextP, lwm2m_server_t *server, ID_T instanceId, int *numDataP, lwm2m_data_t **dataArrayP, lwm2m_object_t *objectP) |
| The read callback function for the Lwm2m core. More... | |
| static uint8_t | serverWrite_clb (lwm2m_context_t *contextP, lwm2m_server_t *server, ID_T instanceId, int numData, lwm2m_data_t *dataArray, lwm2m_object_t *objectP, lwm2m_write_type_t writeType) |
| The write callback function for the Lwm2m core. More... | |
| static uint8_t | serverExecute_clb (lwm2m_context_t *contextP, lwm2m_server_t *server, ID_T instanceId, ID_T resId, uint8_t *buffer, int length, lwm2m_object_t *objectP) |
| The execute callback function for the Lwm2m core. More... | |
| static uint8_t | serverDiscover_clb (lwm2m_context_t *contextP, lwm2m_server_t *server, ID_T instanceId, int *numDataP, lwm2m_data_t **dataArrayP, lwm2m_object_t *objectP) |
| The discover callback function for the Lwm2m core. More... | |
| static uint8_t | serverCreate_clb (lwm2m_context_t *contextP, lwm2m_server_t *server, ID_T instanceId, int numData, lwm2m_data_t *dataArray, lwm2m_object_t *objectP) |
| The create callback function for the Lwm2m core. More... | |
| static uint8_t | serverDelete_clb (lwm2m_context_t *contextP, lwm2m_server_t *server, ID_T instanceId, lwm2m_object_t *objectP) |
| The delete callback function for the Lwm2m core. More... | |
Protected Attributes inherited from wpp::Object | |
| std::vector< Instance * > | _instances |
| lwm2m_context_t & | _context |
| lwm2m_object_t | _lwm2m_object |
| ObjectInfo | _objInfo |
The ObjectImpl class is a template class that represents an implementation of an object in the Wakaama library.
| T | The type of the object. |
The ObjectImpl class provides functionality for creating and managing instances of the object. It inherits from the Object class and overrides its methods to provide the implementation specific to the object type. The ObjectImpl class is intended to be used as a base class for implementing custom objects in the Wakaama library.
Definition at line 25 of file ObjectImpl.h.
|
inline |
Default constructor.
Definition at line 30 of file ObjectImpl.h.
|
inline |
Constructs an ObjectImpl object.
| context | The lwm2m_context_t object. |
| info | The ObjectInfo object. |
Definition at line 36 of file ObjectImpl.h.
|
inline |
Definition at line 37 of file ObjectImpl.h.
|
overridevirtual |
Creates a new instance of the object.
| instanceID | The ID of the instance to create. Defaults to ID_T_MAX_VAL. |
Implements wpp::Object.
Definition at line 51 of file ObjectImpl.h.