The Public User Struct API.
More...
The Public User Struct API.
◆ vxGetUserStructEnumByName()
#include <vx_api.h>
Returns the enum of the user-defined structure associated with the name given.
- Parameters
-
[in] | context | The reference to the implementation context. |
[in] | type_name | Pointer to the '\0' terminated string that identifies the user struct type. The length of the string shall be lower than VX_MAX_REFERENCE_NAME bytes. |
[out] | user_struct_type | The enumeration value of the user struct |
- Returns
- A
vx_status_e
enumeration.
- Return values
-
VX_SUCCESS | type_name was valid, and enumeration was found and returned |
VX_FAILURE | type_name does not match any user struct enumeration. |
- Precondition
vxRegisterUserStructWithName
should be called for this user struct.
◆ vxGetUserStructNameByEnum()
#include <vx_api.h>
Returns the name of the user-defined structure associated with the enumeration given.
- Parameters
-
[in] | context | The reference to the implementation context. |
[in] | user_struct_type | The enumeration value of the user struct |
[out] | type_name | Name of the user struct |
[in] | name_size | The size of allocated buffer pointed to by type_name |
- Returns
- A
vx_status_e
enumeration.
- Return values
-
VX_SUCCESS | user_struct_type was valid, and name was found and returned |
VX_ERROR_INVALID_PARAMETERS | user_struct_type was not a valid user struct enumeration. |
VX_ERROR_NO_MEMORY | name_size is too small to hold the name of the user struct type. |
VX_FAILURE | user_struct_type does not have an associated type name. |
- Precondition
vxRegisterUserStructWithName
should be called for this user struct.
◆ vxRegisterUserStruct()
#include <vx_api.h>
Registers user-defined structures to the context.
- Parameters
-
[in] | context | The reference to the implementation context. |
[in] | size | The size of user struct in bytes. |
- Returns
- A
vx_enum
value that is a type given to the User to refer to their custom structure when declaring a vx_array
of that structure.
- Return values
-
VX_TYPE_INVALID | If the namespace of types has been exhausted. |
- Note
- This call should only be used once within the lifetime of a context for a specific structure.
◆ vxRegisterUserStructWithName()
#include <vx_api.h>
Registers user-defined structures to the context, and associates a name to it.
- Parameters
-
[in] | context | The reference to the implementation context. |
[in] | size | The size of user struct in bytes. |
[in] | *type_name | Pointer to the '\0' terminated string that identifies the user struct type. The string is copied by the function so that it stays the property of the caller. NULL means that the user struct is not named. The length of the string shall be lower than VX_MAX_REFERENCE_NAME bytes. |
- Returns
- A
vx_enum
value that is a type given to the User to refer to their custom structure when declaring a vx_array
of that structure.
- Return values
-
VX_TYPE_INVALID | If the namespace of types has been exhausted. |
- Note
- This call should only be used once within the lifetime of a context for a specific structure.