libiec61850  1.5.3
Data Structures | Typedefs | Enumerations | Functions
MMS client API (for IEC 61850 use IEC 61850 client API instead!)

Data Structures

struct  MmsConnectionParameters
 
struct  MmsServerIdentity
 
struct  MmsJournalEntry
 
struct  MmsJournalVariable
 
struct  AcseAuthenticationParameter
 
struct  TSelector
 COTP T selector. More...
 
struct  SSelector
 OSI session selector. More...
 
struct  PSelector
 OSI presentation (P) selector. More...
 
struct  IsoConnectionParameters
 

Typedefs

typedef void(* MmsInformationReportHandler) (void *parameter, char *domainName, char *variableListName, MmsValue *value, bool isVariableListName)
 
typedef struct sMmsConnection * MmsConnection
 
typedef void(* MmsRawMessageHandler) (void *parameter, uint8_t *message, int messageLength, bool received)
 Callback function to intercept raw MMS messages. More...
 
typedef void(* MmsConnectionStateChangedHandler) (MmsConnection connection, void *parameter, MmsConnectionState newState)
 
typedef void(* MmsConnectionLostHandler) (MmsConnection connection, void *parameter)
 User provided handler function that will be called if the connection to the server is lost. More...
 
typedef void(* MmsConnection_ConcludeAbortHandler) (void *parameter, MmsError mmsError, bool success)
 
typedef void(* MmsConnection_GenericServiceHandler) (uint32_t invokeId, void *parameter, MmsError mmsError, bool success)
 
typedef void(* MmsConnection_GetNameListHandler) (uint32_t invokeId, void *parameter, MmsError mmsError, LinkedList nameList, bool moreFollows)
 
typedef void(* MmsConnection_ReadVariableHandler) (uint32_t invokeId, void *parameter, MmsError mmsError, MmsValue *value)
 
typedef void(* MmsConnection_WriteVariableHandler) (uint32_t invokeId, void *parameter, MmsError mmsError, MmsDataAccessError accessError)
 
typedef void(* MmsConnection_WriteMultipleVariablesHandler) (uint32_t invokeId, void *parameter, MmsError mmsError, LinkedList accessResults)
 
typedef void(* MmsConnection_GetVariableAccessAttributesHandler) (uint32_t invokeId, void *parameter, MmsError mmsError, MmsVariableSpecification *spec)
 
typedef void(* MmsConnection_ReadNVLDirectoryHandler) (uint32_t invokeId, void *parameter, MmsError mmsError, LinkedList specs, bool deletable)
 
typedef void(* MmsConnection_IdentifyHandler) (uint32_t invokeId, void *parameter, MmsError mmsError, char *vendorName, char *modelName, char *revision)
 
typedef void(* MmsConnection_GetServerStatusHandler) (uint32_t invokeId, void *parameter, MmsError mmsError, int vmdLogicalStatus, int vmdPhysicalStatus)
 
typedef void(* MmsFileDirectoryHandler) (void *parameter, char *filename, uint32_t size, uint64_t lastModified)
 
typedef void(* MmsConnection_FileDirectoryHandler) (uint32_t invokeId, void *parameter, MmsError mmsError, char *filename, uint32_t size, uint64_t lastModfified, bool moreFollows)
 Callback handler for the get file directory service. More...
 
typedef void(* MmsFileReadHandler) (void *parameter, int32_t frsmId, uint8_t *buffer, uint32_t bytesReceived)
 
typedef void(* MmsConnection_FileReadHandler) (uint32_t invokeId, void *parameter, MmsError mmsError, int32_t frsmId, uint8_t *buffer, uint32_t byteReceived, bool moreFollows)
 Callback handler for the file read service. More...
 
typedef void(* MmsConnection_FileOpenHandler) (uint32_t invokeId, void *parameter, MmsError mmsError, int32_t frsmId, uint32_t fileSize, uint64_t lastModified)
 
typedef void(* MmsConnection_ReadJournalHandler) (uint32_t invokeId, void *parameter, MmsError mmsError, LinkedList journalEntries, bool moreFollows)
 
typedef bool(* AcseAuthenticator) (void *parameter, AcseAuthenticationParameter authParameter, void **securityToken, IsoApplicationReference *appReference)
 Callback function to authenticate a client. More...
 

Enumerations

enum  MmsConnectionState { MMS_CONNECTION_STATE_CLOSED , MMS_CONNECTION_STATE_CONNECTING , MMS_CONNECTION_STATE_CONNECTED , MMS_CONNECTION_STATE_CLOSING }
 
enum  AcseAuthenticationMechanism { ACSE_AUTH_NONE = 0 , ACSE_AUTH_PASSWORD = 1 , ACSE_AUTH_CERTIFICATE = 2 , ACSE_AUTH_TLS = 3 }
 authentication mechanism used by AcseAuthenticator More...
 

Functions

LIB61850_API MmsConnection MmsConnection_create (void)
 Create a new MmsConnection instance. More...
 
LIB61850_API MmsConnection MmsConnection_createSecure (TLSConfiguration tlsConfig)
 Create a new secure (TLS enabled) MmsConnection instance. More...
 
LIB61850_API MmsConnection MmsConnection_createNonThreaded (TLSConfiguration tlsConfig)
 Create a new MmsConnection instance configured for non-threaded mode. More...
 
LIB61850_API void MmsConnection_setRawMessageHandler (MmsConnection self, MmsRawMessageHandler handler, void *parameter)
 Set the callback handler to intercept the raw MMS messages of the connection. More...
 
LIB61850_API void MmsConnection_setFilestoreBasepath (MmsConnection self, const char *basepath)
 Set the virtual filestore basepath for the MMS obtain file services. More...
 
LIB61850_API void MmsConnection_setRequestTimeout (MmsConnection self, uint32_t timeoutInMs)
 Set the request timeout in ms for this connection. More...
 
LIB61850_API uint32_t MmsConnection_getRequestTimeout (MmsConnection self)
 Get the request timeout in ms for this connection. More...
 
LIB61850_API void MmsConnection_setConnectTimeout (MmsConnection self, uint32_t timeoutInMs)
 Set the connect timeout in ms for this connection instance. More...
 
LIB61850_API void MmsConnection_setInformationReportHandler (MmsConnection self, MmsInformationReportHandler handler, void *parameter)
 Install a handler function for MMS information reports (unsolicited messages from the server). More...
 
LIB61850_API IsoConnectionParameters MmsConnection_getIsoConnectionParameters (MmsConnection self)
 Get the ISO connection parameters for an MmsConnection instance. More...
 
LIB61850_API MmsConnectionParameters MmsConnection_getMmsConnectionParameters (MmsConnection self)
 Get the MMS specific connection parameters for an MmsConnection instance. More...
 
LIB61850_API void MmsConnection_setConnectionStateChangedHandler (MmsConnection self, MmsConnectionStateChangedHandler handler, void *parameter)
 
LIB61850_API void MmsConnection_setConnectionLostHandler (MmsConnection self, MmsConnectionLostHandler handler, void *handlerParameter)
 Install a callback function that will be called by the client stack if the MMS connection to the server is lost. More...
 
LIB61850_API void MmsConnection_setIsoConnectionParameters (MmsConnection self, IsoConnectionParameters *params)
 Set the ISO connection parameters for a MmsConnection instance. More...
 
LIB61850_API void MmsConnection_destroy (MmsConnection self)
 Destroy an MmsConnection instance and release all resources. More...
 
LIB61850_API bool MmsConnection_connect (MmsConnection self, MmsError *mmsError, const char *serverName, int serverPort)
 Connect to an MMS server. More...
 
LIB61850_API void MmsConnection_connectAsync (MmsConnection self, MmsError *mmsError, const char *serverName, int serverPort)
 
LIB61850_API bool MmsConnection_tick (MmsConnection self)
 Call MmsConnection state machine and connection handling code (for non-threaded mode only) More...
 
LIB61850_API void MmsConnection_sendRawData (MmsConnection self, MmsError *mmsError, uint8_t *buffer, int bufSize)
 
LIB61850_API void MmsConnection_close (MmsConnection self)
 Close the connection - not recommended. More...
 
LIB61850_API void MmsConnection_abort (MmsConnection self, MmsError *mmsError)
 Uses the MMS/ACSE abort service to close the connection to the server. More...
 
LIB61850_API void MmsConnection_abortAsync (MmsConnection self, MmsError *mmsError)
 
LIB61850_API void MmsConnection_conclude (MmsConnection self, MmsError *mmsError)
 Uses the MMS conclude service to close the connection to the server. More...
 
LIB61850_API void MmsConnection_concludeAsync (MmsConnection self, MmsError *mmsError, MmsConnection_ConcludeAbortHandler handler, void *parameter)
 
LIB61850_API LinkedList MmsConnection_getVMDVariableNames (MmsConnection self, MmsError *mmsError)
 Get the names of all VMD scope variables of the server. More...
 
LIB61850_API void MmsConnection_getVMDVariableNamesAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, const char *continueAfter, MmsConnection_GetNameListHandler handler, void *parameter)
 
LIB61850_API LinkedList MmsConnection_getDomainNames (MmsConnection self, MmsError *mmsError)
 Get the domains names for all domains of the server. More...
 
LIB61850_API void MmsConnection_getDomainNamesAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, const char *continueAfter, LinkedList result, MmsConnection_GetNameListHandler handler, void *parameter)
 Get the domain names of the server (asynchronous version). More...
 
LIB61850_API LinkedList MmsConnection_getDomainVariableNames (MmsConnection self, MmsError *mmsError, const char *domainId)
 Get the names of all variables present in a MMS domain of the server. More...
 
LIB61850_API void MmsConnection_getDomainVariableNamesAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, const char *domainId, const char *continueAfter, LinkedList result, MmsConnection_GetNameListHandler handler, void *parameter)
 Get the names of all variables present in a MMS domain of the server (asynchronous version). More...
 
LIB61850_API LinkedList MmsConnection_getDomainVariableListNames (MmsConnection self, MmsError *mmsError, const char *domainId)
 Get the names of all named variable lists present in a MMS domain or VMD scope of the server. More...
 
LIB61850_API void MmsConnection_getDomainVariableListNamesAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, const char *domainId, const char *continueAfter, LinkedList result, MmsConnection_GetNameListHandler handler, void *parameter)
 
