24 #ifndef MMS_CLIENT_CONNECTION_H_ 25 #define MMS_CLIENT_CONNECTION_H_ 36 #include "libiec61850_common_api.h" 49 typedef struct sMmsConnectionParameters {
54 uint8_t servicesSupported[11];
64 char* variableListName,
MmsValue* value,
bool isVariableListName);
173 IsoConnectionParameters
393 uint32_t startIndex, uint32_t numberOfElements);
426 const char* domainId,
const char* itemId,
MmsValue* value);
448 const char* domainId,
const char* itemId,
int index,
int numberOfElements,
470 LinkedList items, LinkedList values,
471 LinkedList* accessResults);
491 const char* domainId,
const char* itemId, LinkedList values,
492 LinkedList* accessResults);
504 MmsVariableSpecification*
506 const char* domainId,
const char* itemId);
526 const char* listName,
bool specWithResult);
543 const char* listName,
bool specWithResult);
560 const char* listName, LinkedList variableSpecs);
574 const char* listName, LinkedList variableSpecs);
593 const char* domainId,
const char* listName,
bool* deletable);
608 const char* listName,
bool* deletable);
637 const char* listName);
671 char* componentName);
725 bool extendedDerivation);
748 uint32_t* fileSize, uint64_t* lastModified);
880 MmsValue* timeSpecification,
MmsValue* entrySpecification,
bool* moreFollows);
MmsServerIdentity * MmsConnection_identify(MmsConnection self, MmsError *mmsError)
get the identity of the connected server
MmsConnectionParameters MmsConnection_getMmsConnectionParameters(MmsConnection self)
Get the MMS specific connection parameters for an MmsConnection instance.
const MmsValue * MmsJournalVariable_getValue(MmsJournalVariable self)
void(* MmsInformationReportHandler)(void *parameter, char *domainName, char *variableListName, MmsValue *value, bool isVariableListName)
Definition: mms_client_connection.h:63
void MmsConnection_close(MmsConnection self)
Close the connection - not recommended.
MmsValue * MmsConnection_readArrayElements(MmsConnection self, MmsError *mmsError, const char *domainId, const char *itemId, uint32_t startIndex, uint32_t numberOfElements)
Read an element of a single array variable from the server.
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
Definition: mms_client_connection.h:837
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) ...
MmsDataAccessError MmsConnection_writeVariable(MmsConnection self, MmsError *mmsError, const char *domainId, const char *itemId, MmsValue *value)
Write a single variable to the server.
char * tag
Definition: mms_client_connection.h:838
Definition: mms_client_connection.h:831
void MmsConnection_conclude(MmsConnection self, MmsError *mmsError)
Uses the MMS conclude service to close the connection to the server.
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 serv...
void MmsConnection_setRawMessageHandler(MmsConnection self, MmsRawMessageHandler handler, void *parameter)
Set the callback handler to intercept the raw MMS messages of the connection.
struct sMmsConnection * MmsConnection
Definition: mms_client_connection.h:69
IsoConnectionParameters MmsConnection_getIsoConnectionParameters(MmsConnection self)
Get the ISO connection parameters for an MmsConnection instance.
void(* MmsFileDirectoryHandler)(void *parameter, char *filename, uint32_t size, uint64_t lastModified)
Definition: mms_client_connection.h:732
char * vendorName
Definition: mms_client_connection.h:58
int maxServOutstandingCalled
Definition: mms_client_connection.h:51
void MmsJournalEntry_destroy(MmsJournalEntry self)
Destroy a single MmsJournalEntry instance.
void MmsConnection_setConnectTimeout(MmsConnection self, uint32_t timeoutInMs)
Set the connect timeout in ms for this connection instance.
void MmsConnection_destroy(MmsConnection self)
Destroy an MmsConnection instance and release all resources.
void MmsServerIdentity_destroy(MmsServerIdentity *self)
Destroy (free) an MmsServerIdentity object.
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)
void MmsConnection_setLocalDetail(MmsConnection self, int32_t localDetail)
Get the MMS local detail parameter (local detail means maximum MMS PDU size).
bool MmsConnection_deleteNamedVariableList(MmsConnection self, MmsError *mmsError, const char *domainId, const char *listName)
Delete a named variable list at the server.
void MmsVariableAccessSpecification_destroy(MmsVariableAccessSpecification *self)
Delete the MmsVariableAccessSpecification data structure.
MmsValue * occurenceTime
Definition: mms_client_connection.h:833
LinkedList MmsConnection_getVariableListNamesAssociationSpecific(MmsConnection self, MmsError *mmsError)
Get the names of all named variable lists associated with this client connection. ...
Definition: mms_common.h:147
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.
int dataStructureNestingLevel
Definition: mms_client_connection.h:52
const char * MmsJournalVariable_getTag(MmsJournalVariable self)
char * revision
Definition: mms_client_connection.h:60
int32_t MmsConnection_getLocalDetail(MmsConnection self)
void MmsConnection_fileDelete(MmsConnection self, MmsError *mmsError, const char *fileName)
delete the file with the specified name
int maxPduSize
Definition: mms_client_connection.h:53
bool MmsConnection_connect(MmsConnection self, MmsError *mmsError, const char *serverName, int serverPort)
Connect to an MMS server.
LinkedList journalVariables
Definition: mms_client_connection.h:834
void MmsConnection_setFilestoreBasepath(MmsConnection self, const char *basepath)
Set the virtual filestore basepath for the MMS obtain file services.
void MmsConnection_fileRename(MmsConnection self, MmsError *mmsError, const char *currentFileName, const char *newFileName)
rename the file with the specified name
MmsValue * MmsConnection_readVariable(MmsConnection self, MmsError *mmsError, const char *domainId, const char *itemId)
Read a single variable from the server.
MmsValue * MmsConnection_readNamedVariableListValuesAssociationSpecific(MmsConnection self, MmsError *mmsError, const char *listName, bool specWithResult)
Read the values of a association specific named variable list.
MmsConnection MmsConnection_createSecure(TLSConfiguration tlsConfig)
Create a new secure (TLS enabled) MmsConnection instance.
bool MmsConnection_fileRead(MmsConnection self, MmsError *mmsError, int32_t frsmId, MmsFileReadHandler handler, void *handlerParameter)
read the next data block from the file
void MmsConnection_setInformationReportHandler(MmsConnection self, MmsInformationReportHandler handler, void *parameter)
Install a handler function for MMS information reports (unsolicited messages from the server)...
MmsValue * MmsConnection_readMultipleVariables(MmsConnection self, MmsError *mmsError, const char *domainId, LinkedListitems)
Read multiple variables of a domain from the server with one request message.
const MmsValue * MmsJournalEntry_getEntryID(MmsJournalEntry self)
LinkedList MmsConnection_getDomainVariableNames(MmsConnection self, MmsError *mmsError, const char *domainId)
Get the names of all variables present in a MMS domain of the server.
MmsValue * entryID
Definition: mms_client_connection.h:832
Definition: mms_client_connection.h:49
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. ...
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.
void MmsConnection_setIsoConnectionParameters(MmsConnection self, IsoConnectionParameters *params)
Set the ISO connection parameters for a MmsConnection instance.
void(* MmsRawMessageHandler)(void *parameter, uint8_t *message, int messageLength, bool received)
Callback function to intercept raw MMS messages.
Definition: mms_client_connection.h:105
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.
LinkedList MmsConnection_getDomainNames(MmsConnection self, MmsError *mmsError)
Get the domains names for all domains of the server.
MmsDataAccessError
Definition: mms_value.h:47
Definition: mms_client_connection.h:57
void MmsConnection_fileClose(MmsConnection self, MmsError *mmsError, int32_t frsmId)
close the file with the specified frsmID
void MmsConnection_defineNamedVariableListAssociationSpecific(MmsConnection self, MmsError *mmsError, const char *listName, LinkedList variableSpecs)
Define a new association specific named variable list at the server.
void MmsConnection_abort(MmsConnection self, MmsError *mmsError)
Uses the MMS/ACSE abort service to close the connection to the server.
MmsConnection MmsConnection_create(void)
Create a new MmsConnection instance.
bool MmsConnection_getFileDirectory(MmsConnection self, MmsError *mmsError, const char *fileSpecification, const char *continueAfter, MmsFileDirectoryHandler handler, void *handlerParameter)
get the file directory of the server.
void MmsConnection_writeMultipleVariables(MmsConnection self, MmsError *mmsError, const char *domainId, LinkedListitems, LinkedListvalues, LinkedList *accessResults)
Write multiple variables to the server.
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...
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.
const LinkedList MmsJournalEntry_getJournalVariables(MmsJournalEntry self)
LinkedList MmsConnection_readJournalStartAfter(MmsConnection self, MmsError *mmsError, const char *domainId, const char *itemId, MmsValue *timeSpecification, MmsValue *entrySpecification, bool *moreFollows)
LinkedList MmsConnection_getVMDVariableNames(MmsConnection self, MmsError *mmsError)
Get the names of all VMD scope variables of the server.
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.
bool MmsConnection_deleteAssociationSpecificNamedVariableList(MmsConnection self, MmsError *mmsError, const char *listName)
Delete an association specific named variable list at the server.
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.
LinkedList MmsConnection_readJournalTimeRange(MmsConnection self, MmsError *mmsError, const char *domainId, const char *itemId, MmsValue *startingTime, MmsValue *endingTime, bool *moreFollows)
int maxServOutstandingCalling
Definition: mms_client_connection.h:50
const MmsValue * MmsJournalEntry_getOccurenceTime(MmsJournalEntry self)
void(* MmsConnectionLostHandler)(MmsConnection connection, void *parameter)
User provided handler function that will be called if the connection to the server is lost...
Definition: mms_client_connection.h:191
LinkedList MmsConnection_getDomainJournals(MmsConnection self, MmsError *mmsError, const char *domainId)
Get the names of all journals present in a MMS domain of the server.
MmsVariableAccessSpecification * MmsVariableAccessSpecification_create(char *domainId, char *itemId)
Create a new MmsVariableSpecification that can be used to define named variable lists.
char * modelName
Definition: mms_client_connection.h:59
void MmsConnection_setRequestTimeout(MmsConnection self, uint32_t timeoutInMs)
Set the request timeout in ms for this connection.
void(* MmsFileReadHandler)(void *parameter, int32_t frsmId, uint8_t *buffer, uint32_t bytesReceived)
Definition: mms_client_connection.h:735
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.
MmsValue * value
Definition: mms_client_connection.h:839
MmsError
Definition: mms_common.h:38
struct sMmsValue MmsValue
Definition: mms_value.h:68