ANSI C Based OPC UA Client/Server SDK  1.9.0.430
UaBaseTurboList

Data Structures

struct  UaBase_TurboList
 TurboList structure. More...
 

Functions

UaBase_TurboListUaBase_TurboList_Create (OpcUa_UInt size)
 Creates and initializes a TurboList of requested size. More...
 
OpcUa_Void UaBase_TurboList_Delete (UaBase_TurboList *pList)
 This operation frees the TurboList and it's data. More...
 
OpcUa_Int UaBase_TurboList_Add (UaBase_TurboList *pList, OpcUa_Void *pData)
 Adds a new element to the TurboList. More...
 
OpcUa_Void * UaBase_TurboList_Get (UaBase_TurboList *pList, OpcUa_UInt iIndex)
 Retrieves the stored element at the given index. More...
 
OpcUa_Void * UaBase_TurboList_GetNext (UaBase_TurboList *pList, OpcUa_UInt *pIndex)
 Retrieves the next element starting at the given index. More...
 
OpcUa_Void * UaBase_TurboList_Remove (UaBase_TurboList *pList, OpcUa_UInt iIndex)
 Removes the stored element at the given index. More...
 
OpcUa_UInt UaBase_TurboList_GetSize (UaBase_TurboList *pList)
 Returns the number of elements in list. More...
 

Detailed Description

Function Documentation

OpcUa_Int UaBase_TurboList_Add ( UaBase_TurboList pList,
OpcUa_Void *  pData 
)

Adds a new element to the TurboList.

Parameters
pListPointer to the list.
pDataData to add to the list.
Returns
Index where element was stored or -1 if the list is full. Don't store NULL pointers in this list, because 0 is used to mark an element as free.
UaBase_TurboList * UaBase_TurboList_Create ( OpcUa_UInt  size)

Creates and initializes a TurboList of requested size.

Parameters
sizenumber of elements that can be stored in this list.
Returns
Pointer to the created list or 0 if malloc fails.
OpcUa_Void UaBase_TurboList_Delete ( UaBase_TurboList pList)

This operation frees the TurboList and it's data.

Parameters
pListPointer to the list.
OpcUa_Void * UaBase_TurboList_Get ( UaBase_TurboList pList,
OpcUa_UInt  iIndex 
)

Retrieves the stored element at the given index.

Parameters
pListPointer to the list.
iIndexIndex of the element to get.
Returns
Pointer to stored element or 0 if not found.
OpcUa_Void * UaBase_TurboList_GetNext ( UaBase_TurboList pList,
OpcUa_UInt *  pIndex 
)

Retrieves the next element starting at the given index.

Parameters
pListPointer to the list.
pIndexIndex from which the search for the next valid element is started. If an element is found, the element's index is stored in this variable. If no element is found, it is set to 0.
Returns
Pointer to the next stored element or 0 if no element was found.
OpcUa_UInt UaBase_TurboList_GetSize ( UaBase_TurboList pList)

Returns the number of elements in list.

Parameters
pListPointer to the list.
Returns
The number of elements in list.
OpcUa_Void * UaBase_TurboList_Remove ( UaBase_TurboList pList,
OpcUa_UInt  iIndex 
)

Removes the stored element at the given index.

Parameters
pListPointer to the list.
iIndexIndex of the element to remove.
Returns
Pointer to removed element or 0 if not found.