LIB61850_API LinkedList MmsConnection_getDomainJournals (MmsConnection self, MmsError *mmsError, const char *domainId)
 Get the names of all journals present in a MMS domain of the server. More...
 
LIB61850_API void MmsConnection_getDomainJournalsAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, const char *domainId, const char *continueAfter, MmsConnection_GetNameListHandler handler, void *parameter)
 
LIB61850_API LinkedList MmsConnection_getVariableListNamesAssociationSpecific (MmsConnection self, MmsError *mmsError)
 Get the names of all named variable lists associated with this client connection. More...
 
LIB61850_API void MmsConnection_getVariableListNamesAssociationSpecificAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, const char *continueAfter, MmsConnection_GetNameListHandler handler, void *parameter)
 
LIB61850_API MmsValueMmsConnection_readVariable (MmsConnection self, MmsError *mmsError, const char *domainId, const char *itemId)
 Read a single variable from the server. More...
 
LIB61850_API void MmsConnection_readVariableAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, const char *domainId, const char *itemId, MmsConnection_ReadVariableHandler handler, void *parameter)
 Read a single variable from the server (asynchronous version) More...
 
LIB61850_API MmsValueMmsConnection_readVariableComponent (MmsConnection self, MmsError *mmsError, const char *domainId, const char *itemId, const char *componentId)
 Read a component of a single variable from the server. More...
 
LIB61850_API void MmsConnection_readVariableComponentAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, const char *domainId, const char *itemId, const char *componentId, MmsConnection_ReadVariableHandler handler, void *parameter)
 Read a component of a single variable from the server (asynchronous version) More...
 
LIB61850_API MmsValueMmsConnection_readArrayElements (MmsConnection self, MmsError *mmsError, const char *domainId, const char *itemId, uint32_t startIndex, uint32_t numberOfElements)
 Read one or more elements of a single array variable from the server. More...
 
LIB61850_API void MmsConnection_readArrayElementsAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, const char *domainId, const char *itemId, uint32_t startIndex, uint32_t numberOfElements, MmsConnection_ReadVariableHandler handler, void *parameter)
 Read one or more elements of a single array variable from the server (asynchronous version) More...
 
LIB61850_API MmsValueMmsConnection_readSingleArrayElementWithComponent (MmsConnection self, MmsError *mmsError, const char *domainId, const char *itemId, uint32_t index, const char *componentId)
 Read a single element (with optional component specification) from the server. More...
 
LIB61850_API void MmsConnection_readSingleArrayElementWithComponentAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, const char *domainId, const char *itemId, uint32_t index, const char *componentId, MmsConnection_ReadVariableHandler handler, void *parameter)
 
LIB61850_API MmsValueMmsConnection_readMultipleVariables (MmsConnection self, MmsError *mmsError, const char *domainId, LinkedList items)
 Read multiple variables of a domain from the server with one request message. More...
 
LIB61850_API void MmsConnection_readMultipleVariablesAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, const char *domainId, LinkedList items, MmsConnection_ReadVariableHandler handler, void *parameter)
 
LIB61850_API MmsDataAccessError MmsConnection_writeVariable (MmsConnection self, MmsError *mmsError, const char *domainId, const char *itemId, MmsValue *value)
 Write a single variable to the server. More...
 
LIB61850_API void MmsConnection_writeVariableAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, const char *domainId, const char *itemId, MmsValue *value, MmsConnection_WriteVariableHandler handler, void *parameter)
 
LIB61850_API MmsDataAccessError MmsConnection_writeVariableComponent (MmsConnection self, MmsError *mmsError, const char *domainId, const char *itemId, const char *componentId, MmsValue *value)
 Write a single variable to the server (using component alternate access) More...
 
LIB61850_API MmsDataAccessError MmsConnection_writeSingleArrayElementWithComponent (MmsConnection self, MmsError *mmsError, const char *domainId, const char *itemId, uint32_t arrayIndex, const char *componentId, MmsValue *value)
 Write a single array element with a component to an array type variable. More...
 
LIB61850_API void MmsConnection_writeSingleArrayElementWithComponentAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, const char *domainId, const char *itemId, uint32_t arrayIndex, const char *componentId, MmsValue *value, MmsConnection_WriteVariableHandler handler, void *parameter)
 
LIB61850_API void MmsConnection_writeVariableComponentAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, const char *domainId, const char *itemId, const char *componentId, MmsValue *value, MmsConnection_WriteVariableHandler handler, void *parameter)
 
LIB61850_API MmsDataAccessError MmsConnection_writeArrayElements (MmsConnection self, MmsError *mmsError, const char *domainId, const char *itemId, int index, int numberOfElements, MmsValue *value)
 Write a single array element or a sub array to an array type variable. More...
 
LIB61850_API void MmsConnection_writeArrayElementsAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, const char *domainId, const char *itemId, int index, int numberOfElements, MmsValue *value, MmsConnection_WriteVariableHandler handler, void *parameter)
 
LIB61850_API void MmsConnection_writeMultipleVariables (MmsConnection self, MmsError *mmsError, const char *domainId, LinkedList items, LinkedList values, LinkedList *accessResults)
 Write multiple variables to the server. More...
 
LIB61850_API void MmsConnection_writeMultipleVariablesAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, const char *domainId, LinkedList items, LinkedList values, MmsConnection_WriteMultipleVariablesHandler handler, void *parameter)
 
LIB61850_API void MmsConnection_writeNamedVariableList (MmsConnection self, MmsError *mmsError, bool isAssociationSpecific, const char *domainId, const char *itemId, LinkedList values, LinkedList *accessResults)
 Write named variable list values to the server. More...
 
LIB61850_API void MmsConnection_writeNamedVariableListAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, bool isAssociationSpecific, const char *domainId, const char *itemId, LinkedList values, MmsConnection_WriteMultipleVariablesHandler handler, void *parameter)
 
LIB61850_API MmsVariableSpecification * MmsConnection_getVariableAccessAttributes (MmsConnection self, MmsError *mmsError, const char *domainId, const char *itemId)
 Get the variable access attributes of a MMS named variable of the server. More...
 
LIB61850_API void MmsConnection_getVariableAccessAttributesAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, const char *domainId, const char *itemId, MmsConnection_GetVariableAccessAttributesHandler, void *parameter)
 
LIB61850_API MmsValueMmsConnection_readNamedVariableListValues (MmsConnection self, MmsError *mmsError, const char *domainId, const char *listName, bool specWithResult)
 Read the values of a domain specific named variable list. More...
 
LIB61850_API void MmsConnection_readNamedVariableListValuesAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, const char *domainId, const char *listName, bool specWithResult, MmsConnection_ReadVariableHandler handler, void *parameter)
 
LIB61850_API MmsValueMmsConnection_readNamedVariableListValuesAssociationSpecific (MmsConnection self, MmsError *mmsError, const char *listName, bool specWithResult)
 Read the values of a association specific named variable list. More...
 
LIB61850_API void MmsConnection_readNamedVariableListValuesAssociationSpecificAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, const char *listName, bool specWithResult, MmsConnection_ReadVariableHandler handler, void *parameter)
 
LIB61850_API void MmsConnection_defineNamedVariableList (MmsConnection self, MmsError *mmsError, const char *domainId, const char *listName, LinkedList variableSpecs)
 Define a new VMD or domain scoped named variable list at the server. More...
 
LIB61850_API void MmsConnection_defineNamedVariableListAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, const char *domainId, const char *listName, LinkedList variableSpecs, MmsConnection_GenericServiceHandler handler, void *parameter)
 
LIB61850_API void MmsConnection_defineNamedVariableListAssociationSpecific (MmsConnection self, MmsError *mmsError, const char *listName, LinkedList variableSpecs)
 Define a new association specific named variable list at the server. More...
 
LIB61850_API void MmsConnection_defineNamedVariableListAssociationSpecificAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, const char *listName, LinkedList variableSpecs, MmsConnection_GenericServiceHandler handler, void *parameter)
 
LIB61850_API LinkedList MmsConnection_readNamedVariableListDirectory (MmsConnection self, MmsError *mmsError, const char *domainId, const char *listName, bool *deletable)
 Read the entry list of a named variable list at the server. More...
 
LIB61850_API void MmsConnection_readNamedVariableListDirectoryAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, const char *domainId, const char *listName, MmsConnection_ReadNVLDirectoryHandler handler, void *parameter)
 
LIB61850_API LinkedList MmsConnection_readNamedVariableListDirectoryAssociationSpecific (MmsConnection self, MmsError *mmsError, const char *listName, bool *deletable)
 Read the entry list of an association specific named variable list at the server. More...
 
LIB61850_API void MmsConnection_readNamedVariableListDirectoryAssociationSpecificAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, const char *listName, MmsConnection_ReadNVLDirectoryHandler handler, void *parameter)
 
LIB61850_API bool MmsConnection_deleteNamedVariableList (MmsConnection self, MmsError *mmsError, const char *domainId, const char *listName)
 Delete a named variable list at the server. More...
 
LIB61850_API void MmsConnection_deleteNamedVariableListAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, const char *domainId, const char *listName, MmsConnection_GenericServiceHandler handler, void *parameter)
 
LIB61850_API bool MmsConnection_deleteAssociationSpecificNamedVariableList (MmsConnection self, MmsError *mmsError, const char *listName)
 Delete an association specific named variable list at the server. More...
 
LIB61850_API void MmsConnection_deleteAssociationSpecificNamedVariableListAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, const char *listName, MmsConnection_GenericServiceHandler handler, void *parameter)
 
LIB61850_API MmsVariableAccessSpecificationMmsVariableAccessSpecification_create (char *domainId, char *itemId)
 Create a new MmsVariableSpecification that can be used to define named variable lists. More...
 
LIB61850_API MmsVariableAccessSpecificationMmsVariableAccessSpecification_createAlternateAccess (char *domainId, char *itemId, int32_t index, char *componentName)
 Create a new MmsVariableSpecification that can be used to define named variable lists. More...
 
LIB61850_API void MmsVariableAccessSpecification_destroy (MmsVariableAccessSpecification *self)
 Delete the MmsVariableAccessSpecification data structure. More...
 
LIB61850_API void MmsConnection_setLocalDetail (MmsConnection self, int32_t localDetail)
 Get the MMS local detail parameter (local detail means maximum MMS PDU size). More...
 
LIB61850_API int32_t MmsConnection_getLocalDetail (MmsConnection self)
 
