libiec61850  1.5.3
Data Structures | Macros | Typedefs | Enumerations | Functions
iec61850_client.h File Reference
#include "libiec61850_common_api.h"
#include "iec61850_common.h"
#include "mms_value.h"
#include "mms_client_connection.h"
#include "linked_list.h"

Go to the source code of this file.

Data Structures

struct  LastApplError
 

Macros

#define IEC61850_SV_OPT_REFRESH_TIME   1
 
#define IEC61850_SV_OPT_SAMPLE_SYNC   2
 
#define IEC61850_SV_OPT_SAMPLE_RATE   4
 
#define IEC61850_SV_OPT_DATA_SET   8
 
#define IEC61850_SV_OPT_SECURITY   16
 
#define IEC61850_SV_SMPMOD_SAMPLES_PER_PERIOD   0
 
#define IEC61850_SV_SMPMOD_SAMPLES_PER_SECOND   1
 
#define IEC61850_SV_SMPMOD_SECONDS_PER_SAMPLE   2
 
#define GOCB_ELEMENT_GO_ENA   1
 
#define GOCB_ELEMENT_GO_ID   2
 
#define GOCB_ELEMENT_DATSET   4
 
#define GOCB_ELEMENT_CONF_REV   8
 
#define GOCB_ELEMENT_NDS_COMM   16
 
#define GOCB_ELEMENT_DST_ADDRESS   32
 
#define GOCB_ELEMENT_MIN_TIME   64
 
#define GOCB_ELEMENT_MAX_TIME   128
 
#define GOCB_ELEMENT_FIXED_OFFS   256
 
#define GOCB_ELEMENT_ALL   511
 
#define IEC61850_REASON_NOT_INCLUDED   0
 
#define IEC61850_REASON_DATA_CHANGE   1
 
#define IEC61850_REASON_QUALITY_CHANGE   2
 
#define IEC61850_REASON_DATA_UPDATE   4
 
#define IEC61850_REASON_INTEGRITY   8
 
#define IEC61850_REASON_GI   16
 
#define IEC61850_REASON_UNKNOWN   32
 
#define REASON_NOT_INCLUDED   IEC61850_REASON_NOT_INCLUDED
 
#define REASON_DATA_CHANGE   IEC61850_REASON_DATA_CHANGE
 
#define REASON_QUALITY_CHANGE   IEC61850_REASON_QUALITY_CHANGE
 
#define REASON_DATA_UPDATE   IEC61850_REASON_DATA_UPDATE
 
#define REASON_INTEGRITY   IEC61850_REASON_INTEGRITY
 
#define REASON_GI   IEC61850_REASON_GI
 
#define REASON_UNKNOWN   IEC61850_REASON_UNKNOWN
 
#define RCB_ELEMENT_RPT_ID   1
 
#define RCB_ELEMENT_RPT_ENA   2
 
#define RCB_ELEMENT_RESV   4
 
#define RCB_ELEMENT_DATSET   8
 
#define RCB_ELEMENT_CONF_REV   16
 
#define RCB_ELEMENT_OPT_FLDS   32
 
#define RCB_ELEMENT_BUF_TM   64
 
#define RCB_ELEMENT_SQ_NUM   128
 
#define RCB_ELEMENT_TRG_OPS   256
 
#define RCB_ELEMENT_INTG_PD   512
 
#define RCB_ELEMENT_GI   1024
 
#define RCB_ELEMENT_PURGE_BUF   2048
 
#define RCB_ELEMENT_ENTRY_ID   4096
 
#define RCB_ELEMENT_TIME_OF_ENTRY   8192
 
#define RCB_ELEMENT_RESV_TMS   16384
 
#define RCB_ELEMENT_OWNER   32768
 

Typedefs

typedef struct sClientDataSet * ClientDataSet
 
typedef struct sClientReport * ClientReport
 
typedef struct sClientReportControlBlock * ClientReportControlBlock
 
typedef struct sClientGooseControlBlock * ClientGooseControlBlock
 
typedef struct sIedConnection * IedConnection
 
typedef void(* IedConnection_GenericServiceHandler) (uint32_t invokeId, void *parameter, IedClientError err)
 Generic serivce callback handler. More...
 
typedef void(* IedConnectionClosedHandler) (void *parameter, IedConnection connection)
 Callback handler that is invoked when the connection is closed. More...
 
typedef void(* IedConnection_StateChangedHandler) (void *parameter, IedConnection connection, IedConnectionState newState)
 Callback handler that is invoked whenever the connection state (IedConnectionState) changes. More...
 
typedef struct sClientSVControlBlock * ClientSVControlBlock
 
typedef void(* IedConnection_ReadObjectHandler) (uint32_t invokeId, void *parameter, IedClientError err, MmsValue *value)
 
typedef void(* IedConnection_GetRCBValuesHandler) (uint32_t invokeId, void *parameter, IedClientError err, ClientReportControlBlock rcb)
 
typedef int ReasonForInclusion
 
typedef void(* ReportCallbackFunction) (void *parameter, ClientReport report)
 Callback function for receiving reports. More...
 
typedef void(* IedConnection_ReadDataSetHandler) (uint32_t invokeId, void *parameter, IedClientError err, ClientDataSet dataSet)
 
typedef void(* IedConnection_GetDataSetDirectoryHandler) (uint32_t invokeId, void *parameter, IedClientError err, LinkedList dataSetDirectory, bool isDeletable)
 GetDataSetDirectory response or timeout callback. More...
 
typedef void(* IedConnection_WriteDataSetHandler) (uint32_t invokeId, void *parameter, IedClientError err, LinkedList accessResults)
 Callback handler for asynchronous write data set values services (set data set) More...
 
typedef struct sControlObjectClient * ControlObjectClient
 
typedef void(* ControlObjectClient_ControlActionHandler) (uint32_t invokeId, void *parameter, IedClientError err, ControlActionType type, bool success)
 A callback handler that is invoked when a command termination message is received. More...
 
