SCA

SDO Data API

SDO Data API
API Usage Examples

Function Index

DATAOBJECT allocDataObject (DATAOBJECT pdo, SDOPROPERTY p)
 Creates a dataobject having the type of the specified property. More...
 
SDOLIST getList (DATAOBJECT pdo, SDOPROPERTY p)
 Returns a list of dataobjects for the specified many-valued property set on the argument dataobject. More...
 
void setDataObject (DATAOBJECT pdo, SDOPROPERTY p, DATAOBJECT v)
 Sets the specified property of the argument dataobject to the supplied dataobject value. More...
 
DATAOBJECT getDataObject (DATAOBJECT pdo, SDOPROPERTY p)
 Returns the argument dataobject's property instance of the supplied property as a dataobject. More...
 
void setInt (DATAOBJECT pdo, SDOPROPERTY p, int i)
 Sets the supplied property of the argument dataobject to the supplied int value. More...
 
int getInt (DATAOBJECT pdo, SDOPROPERTY p)
 Returns the argument dataobject's property instance of the supplied property as an ìnt. More...
 
void setCString (DATAOBJECT pdo, SDOPROPERTY p, char *str)
 Sets the supplied property of the argument dataobject to the supplied char * value. More...
 
char * getCString (DATAOBJECT pdo, SDOPROPERTY p)
 Returns the argument dataobject's property instance of the supplied property as char *. More...
 
int setDataObjectByName (DATAOBJECT pdo, char *path, DATAOBJECT value)
 Sets the given named property to the argument value dataobject. More...
 
DATAOBJECT getDataObjectByName (DATAOBJECT pdo, char *path)
 Returns the value of the named property of the argument dataobject. More...
 
void setIntByName (DATAOBJECT pdo, char *name, int value)
 Sets the property with the supplied name of the argument dataobject to the supplied int value. More...
 
int getIntByName (DATAOBJECT pdo, char *name)
 Returns the argument dataobject's property instance with the supplied name as int value. More...
 
void setCStringByName (DATAOBJECT pdo, char *name, char *value)
 Sets the property with the supplied name of the argument dataobject to the supplied char * value. More...
 
char * getCStringByName (DATAOBJECT pdo, char *name)
 Returns the argument dataobject's property instance with the supplied name as char * value. More...
 

Function Details

DATAOBJECT allocDataObject ( DATAOBJECT  pdo,
SDOPROPERTY  p 
)

Creates a dataobject having the type of the specified property.

Note that the first parameter is ignored, and only provided for SDO API compatibility.

Parameters
pdounused
pSDOPROPERTY to create dataobject for
SDOLIST getList ( DATAOBJECT  pdo,
SDOPROPERTY  p 
)

Returns a list of dataobjects for the specified many-valued property set on the argument dataobject.

Parameters
pdodataobject to return property value(s) for
pSDOPROPERTY of dataobject to return value(s) for
Returns
a potentially empty list of property values, or 0 if p isn't defined on the dataobject's type or isn't defined as many-valued property
void setDataObject ( DATAOBJECT  pdo,
SDOPROPERTY  p,
DATAOBJECT  v 
)

Sets the specified property of the argument dataobject to the supplied dataobject value.

Parameters
pdodataobject to set property on
pSDOPROPERY to set
vdataobject to set as value
DATAOBJECT getDataObject ( DATAOBJECT  pdo,
SDOPROPERTY  p 
)

Returns the argument dataobject's property instance of the supplied property as a dataobject.

Parameters
pdodataobject to return property value for
pSDOPROPERTY of dataobject to return value for
void setInt ( DATAOBJECT  pdo,
SDOPROPERTY  p,
int  i 
)

Sets the supplied property of the argument dataobject to the supplied int value.

Parameters
pdodataobject to set value for
pSDOPROPERTY of dataobject to set
ivalue to set
int getInt ( DATAOBJECT  pdo,
SDOPROPERTY  p 
)

Returns the argument dataobject's property instance of the supplied property as an ìnt.

Parameters
pdodataobject to return property value for
pSDOPROPERTY of dataobject to return value for
void setCString ( DATAOBJECT  pdo,
SDOPROPERTY  p,
char *  str 
)

Sets the supplied property of the argument dataobject to the supplied char * value.

Parameters
pdodataobject to set value for
pSDOPROPERTY of dataobject to set
strvalue to set
char* getCString ( DATAOBJECT  pdo,
SDOPROPERTY  p 
)

Returns the argument dataobject's property instance of the supplied property as char *.

Parameters
pdodataobject to return property value for
pSDOPROPERTY of dataobject to return value for
int setDataObjectByName ( DATAOBJECT  pdo,
char *  path,
DATAOBJECT  value 
)

Sets the given named property to the argument value dataobject.

The property path/name used to locate the property (or properties, resp.) to set is looked up in pdo's type:

  • if it is found as name of a type property, the created value is added as a type property of pdo
  • otherwise, and if the object admits open content, is created as an instance property.; if the object doesn't admit open content, 0 is returned

TODO: simplistic append, ie. what about replacing values?

DATAOBJECT getDataObjectByName ( DATAOBJECT  pdo,
char *  path 
)

Returns the value of the named property of the argument dataobject.

Returns
the requested value as a dataobject; the returned value is resolved as type property, or, additionally, if the argument dataobject admits open content, as instance property; return 0 if a property having the desired name/path doesn't exist
void setIntByName ( DATAOBJECT  pdo,
char *  name,
int  value 
)

Sets the property with the supplied name of the argument dataobject to the supplied int value.

Parameters
pdodataobject to set value for
namename of property to set
valuevalue to set
int getIntByName ( DATAOBJECT  pdo,
char *  name 
)

Returns the argument dataobject's property instance with the supplied name as int value.

Parameters
pdodataobject to return property value for
nameproperty name of dataobject to return value for
void setCStringByName ( DATAOBJECT  pdo,
char *  name,
char *  value 
)

Sets the property with the supplied name of the argument dataobject to the supplied char * value.

Parameters
pdodataobject to set value for
namename of property to set
valuevalue to set
char* getCStringByName ( DATAOBJECT  pdo,
char *  name 
)

Returns the argument dataobject's property instance with the supplied name as char * value.

Parameters
pdodataobject to return property value for
nameproperty name of dataobject to return value for