LIB61850_API MmsServerIdentityMmsConnection_identify (MmsConnection self, MmsError *mmsError)
 get the identity of the connected server More...
 
LIB61850_API void MmsConnection_identifyAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, MmsConnection_IdentifyHandler handler, void *parameter)
 
LIB61850_API void MmsServerIdentity_destroy (MmsServerIdentity *self)
 Destroy (free) an MmsServerIdentity object. More...
 
LIB61850_API void MmsConnection_getServerStatus (MmsConnection self, MmsError *mmsError, int *vmdLogicalStatus, int *vmdPhysicalStatus, bool extendedDerivation)
 get the VMD status of the connected server (is MMS status service) More...
 
LIB61850_API void MmsConnection_getServerStatusAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, bool extendedDerivation, MmsConnection_GetServerStatusHandler handler, void *parameter)
 
LIB61850_API int32_t MmsConnection_fileOpen (MmsConnection self, MmsError *mmsError, const char *filename, uint32_t initialPosition, uint32_t *fileSize, uint64_t *lastModified)
 open a file for read More...
 
LIB61850_API void MmsConnection_fileOpenAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, const char *filename, uint32_t initialPosition, MmsConnection_FileOpenHandler handler, void *parameter)
 
LIB61850_API bool MmsConnection_fileRead (MmsConnection self, MmsError *mmsError, int32_t frsmId, MmsFileReadHandler handler, void *handlerParameter)
 read the next data block from the file More...
 
LIB61850_API void MmsConnection_fileReadAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, int32_t frsmId, MmsConnection_FileReadHandler handler, void *parameter)
 
LIB61850_API void MmsConnection_fileClose (MmsConnection self, MmsError *mmsError, int32_t frsmId)
 close the file with the specified frsmID More...
 
LIB61850_API void MmsConnection_fileCloseAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, uint32_t frsmId, MmsConnection_GenericServiceHandler handler, void *parameter)
 
LIB61850_API void MmsConnection_fileDelete (MmsConnection self, MmsError *mmsError, const char *fileName)
 delete the file with the specified name More...
 
LIB61850_API void MmsConnection_fileDeleteAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, const char *fileName, MmsConnection_GenericServiceHandler handler, void *parameter)
 
LIB61850_API void MmsConnection_fileRename (MmsConnection self, MmsError *mmsError, const char *currentFileName, const char *newFileName)
 rename the file with the specified name More...
 
LIB61850_API void MmsConnection_fileRenameAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, const char *currentFileName, const char *newFileName, MmsConnection_GenericServiceHandler handler, void *parameter)
 
LIB61850_API void MmsConnection_obtainFile (MmsConnection self, MmsError *mmsError, const char *sourceFile, const char *destinationFile)
 Send an obtainFile request to the server (used to initiate file download to server) More...
 
LIB61850_API void MmsConnection_obtainFileAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, const char *sourceFile, const char *destinationFile, MmsConnection_GenericServiceHandler handler, void *parameter)
 
LIB61850_API bool MmsConnection_getFileDirectory (MmsConnection self, MmsError *mmsError, const char *fileSpecification, const char *continueAfter, MmsFileDirectoryHandler handler, void *handlerParameter)
 get the file directory of the server. More...
 
LIB61850_API void MmsConnection_getFileDirectoryAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, const char *fileSpecification, const char *continueAfter, MmsConnection_FileDirectoryHandler handler, void *parameter)
 
LIB61850_API void MmsJournalEntry_destroy (MmsJournalEntry self)
 Destroy a single MmsJournalEntry instance. More...
 
LIB61850_API MmsValueMmsJournalEntry_getEntryID (MmsJournalEntry self)
 
LIB61850_API MmsValueMmsJournalEntry_getOccurenceTime (MmsJournalEntry self)
 
LIB61850_API LinkedList MmsJournalEntry_getJournalVariables (MmsJournalEntry self)
 
LIB61850_API const char * MmsJournalVariable_getTag (MmsJournalVariable self)
 
LIB61850_API MmsValueMmsJournalVariable_getValue (MmsJournalVariable self)
 
LIB61850_API LinkedList MmsConnection_readJournalTimeRange (MmsConnection self, MmsError *mmsError, const char *domainId, const char *itemId, MmsValue *startTime, MmsValue *endTime, bool *moreFollows)
 
LIB61850_API void MmsConnection_readJournalTimeRangeAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, const char *domainId, const char *itemId, MmsValue *startTime, MmsValue *endTime, MmsConnection_ReadJournalHandler handler, void *parameter)
 
LIB61850_API LinkedList MmsConnection_readJournalStartAfter (MmsConnection self, MmsError *mmsError, const char *domainId, const char *itemId, MmsValue *timeSpecification, MmsValue *entrySpecification, bool *moreFollows)
 
LIB61850_API void MmsConnection_readJournalStartAfterAsync (MmsConnection self, uint32_t *usedInvokeId, MmsError *mmsError, const char *domainId, const char *itemId, MmsValue *timeSpecification, MmsValue *entrySpecification, MmsConnection_ReadJournalHandler handler, void *parameter)
 
LIB61850_API AcseAuthenticationParameter AcseAuthenticationParameter_create (void)
 
LIB61850_API void AcseAuthenticationParameter_destroy (AcseAuthenticationParameter self)
 
LIB61850_API void AcseAuthenticationParameter_setAuthMechanism (AcseAuthenticationParameter self, AcseAuthenticationMechanism mechanism)
 
LIB61850_API void AcseAuthenticationParameter_setPassword (AcseAuthenticationParameter self, char *password)
 
LIB61850_API IsoConnectionParameters IsoConnectionParameters_create (void)
 create a new IsoConnectionParameters instance (FOR LIBRARY INTERNAL USE) More...
 
LIB61850_API void IsoConnectionParameters_destroy (IsoConnectionParameters self)
 Destroy an IsoConnectionParameters instance (FOR LIBRARY INTERNAL USE) More...
 
LIB61850_API void IsoConnectionParameters_setTlsConfiguration (IsoConnectionParameters self, TLSConfiguration tlsConfig)
 
LIB61850_API void IsoConnectionParameters_setAcseAuthenticationParameter (IsoConnectionParameters self, AcseAuthenticationParameter acseAuthParameter)
 set the authentication parameter More...
 
LIB61850_API void IsoConnectionParameters_setTcpParameters (IsoConnectionParameters self, const char *hostname, int tcpPort)
 Set TCP parameters (FOR LIBRARY INTERNAL USE) More...
 
LIB61850_API void IsoConnectionParameters_setLocalTcpParameters (IsoConnectionParameters self, const char *localIpAddress, int localTcpPort)
 Set Local TCP parameters (FOR LIBRARY INTERNAL USE) More...
 
LIB61850_API void IsoConnectionParameters_setRemoteApTitle (IsoConnectionParameters self, const char *apTitle, int aeQualifier)
 set the remote AP-Title and AE-Qualifier More...
 
LIB61850_API void IsoConnectionParameters_setRemoteAddresses (IsoConnectionParameters self, PSelector pSelector, SSelector sSelector, TSelector tSelector)
 set remote addresses for the lower layers More...
 
LIB61850_API void IsoConnectionParameters_setLocalApTitle (IsoConnectionParameters self, const char *apTitle, int aeQualifier)
 set the local AP-Title and AE-Qualifier More...
 
LIB61850_API void IsoConnectionParameters_setLocalAddresses (IsoConnectionParameters self, PSelector pSelector, SSelector sSelector, TSelector tSelector)
 set local addresses for the lower layers More...
 

Detailed Description

Typedef Documentation

◆ AcseAuthenticator

typedef bool(* AcseAuthenticator) (void *parameter, AcseAuthenticationParameter authParameter, void **securityToken, IsoApplicationReference *appReference)

Callback function to authenticate a client.

Parameters
parameteruser provided parameter - set when user registers the authenticator
authParameterthe authentication parameters provided by the client
securityTokenpointer where to store an application specific security token - can be ignored if not used.
appReferenceISO application reference (ap-title + ae-qualifier)
Returns
true if client connection is accepted, false otherwise

◆ MmsConnection

typedef struct sMmsConnection* MmsConnection

Opaque handle for MMS client connection instance.

◆ MmsConnection_ConcludeAbortHandler

typedef void(* MmsConnection_ConcludeAbortHandler) (void *parameter, MmsError mmsError, bool success)

◆ MmsConnection_FileDirectoryHandler

typedef void(* MmsConnection_FileDirectoryHandler) (uint32_t invokeId, void *parameter, MmsError mmsError, char *filename, uint32_t size, uint64_t lastModfified, bool moreFollows)

Callback handler for the get file directory service.

Will be called once for each file directory entry and after the last entry with filename = NULL to indicate with moreFollows set to true when more data is available server side. In case of an error the callback will be called with mmsError != MMS_ERROR_NONE and moreFollows = false.

◆ MmsConnection_FileOpenHandler

typedef void(* MmsConnection_FileOpenHandler) (uint32_t invokeId, void *parameter, MmsError mmsError, int32_t frsmId, uint32_t fileSize, uint64_t lastModified)

◆ MmsConnection_FileReadHandler

typedef void(* MmsConnection_FileReadHandler) (uint32_t invokeId, void *parameter, MmsError mmsError, int32_t frsmId, uint8_t *buffer, uint32_t byteReceived, bool moreFollows)

Callback handler for the file read service.

Will be called for every received part of the file and when there is an error during reading the file.

Parameters
invokeIdinvokeID of the response
parameteruser provided context parameter
mmsErrorerror code
frsmIdID of the file
bufferbuffer where the received bytes are stored
bytesReceivednumber of bytes received with this response
moreFollowsmore messages with parts of the file are following

◆ MmsConnection_GenericServiceHandler

typedef void(* MmsConnection_GenericServiceHandler) (uint32_t invokeId, void *parameter, MmsError mmsError, bool success)

◆ MmsConnection_GetNameListHandler

typedef void(* MmsConnection_GetNameListHandler) (uint32_t invokeId, void *parameter, MmsError mmsError, LinkedList nameList, bool moreFollows)

◆ MmsConnection_GetServerStatusHandler

typedef void(* MmsConnection_GetServerStatusHandler) (uint32_t invokeId, void *parameter, MmsError mmsError, int vmdLogicalStatus, int vmdPhysicalStatus)

◆ MmsConnection_GetVariableAccessAttributesHandler