typedef void(* CommandTerminationHandler) (void *parameter, ControlObjectClient controlClient)
 A callback handler that is invoked when a command termination message is received. More...
 
typedef void(* IedConnection_GetNameListHandler) (uint32_t invokeId, void *parameter, IedClientError err, LinkedList nameList, bool moreFollows)
 
typedef void(* IedConnection_GetVariableSpecificationHandler) (uint32_t invokeId, void *parameter, IedClientError err, MmsVariableSpecification *spec)
 
typedef void(* IedConnection_QueryLogHandler) (uint32_t invokeId, void *parameter, IedClientError mmsError, LinkedList journalEntries, bool moreFollows)
 
typedef struct sFileDirectoryEntry * FileDirectoryEntry
 
typedef bool(* IedConnection_FileDirectoryEntryHandler) (uint32_t invokeId, void *parameter, IedClientError err, char *filename, uint32_t size, uint64_t lastModfified, bool moreFollows)
 Callback handler for the get file directory service. More...
 
typedef bool(* IedClientGetFileHandler) (void *parameter, uint8_t *buffer, uint32_t bytesRead)
 user provided handler to receive the data of the GetFile request More...
 
typedef bool(* IedConnection_GetFileAsyncHandler) (uint32_t invokeId, void *parameter, IedClientError err, uint32_t originalInvokeId, uint8_t *buffer, uint32_t bytesRead, bool moreFollows)
 User provided handler to receive the data of the asynchronous GetFile request. More...
 

Enumerations

enum  IedConnectionState { IED_STATE_CLOSED = 0 , IED_STATE_CONNECTING , IED_STATE_CONNECTED , IED_STATE_CLOSING }
 
enum  IedClientError {
  IED_ERROR_OK = 0 , IED_ERROR_NOT_CONNECTED = 1 , IED_ERROR_ALREADY_CONNECTED = 2 , IED_ERROR_CONNECTION_LOST = 3 ,
  IED_ERROR_SERVICE_NOT_SUPPORTED = 4 , IED_ERROR_CONNECTION_REJECTED = 5 , IED_ERROR_OUTSTANDING_CALL_LIMIT_REACHED = 6 , IED_ERROR_USER_PROVIDED_INVALID_ARGUMENT = 10 ,
  IED_ERROR_ENABLE_REPORT_FAILED_DATASET_MISMATCH = 11 , IED_ERROR_OBJECT_REFERENCE_INVALID = 12 , IED_ERROR_UNEXPECTED_VALUE_RECEIVED = 13 , IED_ERROR_TIMEOUT = 20 ,
  IED_ERROR_ACCESS_DENIED = 21 , IED_ERROR_OBJECT_DOES_NOT_EXIST = 22 , IED_ERROR_OBJECT_EXISTS = 23 , IED_ERROR_OBJECT_ACCESS_UNSUPPORTED = 24 ,
  IED_ERROR_TYPE_INCONSISTENT = 25 , IED_ERROR_TEMPORARILY_UNAVAILABLE = 26 , IED_ERROR_OBJECT_UNDEFINED = 27 , IED_ERROR_INVALID_ADDRESS = 28 ,
  IED_ERROR_HARDWARE_FAULT = 29 , IED_ERROR_TYPE_UNSUPPORTED = 30 , IED_ERROR_OBJECT_ATTRIBUTE_INCONSISTENT = 31 , IED_ERROR_OBJECT_VALUE_INVALID = 32 ,
  IED_ERROR_OBJECT_INVALIDATED = 33 , IED_ERROR_MALFORMED_MESSAGE = 34 , IED_ERROR_SERVICE_NOT_IMPLEMENTED = 98 , IED_ERROR_UNKNOWN = 99
}
 
enum  ControlActionType { CONTROL_ACTION_TYPE_SELECT = 0 , CONTROL_ACTION_TYPE_OPERATE = 1 , CONTROL_ACTION_TYPE_CANCEL = 2 }
 
enum  ACSIClass {
  ACSI_CLASS_DATA_OBJECT , ACSI_CLASS_DATA_SET , ACSI_CLASS_BRCB , ACSI_CLASS_URCB ,
  ACSI_CLASS_LCB , ACSI_CLASS_LOG , ACSI_CLASS_SGCB , ACSI_CLASS_GoCB ,
  ACSI_CLASS_GsCB , ACSI_CLASS_MSVCB , ACSI_CLASS_USVCB
}
 

Functions

LIB61850_API IedConnection IedConnection_create (void)
 create a new IedConnection instance More...
 
LIB61850_API IedConnection IedConnection_createEx (TLSConfiguration tlsConfig, bool useThreads)
 create a new IedConnection instance (extended version) More...
 
LIB61850_API IedConnection IedConnection_createWithTlsSupport (TLSConfiguration tlsConfig)
 create a new IedConnection instance that has support for TLS More...
 
LIB61850_API void IedConnection_destroy (IedConnection self)
 destroy an IedConnection instance. More...
 
LIB61850_API void IedConnection_setLocalAddress (IedConnection self, const char *localIpAddress, int localPort)
 Set the local IP address and port to be used by the client. More...
 
LIB61850_API void IedConnection_setConnectTimeout (IedConnection self, uint32_t timeoutInMs)
 set the connect timeout in ms More...
 
LIB61850_API void IedConnection_setRequestTimeout (IedConnection self, uint32_t timeoutInMs)
 set the request timeout in ms More...
 
LIB61850_API uint32_t IedConnection_getRequestTimeout (IedConnection self)
 get the request timeout in ms for this connection More...
 
LIB61850_API void IedConnection_setTimeQuality (IedConnection self, bool leapSecondKnown, bool clockFailure, bool clockNotSynchronized, int subsecondPrecision)
 Set the time quality for all timestamps generated by this IedConnection instance. More...
 
LIB61850_API bool IedConnection_tick (IedConnection self)
 Perform MMS message handling and house-keeping tasks (for non-thread mode only) More...
 
