ANSI C UA Server SDK
1.5.3.333
|
Data Structures | |
struct | UaBase_Vector |
Vector structure. More... | |
Functions | |
OpcUa_StatusCode | UaBase_Vector_Initialize (UaBase_Vector *pV, unsigned int size, unsigned int grow) |
Initializes the vector structure. More... | |
void | UaBase_Vector_Clear (UaBase_Vector *pV) |
Clears the vector structure. More... | |
unsigned int | UaBase_Vector_Add (UaBase_Vector *pV, void *pData) |
Adds an element to the vector. More... | |
OpcUa_StatusCode | UaBase_Vector_RemoveAt (UaBase_Vector *pV, unsigned int iIndex) |
OpcUa_StatusCode | UaBase_Vector_RemoveAt_Ex (UaBase_Vector *pV, unsigned int iIndex) |
Removes an element from the vector at the given index. More... | |
OpcUa_StatusCode | UaBase_Vector_Set (UaBase_Vector *pV, unsigned int iIndex, void *pData) |
Sets an element at the given index. More... | |
void * | UaBase_Vector_Get (UaBase_Vector *pV, unsigned int iIndex) |
Returns the value at the given index. More... | |
unsigned int | UaBase_Vector_GetSize (UaBase_Vector *pV) |
Returns the current size of the vector. More... | |
OpcUa_StatusCode | UaBase_Vector_Resize (UaBase_Vector *pV, unsigned int size) |
Resize the vector. More... | |
unsigned int UaBase_Vector_Add | ( | UaBase_Vector * | pV, |
void * | pData | ||
) |
Adds an element to the vector.
This method can let the vector grow.
pV | Pointer to the vector object to work on. |
pData | [in] The data for the Vector generation. |
void UaBase_Vector_Clear | ( | UaBase_Vector * | pV | ) |
Clears the vector structure.
pV | Pointer to the vector object to work on. |
void * UaBase_Vector_Get | ( | UaBase_Vector * | pV, |
unsigned int | iIndex | ||
) |
Returns the value at the given index.
pV | Pointer to the vector object to work on. |
iIndex | index where the value is stored. |
unsigned int UaBase_Vector_GetSize | ( | UaBase_Vector * | pV | ) |
Returns the current size of the vector.
pV | Pointer to the vector object to work on. |
OpcUa_StatusCode UaBase_Vector_Initialize | ( | UaBase_Vector * | pV, |
unsigned int | size, | ||
unsigned int | grow | ||
) |
Initializes the vector structure.
The vector is an array like container that can grow dynamically. It stores pointers to objects.
pV | Pointer to the vector object to work on. |
size | Initial size of the vector in number of elements, not bytes. |
grow | The number of elements the vector should grow when it needs to be reallocated. |
OpcUa_StatusCode UaBase_Vector_RemoveAt | ( | UaBase_Vector * | pV, |
unsigned int | iIndex | ||
) |
We recommend to use the more efficient UaBase_Vector_RemoveAt_Ex
pV | Pointer to the vector object to work on. |
iIndex | index where the value is stored. |
OpcUa_StatusCode UaBase_Vector_RemoveAt_Ex | ( | UaBase_Vector * | pV, |
unsigned int | iIndex | ||
) |
Removes an element from the vector at the given index.
pV | Pointer to the vector object to work on. |
iIndex | index where the value is stored. |
OpcUa_StatusCode UaBase_Vector_Resize | ( | UaBase_Vector * | pV, |
unsigned int | size | ||
) |
Resize the vector.
pV | Pointer to the vector object to work on. |
size | New maximum size of the vector in number of elements. |
OpcUa_StatusCode UaBase_Vector_Set | ( | UaBase_Vector * | pV, |
unsigned int | iIndex, | ||
void * | pData | ||
) |
Sets an element at the given index.
This method doesn't change the size of the vector. It's up to you to write to a valid index.
pV | Pointer to the vector object to work on. |
iIndex | index where the value is stored. |
pData | [in] The data for the Vector generation. |