typedef void(* MmsConnection_GetVariableAccessAttributesHandler) (uint32_t invokeId, void *parameter, MmsError mmsError, MmsVariableSpecification *spec)

◆ MmsConnection_IdentifyHandler

typedef void(* MmsConnection_IdentifyHandler) (uint32_t invokeId, void *parameter, MmsError mmsError, char *vendorName, char *modelName, char *revision)

◆ MmsConnection_ReadJournalHandler

typedef void(* MmsConnection_ReadJournalHandler) (uint32_t invokeId, void *parameter, MmsError mmsError, LinkedList journalEntries, bool moreFollows)

◆ MmsConnection_ReadNVLDirectoryHandler

typedef void(* MmsConnection_ReadNVLDirectoryHandler) (uint32_t invokeId, void *parameter, MmsError mmsError, LinkedList specs, bool deletable)

◆ MmsConnection_ReadVariableHandler

typedef void(* MmsConnection_ReadVariableHandler) (uint32_t invokeId, void *parameter, MmsError mmsError, MmsValue *value)

◆ MmsConnection_WriteMultipleVariablesHandler

typedef void(* MmsConnection_WriteMultipleVariablesHandler) (uint32_t invokeId, void *parameter, MmsError mmsError, LinkedList accessResults)

◆ MmsConnection_WriteVariableHandler

typedef void(* MmsConnection_WriteVariableHandler) (uint32_t invokeId, void *parameter, MmsError mmsError, MmsDataAccessError accessError)

◆ MmsConnectionLostHandler

typedef void(* MmsConnectionLostHandler) (MmsConnection connection, void *parameter)

User provided handler function that will be called if the connection to the server is lost.

Parameters
connectionMmsConnection object of the lost connection
parameteruser provided parameter.

◆ MmsConnectionStateChangedHandler

typedef void(* MmsConnectionStateChangedHandler) (MmsConnection connection, void *parameter, MmsConnectionState newState)

◆ MmsFileDirectoryHandler

typedef void(* MmsFileDirectoryHandler) (void *parameter, char *filename, uint32_t size, uint64_t lastModified)

◆ MmsFileReadHandler

typedef void(* MmsFileReadHandler) (void *parameter, int32_t frsmId, uint8_t *buffer, uint32_t bytesReceived)

◆ MmsInformationReportHandler

typedef void(* MmsInformationReportHandler) (void *parameter, char *domainName, char *variableListName, MmsValue *value, bool isVariableListName)

◆ MmsRawMessageHandler

typedef void(* MmsRawMessageHandler) (void *parameter, uint8_t *message, int messageLength, bool received)

Callback function to intercept raw MMS messages.

IMPORTANT: the message buffer is only valid in the context of the the callback function. If the message data is required elsewhere it has to be copied here!

Parameters
parameteruser provided parameter that is passed to the callback function
messagebuffer of the message.
messageLengthlength of the message in bytes
receivedif true message has been received, false when message has been sent.

Enumeration Type Documentation

◆ AcseAuthenticationMechanism

authentication mechanism used by AcseAuthenticator

Enumerator
ACSE_AUTH_NONE 

Neither ACSE nor TLS authentication used

ACSE_AUTH_PASSWORD 

Use ACSE password for client authentication

ACSE_AUTH_CERTIFICATE 

Use ACSE certificate for client authentication

ACSE_AUTH_TLS 

Use TLS certificate for client authentication

◆ MmsConnectionState

Enumerator
MMS_CONNECTION_STATE_CLOSED 
MMS_CONNECTION_STATE_CONNECTING 
MMS_CONNECTION_STATE_CONNECTED 
MMS_CONNECTION_STATE_CLOSING 

Function Documentation

◆ AcseAuthenticationParameter_create()

LIB61850_API AcseAuthenticationParameter AcseAuthenticationParameter_create ( void  )

◆ AcseAuthenticationParameter_destroy()

LIB61850_API void AcseAuthenticationParameter_destroy ( AcseAuthenticationParameter  self)

◆ AcseAuthenticationParameter_setAuthMechanism()

LIB61850_API void AcseAuthenticationParameter_setAuthMechanism ( AcseAuthenticationParameter  self,
AcseAuthenticationMechanism  mechanism 
)

◆ AcseAuthenticationParameter_setPassword()

LIB61850_API void AcseAuthenticationParameter_setPassword ( AcseAuthenticationParameter  self,
char *  password 
)

◆ IsoConnectionParameters_create()

LIB61850_API IsoConnectionParameters IsoConnectionParameters_create ( void  )

create a new IsoConnectionParameters instance (FOR LIBRARY INTERNAL USE)

NOTE: This function used internally by the MMS client library. When using the MMS or IEC 61850 API there should be no reason for the user to call this function.

Returns
new IsoConnectionParameters instance

◆ IsoConnectionParameters_destroy()

LIB61850_API void IsoConnectionParameters_destroy ( IsoConnectionParameters  self)

Destroy an IsoConnectionParameters instance (FOR LIBRARY INTERNAL USE)

NOTE: This function used internally by the MMS client library. When using the MMS or IEC 61850 API there should be no reason for the user to call this function.

Parameters
selfthe IsoConnectionParameters instance

◆ IsoConnectionParameters_setAcseAuthenticationParameter()

LIB61850_API void IsoConnectionParameters_setAcseAuthenticationParameter ( IsoConnectionParameters  self,
AcseAuthenticationParameter  acseAuthParameter 
)

set the authentication parameter

This will set the authentication parameter and activates authentication.

Parameters
selfthe IsoConnectionParameters instance
acseAuthParameter

◆ IsoConnectionParameters_setLocalAddresses()

LIB61850_API void IsoConnectionParameters_setLocalAddresses ( IsoConnectionParameters  self,
PSelector  pSelector,
SSelector  sSelector,
TSelector  tSelector 
)

set local addresses for the lower layers

This function can be used to set the addresses for the lower layer protocols (presentation, session, and transport layer). Calling this function is optional and not recommended. If not called the default parameters are used.

Parameters
selfthe IsoConnectionParameters instance
pSelectorthe P-Selector (presentation layer address)
sSelectorthe S-Selector (session layer address)
tSelectorthe T-Selector (ISO transport layer address)

◆ IsoConnectionParameters_setLocalApTitle()

LIB61850_API void IsoConnectionParameters_setLocalApTitle ( IsoConnectionParameters  self,
const char *  apTitle,
int  aeQualifier 
)

set the local AP-Title and AE-Qualifier

Calling this function is optional and not recommended. If not called the default parameters are used. If apTitle is NULL the parameter the AP-Title and AE-Qualifier will not be transmitted. This seems to be required by some server devices.

Parameters
selfthe IsoConnectionParameters instance
apTitlethe AP-Title OID as string.
aeQualifierthe AP-qualifier

◆ IsoConnectionParameters_setLocalTcpParameters()

LIB61850_API void IsoConnectionParameters_setLocalTcpParameters ( IsoConnectionParameters  self,
const char *  localIpAddress,
int  localTcpPort 
)

Set Local TCP parameters (FOR LIBRARY INTERNAL USE)

NOTE: This function used internally by the MMS Client library. When using the MMS or IEC 61850 API there should be no reason for the user to call this function

Parameters
selfthe IsoConnectionParameters instance
localIpAddressthe hostname of local IP address of the server
localTcpPortthe local TCP port number of the server

◆ IsoConnectionParameters_setRemoteAddresses()

LIB61850_API void IsoConnectionParameters_setRemoteAddresses ( IsoConnectionParameters  self,
PSelector  pSelector,
SSelector  sSelector,
TSelector  tSelector 
)

set remote addresses for the lower layers

This function can be used to set the addresses for the lower layer protocols (presentation, session, and transport layer). Calling this function is optional and not recommended. If not called the default parameters are used.

Parameters
selfthe IsoConnectionParameters instance
pSelectorthe P-Selector (presentation layer address)
sSelectorthe S-Selector (session layer address)
tSelectorthe T-Selector (ISO transport layer address)

◆ IsoConnectionParameters_setRemoteApTitle()

LIB61850_API void IsoConnectionParameters_setRemoteApTitle ( IsoConnectionParameters  self,
const char *  apTitle,
int  aeQualifier 
)

set the remote AP-Title and AE-Qualifier

Calling this function is optional and not recommended. If not called the default parameters are used. If apTitle is NULL the parameter the AP-Title and AE-Qualifier will not be transmitted. This seems to be required by some server devices.

Parameters
selfthe IsoConnectionParameters instance
apTitlethe AP-Title OID as string.
aeQualifierthe AP-qualifier

◆ IsoConnectionParameters_setTcpParameters()

LIB61850_API void IsoConnectionParameters_setTcpParameters ( IsoConnectionParameters  self,
const char *  hostname,
int  tcpPort 
)

Set TCP parameters (FOR LIBRARY INTERNAL USE)

NOTE: This function used internally by the MMS client library. When using the MMS or IEC 61850 API there should be no reason for the user to call this function

Parameters
selfthe IsoConnectionParameters instance
hostnamethe hostname of IP address if the server
tcpPortthe TCP port number of the server

◆ IsoConnectionParameters_setTlsConfiguration()

LIB61850_API void IsoConnectionParameters_setTlsConfiguration ( IsoConnectionParameters  self,
TLSConfiguration  tlsConfig 
)

◆ MmsConnection_abort()

LIB61850_API void MmsConnection_abort ( MmsConnection  self,
MmsError mmsError 
)

Uses the MMS/ACSE abort service to close the connection to the server.

This service should be used to abruptly interrupt the connection to the server. It is not quite clear what the benefit of this service is (simply closing the TCP connection should do the same). Though it is required by conformance tests. In case the server doesn't close the connection after the internal timeout interval the client will close the TCP connection and set mmsError to MMS_ERROR_SERVICE_TIMEOUT.

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variable to store error code

◆ MmsConnection_abortAsync()

LIB61850_API void MmsConnection_abortAsync ( MmsConnection  self,
MmsError mmsError 
)

◆ MmsConnection_close()

LIB61850_API void MmsConnection_close ( MmsConnection  self)

Close the connection - not recommended.

This service simply closes the TCP socket without any hand-shaking with the server. This behavior is not specified. Use with care!

Parameters
selfMmsConnection instance to operate on

◆ MmsConnection_conclude()

LIB61850_API void MmsConnection_conclude ( MmsConnection  self,
MmsError mmsError 
)

Uses the MMS conclude service to close the connection to the server.

