libiec61850
1.2.0
|
#include "mms_server.h"
#include "iec61850_dynamic_model.h"
#include "iec61850_model.h"
#include "hal_filesystem.h"
#include "iec61850_config_file_parser.h"
Go to the source code of this file.
Macros | |
#define | IEC61850_SVCB_EVENT_ENABLE 1 |
#define | IEC61850_SVCB_EVENT_DISABLE 0 |
Typedefs | |
typedef struct sIedServer * | IedServer |
typedef struct sClientConnection * | ClientConnection |
typedef void(* | IedConnectionIndicationHandler) (IedServer self, ClientConnection connection, bool connected, void *parameter) |
User provided callback function that is invoked whenever a new client connects or an existing connection is closed or detected as lost. More... | |
typedef bool(* | ActiveSettingGroupChangedHandler) (void *parameter, SettingGroupControlBlock *sgcb, uint8_t newActSg, ClientConnection connection) |
Callback handler that is invoked when the active setting group is about to be changed by an external client. More... | |
typedef bool(* | EditSettingGroupChangedHandler) (void *parameter, SettingGroupControlBlock *sgcb, uint8_t newEditSg, ClientConnection connection) |
Callback handler that is invoked when the edit setting group is about to be changed by an external client. More... | |
typedef void(* | EditSettingGroupConfirmationHandler) (void *parameter, SettingGroupControlBlock *sgcb, uint8_t editSg) |
Callback handler that is invoked when the edit setting group has been confirmed by an external client. More... | |
typedef CheckHandlerResult(* | ControlPerformCheckHandler) (void *parameter, MmsValue *ctlVal, bool test, bool interlockCheck, ClientConnection connection) |
Control model callback to perform the static tests (optional). More... | |
typedef ControlHandlerResult(* | ControlWaitForExecutionHandler) (void *parameter, MmsValue *ctlVal, bool test, bool synchroCheck) |
Control model callback to perform the dynamic tests (optional). More... | |
typedef ControlHandlerResult(* | ControlHandler) (void *parameter, MmsValue *ctlVal, bool test) |
Control model callback to actually perform the control operation. More... | |
typedef void(* | SVCBEventHandler) (SVControlBlock *svcb, int event, void *parameter) |
callback handler for SVCB events. More... | |
typedef MmsDataAccessError(* | WriteAccessHandler) (DataAttribute *dataAttribute, MmsValue *value, ClientConnection connection, void *parameter) |
callback handler to intercept/control client access to data attributes More... | |
Enumerations | |
enum | CheckHandlerResult { CONTROL_ACCEPTED = -1, CONTROL_HARDWARE_FAULT = 1, CONTROL_TEMPORARILY_UNAVAILABLE = 2, CONTROL_OBJECT_ACCESS_DENIED = 3, CONTROL_OBJECT_UNDEFINED = 4, CONTROL_VALUE_INVALID = 11 } |
result code for ControlPerformCheckHandler More... | |
enum | ControlHandlerResult { CONTROL_RESULT_FAILED = 0, CONTROL_RESULT_OK = 1, CONTROL_RESULT_WAITING = 2 } |
result codes for control handler (ControlWaitForExecutionHandler and ControlHandler) More... | |
enum | AccessPolicy { ACCESS_POLICY_ALLOW, ACCESS_POLICY_DENY } |
Functions | |
IedServer | IedServer_create (IedModel *dataModel) |
Create a new IedServer instance. More... | |
IedServer | IedServer_createWithTlsSupport (IedModel *dataModel, TLSConfiguration tlsConfiguration) |
Create a new IedServer with TLS support. More... | |
void | IedServer_destroy (IedServer self) |
Destroy an IedServer instance and release all resources (memory, TCP sockets) More... | |
void | IedServer_setLocalIpAddress (IedServer self, const char *localIpAddress) |
Set the local IP address to listen on. More... | |
void | IedServer_setFilestoreBasepath (IedServer self, const char *basepath) |
Set the virtual filestore basepath for the MMS file services. More... | |
void | IedServer_start (IedServer self, int tcpPort) |
Start handling client connections. More... | |
void | IedServer_stop (IedServer self) |
Stop handling client connections. More... | |
void | IedServer_startThreadless (IedServer self, int tcpPort) |
Start handling client connection for non-threaded mode. More... | |
int | IedServer_waitReady (IedServer self, unsigned int timeoutMs) |
Wait until a server connection is ready (with timeout) More... | |
void | IedServer_processIncomingData (IedServer self) |
handle incoming TCP data in non-threaded mode More... | |
void | IedServer_performPeriodicTasks (IedServer self) |
perform periodic background tasks in non-threaded mode More... | |
void | IedServer_stopThreadless (IedServer self) |
Stop handling client connections for non-threaded mode. More... | |
IedModel * | IedServer_getDataModel (IedServer self) |
Return the data model of the server. More... | |
bool | IedServer_isRunning (IedServer self) |
Check if IedServer instance is listening for client connections. More... | |
MmsServer | IedServer_getMmsServer (IedServer self) |
Get access to the underlying MmsServer instance. More... | |
void | IedServer_enableGoosePublishing (IedServer self) |
Enable all GOOSE control blocks. More... | |
void | IedServer_disableGoosePublishing (IedServer self) |
Disable all GOOSE control blocks. More... | |
void | IedServer_setGooseInterfaceId (IedServer self, const char *interfaceId) |
Set the Ethernet interface to be used by GOOSE publishing. More... | |
void | IedServer_setAuthenticator (IedServer self, AcseAuthenticator authenticator, void *authenticatorParameter) |
set the authenticator for this server More... | |
const char * | ClientConnection_getPeerAddress (ClientConnection self) |
get the peer address of this connection as string More... | |
void * | ClientConnection_getSecurityToken (ClientConnection self) |
Get the security token associated with this connection. More... | |
void | IedServer_setConnectionIndicationHandler (IedServer self, IedConnectionIndicationHandler handler, void *parameter) |
set a callback function that will be called on connection events (open or close). More... | |
void | IedServer_lockDataModel (IedServer self) |
Lock the MMS server data model. More... | |
void | IedServer_unlockDataModel (IedServer self) |
Unlock the MMS server data model and process pending client requests. More... | |
MmsValue * | IedServer_getAttributeValue (IedServer self, DataAttribute *dataAttribute) |
Get data attribute value. More... | |
bool | IedServer_getBooleanAttributeValue (IedServer self, const DataAttribute *dataAttribute) |
Get data attribute value of a boolean data attribute. More... | |
int32_t | IedServer_getInt32AttributeValue (IedServer self, const DataAttribute *dataAttribute) |
Get data attribute value of an integer data attribute. More... | |
int64_t | IedServer_getInt64AttributeValue (IedServer self, const DataAttribute *dataAttribute) |
Get data attribute value of an integer data attribute. More... | |
uint32_t | IedServer_getUInt32AttributeValue (IedServer self, const DataAttribute *dataAttribute) |
Get data attribute value of an unsigned integer data attribute. More... | |
float | IedServer_getFloatAttributeValue (IedServer self, const DataAttribute *dataAttribute) |
Get data attribute value of a floating point data attribute. More... | |
uint64_t | IedServer_getUTCTimeAttributeValue (IedServer self, const DataAttribute *dataAttribute) |
Get data attribute value of a UTC time data attribute. More... | |
uint32_t | IedServer_getBitStringAttributeValue (IedServer self, const DataAttribute *dataAttribute) |
Get data attribute value of a bit string data attribute as integer value. More... | |
const char * | IedServer_getStringAttributeValue (IedServer self, const DataAttribute *dataAttribute) |
Get data attribute value of a string type data attribute. More... | |
MmsValue * | IedServer_getFunctionalConstrainedData (IedServer self, DataObject *dataObject, FunctionalConstraint fc) |
Get the MmsValue object related to a FunctionalConstrainedData object. More... | |
void | IedServer_updateAttributeValue (IedServer self, DataAttribute *dataAttribute, MmsValue *value) |
Update the MmsValue object of an IEC 61850 data attribute. More... | |
void | IedServer_updateFloatAttributeValue (IedServer self, DataAttribute *dataAttribute, float value) |
Update the value of an IEC 61850 float data attribute. More... | |
void | IedServer_updateInt32AttributeValue (IedServer self, DataAttribute *dataAttribute, int32_t value) |
Update the value of an IEC 61850 integer32 data attribute. More... | |
void | IedServer_udpateDbposValue (IedServer self, DataAttribute *dataAttribute, Dbpos value) |
Update the value of an IEC 61850 Dbpos (double point/position) data attribute. More... | |
void | IedServer_updateInt64AttributeValue (IedServer self, DataAttribute *dataAttribute, int64_t value) |
Update the value of an IEC 61850 integer64 data attribute (like BCR actVal) More... | |
void | IedServer_updateUnsignedAttributeValue (IedServer self, DataAttribute *dataAttribute, uint32_t value) |
Update the value of an IEC 61850 unsigned integer data attribute. More... | |
void | IedServer_updateBitStringAttributeValue (IedServer self, DataAttribute *dataAttribute, uint32_t value) |
Update the value of an IEC 61850 bit string data attribute. More... | |
void | IedServer_updateBooleanAttributeValue (IedServer self, DataAttribute *dataAttribute, bool value) |
Update the value of an IEC 61850 boolean data attribute. More... | |
void | IedServer_updateVisibleStringAttributeValue (IedServer self, DataAttribute *dataAttribute, char *value) |
Update the value of an IEC 61850 visible string data attribute. More... | |
void | IedServer_updateUTCTimeAttributeValue (IedServer self, DataAttribute *dataAttribute, uint64_t value) |
Update the value of an IEC 61850 UTC time (timestamp) data attribute. More... | |
void | IedServer_updateTimestampAttributeValue (IedServer self, DataAttribute *dataAttribute, Timestamp *timestamp) |
Update the value of an IEC 61850 UTC time (timestamp) data attribute. More... | |
void | IedServer_updateQuality (IedServer self, DataAttribute *dataAttribute, Quality quality) |
Update a quality ("q") IEC 61850 data attribute. More... | |
void | IedServer_setLogStorage (IedServer self, const char *logRef, LogStorage logStorage) |
void | IedServer_changeActiveSettingGroup (IedServer self, SettingGroupControlBlock *sgcb, uint8_t newActiveSg) |
Change active setting group. More... | |
uint8_t | IedServer_getActiveSettingGroup (IedServer self, SettingGroupControlBlock *sgcb) |
Get the active setting group number. More... | |
void | IedServer_setActiveSettingGroupChangedHandler (IedServer self, SettingGroupControlBlock *sgcb, ActiveSettingGroupChangedHandler handler, void *parameter) |
Set the callback handler for the SetActSG event. More... | |
void | IedServer_setEditSettingGroupChangedHandler (IedServer self, SettingGroupControlBlock *sgcb, EditSettingGroupChangedHandler handler, void *parameter) |
Set the callback handler for the SetEditSG event. More... | |
void | IedServer_setEditSettingGroupConfirmationHandler (IedServer self, SettingGroupControlBlock *sgcb, EditSettingGroupConfirmationHandler handler, void *parameter) |
Set the callback handler for the COnfEditSG event. More... | |
void | IedServer_setControlHandler (IedServer self, DataObject *node, ControlHandler handler, void *parameter) |
Set control handler for controllable data object. More... | |
void | IedServer_setPerformCheckHandler (IedServer self, DataObject *node, ControlPerformCheckHandler handler, void *parameter) |
Set a handler for a controllable data object to perform operative tests. More... | |
void | IedServer_setWaitForExecutionHandler (IedServer self, DataObject *node, ControlWaitForExecutionHandler handler, void *parameter) |
Set a handler for a controllable data object to perform dynamic tests. More... | |
void | IedServer_setSVCBHandler (IedServer self, SVControlBlock *svcb, SVCBEventHandler handler, void *parameter) |
Set a handler for SVCB control block events (enable/disable) More... | |
void | IedServer_handleWriteAccess (IedServer self, DataAttribute *dataAttribute, WriteAccessHandler handler, void *parameter) |
Install a WriteAccessHandler for a data attribute. More... | |
void | IedServer_setWriteAccessPolicy (IedServer self, FunctionalConstraint fc, AccessPolicy policy) |
Change the default write access policy for functional constraint data with a specific FC. More... | |