Add a resource array definition to an existing Object Definition.
More...
|
AwaError | AwaObjectDefinition_AddResourceDefinitionAsStringArray (AwaObjectDefinition *objectDefinition, AwaResourceID resourceID, const char *resourceName, int minimumInstances, int maximumInstances, AwaResourceOperations operations, const AwaStringArray *defaultArray) |
|
AwaError | AwaObjectDefinition_AddResourceDefinitionAsIntegerArray (AwaObjectDefinition *objectDefinition, AwaResourceID resourceID, const char *resourceName, int minimumInstances, int maximumInstances, AwaResourceOperations operations, const AwaIntegerArray *defaultArray) |
|
AwaError | AwaObjectDefinition_AddResourceDefinitionAsFloatArray (AwaObjectDefinition *objectDefinition, AwaResourceID resourceID, const char *resourceName, int minimumInstances, int maximumInstances, AwaResourceOperations operations, const AwaFloatArray *defaultArray) |
|
AwaError | AwaObjectDefinition_AddResourceDefinitionAsBooleanArray (AwaObjectDefinition *objectDefinition, AwaResourceID resourceID, const char *resourceName, int minimumInstances, int maximumInstances, AwaResourceOperations operations, const AwaBooleanArray *defaultArray) |
|
AwaError | AwaObjectDefinition_AddResourceDefinitionAsTimeArray (AwaObjectDefinition *objectDefinition, AwaResourceID resourceID, const char *resourceName, int minimumInstances, int maximumInstances, AwaResourceOperations operations, const AwaTimeArray *defaultArray) |
|
AwaError | AwaObjectDefinition_AddResourceDefinitionAsOpaqueArray (AwaObjectDefinition *objectDefinition, AwaResourceID resourceID, const char *resourceName, int minimumInstances, int maximumInstances, AwaResourceOperations operations, const AwaOpaqueArray *defaultArray) |
|
AwaError | AwaObjectDefinition_AddResourceDefinitionAsObjectLinkArray (AwaObjectDefinition *objectDefinition, AwaResourceID resourceID, const char *resourceName, int minimumInstances, int maximumInstances, AwaResourceOperations operations, const AwaObjectLinkArray *defaultArray) |
|
Add a resource array 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] | minimumInstances | the minimum resource instances or array elements for the resource array. If minimumInstances is greater than zero, it is a mandatory resource. If minimumInstances is zero, this is an optional resource which must be created within its object instance before being used. |
[in] | maximumInstances | the maximum resource instances or array elements for the resource array. |
[in] | operations | The valid operations allowed on this resource. |
[in] | defaultArray | The default value for created resource arrays, and the value which a mandatory resource will be set to if a delete operation is called upon the entire resource array. |
- 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.