This should be used to orderly release the connection to the server. If the server denies the conclude request (by sending a concludeError PDU) this service fails with an error (mmsError set accordingly) and the connection remains open. In this case the close or abort methods have to be used to close the connection. It is not quite clear if this service is really useful but it is required by conformance tests.

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variable to store error code

◆ MmsConnection_concludeAsync()

LIB61850_API void MmsConnection_concludeAsync ( MmsConnection  self,
MmsError mmsError,
MmsConnection_ConcludeAbortHandler  handler,
void *  parameter 
)

◆ MmsConnection_connect()

LIB61850_API bool MmsConnection_connect ( MmsConnection  self,
MmsError mmsError,
const char *  serverName,
int  serverPort 
)

Connect to an MMS server.

This will open a new TCP connection and send a MMS initiate request.

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variable to store error code
serverNamehostname or IP address of the server to connect
serverPortTCP port number of the server to connect or -1 to use default port (102 for MMS or 3872 for MMS over TLS)
Returns
true on success. false if the connection attempt failed.

◆ MmsConnection_connectAsync()

LIB61850_API void MmsConnection_connectAsync ( MmsConnection  self,
MmsError mmsError,
const char *  serverName,
int  serverPort 
)

◆ MmsConnection_create()

LIB61850_API MmsConnection MmsConnection_create ( void  )

Create a new MmsConnection instance.

Returns
the newly created instance.

◆ MmsConnection_createNonThreaded()

LIB61850_API MmsConnection MmsConnection_createNonThreaded ( TLSConfiguration  tlsConfig)

Create a new MmsConnection instance configured for non-threaded mode.

NOTE: This constructor doesn't create a background thread for connection handling. The user has to call the MmsConnection_tick function periodically to ensure that the MMS connection can be handled properly.

Parameters
tlsConfigTLS configuration parameters and certificates or NULL for non-TLS mode.
Returns
the newly created instance.

◆ MmsConnection_createSecure()

LIB61850_API MmsConnection MmsConnection_createSecure ( TLSConfiguration  tlsConfig)

Create a new secure (TLS enabled) MmsConnection instance.

Parameters
tlsConfigTLS configuration parameters and certificates
Returns
the newly created instance.

◆ MmsConnection_defineNamedVariableList()

LIB61850_API void MmsConnection_defineNamedVariableList ( MmsConnection  self,
MmsError mmsError,
const char *  domainId,
const char *  listName,
LinkedList  variableSpecs 
)

Define a new VMD or domain scoped named variable list at the server.

The resulting named variable list will either be of domain scope (when the domainId argument is present) or VMD scope when the domainId argument is NULL.

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variable to store error code
domainIdthe domain name of the domain for the new variable list
listNamethe name of the named variable list
variableSpecsa list of variable specifications for the new variable list. The list elements have to be of type MmsVariableAccessSpecification*.

◆ MmsConnection_defineNamedVariableListAssociationSpecific()

LIB61850_API void MmsConnection_defineNamedVariableListAssociationSpecific ( MmsConnection  self,
MmsError mmsError,
const char *  listName,
LinkedList  variableSpecs 
)

Define a new association specific named variable list at the server.

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variable to store error code
listNamethe name of the named variable list
variableSpecslist of variable specifications for the new variable list.The list elements have to be of type MmsVariableAccessSpecification*.

◆ MmsConnection_defineNamedVariableListAssociationSpecificAsync()

LIB61850_API void MmsConnection_defineNamedVariableListAssociationSpecificAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
const char *  listName,
LinkedList  variableSpecs,
MmsConnection_GenericServiceHandler  handler,
void *  parameter 
)

◆ MmsConnection_defineNamedVariableListAsync()

LIB61850_API void MmsConnection_defineNamedVariableListAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
const char *  domainId,
const char *  listName,
LinkedList  variableSpecs,
MmsConnection_GenericServiceHandler  handler,
void *  parameter 
)

◆ MmsConnection_deleteAssociationSpecificNamedVariableList()

LIB61850_API bool MmsConnection_deleteAssociationSpecificNamedVariableList ( MmsConnection  self,
MmsError mmsError,
const char *  listName 
)

Delete an association specific named variable list at the server.

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variable to store error code
listNamethe name of the named variable list
Returns
true if named variable list has been deleted, false otherwise

◆ MmsConnection_deleteAssociationSpecificNamedVariableListAsync()

LIB61850_API void MmsConnection_deleteAssociationSpecificNamedVariableListAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
const char *  listName,
MmsConnection_GenericServiceHandler  handler,
void *  parameter 
)

◆ MmsConnection_deleteNamedVariableList()

LIB61850_API bool MmsConnection_deleteNamedVariableList ( MmsConnection  self,
MmsError mmsError,
const char *  domainId,
const char *  listName 
)

Delete a named variable list at the server.

The resulting named variable list will either be of domain scope (when the domainId argument is present) or VMD scope when the domainId argument is NULL.

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variable to store error code
domainIdthe domain name of the domain of the variable list
listNamethe name of the named variable list
Returns
true if named variable list has been deleted, false otherwise

◆ MmsConnection_deleteNamedVariableListAsync()

LIB61850_API void MmsConnection_deleteNamedVariableListAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
const char *  domainId,
const char *  listName,
MmsConnection_GenericServiceHandler  handler,
void *  parameter 
)

◆ MmsConnection_destroy()

LIB61850_API void MmsConnection_destroy ( MmsConnection  self)

Destroy an MmsConnection instance and release all resources.

Parameters
selfMmsConnection instance to operate on

◆ MmsConnection_fileClose()

LIB61850_API void MmsConnection_fileClose ( MmsConnection  self,
MmsError mmsError,
int32_t  frsmId 
)

close the file with the specified frsmID

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variable to store error code
frsmIdid of the file to close

◆ MmsConnection_fileCloseAsync()

LIB61850_API void MmsConnection_fileCloseAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
uint32_t  frsmId,
MmsConnection_GenericServiceHandler  handler,
void *  parameter 
)

◆ MmsConnection_fileDelete()

LIB61850_API void MmsConnection_fileDelete ( MmsConnection  self,
MmsError mmsError,
const char *  fileName 
)

delete the file with the specified name

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variable to store error code
fileNamename of the file to delete

◆ MmsConnection_fileDeleteAsync()

LIB61850_API void MmsConnection_fileDeleteAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
const char *  fileName,
MmsConnection_GenericServiceHandler  handler,
void *  parameter 
)

◆ MmsConnection_fileOpen()

LIB61850_API int32_t MmsConnection_fileOpen ( MmsConnection  self,
MmsError mmsError,
const char *  filename,
uint32_t  initialPosition,
uint32_t *  fileSize,
uint64_t *  lastModified 
)

open a file for read

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variable to store error code
Returns
the FRSM ID (file read state machine) handle of the opened file

◆ MmsConnection_fileOpenAsync()

LIB61850_API void MmsConnection_fileOpenAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
const char *  filename,
uint32_t  initialPosition,
MmsConnection_FileOpenHandler  handler,
void *  parameter 
)

◆ MmsConnection_fileRead()

LIB61850_API bool MmsConnection_fileRead ( MmsConnection  self,
MmsError mmsError,
int32_t  frsmId,
MmsFileReadHandler  handler,
void *  handlerParameter 
)

read the next data block from the file

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variable to store error code
frsmIdthe FRSM ID (file read state machine) handle of the file
handlercallback that is invoked to deliver the received data
handlerParameteruser provided paramter that is passed to the callback function
Returns
true if more data follows, false if last data has been received.

◆ MmsConnection_fileReadAsync()

LIB61850_API void MmsConnection_fileReadAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
int32_t  frsmId,
MmsConnection_FileReadHandler  handler,
void *  parameter 
)

◆ MmsConnection_fileRename()

LIB61850_API void MmsConnection_fileRename ( MmsConnection  self,
MmsError mmsError,
const char *  currentFileName,
const char *  newFileName 
)

rename the file with the specified name

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variable to store error code
currentFileNamename of the file to rename
newFileNamenew name of the file

◆ MmsConnection_fileRenameAsync()

LIB61850_API void MmsConnection_fileRenameAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
const char *  currentFileName,
const char *  newFileName,
MmsConnection_GenericServiceHandler  handler,
void *  parameter 
)

◆ MmsConnection_getDomainJournals()

LIB61850_API LinkedList MmsConnection_getDomainJournals ( MmsConnection  self,
MmsError mmsError,
const char *  domainId 
)

Get the names of all journals present in a MMS domain of the server.

This will result in a domain specific GetNameList request.

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variable to store error code
domainIdthe domain name for the domain specific request
Returns
the domain specific journal names or NULL if the request failed.

◆ MmsConnection_getDomainJournalsAsync()

LIB61850_API void MmsConnection_getDomainJournalsAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
const char *  domainId,
const char *  continueAfter,
MmsConnection_GetNameListHandler  handler,
void *  parameter 
)

◆ MmsConnection_getDomainNames()

LIB61850_API LinkedList MmsConnection_getDomainNames ( MmsConnection  self,
MmsError mmsError 
)

Get the domains names for all domains of the server.

This will result in a VMD specific GetNameList request.

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variaextern "C" {ble to store error code
Returns
the list of domain names or NULL if the request failed.

◆ MmsConnection_getDomainNamesAsync()

LIB61850_API void MmsConnection_getDomainNamesAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
const char *  continueAfter,
LinkedList  result,
MmsConnection_GetNameListHandler  handler,
void *  parameter 
)

Get the domain names of the server (asynchronous version).

Parameters
[in]selfMmsConnection instance to operate on
[out]usedInvokeIdthe invoke ID of the request
[out]mmsErroruser provided variable to store error code
[in]continueAfterthe name of the last received element when the call is a continuation, or NULL for the first call
[in]resultlist to store (append) the response names, or NULL to create a new list for the response names
[in]handlerwill be called when response is received or timed out.
[in]parameter

◆ MmsConnection_getDomainVariableListNames()

LIB61850_API LinkedList MmsConnection_getDomainVariableListNames ( MmsConnection  self,
MmsError mmsError,
const char *  domainId 
)

Get the names of all named variable lists present in a MMS domain or VMD scope of the server.

This will result in a domain specific GetNameList request.

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variable to store error code
domainIdthe domain name for the domain specific request or NULL for a VMD scope request
Returns
the domain specific named variable list names or NULL if the request failed.