LIB61850_API void IedConnection_connect (IedConnection self, IedClientError *error, const char *hostname, int tcpPort)
 Connect to a server. More...
 
LIB61850_API void IedConnection_connectAsync (IedConnection self, IedClientError *error, const char *hostname, int tcpPort)
 Asynchronously connect to a server. More...
 
LIB61850_API void IedConnection_abort (IedConnection self, IedClientError *error)
 Abort the connection. More...
 
LIB61850_API void IedConnection_abortAsync (IedConnection self, IedClientError *error)
 Asynchronously abort the connection. More...
 
LIB61850_API void IedConnection_release (IedConnection self, IedClientError *error)
 Release the connection. More...
 
LIB61850_API void IedConnection_releaseAsync (IedConnection self, IedClientError *error)
 Asynchronously release the connection. More...
 
LIB61850_API void IedConnection_close (IedConnection self)
 Close the connection. More...
 
LIB61850_API IedConnectionState IedConnection_getState (IedConnection self)
 return the state of the connection. More...
 
LIB61850_API LastApplError IedConnection_getLastApplError (IedConnection self)
 Access to last application error received by the client connection. More...
 
LIB61850_API void IedConnection_installConnectionClosedHandler (IedConnection self, IedConnectionClosedHandler handler, void *parameter)
 Install a handler function that is called when the connection is lost/closed. More...
 
LIB61850_API void IedConnection_installStateChangedHandler (IedConnection self, IedConnection_StateChangedHandler handler, void *parameter)
 Install a handler function that is called when the connection state changes. More...
 
LIB61850_API MmsConnection IedConnection_getMmsConnection (IedConnection self)
 get a handle to the underlying MmsConnection More...
 
LIB61850_API ClientSVControlBlock ClientSVControlBlock_create (IedConnection connection, const char *reference)
 Create a new ClientSVControlBlock instance. More...
 
LIB61850_API void ClientSVControlBlock_destroy (ClientSVControlBlock self)
 Free all resources related to the ClientSVControlBlock instance. More...
 
LIB61850_API bool ClientSVControlBlock_isMulticast (ClientSVControlBlock self)
 Test if this SVCB is multicast. More...
 
LIB61850_API IedClientError ClientSVControlBlock_getLastComError (ClientSVControlBlock self)
 Return the error code of the last write or write acccess to the SVCB. More...
 
LIB61850_API bool ClientSVControlBlock_setSvEna (ClientSVControlBlock self, bool value)
 
LIB61850_API bool ClientSVControlBlock_getSvEna (ClientSVControlBlock self)
 
LIB61850_API bool ClientSVControlBlock_setResv (ClientSVControlBlock self, bool value)
 
LIB61850_API bool ClientSVControlBlock_getResv (ClientSVControlBlock self)
 
LIB61850_API char * ClientSVControlBlock_getMsvID (ClientSVControlBlock self)
 
LIB61850_API char * ClientSVControlBlock_getDatSet (ClientSVControlBlock self)
 Get the (MMS) reference to the data set. More...
 
LIB61850_API uint32_t ClientSVControlBlock_getConfRev (ClientSVControlBlock self)
 
LIB61850_API uint16_t ClientSVControlBlock_getSmpRate (ClientSVControlBlock self)
 
LIB61850_API PhyComAddress ClientSVControlBlock_getDstAddress (ClientSVControlBlock self)
 returns the destination address of the SV publisher More...
 
LIB61850_API int ClientSVControlBlock_getOptFlds (ClientSVControlBlock self)
 Gets the OptFlds parameter of the RCB (decides what information to include in a report) More...
 
LIB61850_API uint8_t ClientSVControlBlock_getSmpMod (ClientSVControlBlock self)
 returns number of sample mode of the SV publisher More...
 
LIB61850_API int ClientSVControlBlock_getNoASDU (ClientSVControlBlock self)
 returns number of ASDUs included in the SV message More...
 
LIB61850_API ClientGooseControlBlock ClientGooseControlBlock_create (const char *dataAttributeReference)
 
LIB61850_API void ClientGooseControlBlock_destroy (ClientGooseControlBlock self)
 
LIB61850_API bool ClientGooseControlBlock_getGoEna (ClientGooseControlBlock self)
 
LIB61850_API void ClientGooseControlBlock_setGoEna (ClientGooseControlBlock self, bool goEna)
 
LIB61850_API const char * ClientGooseControlBlock_getGoID (ClientGooseControlBlock self)
 
LIB61850_API void ClientGooseControlBlock_setGoID (ClientGooseControlBlock self, const char *goID)
 
LIB61850_API const char * ClientGooseControlBlock_getDatSet (ClientGooseControlBlock self)
 
LIB61850_API void ClientGooseControlBlock_setDatSet (ClientGooseControlBlock self, const char *datSet)
 
LIB61850_API uint32_t ClientGooseControlBlock_getConfRev (ClientGooseControlBlock self)
 
LIB61850_API bool ClientGooseControlBlock_getNdsComm (ClientGooseControlBlock self)
 
LIB61850_API uint32_t ClientGooseControlBlock_getMinTime (ClientGooseControlBlock self)
 
LIB61850_API uint32_t ClientGooseControlBlock_getMaxTime (ClientGooseControlBlock self)
 
LIB61850_API bool ClientGooseControlBlock_getFixedOffs (ClientGooseControlBlock self)
 
LIB61850_API PhyComAddress ClientGooseControlBlock_getDstAddress (ClientGooseControlBlock self)
 
LIB61850_API void ClientGooseControlBlock_setDstAddress (ClientGooseControlBlock self, PhyComAddress value)
 
LIB61850_API DEPRECATED MmsValueClientGooseControlBlock_getDstAddress_addr (ClientGooseControlBlock self)
 
LIB61850_API DEPRECATED void ClientGooseControlBlock_setDstAddress_addr (ClientGooseControlBlock self, MmsValue *macAddr)
 
