Add a Resource Definition to an existing Object Definition.
More...
|
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) |
|
Add a Resource Definition to an existing Object Definition.
Paths are not used here as Object Instance IDs are not relevant.
- Parameters
-
[in] | objectDefinition | A pointer to an Object Definition to add the Resource Definition to. |
[in] | resourceID | The numeric resource ID to define. |
[in] | resourceName | A descriptive name that is used to describe the Resource. |
[in] | isMandatory | whether 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] | operations | The valid operations allowed on this resource. |
[in] | default | The 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.