◆ MmsConnection_getDomainVariableListNamesAsync()

LIB61850_API void MmsConnection_getDomainVariableListNamesAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
const char *  domainId,
const char *  continueAfter,
LinkedList  result,
MmsConnection_GetNameListHandler  handler,
void *  parameter 
)

◆ MmsConnection_getDomainVariableNames()

LIB61850_API LinkedList MmsConnection_getDomainVariableNames ( MmsConnection  self,
MmsError mmsError,
const 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.

Parameters
[in]selfMmsConnection instance to operate on
[out]mmsErroruser provided variable to store error code
[in]domainIdthe domain name for the domain specific request
Returns
the of domain specific variable names or NULL if the request failed.

◆ MmsConnection_getDomainVariableNamesAsync()

LIB61850_API void MmsConnection_getDomainVariableNamesAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
const char *  domainId,
const char *  continueAfter,
LinkedList  result,
MmsConnection_GetNameListHandler  handler,
void *  parameter 
)

Get the names of all variables present in a MMS domain of the server (asynchronous version).

This will result in a domain specific GetNameList request.

Parameters
[in]selfMmsConnection instance to operate on
[out]usedInvokeIdthe invoke ID of the request
[out]mmsErroruser provided variable to store error code
[in]domainIdthe domain name for the domain specific request
[in]continueAfterthe name of the last received element when the call is a continuation, or NULL for the first call
[in]resultlist to store (append) the response names, or NULL to create a new list for the response names
[in]handlerwill be called when response is received or timed out.
[in]parameter

◆ MmsConnection_getFileDirectory()

LIB61850_API bool MmsConnection_getFileDirectory ( MmsConnection  self,
MmsError mmsError,
const char *  fileSpecification,
const char *  continueAfter,
MmsFileDirectoryHandler  handler,
void *  handlerParameter 
)

get the file directory of the server.

This function will return the directory entries of the given server directory. For each directory entry the provided callback handler is called. If the

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variable to store error code
fileSpecificationthe file specification of the directory to browse or NULL to browse the root directory
continueAftercontinuation point or NULL for the first request. The continuation point is the first entry after the provided continuation file name.
handleruser provided callback handler
handlerParameteruser provided parameter that is passed to the handler
Returns
(more follows) true if more data is available

◆ MmsConnection_getFileDirectoryAsync()

LIB61850_API void MmsConnection_getFileDirectoryAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
const char *  fileSpecification,
const char *  continueAfter,
MmsConnection_FileDirectoryHandler  handler,
void *  parameter 
)

◆ MmsConnection_getIsoConnectionParameters()

LIB61850_API IsoConnectionParameters MmsConnection_getIsoConnectionParameters ( MmsConnection  self)

Get the ISO connection parameters for an MmsConnection instance.

Parameters
selfMmsConnection instance to operate on
Returns
params the to be used by this connection

◆ MmsConnection_getLocalDetail()

LIB61850_API int32_t MmsConnection_getLocalDetail ( MmsConnection  self)

◆ MmsConnection_getMmsConnectionParameters()

LIB61850_API MmsConnectionParameters MmsConnection_getMmsConnectionParameters ( MmsConnection  self)

Get the MMS specific connection parameters for an MmsConnection instance.

Parameters
selfMmsConnection instance to operate on
Returns
params the to be used by this connection

◆ MmsConnection_getRequestTimeout()

LIB61850_API uint32_t MmsConnection_getRequestTimeout ( MmsConnection  self)

Get the request timeout in ms for this connection.

Parameters
selfMmsConnection instance to operate on
Returns
request timeout in milliseconds

◆ MmsConnection_getServerStatus()

LIB61850_API void MmsConnection_getServerStatus ( MmsConnection  self,
MmsError mmsError,
int *  vmdLogicalStatus,
int *  vmdPhysicalStatus,
bool  extendedDerivation 
)

get the VMD status of the connected server (is MMS status service)

This function will return the status of the connected server by invoking the MMS status service. The services returns the logical and physical states of the server.

Parameters
[in]selfMmsConnection instance to operate on
[out]mmsErroruser provided variable to store error code
[out]vmdLogicalStatususer provided variable to store the logical state of the VMD
[out]vmdPhysicalStatususer provided variable to store the physical state of the VMD
[in]extendedDerivationinstructs the server to invoke self-diagnosis routines to determine server status

◆ MmsConnection_getServerStatusAsync()

LIB61850_API void MmsConnection_getServerStatusAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
bool  extendedDerivation,
MmsConnection_GetServerStatusHandler  handler,
void *  parameter 
)

◆ MmsConnection_getVariableAccessAttributes()

LIB61850_API MmsVariableSpecification* MmsConnection_getVariableAccessAttributes ( MmsConnection  self,
MmsError mmsError,
const char *  domainId,
const char *  itemId 
)

Get the variable access attributes of a MMS named variable of the server.

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variable to store error code
domainIdthe domain name of the variable or NULL for a VMD specific request
itemIdname of the variable
Returns
Returns a MmsTypeSpecification object or NULL if the request failed.

◆ MmsConnection_getVariableAccessAttributesAsync()

LIB61850_API void MmsConnection_getVariableAccessAttributesAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
const char *  domainId,
const char *  itemId,
MmsConnection_GetVariableAccessAttributesHandler  ,
void *  parameter 
)

◆ MmsConnection_getVariableListNamesAssociationSpecific()

LIB61850_API LinkedList MmsConnection_getVariableListNamesAssociationSpecific ( MmsConnection  self,
MmsError mmsError 
)

Get the names of all named variable lists associated with this client connection.

This will result in an association specific GetNameList request.

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variable to store error code
Returns
the association specific named variable list names or NULL if the request failed.

◆ MmsConnection_getVariableListNamesAssociationSpecificAsync()

LIB61850_API void MmsConnection_getVariableListNamesAssociationSpecificAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
const char *  continueAfter,
MmsConnection_GetNameListHandler  handler,
void *  parameter 
)

◆ MmsConnection_getVMDVariableNames()

LIB61850_API LinkedList MmsConnection_getVMDVariableNames ( MmsConnection  self,
MmsError mmsError 
)

Get the names of all VMD scope variables of the server.

This will result in a VMD specific GetNameList request.

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variable to store error code
Returns
the of VMD specific variable names or NULL if the request failed.

◆ MmsConnection_getVMDVariableNamesAsync()

LIB61850_API void MmsConnection_getVMDVariableNamesAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
const char *  continueAfter,
MmsConnection_GetNameListHandler  handler,
void *  parameter 
)

◆ MmsConnection_identify()

LIB61850_API MmsServerIdentity* MmsConnection_identify ( MmsConnection  self,
MmsError mmsError 
)

get the identity of the connected server

This function will return the identity of the server if the server supports the MMS identify service. The server identity consists of a vendor name, model name, and a revision.

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variable to store error code

◆ MmsConnection_identifyAsync()

LIB61850_API void MmsConnection_identifyAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
MmsConnection_IdentifyHandler  handler,
void *  parameter 
)

◆ MmsConnection_obtainFile()

LIB61850_API void MmsConnection_obtainFile ( MmsConnection  self,
MmsError mmsError,
const char *  sourceFile,
const char *  destinationFile 
)

Send an obtainFile request to the server (used to initiate file download to server)

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variable to store error code
sourceFilethe name of the source file (client side name)
destinationFilethe name of the destination file (server side name)

◆ MmsConnection_obtainFileAsync()

LIB61850_API void MmsConnection_obtainFileAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
const char *  sourceFile,
const char *  destinationFile,
MmsConnection_GenericServiceHandler  handler,
void *  parameter 
)

◆ MmsConnection_readArrayElements()

LIB61850_API MmsValue* MmsConnection_readArrayElements ( MmsConnection  self,
MmsError mmsError,
const char *  domainId,
const char *  itemId,
uint32_t  startIndex,
uint32_t  numberOfElements 
)

Read one or more elements of a single array variable from the server.

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variable to store error code
domainIdthe domain name of the variable to be read
itemIdname of the variable to be read
startIndexindex of element to read or start index if a element range is to be read
numberOfElementsNumber of elements to read or 0 if a single element is to be read
Returns
Returns a MmsValue object or NULL if the request failed. The MmsValue object is either a simple or complex type if numberOfElements is 0, or an array containing the selected array elements of numberOfElements > 0.

◆ MmsConnection_readArrayElementsAsync()

LIB61850_API void MmsConnection_readArrayElementsAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
const char *  domainId,
const char *  itemId,
uint32_t  startIndex,
uint32_t  numberOfElements,
MmsConnection_ReadVariableHandler  handler,
void *  parameter 
)

Read one or more elements of a single array variable from the server (asynchronous version)

NOTE: The MmsValue object received by the callback function is either a simple or complex type if numberOfElements is 0, or an array containing the selected array elements of numberOfElements > 0.

Parameters
[in]selfMmsConnection instance to operate on
[out]usedInvokeIdthe invoke ID of the request
[out]mmsErroruser provided variable to store error code
[in]domainIdthe domain name of the variable to be read
[in]itemIdname of the variable to be read
[in]startIndexindex of element to read or start index if a element range is to be read
[in]numberOfElementsNumber of elements to read or 0 if a single element is to be read

◆ MmsConnection_readJournalStartAfter()

LIB61850_API LinkedList MmsConnection_readJournalStartAfter ( MmsConnection  self,
MmsError mmsError,
const char *  domainId,
const char *  itemId,
MmsValue timeSpecification,
MmsValue entrySpecification,
bool *  moreFollows 
)

◆ MmsConnection_readJournalStartAfterAsync()

LIB61850_API void MmsConnection_readJournalStartAfterAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
const char *  domainId,
const char *  itemId,
MmsValue timeSpecification,
MmsValue entrySpecification,
MmsConnection_ReadJournalHandler  handler,
void *  parameter 
)

◆ MmsConnection_readJournalTimeRange()

LIB61850_API LinkedList MmsConnection_readJournalTimeRange ( MmsConnection  self,
MmsError mmsError,
const char *  domainId,
const char *  itemId,
MmsValue startTime,
MmsValue endTime,
bool *  moreFollows 
)

◆ MmsConnection_readJournalTimeRangeAsync()

LIB61850_API void MmsConnection_readJournalTimeRangeAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
const char *  domainId,
const char *  itemId,
MmsValue startTime,
MmsValue endTime,
MmsConnection_ReadJournalHandler  handler,
void *  parameter 
)