LIB61850_API DEPRECATED uint8_t ClientGooseControlBlock_getDstAddress_priority (ClientGooseControlBlock self)
 
LIB61850_API DEPRECATED void ClientGooseControlBlock_setDstAddress_priority (ClientGooseControlBlock self, uint8_t priorityValue)
 
LIB61850_API DEPRECATED uint16_t ClientGooseControlBlock_getDstAddress_vid (ClientGooseControlBlock self)
 
LIB61850_API DEPRECATED void ClientGooseControlBlock_setDstAddress_vid (ClientGooseControlBlock self, uint16_t vidValue)
 
LIB61850_API DEPRECATED uint16_t ClientGooseControlBlock_getDstAddress_appid (ClientGooseControlBlock self)
 
LIB61850_API DEPRECATED void ClientGooseControlBlock_setDstAddress_appid (ClientGooseControlBlock self, uint16_t appidValue)
 
LIB61850_API ClientGooseControlBlock IedConnection_getGoCBValues (IedConnection self, IedClientError *error, const char *goCBReference, ClientGooseControlBlock updateGoCB)
 Read access to attributes of a GOOSE control block (GoCB) at the connected server. A GoCB contains the configuration values for a single GOOSE publisher. More...
 
LIB61850_API void IedConnection_setGoCBValues (IedConnection self, IedClientError *error, ClientGooseControlBlock goCB, uint32_t parametersMask, bool singleRequest)
 Write access to attributes of a GOOSE control block (GoCB) at the connected server. More...
 
LIB61850_API MmsValueIedConnection_readObject (IedConnection self, IedClientError *error, const char *dataAttributeReference, FunctionalConstraint fc)
 read a functional constrained data attribute (FCDA) or functional constrained data (FCD). More...
 
LIB61850_API uint32_t IedConnection_readObjectAsync (IedConnection self, IedClientError *error, const char *objRef, FunctionalConstraint fc, IedConnection_ReadObjectHandler handler, void *parameter)
 read a functional constrained data attribute (FCDA) or functional constrained data (FCD) - async version More...
 
LIB61850_API void IedConnection_writeObject (IedConnection self, IedClientError *error, const char *dataAttributeReference, FunctionalConstraint fc, MmsValue *value)
 write a functional constrained data attribute (FCDA) or functional constrained data (FCD). More...
 
LIB61850_API uint32_t IedConnection_writeObjectAsync (IedConnection self, IedClientError *error, const char *objectReference, FunctionalConstraint fc, MmsValue *value, IedConnection_GenericServiceHandler handler, void *parameter)
 write a functional constrained data attribute (FCDA) or functional constrained data (FCD) - async version More...
 
LIB61850_API bool IedConnection_readBooleanValue (IedConnection self, IedClientError *error, const char *objectReference, FunctionalConstraint fc)
 read a functional constrained data attribute (FCDA) of type boolean More...
 
LIB61850_API float IedConnection_readFloatValue (IedConnection self, IedClientError *error, const char *objectReference, FunctionalConstraint fc)
 read a functional constrained data attribute (FCDA) of type float More...
 
LIB61850_API char * IedConnection_readStringValue (IedConnection self, IedClientError *error, const char *objectReference, FunctionalConstraint fc)
 read a functional constrained data attribute (FCDA) of type VisibleString or MmsString More...
 
LIB61850_API int32_t IedConnection_readInt32Value (IedConnection self, IedClientError *error, const char *objectReference, FunctionalConstraint fc)
 read a functional constrained data attribute (FCDA) of type Integer or Unsigned and return the result as int32_t More...
 
LIB61850_API int64_t IedConnection_readInt64Value (IedConnection self, IedClientError *error, const char *objectReference, FunctionalConstraint fc)
 read a functional constrained data attribute (FCDA) of type Integer or Unsigned and return the result as int64_t More...
 
LIB61850_API uint32_t IedConnection_readUnsigned32Value (IedConnection self, IedClientError *error, const char *objectReference, FunctionalConstraint fc)
 read a functional constrained data attribute (FCDA) of type Integer or Unsigned and return the result as uint32_t More...
 
LIB61850_API TimestampIedConnection_readTimestampValue (IedConnection self, IedClientError *error, const char *objectReference, FunctionalConstraint fc, Timestamp *timeStamp)
 read a functional constrained data attribute (FCDA) of type Timestamp (UTC Time) More...
 
LIB61850_API Quality IedConnection_readQualityValue (IedConnection self, IedClientError *error, const char *objectReference, FunctionalConstraint fc)
 read a functional constrained data attribute (FCDA) of type Quality More...
 
LIB61850_API void IedConnection_writeBooleanValue (IedConnection self, IedClientError *error, const char *objectReference, FunctionalConstraint fc, bool value)
 write a functional constrained data attribute (FCDA) of type boolean More...
 
LIB61850_API void IedConnection_writeInt32Value (IedConnection self, IedClientError *error, const char *objectReference, FunctionalConstraint fc, int32_t value)
 write a functional constrained data attribute (FCDA) of type integer More...
 
LIB61850_API void IedConnection_writeUnsigned32Value (IedConnection self, IedClientError *error, const char *objectReference, FunctionalConstraint fc, uint32_t value)
 write a functional constrained data attribute (FCDA) of type unsigned (integer) More...
 
LIB61850_API void IedConnection_writeFloatValue (IedConnection self, IedClientError *error, const char *objectReference, FunctionalConstraint fc, float value)
 write a functional constrained data attribute (FCDA) of type float More...
 
LIB61850_API void IedConnection_writeVisibleStringValue (IedConnection self, IedClientError *error, const char *objectReference, FunctionalConstraint fc, char *value)
 
LIB61850_API void IedConnection_writeOctetString (IedConnection self, IedClientError *error, const char *objectReference, FunctionalConstraint fc, uint8_t *value, int valueLength)
 
