SCA

SDO List API

SDO List API

Function Index

int getCountList (SDOLIST l)
 Returns the length of the argument SDOLIST. More...
 
void setList (DATAOBJECT pdo, SDOPROPERTY p, SDOLIST list)
 Sets the value(s) of the supplied property to the members of the supplied list. More...
 
DATAOBJECT getDataObjectList (SDOLIST l, int index)
 Returns the dataobject at the specified index in the supplied SDOLIST. More...
 
void appendDataObjectList (SDOLIST list, DATAOBJECT pdo)
 Appends the argument dataobject to the supplied SDOLIST. More...
 
char * getStringList (SDOLIST list, int index)
 Returns the string at the specified index in the supplied SDOLIST of string values.
 
void appendStringList (SDOLIST list, char *str)
 Appends the argument string to the supplied SDOLIST. More...
 
SDOTYPE getTypeList (SDOLIST plist, int index)
 Returns the SDOTYPE at the specified index in the supplied SDOLIST of SDOTYPE objects.
 
SDOLIST listAlloc ()
 Extension function for creating a list. More...
 

Function Details

int getCountList ( SDOLIST  l)

Returns the length of the argument SDOLIST.

Parameters
lSDOLIST to return length for
void setList ( DATAOBJECT  pdo,
SDOPROPERTY  p,
SDOLIST  list 
)

Sets the value(s) of the supplied property to the members of the supplied list.

Parameters
pdodataobject to set value(s) for
pSDOPROPERTY to set values(s) for
listSDOLIST of values to set
DATAOBJECT getDataObjectList ( SDOLIST  l,
int  index 
)

Returns the dataobject at the specified index in the supplied SDOLIST.

Parameters
lSDOLIST containing dataobject to return
indexof dataobject on l to return
void appendDataObjectList ( SDOLIST  list,
DATAOBJECT  pdo 
)

Appends the argument dataobject to the supplied SDOLIST.

TODO: re-check/test case

Parameters
lSDOLIST to append to
pdodataobject to append
void appendStringList ( SDOLIST  list,
char *  str 
)

Appends the argument string to the supplied SDOLIST.

Note that a list of strings is internally represented as a list of dataobjects with string simple type.

Parameters
listlist obtained by a prior call to getList()
strstring value to append as list item
SDOLIST listAlloc ( )

Extension function for creating a list.

TODO: SDO API doesn't have a list constructor/assumes SDOLIST is allocated statically (and extended dynamically)