◆ MmsConnection_readMultipleVariables()

LIB61850_API MmsValue* MmsConnection_readMultipleVariables ( MmsConnection  self,
MmsError mmsError,
const char *  domainId,
LinkedList  items 
)

Read multiple variables of a domain from the server with one request message.

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variable to store error code
domainIdthe domain name of the requested variables.
itemsLinkedList<char*> is the list of item IDs of the requested variables.
Returns
Returns a MmsValue object or NULL if the request failed. The MmsValue object is is of type MMS_ARRAY and contains the variable values of simple or complex type in the order as they appeared in the item ID list.

◆ MmsConnection_readMultipleVariablesAsync()

LIB61850_API void MmsConnection_readMultipleVariablesAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
const char *  domainId,
LinkedList  items,
MmsConnection_ReadVariableHandler  handler,
void *  parameter 
)

◆ MmsConnection_readNamedVariableListDirectory()

LIB61850_API LinkedList MmsConnection_readNamedVariableListDirectory ( MmsConnection  self,
MmsError mmsError,
const char *  domainId,
const char *  listName,
bool *  deletable 
)

Read the entry list of a named variable list at the server.

The resulting named variable list will either be of domain scope (when the domainId argument is present) or VMD scope when the domainId argument is NULL.

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variable to store error code
domainIdthe domain name of the domain of the variable list
listNamethe name of the named variable list
deletableTHIS 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.
Returns
List of names of the variable list entries or NULL if the request failed

◆ MmsConnection_readNamedVariableListDirectoryAssociationSpecific()

LIB61850_API LinkedList MmsConnection_readNamedVariableListDirectoryAssociationSpecific ( MmsConnection  self,
MmsError mmsError,
const char *  listName,
bool *  deletable 
)

Read the entry list of an association specific named variable list at the server.

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variable to store error code
listNamethe name of the named variable list
Returns
List of names of the variable list entries or NULL if the request failed

◆ MmsConnection_readNamedVariableListDirectoryAssociationSpecificAsync()

LIB61850_API void MmsConnection_readNamedVariableListDirectoryAssociationSpecificAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
const char *  listName,
MmsConnection_ReadNVLDirectoryHandler  handler,
void *  parameter 
)

◆ MmsConnection_readNamedVariableListDirectoryAsync()

LIB61850_API void MmsConnection_readNamedVariableListDirectoryAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
const char *  domainId,
const char *  listName,
MmsConnection_ReadNVLDirectoryHandler  handler,
void *  parameter 
)

◆ MmsConnection_readNamedVariableListValues()

LIB61850_API MmsValue* MmsConnection_readNamedVariableListValues ( MmsConnection  self,
MmsError mmsError,
const char *  domainId,
const char *  listName,
bool  specWithResult 
)

Read the values of a domain specific named variable list.

The resulting named variable list will either be of domain scope (when the domainId argument is present) or VMD scope when the domainId argument is NULL.

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variable to store error code
domainIdthe domain name of the requested variables.
listNamethe name of the named variable list
specWithResultif specWithResult is set to true, a IEC 61850 compliant request will be sent.
Returns
Returns a MmsValue object or NULL if the request failed. The MmsValue object is is of type MMS_ARRAY and contains the variable values of simple or complex type in the order as they appeared in named variable list definition.

◆ MmsConnection_readNamedVariableListValuesAssociationSpecific()

LIB61850_API MmsValue* MmsConnection_readNamedVariableListValuesAssociationSpecific ( MmsConnection  self,
MmsError mmsError,
const char *  listName,
bool  specWithResult 
)

Read the values of a association specific named variable list.

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variable to store error code
listNamethe name of the named variable list
specWithResultif specWithResult is set to true, a IEC 61850 compliant request will be sent.
Returns
Returns a MmsValue object or NULL if the request failed. The MmsValue object is is of type MMS_ARRAY and contains the variable values of simple or complex type in the order as they appeared in named variable list definition.

◆ MmsConnection_readNamedVariableListValuesAssociationSpecificAsync()

LIB61850_API void MmsConnection_readNamedVariableListValuesAssociationSpecificAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
const char *  listName,
bool  specWithResult,
MmsConnection_ReadVariableHandler  handler,
void *  parameter 
)

◆ MmsConnection_readNamedVariableListValuesAsync()

LIB61850_API void MmsConnection_readNamedVariableListValuesAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
const char *  domainId,
const char *  listName,
bool  specWithResult,
MmsConnection_ReadVariableHandler  handler,
void *  parameter 
)

◆ MmsConnection_readSingleArrayElementWithComponent()

LIB61850_API MmsValue* MmsConnection_readSingleArrayElementWithComponent ( MmsConnection  self,
MmsError mmsError,
const char *  domainId,
const char *  itemId,
uint32_t  index,
const char *  componentId 
)

Read a single element (with optional component specification) from the server.

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variable to store error code
domainIdthe domain name of the variable to be read
itemIdname of the variable to be read
indexarray element index
componentIdarray element component name
Returns
Returns a MmsValue object or NULL if the request failed.

◆ MmsConnection_readSingleArrayElementWithComponentAsync()

LIB61850_API void MmsConnection_readSingleArrayElementWithComponentAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
const char *  domainId,
const char *  itemId,
uint32_t  index,
const char *  componentId,
MmsConnection_ReadVariableHandler  handler,
void *  parameter 
)

◆ MmsConnection_readVariable()

LIB61850_API MmsValue* MmsConnection_readVariable ( MmsConnection  self,
MmsError mmsError,
const char *  domainId,
const char *  itemId 
)

Read a single variable from the server.

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variable to store error code
domainIdthe domain name of the variable to be read or NULL to read a VMD specific named variable
itemIdname of the variable to be read
Returns
Returns a MmsValue object or NULL if the request failed. The MmsValue object can either be a simple value or a complex value or array. It is also possible that the return value is NULL even if mmsError = MMS_ERROR_NON. This is the case when the servers returns an empty result list.

◆ MmsConnection_readVariableAsync()

LIB61850_API void MmsConnection_readVariableAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
const char *  domainId,
const char *  itemId,
MmsConnection_ReadVariableHandler  handler,
void *  parameter 
)

Read a single variable from the server (asynchronous version)

Parameters
{in]self MmsConnection instance to operate on
[out]usedInvokeIdthe invoke ID of the request
[out]mmsErroruser provided variable to store error code
[in]domainIdthe domain name of the variable to be read or NULL to read a VMD specific named variable
[in]itemIdname of the variable to be read

◆ MmsConnection_readVariableComponent()

LIB61850_API MmsValue* MmsConnection_readVariableComponent ( MmsConnection  self,
MmsError mmsError,
const char *  domainId,
const char *  itemId,
const char *  componentId 
)

Read a component of a single variable from the server.

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variable to store error code
domainIdthe domain name of the variable to be read or NULL to read a VMD specific named variable
itemIdname of the variable to be read
componentIdthe component name
Returns
Returns a MmsValue object or NULL if the request failed. The MmsValue object can either be a simple value or a complex value or array. It is also possible that the return value is NULL even if mmsError = MMS_ERROR_NON. This is the case when the servers returns an empty result list.

◆ MmsConnection_readVariableComponentAsync()

LIB61850_API void MmsConnection_readVariableComponentAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
const char *  domainId,
const char *  itemId,
const char *  componentId,
MmsConnection_ReadVariableHandler  handler,
void *  parameter 
)

Read a component of a single variable from the server (asynchronous version)

Parameters
[in]selfMmsConnection instance to operate on
[out]usedInvokeIdthe invoke ID of the request
[out]mmsErroruser provided variable to store error code
[in]domainIdthe domain name of the variable to be read or NULL to read a VMD specific named variable
[in]itemIdname of the variable to be read
[in]componentIdthe component name
[in]handler
[in]parameter

◆ MmsConnection_sendRawData()

LIB61850_API void MmsConnection_sendRawData ( MmsConnection  self,
MmsError mmsError,
uint8_t *  buffer,
int  bufSize 
)

◆ MmsConnection_setConnectionLostHandler()

LIB61850_API void MmsConnection_setConnectionLostHandler ( MmsConnection  self,
MmsConnectionLostHandler  handler,
void *  handlerParameter 
)

Install a callback function that will be called by the client stack if the MMS connection to the server is lost.

Parameters
handlerthe user provided callback function
handlerParametera parameter that will be passed to the callback function. Can be set to NULL if not required.

◆ MmsConnection_setConnectionStateChangedHandler()

LIB61850_API void MmsConnection_setConnectionStateChangedHandler ( MmsConnection  self,
MmsConnectionStateChangedHandler  handler,
void *  parameter 
)

◆ MmsConnection_setConnectTimeout()

LIB61850_API void MmsConnection_setConnectTimeout ( MmsConnection  self,
uint32_t  timeoutInMs 
)

Set the connect timeout in ms for this connection instance.

Parameters
selfMmsConnection instance to operate on
timeoutInMsconnect timeout in milliseconds

◆ MmsConnection_setFilestoreBasepath()

LIB61850_API void MmsConnection_setFilestoreBasepath ( MmsConnection  self,
const char *  basepath 
)

Set the virtual filestore basepath for the MMS obtain file services.

All external file service accesses will be mapped to paths relative to the base directory. NOTE: This function is only available when the CONFIG_SET_FILESTORE_BASEPATH_AT_RUNTIME option in stack_config.h is set.

Parameters
selfthe MmsServer instance
basepaththe new virtual filestore basepath

◆ MmsConnection_setInformationReportHandler()

LIB61850_API 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.

Parameters
selfMmsConnection instance to operate on
handlerthe handler function to install for this client connection
parametera user specified parameter that will be passed to the handler function on each invocation.

◆ MmsConnection_setIsoConnectionParameters()

LIB61850_API void MmsConnection_setIsoConnectionParameters ( MmsConnection  self,
IsoConnectionParameters *  params 
)

Set the ISO connection parameters for a MmsConnection instance.

Parameters
selfMmsConnection instance to operate on
paramsthe ISO client parameters to use

◆ MmsConnection_setLocalDetail()

LIB61850_API void MmsConnection_setLocalDetail ( MmsConnection  self,
int32_t  localDetail 
)

Get the MMS local detail parameter (local detail means maximum MMS PDU size).

