16 #define SERVER_URI_MAX_SIZE 255
18 #define SMS_BIND_KEY_PARAMS_SIZE 6
22 #define TAG "Lwm2mSecurity"
49 if (!inst)
return NULL;
55 if (!inst)
return NULL;
80 void Lwm2mSecurity::resourcesCreate() {
128 void Lwm2mSecurity::resourcesInit() {
194 resource(OSCORE_SECURITY_MODE_17)->
set<OBJ_LINK_T>({});
#define SERVER_URI_MAX_SIZE
#define SINGLE_INSTANCE_ID
void operationNotify(Instance &inst, const ResLink &resLink, ItemOp::TYPE type)
Notifies the observers about an operation on an instance resource.
Instance is interface class that implements manipulation with derived class resources....
void notifyResChanged(ID_T resId, ID_T resInstId=ID_T_MAX_VAL)
Notify server about resource value change.
static Object & object(WppClient &ctx)
Gets the Object reference.
Lwm2mSecurity(lwm2m_context_t &context, const OBJ_LINK_T &id)
static Lwm2mSecurity * createInst(WppClient &ctx, ID_T instId=ID_T_MAX_VAL)
Creates an instance of the object.
static Lwm2mSecurity * instance(WppClient &ctx, ID_T instId=ID_T_MAX_VAL)
Gets an instance of the object.
static bool removeInst(WppClient &ctx, ID_T instId)
Removes an instance of the object.
void userOperationNotifier(ItemOp::TYPE type, const ResLink &resLink) override
This method must be implemented by the derived class, and handle information about resource operation...
@ CLIENT_HOLD_OFF_TIME_11
@ BOOTSTRAP_SERVER_ACCOUNT_TIMEOUT_12
@ PUBLIC_KEY_OR_IDENTITY_3
void serverOperationNotifier(Instance *securityInst, ItemOp::TYPE type, const ResLink &resLink) override
This method must be implemented by the derived class, and handle information about resource operation...
The Object class implements manipulation with Instance interface class and its inheritors.
Instance * instance(ID_T instanceID=ID_T_MAX_VAL)
Gets an instance of the object.
virtual Instance * createInstance(ID_T instanceID=ID_T_MAX_VAL)=0
Creates an instance of the object.
bool remove(ID_T instanceID)
Removes an instance of the object.
void setupResources(const std::vector< Resource > &resources)
This methods setup resources list.
Resource * resource(ID_T resId)
This method return resource ptr if it exists. If resources does not exist then return NULL.
std::vector< Resource > & resources()
This method return list with all resources that has been defined.
bool set(const T &value, ID_T resInstId=SINGLE_INSTANCE_ID)
Set data value by copy for the resource (instance)
bool setDataVerifier(const DATA_VERIFIER_T &verifier)
Set data verifier for the resource.
Represents a client interface for Wpp library.
WppRegistry & registry()
Gets the WppRegistry associated with the WppClient.
The WppConnection class represents a connection interface for the Wpp library.
bool BOOL_T
Wpp data types bindings.
std::function< bool(const STRING_T &)> VERIFY_STRING_T
std::function< bool(const INT_T &)> VERIFY_INT_T
Data validation function types.
std::function< bool(const UINT_T &)> VERIFY_UINT_T
std::vector< uint8_t > OPAQUE_T
Opaque - represent buffer or string as lwm2m_data_t.value.asBuffer.
std::function< bool(const OPAQUE_T &)> VERIFY_OPAQUE_T
The ItemOp struct represents the operations that can be performed on a instance/resource.
TYPE
Enum representing the different types of operations.
ObjLink - (object ID):(instance ID), example: 1:3. Represent as two integers in lwm2m_data_t....