LIB61850_API ClientReportControlBlock IedConnection_getRCBValues (IedConnection self, IedClientError *error, const char *rcbReference, ClientReportControlBlock updateRcb)
 Read access to attributes of a report control block (RCB) at the connected server. More...
 
LIB61850_API uint32_t IedConnection_getRCBValuesAsync (IedConnection self, IedClientError *error, const char *rcbReference, ClientReportControlBlock updateRcb, IedConnection_GetRCBValuesHandler handler, void *parameter)
 
LIB61850_API void IedConnection_setRCBValues (IedConnection self, IedClientError *error, ClientReportControlBlock rcb, uint32_t parametersMask, bool singleRequest)
 Write access to attributes of a report control block (RCB) at the connected server. More...
 
LIB61850_API uint32_t IedConnection_setRCBValuesAsync (IedConnection self, IedClientError *error, ClientReportControlBlock rcb, uint32_t parametersMask, bool singleRequest, IedConnection_GenericServiceHandler handler, void *parameter)
 
LIB61850_API void IedConnection_installReportHandler (IedConnection self, const char *rcbReference, const char *rptId, ReportCallbackFunction handler, void *handlerParameter)
 Install a report handler function for the specified report control block (RCB) More...
 
LIB61850_API void IedConnection_uninstallReportHandler (IedConnection self, const char *rcbReference)
 uninstall a report handler function for the specified report control block (RCB) More...
 
LIB61850_API void IedConnection_triggerGIReport (IedConnection self, IedClientError *error, const char *rcbReference)
 trigger a general interrogation (GI) report for the specified report control block (RCB) More...
 
LIB61850_API const char * ClientReport_getDataSetName (ClientReport self)
 get the name of the report data set More...
 
LIB61850_API MmsValueClientReport_getDataSetValues (ClientReport self)
 return the received data set values of the report More...
 
LIB61850_API char * ClientReport_getRcbReference (ClientReport self)
 return reference (name) of the server RCB associated with this ClientReport object More...
 
LIB61850_API char * ClientReport_getRptId (ClientReport self)
 return RptId of the server RCB associated with this ClientReport object More...
 
LIB61850_API ReasonForInclusion ClientReport_getReasonForInclusion (ClientReport self, int elementIndex)
 get the reason code (reason for inclusion) for a specific report data set element More...
 
LIB61850_API MmsValueClientReport_getEntryId (ClientReport self)
 get the entry ID of the report More...
 
LIB61850_API bool ClientReport_hasTimestamp (ClientReport self)
 determine if the last received report contains a timestamp More...
 
LIB61850_API bool ClientReport_hasSeqNum (ClientReport self)
 determine if the last received report contains a sequence number More...
 
LIB61850_API uint16_t ClientReport_getSeqNum (ClientReport self)
 get the value of the sequence number More...
 
LIB61850_API bool ClientReport_hasDataSetName (ClientReport self)
 determine if the last received report contains the data set name More...
 
LIB61850_API bool ClientReport_hasReasonForInclusion (ClientReport self)
 determine if the last received report contains reason-for-inclusion information More...
 
LIB61850_API bool ClientReport_hasConfRev (ClientReport self)
 determine if the last received report contains the configuration revision More...
 
LIB61850_API uint32_t ClientReport_getConfRev (ClientReport self)
 get the value of the configuration revision More...
 
LIB61850_API bool ClientReport_hasBufOvfl (ClientReport self)
 indicates if the report contains the bufOvfl (buffer overflow) flag More...
 
LIB61850_API bool ClientReport_getBufOvfl (ClientReport self)
 get the value of the bufOvfl flag More...
 
LIB61850_API bool ClientReport_hasDataReference (ClientReport self)
 indicates if the report contains data references for the reported data set members More...
 
LIB61850_API const char * ClientReport_getDataReference (ClientReport self, int elementIndex)
 get the data-reference of the element of the report data set More...
 
LIB61850_API uint64_t ClientReport_getTimestamp (ClientReport self)
 get the timestamp of the report More...
 
LIB61850_API bool ClientReport_hasSubSeqNum (ClientReport self)
 indicates if the report contains a sub sequence number and a more segments follow flags (for segmented reporting) More...
 
LIB61850_API uint16_t ClientReport_getSubSeqNum (ClientReport self)
 get the sub sequence number of the report (for segmented reporting) More...
 
LIB61850_API bool ClientReport_getMoreSeqmentsFollow (ClientReport self)
 get the more segments follow flag of the received report segment (for segmented reporting) More...
 
LIB61850_API char * ReasonForInclusion_getValueAsString (ReasonForInclusion reasonCode)
 get the reason for inclusion of as a human readable string More...
 
LIB61850_API ClientReportControlBlock ClientReportControlBlock_create (const char *rcbReference)
 
LIB61850_API void ClientReportControlBlock_destroy (ClientReportControlBlock self)
 
LIB61850_API char * ClientReportControlBlock_getObjectReference (ClientReportControlBlock self)
 
LIB61850_API bool ClientReportControlBlock_isBuffered (ClientReportControlBlock self)
 
LIB61850_API const char * ClientReportControlBlock_getRptId (ClientReportControlBlock self)
 
LIB61850_API void ClientReportControlBlock_setRptId (ClientReportControlBlock self, const char *rptId)
 
LIB61850_API bool ClientReportControlBlock_getRptEna (ClientReportControlBlock self)
 
LIB61850_API void ClientReportControlBlock_setRptEna (ClientReportControlBlock self, bool rptEna)
 
LIB61850_API bool ClientReportControlBlock_getResv (ClientReportControlBlock self)
 
LIB61850_API void ClientReportControlBlock_setResv (ClientReportControlBlock self, bool resv)
 
LIB61850_API const char * ClientReportControlBlock_getDataSetReference (ClientReportControlBlock self)
 
LIB61850_API void ClientReportControlBlock_setDataSetReference (ClientReportControlBlock self, const char *dataSetReference)
 set the data set to be observed by the RCB More...
 
LIB61850_API uint32_t ClientReportControlBlock_getConfRev (ClientReportControlBlock self)
 
