libIEC61850
Open-source IEC 61850 MMS server and client library
|
Data Structures | |
struct | MmsConnectionParameters |
struct | MmsVariableSpecification |
Typedefs | |
typedef void(* | MmsInformationReportHandler )(void *parameter, char *domainName, char *variableListName, MmsValue *value) |
typedef struct sMmsConnection * | MmsConnection |
Enumerations | |
enum | MmsClientError { MMS_CE_NO_ERROR, MMS_CE_REQUEST_FAILED, MMS_CE_REQUEST_TIMEOUT, MMS_CE_INVOKE_ID_MISMATCH } |
typedef struct sMmsConnection* MmsConnection |
Opaque handle for MMS client connection instance.
typedef void(* MmsInformationReportHandler)(void *parameter, char *domainName, char *variableListName, MmsValue *value) |
enum MmsClientError |
MmsIndication MmsConnection_connect | ( | MmsConnection | self, |
char * | serverName, | ||
int | serverPort | ||
) |
Connect to a MMS server. This will open a new TCP connection and send a MMS initiate request.
self | MmsConnection instance to operate on |
serverName | hostname or IP address of the server to connect |
serverPort | TCP port number of the server to connect (usually 102) |
MmsConnection MmsConnection_create | ( | ) |
Create a new MmsConnection instance
MmsIndication MmsConnection_defineNamedVariableList | ( | MmsConnection | self, |
char * | domainId, | ||
char * | listName, | ||
LinkedList | variableSpecs | ||
) |
Define a new named variable list at the server.
self | MmsConnection instance to operate on |
domainId | the domain name of the domain for the new variable list |
listName | the name of the named variable list |
variableSpecs | a list of variable specifications for the new variable lsit |
MmsIndication MmsConnection_defineNamedVariableListAssociationSpecific | ( | MmsConnection | self, |
char * | listName, | ||
LinkedList | variableSpecs | ||
) |
Define a new association specific named variable list at the server.
self | MmsConnection instance to operate on |
listName | the name of the named variable list |
variableSpecs | list of variable specifications for the new variable lsit |
MmsIndication MmsConnection_deleteAssociationSpecificNamedVariableList | ( | MmsConnection | self, |
char * | listName | ||
) |
Delete an association specific named variable list at the server.
self | MmsConnection instance to operate on |
listName | the name of the named variable list |
MmsIndication MmsConnection_deleteNamedVariableList | ( | MmsConnection | self, |
char * | domainId, | ||
char * | listName | ||
) |
Delete a named variable list at the server.
self | MmsConnection instance to operate on |
domainId | the domain name of the domain of the variable list |
listName | the name of the named variable list |
void MmsConnection_destroy | ( | MmsConnection | self | ) |
Destroy a MmsConnection instance and release all resources
self | MmsConnection instance to operate on |
LinkedList MmsConnection_getDomainNames | ( | MmsConnection | self | ) |
Get the domains names for all domains of the server.
This will result in a VMD specific GetNameList request.
self | MmsConnection instance to operate on |
LinkedList MmsConnection_getDomainVariableListNames | ( | MmsConnection | self, |
char * | domainId | ||
) |
Get the names of all named variable lists present in a MMS domain of the server.
This will result in a domain specific GetNameList request.
self | MmsConnection instance to operate on |
domainId | the domain name for the domain specific request |
LinkedList MmsConnection_getDomainVariableNames | ( | MmsConnection | self, |
char * | domainId | ||
) |
Get the names of all variables present in a MMS domain of the server.
This will result in a domain specific GetNameList request.
self | MmsConnection instance to operate on |
domainId | the domain name for the domain specific request |
MmsClientError MmsConnection_getError | ( | MmsConnection | self | ) |
Get a detailed description of the last error occurred.
self | MmsConnection instance to operate on |
int32_t MmsConnection_getLocalDetail | ( | MmsConnection | self | ) |
MmsTypeSpecification* MmsConnection_getVariableAccessAttributes | ( | MmsConnection | self, |
char * | domainId, | ||
char * | itemId | ||
) |
Get the variable access attributes of a MMS named variable of the server
self | MmsConnection instance to operate on |
domainId | the domain name of the variable |
itemId | name of the variable |
LinkedList MmsConnection_getVariableListNamesAssociationSpecific | ( | MmsConnection | self | ) |
Get the names of all named variable lists associated with this client connection.
This will result in an association specific GetNameList request.
self | MmsConnection instance to operate on |
MmsValue* MmsConnection_readArrayElements | ( | MmsConnection | self, |
char * | domainId, | ||
char * | itemId, | ||
uint32_t | startIndex, | ||
uint32_t | numberOfElements | ||
) |
Read an element of a single array variable from the server.
self | MmsConnection instance to operate on |
domainId | the domain name of the variable to be read |
itemId | name of the variable to be read |
startIndex | index of element to read or start index if a element range is to be read |
numberOfElements | Number of elements to read or 0 if a single element is to be read |
LinkedList MmsConnection_readAssociationSpecificNamedVariableListDirectory | ( | MmsConnection | self, |
char * | listName | ||
) |
Read the entry list of an association specific named variable list at the server.
self | MmsConnection instance to operate on |
listName | the name of the named variable list |
MmsValue* MmsConnection_readMultipleVariables | ( | MmsConnection | self, |
char * | domainId, | ||
LinkedListitems | |||
) |
Read multiple variables of a domain from the server with one request message.
self | MmsConnection instance to operate on |
domainId | the domain name of the requested variables. : LinkedList<char*> is the list of item IDs of the requested variables. |
LinkedList MmsConnection_readNamedVariableListDirectory | ( | MmsConnection | self, |
char * | domainId, | ||
char * | listName, | ||
bool * | deletable | ||
) |
Read the entry list of a named variable list at the server.
self | MmsConnection instance to operate on |
domainId | the domain name of the domain of the variable list |
listName | the name of the named variable list |
deletable | THIS IS A OUTPUT PARAMETER - indicates if the variable list is deletable by the client. The user may provide a NULL pointer if the value doesn't matter. |
MmsValue* MmsConnection_readNamedVariableListValues | ( | MmsConnection | self, |
char * | domainId, | ||
char * | listName, | ||
bool | specWithResult | ||
) |
Read the values of a domain specific named variable list
self | MmsConnection instance to operate on |
domainId | the domain name of the requested variables. |
listName | the name of the named variable list |
specWithResult | if specWithResult is set to true, a IEC 61850 compliant request will be sent. |
MmsValue* MmsConnection_readNamedVariableListValuesAssociationSpecific | ( | MmsConnection | self, |
char * | listName, | ||
bool | specWithResult | ||
) |
Read the values of a association specific named variable list
self | MmsConnection instance to operate on |
listName | the name of the named variable list |
specWithResult | if specWithResult is set to true, a IEC 61850 compliant request will be sent. |
MmsValue* MmsConnection_readVariable | ( | MmsConnection | self, |
char * | domainId, | ||
char * | itemId | ||
) |
Read a single variable from the server.
self | MmsConnection instance to operate on |
domainId | the domain name of the variable to be read |
itemId | name of the variable to be read |
void MmsConnection_setConnectionParameters | ( | MmsConnection | self, |
MmsConnectionParameters | params | ||
) |
Set the connection parameters for a MmsConnection instance
self | MmsConnection instance to operate on |
params | the parameters to use |
void MmsConnection_setInformationReportHandler | ( | MmsConnection | self, |
MmsInformationReportHandler | handler, | ||
void * | parameter | ||
) |
Install a handler function for MMS information reports (unsolicited messages from the server). The handler function will be called whenever the client receives an MMS information report message. Note that the API user is responsible to properly free the passed MmsValue object.
self | MmsConnection instance to operate on |
handler | the handler function to install for this client connection |
parameter | a user specified parameter that will be passed to the handler function on each invocation. |
void MmsConnection_setIsoConnectionParameters | ( | MmsConnection | self, |
IsoConnectionParameters * | params | ||
) |
Set the ISO connection parameters for a MmsConnection instance
self | MmsConnection instance to operate on |
params | the ISO client parameters to use |
void MmsConnection_setLocalDetail | ( | MmsConnection | self, |
int32_t | localDetail | ||
) |
Get the MMS local detail parameter (local detail means maximum MMS PDU size). This defaults to
localDetail | the maximum size of the MMS PDU that we will accept. |
MmsIndication MmsConnection_writeVariable | ( | MmsConnection | self, |
char * | domainId, | ||
char * | itemId, | ||
MmsValue * | value | ||
) |
Write a single variable to the server.
self | MmsConnection instance to operate on |
domainId | the domain name of the variable to be written |
itemId | name of the variable to be written |
value | value of the variable to be written |
MmsVariableSpecification* MmsVariableSpecification_create | ( | char * | domainId, |
char * | itemId | ||
) |
Create a new MmsVariableSpecification that can be used to define named variable lists. The created object can be deleted with free(). If the parameter strings were dynamically allocated the deallocation is in the responsibility of the user.
domainId | the MMS domain name of the variable |
itemId | the name for the MMS variable |
MmsVariableSpecification* MmsVariableSpecification_createAlternateAccess | ( | char * | domainId, |
char * | itemId, | ||
int32_t | index, | ||
char * | componentName | ||
) |
Create a new MmsVariableSpecification that can be used to define named variable lists. The created object can be deleted with free(). If the parameter strings were dynamically allocated the deallocation is in the responsibility of the user. This function should be used for named variable list entries that are array elements or components of array elements in the case when the array element is of complex (structured) type.
domainId | the MMS domain name of the variable |
itemId | the name for the MMS variable |
index | the array index to describe an array element |
componentName | the name of the component of the array element. Should be set to NULL if the array element is of simple type or the whole array element is required. |