Awa LWM2M C API (0.2.5)  
Functions
AwaObjectDefinition_AddResourceDefinitionAs___

Add a Resource Definition to an existing Object Definition. More...

Functions

AwaError AwaObjectDefinition_AddResourceDefinitionAsString (AwaObjectDefinition *objectDefinition, AwaResourceID resourceID, const char *resourceName, bool isMandatory, AwaResourceOperations operations, const char *defaultValue)
 
AwaError AwaObjectDefinition_AddResourceDefinitionAsInteger (AwaObjectDefinition *objectDefinition, AwaResourceID resourceID, const char *resourceName, bool isMandatory, AwaResourceOperations operations, AwaInteger defaultValue)
 
AwaError AwaObjectDefinition_AddResourceDefinitionAsFloat (AwaObjectDefinition *objectDefinition, AwaResourceID resourceID, const char *resourceName, bool isMandatory, AwaResourceOperations operations, AwaFloat defaultValue)
 
AwaError AwaObjectDefinition_AddResourceDefinitionAsBoolean (AwaObjectDefinition *objectDefinition, AwaResourceID resourceID, const char *resourceName, bool isMandatory, AwaResourceOperations operations, AwaBoolean defaultValue)
 
AwaError AwaObjectDefinition_AddResourceDefinitionAsOpaque (AwaObjectDefinition *objectDefinition, AwaResourceID resourceID, const char *resourceName, bool isMandatory, AwaResourceOperations operations, AwaOpaque defaultValue)
 
AwaError AwaObjectDefinition_AddResourceDefinitionAsTime (AwaObjectDefinition *objectDefinition, AwaResourceID resourceID, const char *resourceName, bool isMandatory, AwaResourceOperations operations, AwaTime defaultValue)
 
AwaError AwaObjectDefinition_AddResourceDefinitionAsObjectLink (AwaObjectDefinition *objectDefinition, AwaResourceID resourceID, const char *resourceName, bool isMandatory, AwaResourceOperations operations, AwaObjectLink defaultValue)
 

Detailed Description

Add a Resource Definition to an existing Object Definition.

Paths are not used here as Object Instance IDs are not relevant.

Parameters
[in]objectDefinitionA pointer to an Object Definition to add the Resource Definition to.
[in]resourceIDThe numeric resource ID to define.
[in]resourceNameA descriptive name that is used to describe the Resource.
[in]isMandatorywhether or not object instances must contain this resource. If not, this is an optional resource which must be created within its object instance before being used.
[in]operationsThe valid operations allowed on this resource.
[in]defaultThe default value for created resources, and the value which a mandatory resource will be set to if a delete operation is called upon the resource.
Returns
AwaError_Success on success.
AwaError_DefinitionInvalid if the Object Definition is not valid.
AwaError_AlreadyDefined if a Resource Definition already exists for the Object Definition with the same resourceID.
AwaError_IDInvalid if resourceID is negative or larger than AWA_MAX_ID.
AwaError_OutOfMemory if there is not enough memory to create the Resource Definition.

Function Documentation

AwaError AwaObjectDefinition_AddResourceDefinitionAsString ( AwaObjectDefinition objectDefinition,
AwaResourceID  resourceID,
const char *  resourceName,
bool  isMandatory,
AwaResourceOperations  operations,
const char *  defaultValue 
)
AwaError AwaObjectDefinition_AddResourceDefinitionAsInteger ( AwaObjectDefinition objectDefinition,
AwaResourceID  resourceID,
const char *  resourceName,
bool  isMandatory,
AwaResourceOperations  operations,
AwaInteger  defaultValue 
)
AwaError AwaObjectDefinition_AddResourceDefinitionAsFloat ( AwaObjectDefinition objectDefinition,
AwaResourceID  resourceID,
const char *  resourceName,
bool  isMandatory,
AwaResourceOperations  operations,
AwaFloat  defaultValue 
)
AwaError AwaObjectDefinition_AddResourceDefinitionAsBoolean ( AwaObjectDefinition objectDefinition,
AwaResourceID  resourceID,
const char *  resourceName,
bool  isMandatory,
AwaResourceOperations  operations,
AwaBoolean  defaultValue 
)
AwaError AwaObjectDefinition_AddResourceDefinitionAsOpaque ( AwaObjectDefinition objectDefinition,
AwaResourceID  resourceID,
const char *  resourceName,
bool  isMandatory,
AwaResourceOperations  operations,
AwaOpaque  defaultValue 
)
AwaError AwaObjectDefinition_AddResourceDefinitionAsTime ( AwaObjectDefinition objectDefinition,
AwaResourceID  resourceID,
const char *  resourceName,
bool  isMandatory,
AwaResourceOperations  operations,
AwaTime  defaultValue 
)
AwaError AwaObjectDefinition_AddResourceDefinitionAsObjectLink ( AwaObjectDefinition objectDefinition,
AwaResourceID  resourceID,
const char *  resourceName,
bool  isMandatory,
AwaResourceOperations  operations,
AwaObjectLink  defaultValue 
)