LIB61850_API int ClientReportControlBlock_getOptFlds (ClientReportControlBlock self)
 Gets the OptFlds parameter of the RCB (decides what information to include in a report) More...
 
LIB61850_API void ClientReportControlBlock_setOptFlds (ClientReportControlBlock self, int optFlds)
 Set the OptFlds parameter of the RCB (decides what information to include in a report) More...
 
LIB61850_API uint32_t ClientReportControlBlock_getBufTm (ClientReportControlBlock self)
 Get the BufTm (buffer time) parameter of the RCB. More...
 
LIB61850_API void ClientReportControlBlock_setBufTm (ClientReportControlBlock self, uint32_t bufTm)
 Set the BufTm (buffer time) parameter of the RCB. More...
 
LIB61850_API uint16_t ClientReportControlBlock_getSqNum (ClientReportControlBlock self)
 
LIB61850_API int ClientReportControlBlock_getTrgOps (ClientReportControlBlock self)
 
LIB61850_API void ClientReportControlBlock_setTrgOps (ClientReportControlBlock self, int trgOps)
 
LIB61850_API uint32_t ClientReportControlBlock_getIntgPd (ClientReportControlBlock self)
 
LIB61850_API void ClientReportControlBlock_setIntgPd (ClientReportControlBlock self, uint32_t intgPd)
 
LIB61850_API bool ClientReportControlBlock_getGI (ClientReportControlBlock self)
 
LIB61850_API void ClientReportControlBlock_setGI (ClientReportControlBlock self, bool gi)
 
LIB61850_API bool ClientReportControlBlock_getPurgeBuf (ClientReportControlBlock self)
 
LIB61850_API void ClientReportControlBlock_setPurgeBuf (ClientReportControlBlock self, bool purgeBuf)
 Set the "PurgeBuf" attribute value (only BRCB) More...
 
LIB61850_API bool ClientReportControlBlock_hasResvTms (ClientReportControlBlock self)
 Check if optional attribute "ResvTms" is present in BRCB. More...
 
LIB61850_API int16_t ClientReportControlBlock_getResvTms (ClientReportControlBlock self)
 
LIB61850_API void ClientReportControlBlock_setResvTms (ClientReportControlBlock self, int16_t resvTms)
 
LIB61850_API MmsValueClientReportControlBlock_getEntryId (ClientReportControlBlock self)
 
LIB61850_API void ClientReportControlBlock_setEntryId (ClientReportControlBlock self, MmsValue *entryId)
 
LIB61850_API uint64_t ClientReportControlBlock_getEntryTime (ClientReportControlBlock self)
 
LIB61850_API MmsValueClientReportControlBlock_getOwner (ClientReportControlBlock self)
 
LIB61850_API ClientDataSet IedConnection_readDataSetValues (IedConnection self, IedClientError *error, const char *dataSetReference, ClientDataSet dataSet)
 get data set values from the server More...
 
LIB61850_API uint32_t IedConnection_readDataSetValuesAsync (IedConnection self, IedClientError *error, const char *dataSetReference, ClientDataSet dataSet, IedConnection_ReadDataSetHandler handler, void *parameter)
 get data set values from the server - async version More...
 
LIB61850_API void IedConnection_createDataSet (IedConnection self, IedClientError *error, const char *dataSetReference, LinkedList dataSetElements)
 create a new data set at the connected server device More...
 
LIB61850_API uint32_t IedConnection_createDataSetAsync (IedConnection self, IedClientError *error, const char *dataSetReference, LinkedList dataSetElements, IedConnection_GenericServiceHandler handler, void *parameter)
 create a new data set at the connected server device More...
 
LIB61850_API bool IedConnection_deleteDataSet (IedConnection self, IedClientError *error, const char *dataSetReference)
 delete a deletable data set at the connected server device More...
 
LIB61850_API uint32_t IedConnection_deleteDataSetAsync (IedConnection self, IedClientError *error, const char *dataSetReference, IedConnection_GenericServiceHandler handler, void *parameter)
 delete a deletable data set at the connected server device - asynchronous version More...
 
LIB61850_API LinkedList IedConnection_getDataSetDirectory (IedConnection self, IedClientError *error, const char *dataSetReference, bool *isDeletable)
 read the data set directory More...
 
LIB61850_API uint32_t IedConnection_getDataSetDirectoryAsync (IedConnection self, IedClientError *error, const char *dataSetReference, IedConnection_GetDataSetDirectoryHandler handler, void *parameter)
 read the data set directory - asynchronous version More...
 
LIB61850_API void IedConnection_writeDataSetValues (IedConnection self, IedClientError *error, const char *dataSetReference, LinkedList values, LinkedList *accessResults)
 Write the data set values to the server. More...
 
LIB61850_API uint32_t IedConnection_writeDataSetValuesAsync (IedConnection self, IedClientError *error, const char *dataSetReference, LinkedList values, IedConnection_WriteDataSetHandler handler, void *parameter)
 Write the data set values to the server - async version. More...
 
LIB61850_API void ClientDataSet_destroy (ClientDataSet self)
 destroy an ClientDataSet instance. Has to be called by the application. More...
 
LIB61850_API MmsValueClientDataSet_getValues (ClientDataSet self)
 get the data set values locally stored in the ClientDataSet instance. More...
 
LIB61850_API char * ClientDataSet_getReference (ClientDataSet self)
 Get the object reference of the data set. More...
 
LIB61850_API int ClientDataSet_getDataSetSize (ClientDataSet self)
 get the size of the data set (number of members) More...
 
LIB61850_API ControlObjectClient ControlObjectClient_create (const char *objectReference, IedConnection connection)
 Create a new client control object. More...
 
LIB61850_API ControlObjectClient ControlObjectClient_createEx (const char *objectReference, IedConnection connection, ControlModel ctlModel, MmsVariableSpecification *controlObjectSpec)
 Create a new client control object - doesn't send requests to the server (doesn't block) More...
 
