Friendly LWM2M client
wpp::WppRegistry Class Reference

The WppRegistry class represents a registry for managing LWM2M objects. More...

#include <WppRegistry.h>

+ Collaboration diagram for wpp::WppRegistry:

Public Member Functions

 WppRegistry (lwm2m_context_t &context)
 
 ~WppRegistry ()
 
 WppRegistry (const WppRegistry &)=delete
 
 WppRegistry (WppRegistry &&)=delete
 
WppRegistryoperator= (const WppRegistry &)=delete
 
WppRegistryoperator= (WppRegistry &&)=delete
 
bool registerObj (Object &object)
 Registers an Object in the registry. More...
 
bool deregisterObj (Object &object)
 Deregisters an Object from the registry. More...
 
bool isObjRegistered (Object &object)
 Checks if an Object is registered in the registry. More...
 
bool isExist (OBJ_ID objId)
 Checks if an Object with the given objId exists in the registry. More...
 
Objectobject (OBJ_ID objId)
 Retrieves a pointer to the Object with the given objId. More...
 
std::vector< Object * > & objects ()
 Gets all registered objects. More...
 
Objectdevice ()
 
Objectlwm2mServer ()
 
Objectlwm2mSecurity ()
 
ObjectconnectivityMonitoring ()
 
Objectlwm2mAccessControl ()
 
ObjectfirmwareUpdate ()
 

Detailed Description

The WppRegistry class represents a registry for managing LWM2M objects.

This class provides functionality to register, deregister, and access LWM2M objects. It also allows checking if an object is registered or exists in the registry. The registry can contain both mandatory and optional objects.

Note
This class is not copyable or movable.

Definition at line 53 of file WppRegistry.h.

Constructor & Destructor Documentation

◆ WppRegistry() [1/3]

wpp::WppRegistry::WppRegistry ( lwm2m_context_t &  context)
explicit

Definition at line 7 of file WppRegistry.cpp.

◆ ~WppRegistry()

wpp::WppRegistry::~WppRegistry ( )

Definition at line 38 of file WppRegistry.cpp.

◆ WppRegistry() [2/3]

wpp::WppRegistry::WppRegistry ( const WppRegistry )
delete

◆ WppRegistry() [3/3]

wpp::WppRegistry::WppRegistry ( WppRegistry &&  )
delete

Member Function Documentation

◆ connectivityMonitoring()

Object & wpp::WppRegistry::connectivityMonitoring ( )

Definition at line 94 of file WppRegistry.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deregisterObj()

bool wpp::WppRegistry::deregisterObj ( Object object)

Deregisters an Object from the registry.

Parameters
objectThe Object to deregister.
Returns
True if the deregistration is successful, false otherwise.

Definition at line 50 of file WppRegistry.cpp.

◆ device()

Object & wpp::WppRegistry::device ( )

Definition at line 76 of file WppRegistry.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ firmwareUpdate()

Object & wpp::WppRegistry::firmwareUpdate ( )

Definition at line 109 of file WppRegistry.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isExist()

bool wpp::WppRegistry::isExist ( OBJ_ID  objId)

Checks if an Object with the given objId exists in the registry.

Parameters
objIdThe ID of the Object to check.
Returns
True if the Object exists, false otherwise.

Definition at line 60 of file WppRegistry.cpp.

+ Here is the call graph for this function:

◆ isObjRegistered()

bool wpp::WppRegistry::isObjRegistered ( Object object)

Checks if an Object is registered in the registry.

Parameters
objectThe Object to check.
Returns
True if the Object is registered, false otherwise.

Definition at line 55 of file WppRegistry.cpp.

◆ lwm2mAccessControl()

Object & wpp::WppRegistry::lwm2mAccessControl ( )

Definition at line 99 of file WppRegistry.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lwm2mSecurity()

Object & wpp::WppRegistry::lwm2mSecurity ( )

Definition at line 86 of file WppRegistry.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lwm2mServer()

Object & wpp::WppRegistry::lwm2mServer ( )

Definition at line 81 of file WppRegistry.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ object()

Object * wpp::WppRegistry::object ( OBJ_ID  objId)

Retrieves a pointer to the Object with the given objId.

Parameters
objIdThe ID of the Object to retrieve.
Returns
A pointer to the Object if found, nullptr otherwise.

Definition at line 64 of file WppRegistry.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ objects()

std::vector< Object * > & wpp::WppRegistry::objects ( )

Gets all registered objects.

Returns
A vector of pointers to the registered objects.

Definition at line 70 of file WppRegistry.cpp.

◆ operator=() [1/2]

WppRegistry& wpp::WppRegistry::operator= ( const WppRegistry )
delete

◆ operator=() [2/2]

WppRegistry& wpp::WppRegistry::operator= ( WppRegistry &&  )
delete

◆ registerObj()

bool wpp::WppRegistry::registerObj ( Object object)

Registers an Object in the registry.

Parameters
objectThe Object to register.
Returns
True if the registration is successful, false otherwise.

Definition at line 45 of file WppRegistry.cpp.