libiec61850  1.2.0
Functions
MmsVariableSpecification data type specifications

Functions

void MmsVariableSpecification_destroy (MmsVariableSpecification *self)
 Delete MmsTypeSpecification object (recursive). More...
 
MmsValueMmsVariableSpecification_getChildValue (MmsVariableSpecification *self, MmsValue *value, const char *childId)
 Get the corresponding child of value according to childId. More...
 
MmsVariableSpecification * MmsVariableSpecification_getNamedVariableRecursive (MmsVariableSpecification *self, const char *nameId)
 Get the child of self specified by its relative name. More...
 
MmsType MmsVariableSpecification_getType (MmsVariableSpecification *self)
 get the MMS type of the variable More...
 
bool MmsVariableSpecification_isValueOfType (MmsVariableSpecification *self, MmsValue *value)
 Check if the value has exactly the same type as this variable specfication. More...
 
const char * MmsVariableSpecification_getName (MmsVariableSpecification *self)
 get the name of the variable More...
 
LinkedList MmsVariableSpecification_getStructureElements (MmsVariableSpecification *self)
 
int MmsVariableSpecification_getSize (MmsVariableSpecification *self)
 returns the number of elements if the type is a complex type (structure, array) or the bit size of integers, unsigned integers, floats, bit strings, visible and MMS strings and octet strings. More...
 
MmsVariableSpecification * MmsVariableSpecification_getChildSpecificationByIndex (MmsVariableSpecification *self, int index)
 
MmsVariableSpecification * MmsVariableSpecification_getChildSpecificationByName (MmsVariableSpecification *self, const char *name, int *index)
 return the MmsVariableSpecification of a structure element with the given name More...
 
MmsVariableSpecification * MmsVariableSpecification_getArrayElementSpecification (MmsVariableSpecification *self)
 
int MmsVariableSpecification_getExponentWidth (MmsVariableSpecification *self)
 

Detailed Description

Function Documentation

void MmsVariableSpecification_destroy ( MmsVariableSpecification *  self)

Delete MmsTypeSpecification object (recursive).

Parameters
selfthe MmsVariableSpecification instance
MmsVariableSpecification* MmsVariableSpecification_getArrayElementSpecification ( MmsVariableSpecification *  self)
MmsVariableSpecification* MmsVariableSpecification_getChildSpecificationByIndex ( MmsVariableSpecification *  self,
int  index 
)
MmsVariableSpecification* MmsVariableSpecification_getChildSpecificationByName ( MmsVariableSpecification *  self,
const char *  name,
int *  index 
)

return the MmsVariableSpecification of a structure element with the given name

Parameters
selfthe MmsVariableSpecification object
namethe name of the component (structure element)
index(OUT) if not NULL the index of the structure element will be stored there
Returns
the type specification of the component or NULL if the component was not found
MmsValue* MmsVariableSpecification_getChildValue ( MmsVariableSpecification *  self,
MmsValue value,
const char *  childId 
)

Get the corresponding child of value according to childId.

This function assumes that value is the corresponding value of the MMS variable self. Given the relative name of a child of self this function returns the corresponding child of the value object. Note: the child name has to be provided in MMS mapping syntax (with "$" sign as separator between path name elements!

Parameters
selfthe MmsVariableSpecification instance
valuethe MmsValue instance
childIdthe relative MMS name to the child MMS variable (with "$" separators!)
int MmsVariableSpecification_getExponentWidth ( MmsVariableSpecification *  self)
const char* MmsVariableSpecification_getName ( MmsVariableSpecification *  self)

get the name of the variable

Note: the return string is only valid as long as the MmsVariableSpecification instance exists!

Parameters
selfthe MmsVariableSpecification instance
Returns
the name of the variable
MmsVariableSpecification* MmsVariableSpecification_getNamedVariableRecursive ( MmsVariableSpecification *  self,
const char *  nameId 
)

Get the child of self specified by its relative name.

Parameters
selfthe MmsVariableSpecification instance
nameIdthe relative MMS name to the child MMS variable (with "$" separators!)
Returns
the variable specification of the child or NULL if not existing.
int MmsVariableSpecification_getSize ( MmsVariableSpecification *  self)

returns the number of elements if the type is a complex type (structure, array) or the bit size of integers, unsigned integers, floats, bit strings, visible and MMS strings and octet strings.

Parameters
selfthe MmsVariableSpecification object
Returns
the number of elements or -1 if not applicable
LinkedList MmsVariableSpecification_getStructureElements ( MmsVariableSpecification *  self)
MmsType MmsVariableSpecification_getType ( MmsVariableSpecification *  self)

get the MMS type of the variable

Parameters
selfthe MmsVariableSpecification instance
Returns
the MMS type of the variable
bool MmsVariableSpecification_isValueOfType ( MmsVariableSpecification *  self,
MmsValue value 
)

Check if the value has exactly the same type as this variable specfication.

Parameters
selfthe MmsVariableSpecification instance
valuethe value to check
Returns
true if type is matching, false otherwise