This defaults to 65000 (or the value specified in the stack_config.h file. This function should not be called after a successful connection attempt.

Parameters
selfMmsConnection instance to operate on
localDetailthe maximum size of the MMS PDU that will be accepted.

◆ MmsConnection_setRawMessageHandler()

LIB61850_API void MmsConnection_setRawMessageHandler ( MmsConnection  self,
MmsRawMessageHandler  handler,
void *  parameter 
)

Set the callback handler to intercept the raw MMS messages of the connection.

This function can be used to log raw MMS messages. It may be useful for debugging purposes or advanced test tools. This function will only work when the flag CONFIG_MMS_RAW_MESSAGE_LOGGING it set in stack_config.h

Parameters
selfMmsConnection instance to operate on
handlerthe connection specific callback function
auser provided parameter passed to the callback function (use NULL if not required).

◆ MmsConnection_setRequestTimeout()

LIB61850_API void MmsConnection_setRequestTimeout ( MmsConnection  self,
uint32_t  timeoutInMs 
)

Set the request timeout in ms for this connection.

Parameters
selfMmsConnection instance to operate on
timeoutInMsrequest timeout in milliseconds

◆ MmsConnection_tick()

LIB61850_API bool MmsConnection_tick ( MmsConnection  self)

Call MmsConnection state machine and connection handling code (for non-threaded mode only)

This function has to be called periodically by the user application in non-threaded mode.

Returns
true when connection is currently waiting and calling thread can be suspended, false means connection is busy and the tick function should be called again as soon as possible.

◆ MmsConnection_writeArrayElements()

LIB61850_API MmsDataAccessError MmsConnection_writeArrayElements ( MmsConnection  self,
MmsError mmsError,
const char *  domainId,
const char *  itemId,
int  index,
int  numberOfElements,
MmsValue value 
)

Write a single array element or a sub array to an array type variable.

When a single array element is addressed the MmsValue object value has to be of the type of the array elements. When multiple array elements have to be written (index range) the MmsValue object value has to be of type MMS_ARRAY containing "numberOfElements" elements.

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variable to store error code
domainIdthe domain name of the variable to be written
indexthe index of the array element or the start index of a index range
numberOfElementsthe number of array elements to write starting with index. If 0 only one array element is written.
itemIdname of the variable to be written
valuevalue of the array element(s) to be written. Has to be of the type of the array elements or of type MMS_ARRAY when it is a sub array (index range)
Returns
when successful, the data access error value returned by the server

◆ MmsConnection_writeArrayElementsAsync()

LIB61850_API void MmsConnection_writeArrayElementsAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
const char *  domainId,
const char *  itemId,
int  index,
int  numberOfElements,
MmsValue value,
MmsConnection_WriteVariableHandler  handler,
void *  parameter 
)

◆ MmsConnection_writeMultipleVariables()

LIB61850_API void MmsConnection_writeMultipleVariables ( MmsConnection  self,
MmsError mmsError,
const char *  domainId,
LinkedList  items,
LinkedList  values,
LinkedList *  accessResults 
)

Write multiple variables to the server.

This function will write multiple variables to the server.

The parameter accessResults is a pointer to a LinkedList reference. The methods will create a new LinkedList object that contains the AccessResults of the single variable write attempts. It is up to the user to free this objects properly (e.g. with LinkedList_destroyDeep(accessResults, MmsValue_delete)).

Parameters
[in]selfMmsConnection instance to operate on
[out]mmsErroruser provided variable to store error code
[in]domainIdthe common domain name of all variables to be written
[in]itemsa linked list containing the names of the variables to be written. The names are C strings.
[out]valuesvalues of the variables to be written
[out]theMmsValue objects of type MMS_DATA_ACCESS_ERROR representing the write success of a single variable write.

◆ MmsConnection_writeMultipleVariablesAsync()

LIB61850_API void MmsConnection_writeMultipleVariablesAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
const char *  domainId,
LinkedList  items,
LinkedList  values,
MmsConnection_WriteMultipleVariablesHandler  handler,
void *  parameter 
)

◆ MmsConnection_writeNamedVariableList()

LIB61850_API void MmsConnection_writeNamedVariableList ( MmsConnection  self,
MmsError mmsError,
bool  isAssociationSpecific,
const char *  domainId,
const char *  itemId,
LinkedList  values,
LinkedList *  accessResults 
)

Write named variable list values to the server.

The parameter accessResults is a pointer to a LinkedList reference. The methods will create a new LinkedList object that contains the AccessResults of the single variable write attempts. It is in the responsibility of the user to free this objects properly (e.g. with LinkedList_destroyDeep(accessResults, MmsValue_delete)). If accessResult is the to NULL the result will not be stored.

Parameters
[in]selfMmsConnection instance to operate on
[out]mmsErroruser provided variable to store error code
[in]isAssociationSpecifctrue if the named variable list is an association specific named variable list
[in]domainIdthe common domain name of all variables to be written
[out]valuesvalues of the variables to be written
[out]theMmsValue objects of type MMS_DATA_ACCESS_ERROR representing the write success of a single variable write.

◆ MmsConnection_writeNamedVariableListAsync()

LIB61850_API void MmsConnection_writeNamedVariableListAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
bool  isAssociationSpecific,
const char *  domainId,
const char *  itemId,
LinkedList  values,
MmsConnection_WriteMultipleVariablesHandler  handler,
void *  parameter 
)

◆ MmsConnection_writeSingleArrayElementWithComponent()

LIB61850_API MmsDataAccessError MmsConnection_writeSingleArrayElementWithComponent ( MmsConnection  self,
MmsError mmsError,
const char *  domainId,
const char *  itemId,
uint32_t  arrayIndex,
const char *  componentId,
MmsValue value 
)

Write a single array element with a component to an array type variable.

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variable to store error code
domainIdthe domain name of the variable to be written
itemIdname of the variable to be written
arrayIndexthe index of the array element.
componentIdthe name of the component of the array element
valuevalue of the array element component to be written.
Returns
when successful, the data access error value returned by the server

◆ MmsConnection_writeSingleArrayElementWithComponentAsync()

LIB61850_API void MmsConnection_writeSingleArrayElementWithComponentAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
const char *  domainId,
const char *  itemId,
uint32_t  arrayIndex,
const char *  componentId,
MmsValue value,
MmsConnection_WriteVariableHandler  handler,
void *  parameter 
)

◆ MmsConnection_writeVariable()

LIB61850_API MmsDataAccessError MmsConnection_writeVariable ( MmsConnection  self,
MmsError mmsError,
const char *  domainId,
const char *  itemId,
MmsValue value 
)

Write a single variable to the server.

NOTE: added return value in version 1.1

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variable to store error code
domainIdthe domain name of the variable to be written
itemIdname of the variable to be written
valuevalue of the variable to be written
Returns
when successful, the data access error value returned by the server

◆ MmsConnection_writeVariableAsync()

LIB61850_API void MmsConnection_writeVariableAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
const char *  domainId,
const char *  itemId,
MmsValue value,
MmsConnection_WriteVariableHandler  handler,
void *  parameter 
)

◆ MmsConnection_writeVariableComponent()

LIB61850_API MmsDataAccessError MmsConnection_writeVariableComponent ( MmsConnection  self,
MmsError mmsError,
const char *  domainId,
const char *  itemId,
const char *  componentId,
MmsValue value 
)

Write a single variable to the server (using component alternate access)

Parameters
selfMmsConnection instance to operate on
mmsErroruser provided variable to store error code
domainIdthe domain name of the variable to be written
itemIdname of the variable to be written
componentIdthe name of the variable component
valuevalue of the variable to be written
Returns
when successful, the data access error value returned by the server

◆ MmsConnection_writeVariableComponentAsync()

LIB61850_API void MmsConnection_writeVariableComponentAsync ( MmsConnection  self,
uint32_t *  usedInvokeId,
MmsError mmsError,
const char *  domainId,
const char *  itemId,
const char *  componentId,
MmsValue value,
MmsConnection_WriteVariableHandler  handler,
void *  parameter 
)

◆ MmsJournalEntry_destroy()

LIB61850_API void MmsJournalEntry_destroy ( MmsJournalEntry  self)

Destroy a single MmsJournalEntry instance.

This function will destroy the whole MmsJournalEntry object including the attached list of MmsJournalVariable objects. It is intended to be used in conjunction with the LinkedList_destroyDeep function in order to free the result of MmsConnection_readJournalTimeRange or MmsConnection_readJournalStartAfter

LinkedList_destroyDeep(journalEntries, (LinkedListValueDeleteFunction) MmsJournalEntry_destroy);

Parameters
selfthe MmsJournalEntry instance to destroy

◆ MmsJournalEntry_getEntryID()

LIB61850_API MmsValue* MmsJournalEntry_getEntryID ( MmsJournalEntry  self)

◆ MmsJournalEntry_getJournalVariables()

LIB61850_API LinkedList MmsJournalEntry_getJournalVariables ( MmsJournalEntry  self)

◆ MmsJournalEntry_getOccurenceTime()

LIB61850_API MmsValue* MmsJournalEntry_getOccurenceTime ( MmsJournalEntry  self)

◆ MmsJournalVariable_getTag()

LIB61850_API const char* MmsJournalVariable_getTag ( MmsJournalVariable  self)

◆ MmsJournalVariable_getValue()

LIB61850_API MmsValue* MmsJournalVariable_getValue ( MmsJournalVariable  self)

◆ MmsServerIdentity_destroy()

LIB61850_API void MmsServerIdentity_destroy ( MmsServerIdentity self)

Destroy (free) an MmsServerIdentity object.

Parameters
selfthe object to destroy

◆ MmsVariableAccessSpecification_create()

LIB61850_API MmsVariableAccessSpecification* MmsVariableAccessSpecification_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.

Parameters
domainIdthe MMS domain name of the variable
itemIdthe name for the MMS variable
Returns
reference to the new MmsVariableSpecfication object

◆ MmsVariableAccessSpecification_createAlternateAccess()

LIB61850_API MmsVariableAccessSpecification* MmsVariableAccessSpecification_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.

Parameters
domainIdthe MMS domain name of the variable
itemIdthe name for the MMS variable
indexthe array index to describe an array element
componentNamethe 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.
Returns
reference to the new MmsVariableSpecfication object

◆ MmsVariableAccessSpecification_destroy()

LIB61850_API void MmsVariableAccessSpecification_destroy ( MmsVariableAccessSpecification self)

Delete the MmsVariableAccessSpecification data structure.

Parameters
selfthe instance to delete