8 #ifndef WPP_OBJECT_IMPL_H_
9 #define WPP_OBJECT_IMPL_H_
54 WPP_LOGW(
TAG_WPP_OBJ,
"Not possible to create instance %d:%d, object is single", getObjectID(), instanceId);
58 if (instanceId ==
ID_T_MAX_VAL) instanceId = getFirstAvailableInstanceID();
61 WPP_LOGW(
TAG_WPP_OBJ,
"Not possible to create instance %d:%d, ID has been already occupied", getObjectID(), instanceId);
67 lwm2m_list_t *element =
new lwm2m_list_t;
68 if (NULL == element)
return NULL;
70 element->id = instanceId;
71 _lwm2m_object.instanceList = LWM2M_LIST_ADD(_lwm2m_object.instanceList, element);
75 T *inst =
new T(_context, {(
ID_T)_objInfo.objID, instanceId});
76 _instances.push_back(inst);
79 lwm2m_update_registration(&getContext(), 0,
false,
true);
#define WPP_LOGW(TAG, FMT,...)
#define WPP_LOGD(TAG, FMT,...)
Instance is interface class that implements manipulation with derived class resources....
The ObjectImpl class is a template class that represents an implementation of an object in the Wakaam...
Instance * createInstance(ID_T instanceID=ID_T_MAX_VAL) override
Creates a new instance of the object.
ObjectImpl(lwm2m_context_t &context, const ObjectInfo &info)
Constructs an ObjectImpl object.
ObjectImpl(lwm2m_context_t &context)
The Object class implements manipulation with Instance interface class and its inheritors.
The WppConnection class represents a connection interface for the Wpp library.
The ObjectInfo struct represents information about an object in the Wakaama data model.