LIB61850_API void ControlObjectClient_destroy (ControlObjectClient self)
 Destroy the client control object instance and release all related resources. More...
 
LIB61850_API const char * ControlObjectClient_getObjectReference (ControlObjectClient self)
 Get the object reference of the control data object. More...
 
LIB61850_API ControlModel ControlObjectClient_getControlModel (ControlObjectClient self)
 Get the current control model (local representation) applied to the control object. More...
 
LIB61850_API void ControlObjectClient_setControlModel (ControlObjectClient self, ControlModel ctlModel)
 Set the applied control model. More...
 
LIB61850_API void ControlObjectClient_changeServerControlModel (ControlObjectClient self, ControlModel ctlModel)
 Change the control model of the server. More...
 
LIB61850_API MmsType ControlObjectClient_getCtlValType (ControlObjectClient self)
 Get the type of ctlVal. More...
 
LIB61850_API IedClientError ControlObjectClient_getLastError (ControlObjectClient self)
 Get the error code of the last synchronous control action (operate, select, select-with-value, cancel) More...
 
LIB61850_API bool ControlObjectClient_operate (ControlObjectClient self, MmsValue *ctlVal, uint64_t operTime)
 Send an operate command to the server. More...
 
LIB61850_API bool ControlObjectClient_select (ControlObjectClient self)
 Send a select command to the server. More...
 
LIB61850_API bool ControlObjectClient_selectWithValue (ControlObjectClient self, MmsValue *ctlVal)
 Send an select with value command to the server. More...
 
LIB61850_API bool ControlObjectClient_cancel (ControlObjectClient self)
 Send a cancel command to the server. More...
 
LIB61850_API uint32_t ControlObjectClient_operateAsync (ControlObjectClient self, IedClientError *err, MmsValue *ctlVal, uint64_t operTime, ControlObjectClient_ControlActionHandler handler, void *parameter)
 Send an operate command to the server - async version. More...
 
LIB61850_API uint32_t ControlObjectClient_selectAsync (ControlObjectClient self, IedClientError *err, ControlObjectClient_ControlActionHandler handler, void *parameter)
 Send a select command to the server - async version. More...
 
LIB61850_API uint32_t ControlObjectClient_selectWithValueAsync (ControlObjectClient self, IedClientError *err, MmsValue *ctlVal, ControlObjectClient_ControlActionHandler handler, void *parameter)
 Send a select-with-value command to the server - async version. More...
 
LIB61850_API uint32_t ControlObjectClient_cancelAsync (ControlObjectClient self, IedClientError *err, ControlObjectClient_ControlActionHandler handler, void *parameter)
 Send a cancel command to the server - async version. More...
 
LIB61850_API LastApplError ControlObjectClient_getLastApplError (ControlObjectClient self)
 Get the last received control application error. More...
 
LIB61850_API void ControlObjectClient_setTestMode (ControlObjectClient self, bool value)
 Send commands in test mode. More...
 
LIB61850_API void ControlObjectClient_setOrigin (ControlObjectClient self, const char *orIdent, int orCat)
 Set the origin parameter for control commands. More...
 
LIB61850_API void ControlObjectClient_useConstantT (ControlObjectClient self, bool useConstantT)
 Use a constant T parameter for all command (select, operate, cancel) of a single control sequence. More...
 
LIB61850_API DEPRECATED void ControlObjectClient_enableInterlockCheck (ControlObjectClient self)
 
LIB61850_API DEPRECATED void ControlObjectClient_enableSynchroCheck (ControlObjectClient self)
 
LIB61850_API DEPRECATED void ControlObjectClient_setCtlNum (ControlObjectClient self, uint8_t ctlNum)
 
LIB61850_API void ControlObjectClient_setInterlockCheck (ControlObjectClient self, bool value)
 Set the value of the interlock check flag when a control command is sent. More...
 
LIB61850_API void ControlObjectClient_setSynchroCheck (ControlObjectClient self, bool value)
 Set the value of the synchro check flag when a control command is sent. More...
 
LIB61850_API void ControlObjectClient_setCommandTerminationHandler (ControlObjectClient self, CommandTerminationHandler handler, void *handlerParameter)
 Set the command termination callback handler for this control object. More...
 
LIB61850_API void IedConnection_getDeviceModelFromServer (IedConnection self, IedClientError *error)
 Retrieve the device model from the server. More...
 
LIB61850_API LinkedList IedConnection_getLogicalDeviceList (IedConnection self, IedClientError *error)
 Get the list of logical devices available at the server (DEPRECATED) More...
 
LIB61850_API LinkedList IedConnection_getServerDirectory (IedConnection self, IedClientError *error, bool getFileNames)
 Get the list of logical devices or files available at the server. More...
 
LIB61850_API LinkedList IedConnection_getLogicalDeviceDirectory (IedConnection self, IedClientError *error, const char *logicalDeviceName)
 Get the list of logical nodes (LN) of a logical device. More...
 
LIB61850_API LinkedList IedConnection_getLogicalNodeVariables (IedConnection self, IedClientError *error, const char *logicalNodeReference)
 returns a list of all MMS variables that are children of the given logical node More...
 
LIB61850_API LinkedList IedConnection_getLogicalNodeDirectory (IedConnection self, IedClientError *error, const char *logicalNodeReference, ACSIClass acsiClass)
 returns the directory of the given logical node (LN) containing elements of the specified ACSI class More...
 
LIB61850_API LinkedList IedConnection_getDataDirectory (IedConnection self, IedClientError *error, const char *dataReference)
 returns the directory of the given data object (DO) More...
 
LIB61850_API LinkedList IedConnection_getDataDirectoryFC (IedConnection self, IedClientError *error, const char *dataReference)
 returns the directory of the given data object (DO) More...
 
LIB61850_API LinkedList IedConnection_getDataDirectoryByFC (IedConnection self, IedClientError *error, const char *dataReference, FunctionalConstraint fc)
 returns the directory of the given data object/data attribute with the given FC More...
 
