libIEC61850
Open-source IEC 61850 MMS server and client library
|
Data Structures | |
struct | sMmsDomain |
struct | sMmsNamedVariableList |
Typedefs | |
typedef struct sIedServer * | IedServer |
typedef bool(* | ControlHandler )(void *parameter, MmsValue *ctlVal) |
Functions | |
IedServer | IedServer_create (IedModel *iedModel) |
void | IedServer_destroy (IedServer self) |
void | IedServer_start (IedServer self, int tcpPort) |
void | IedServer_stop (IedServer self) |
bool | IedServer_isRunning (IedServer self) |
MmsValue * | IedServer_getAttributeValue (IedServer self, ModelNode *node) |
void | IedServer_updateAttributeValue (IedServer self, DataAttribute *node, MmsValue *value) |
void | IedServer_setControlHandler (IedServer self, DataObject *node, ControlHandler handler, void *parameter) |
void | IedServer_lockDataModel (IedServer self) |
void | IedServer_unlockDataModel (IedServer self) |
MmsDomain * | MmsDomain_create (char *domainName) |
char * | MmsDomain_getName (MmsDomain *self) |
void | MmsDomain_destroy (MmsDomain *self) |
bool | MmsDomain_addNamedVariableList (MmsDomain *self, MmsNamedVariableList variableList) |
void | MmsDomain_deleteNamedVariableList (MmsDomain *self, char *variableListName) |
MmsNamedVariableList | MmsDomain_getNamedVariableList (MmsDomain *self, char *variableListName) |
LinkedList | MmsDomain_getNamedVariableLists (MmsDomain *self) |
LinkedList | MmsDomain_getNamedVariableListValues (MmsDomain *self, char *variableListName) |
LinkedList | MmsDomain_createNamedVariableListValues (MmsDomain *self, char *variableListName) |
MmsTypeSpecification * | MmsDomain_getNamedVariable (MmsDomain *domain, char *nameId) |
MmsNamedVariableListEntry | MmsNamedVariableListEntry_create (MmsAccessSpecifier accessSpecifier) |
void | MmsNamedVariableListEntry_destroy (MmsNamedVariableListEntry self) |
MmsDomain * | MmsNamedVariableListEntry_getDomain (MmsNamedVariableListEntry self) |
char * | MmsNamedVariableListEntry_getVariableName (MmsNamedVariableListEntry self) |
MmsNamedVariableList | MmsNamedVariableList_create (char *name, bool deletable) |
char * | MmsNamedVariableList_getName (MmsNamedVariableList self) |
bool | MmsNamedVariableList_isDeletable (MmsNamedVariableList self) |
void | MmsNamedVariableList_addVariable (MmsNamedVariableList self, MmsNamedVariableListEntry variable) |
LinkedList | MmsNamedVariableList_getVariableList (MmsNamedVariableList self) |
void | MmsNamedVariableList_destroy (MmsNamedVariableList self) |
typedef bool(* ControlHandler)(void *parameter, MmsValue *ctlVal) |
User provided callback function for the control model. It will be invoked when a control operation happens (Oper, SBOw).
parameter | the parameter that was specified when setting the control handler |
ctlVal | the control value of the control operation. |
typedef struct sIedServer* IedServer |
IedServer IedServer_create | ( | IedModel * | iedModel | ) |
Create a new IedServer instance
iedModel | reference to the IedModel data structure to be used as IEC 61850 model of the device |
void IedServer_destroy | ( | IedServer | self | ) |
Destroy an IedServer instance and release all resources (memory, TCP sockets)
self | the instance of IedServer to operate on. |
MmsValue* IedServer_getAttributeValue | ( | IedServer | self, |
ModelNode * | node | ||
) |
Get the MmsValue object of an MMS Named Variable that is part of the device model. You should not manipulate the received object directly. Instead you should use the IedServer_updateValue method.
self | the instance of IedServer to operate on. |
node | the data attribute handle |
bool IedServer_isRunning | ( | IedServer | self | ) |
Check if IedServer instance is listening for client connections
self | the instance of IedServer to operate on. |
void IedServer_lockDataModel | ( | IedServer | self | ) |
Lock the MMS server data model. Client requests will be postponed until the lock is removed
self | the instance of IedServer to operate on. |
void IedServer_setControlHandler | ( | IedServer | self, |
DataObject * | node, | ||
ControlHandler | handler, | ||
void * | parameter | ||
) |
Set control handler for controllable data object
This functions sets a user provided control handler for a data object. The data object has to be an instance of a controllable CDC (Common Data Class) like e.g. SPC, DPC or APC. The control handler is a callback function that will be called by the IEC server when a client invokes a control operation on the data object.
self | the instance of IedServer to operate on. |
node | the controllable data object handle |
handler | a callback function of type ControlHandler |
parameter | a user provided parameter that is passed to the control handler. |
void IedServer_start | ( | IedServer | self, |
int | tcpPort | ||
) |
Start handling client connections
self | the instance of IedServer to operate on. |
tcpPort | the TCP port the server is listening |
void IedServer_stop | ( | IedServer | self | ) |
Stop handling client connections
self | the instance of IedServer to operate on. |
void IedServer_unlockDataModel | ( | IedServer | self | ) |
Unlock the MMS server data model and process pending client requests.
self | the instance of IedServer to operate on. |
void IedServer_updateAttributeValue | ( | IedServer | self, |
DataAttribute * | node, | ||
MmsValue * | value | ||
) |
Update the MmsValue object of an IEC 61850 data attribute.
The data attribute handle of type ModelNode* are imported with static_model.h. You should use this function instead of directly operating on the MmsValue instance that is hold by the MMS server. Otherwise the IEC 61850 server is not aware of the changed value and will e.g. not generate a report.
self | the instance of IedServer to operate on. |
node | the data attribute handle |
value | MmsValue object used to update the value cached by the server. |
bool MmsDomain_addNamedVariableList | ( | MmsDomain * | self, |
MmsNamedVariableList | variableList | ||
) |
Add a new MMS Named Variable List (Data set) to a MmsDomain instance
The passed MmsNamedVariableList instance will be handled by the MmsDomain instance and will be destroyed if the MmsDomain_destroy function on this MmsDomain instance is called.
self | instance of MmsDomain to operate on |
variableList | new named variable list that will be added to this MmsDomain |
if operation was successful.
MmsDomain* MmsDomain_create | ( | char * | domainName | ) |
Create a new MmsDomain instance
This method should not be invoked by client code!
LinkedList MmsDomain_createNamedVariableListValues | ( | MmsDomain * | self, |
char * | variableListName | ||
) |
void MmsDomain_deleteNamedVariableList | ( | MmsDomain * | self, |
char * | variableListName | ||
) |
Delete a MMS Named Variable List from this MmsDomain instance
A call to this function will also destroy the MmsNamedVariableList instance.
self | instance of MmsDomain to operate on |
variableListName | the name of the variable list to delete. |
void MmsDomain_destroy | ( | MmsDomain * | self | ) |
Delete a MmsDomain instance
This method should not be invoked by client code!
char* MmsDomain_getName | ( | MmsDomain * | self | ) |
MmsTypeSpecification* MmsDomain_getNamedVariable | ( | MmsDomain * | domain, |
char * | nameId | ||
) |
Get the MmsTypeSpecification instance of a MMS named variable
self | instance of MmsDomain to operate on |
nameId | name of the named variable |
MmsNamedVariableList MmsDomain_getNamedVariableList | ( | MmsDomain * | self, |
char * | variableListName | ||
) |
LinkedList MmsDomain_getNamedVariableLists | ( | MmsDomain * | self | ) |
LinkedList MmsDomain_getNamedVariableListValues | ( | MmsDomain * | self, |
char * | variableListName | ||
) |
void MmsNamedVariableList_addVariable | ( | MmsNamedVariableList | self, |
MmsNamedVariableListEntry | variable | ||
) |
MmsNamedVariableList MmsNamedVariableList_create | ( | char * | name, |
bool | deletable | ||
) |
void MmsNamedVariableList_destroy | ( | MmsNamedVariableList | self | ) |
char* MmsNamedVariableList_getName | ( | MmsNamedVariableList | self | ) |
LinkedList MmsNamedVariableList_getVariableList | ( | MmsNamedVariableList | self | ) |
bool MmsNamedVariableList_isDeletable | ( | MmsNamedVariableList | self | ) |
MmsNamedVariableListEntry MmsNamedVariableListEntry_create | ( | MmsAccessSpecifier | accessSpecifier | ) |
void MmsNamedVariableListEntry_destroy | ( | MmsNamedVariableListEntry | self | ) |
MmsDomain* MmsNamedVariableListEntry_getDomain | ( | MmsNamedVariableListEntry | self | ) |
char* MmsNamedVariableListEntry_getVariableName | ( | MmsNamedVariableListEntry | self | ) |