LIB61850_API MmsVariableSpecification * IedConnection_getVariableSpecification (IedConnection self, IedClientError *error, const char *dataAttributeReference, FunctionalConstraint fc)
 return the MMS variable type specification of the data attribute referenced by dataAttributeReference and function constraint fc. More...
 
LIB61850_API LinkedList IedConnection_getLogicalDeviceVariables (IedConnection self, IedClientError *error, const char *ldName)
 Get all variables of the logical device. More...
 
LIB61850_API LinkedList IedConnection_getLogicalDeviceDataSets (IedConnection self, IedClientError *error, const char *ldName)
 Get the data set names of the logical device. More...
 
LIB61850_API uint32_t IedConnection_getServerDirectoryAsync (IedConnection self, IedClientError *error, const char *continueAfter, LinkedList result, IedConnection_GetNameListHandler handler, void *parameter)
 Get the server directory (logical devices name) - asynchronous version. More...
 
LIB61850_API uint32_t IedConnection_getLogicalDeviceVariablesAsync (IedConnection self, IedClientError *error, const char *ldName, const char *continueAfter, LinkedList result, IedConnection_GetNameListHandler handler, void *parameter)
 Get the variables in the logical device - asynchronous version. More...
 
LIB61850_API uint32_t IedConnection_getLogicalDeviceDataSetsAsync (IedConnection self, IedClientError *error, const char *ldName, const char *continueAfter, LinkedList result, IedConnection_GetNameListHandler handler, void *parameter)
 Get the data set names in the logical device - asynchronous version. More...
 
LIB61850_API uint32_t IedConnection_getVariableSpecificationAsync (IedConnection self, IedClientError *error, const char *dataAttributeReference, FunctionalConstraint fc, IedConnection_GetVariableSpecificationHandler handler, void *parameter)
 Get the specification of a variable (data attribute or functional constraint data object) - asynchronous version. More...
 
LIB61850_API LinkedList IedConnection_queryLogByTime (IedConnection self, IedClientError *error, const char *logReference, uint64_t startTime, uint64_t endTime, bool *moreFollows)
 Implementation of the QueryLogByTime ACSI service. More...
 
LIB61850_API LinkedList IedConnection_queryLogAfter (IedConnection self, IedClientError *error, const char *logReference, MmsValue *entryID, uint64_t timeStamp, bool *moreFollows)
 Implementation of the QueryLogAfter ACSI service. More...
 
LIB61850_API uint32_t IedConnection_queryLogByTimeAsync (IedConnection self, IedClientError *error, const char *logReference, uint64_t startTime, uint64_t endTime, IedConnection_QueryLogHandler handler, void *parameter)
 
LIB61850_API uint32_t IedConnection_queryLogAfterAsync (IedConnection self, IedClientError *error, const char *logReference, MmsValue *entryID, uint64_t timeStamp, IedConnection_QueryLogHandler handler, void *parameter)
 
LIB61850_API FileDirectoryEntry FileDirectoryEntry_create (const char *fileName, uint32_t fileSize, uint64_t lastModified)
 
LIB61850_API void FileDirectoryEntry_destroy (FileDirectoryEntry self)
 Destroy a FileDirectoryEntry object (free all resources) More...
 
LIB61850_API const char * FileDirectoryEntry_getFileName (FileDirectoryEntry self)
 Get the name of the file. More...
 
LIB61850_API uint32_t FileDirectoryEntry_getFileSize (FileDirectoryEntry self)
 Get the file size in bytes. More...
 
LIB61850_API uint64_t FileDirectoryEntry_getLastModified (FileDirectoryEntry self)
 Get the timestamp of last modification of the file. More...
 
LIB61850_API LinkedList IedConnection_getFileDirectory (IedConnection self, IedClientError *error, const char *directoryName)
 returns the directory entries of the specified file directory. More...
 
LIB61850_API LinkedList IedConnection_getFileDirectoryEx (IedConnection self, IedClientError *error, const char *directoryName, const char *continueAfter, bool *moreFollows)
 returns the directory entries of the specified file directory returned by a single file directory request. More...
 
LIB61850_API uint32_t IedConnection_getFileDirectoryAsyncEx (IedConnection self, IedClientError *error, const char *directoryName, const char *continueAfter, IedConnection_FileDirectoryEntryHandler handler, void *parameter)
 Get file directory (single request) - asynchronous version. More...
 
LIB61850_API uint32_t IedConnection_getFile (IedConnection self, IedClientError *error, const char *fileName, IedClientGetFileHandler handler, void *handlerParameter)
 Implementation of the GetFile ACSI service. More...
 
LIB61850_API uint32_t IedConnection_getFileAsync (IedConnection self, IedClientError *error, const char *fileName, IedConnection_GetFileAsyncHandler handler, void *parameter)
 Implementation of the GetFile ACSI service - asynchronous version. More...
 
LIB61850_API void IedConnection_setFilestoreBasepath (IedConnection, const char *basepath)
 Set the virtual filestore basepath for the setFile service. More...
 
LIB61850_API void IedConnection_setFile (IedConnection self, IedClientError *error, const char *sourceFilename, const char *destinationFilename)
 Implementation of the SetFile ACSI service. More...
 
LIB61850_API uint32_t IedConnection_setFileAsync (IedConnection self, IedClientError *error, const char *sourceFilename, const char *destinationFilename, IedConnection_GenericServiceHandler handler, void *parameter)
 Implementation of the SetFile ACSI service - asynchronous version. More...
 
LIB61850_API void IedConnection_deleteFile (IedConnection self, IedClientError *error, const char *fileName)
 Implementation of the DeleteFile ACSI service. More...
 
LIB61850_API uint32_t IedConnection_deleteFileAsync (IedConnection self, IedClientError *error, const char *fileName, IedConnection_GenericServiceHandler handler, void *parameter)
 Implementation of the DeleteFile ACSI service - asynchronous version. More...