27 #ifndef IED_SERVER_API_H_ 28 #define IED_SERVER_API_H_ 752 uint8_t newActSg, ClientConnection connection);
784 uint8_t newEditSg, ClientConnection connection);
868 ClientConnection connection);
970 #define IEC61850_SVCB_EVENT_ENABLE 1 973 #define IEC61850_SVCB_EVENT_DISABLE 0 void IedServer_destroy(IedServer self)
Destroy an IedServer instance and release all resources (memory, TCP sockets)
Definition: iec61850_server.h:848
Definition: iec61850_server.h:837
void IedServer_setGooseInterfaceId(IedServer self, const char *interfaceId)
Set the ethernet interface to be used by GOOSE publishing.
void IedServer_start(IedServer self, int tcpPort)
Start handling client connections.
void IedServer_updateVisibleStringAttributeValue(IedServer self, DataAttribute *dataAttribute, char *value)
Update the value of an IEC 61850 visible string data attribute.
uint16_t Quality
Definition: iec61850_common.h:266
struct sIsoServer * IsoServer
Definition: iso_server.h:46
Definition: iec61850_server.h:834
void IedServer_updateBitStringAttributeValue(IedServer self, DataAttribute *dataAttribute, uint32_t value)
Update the value of an IEC 61850 bit string data attribute.
IedModel * IedServer_getDataModel(IedServer self)
Return the data model of the server.
void IedServer_unlockDataModel(IedServer self)
Unlock the MMS server data model and process pending client requests.
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 cl...
Definition: iec61850_server.h:783
CheckHandlerResult
result code for ControlPerformCheckHandler
Definition: iec61850_server.h:833
void IedServer_setConnectionIndicationHandler(IedServer self, IedConnectionIndicationHandler handler, void *parameter)
set a callback function that will be called on connection events (open or close). ...
void IedServer_updateQuality(IedServer self, DataAttribute *dataAttribute, Quality quality)
Update a quality ("q") IEC 61850 data attribute.
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 ...
Definition: iec61850_server.h:751
Definition: iec61850_server.h:846
void IedServer_updateUTCTimeAttributeValue(IedServer self, DataAttribute *dataAttribute, uint64_t value)
Update the value of an IEC 61850 UTC time (timestamp) data attribute.
void IedServer_updateInt32AttributeValue(IedServer self, DataAttribute *dataAttribute, int32_t value)
Update the value of an IEC 61850 integer32 data attribute.
Definition: iec61850_server.h:847
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 connect...
Definition: iec61850_server.h:317
bool(* AcseAuthenticator)(void *parameter, AcseAuthenticationParameter authParameter, void **securityToken, IsoApplicationReference *appReference)
Callback function to authenticate a client.
Definition: iso_connection_parameters.h:97
void IedServer_stopThreadless(IedServer self)
Stop handling client connections for non-threaded mode.
struct sMmsServer * MmsServer
Definition: mms_server.h:43
MmsValue * IedServer_getAttributeValue(IedServer self, DataAttribute *dataAttribute)
Get data attribute value.
void IedServer_lockDataModel(IedServer self)
Lock the MMS server data model.
uint8_t IedServer_getActiveSettingGroup(IedServer self, SettingGroupControlBlock *sgcb)
Get the active setting group number.
void IedServer_setActiveSettingGroupChangedHandler(IedServer self, SettingGroupControlBlock *sgcb, ActiveSettingGroupChangedHandler handler, void *parameter)
Set the callback handler for the SetActSG event.
void IedServer_processIncomingData(IedServer self)
handle incoming TCP data in non-threaded mode
MmsDataAccessError(* WriteAccessHandler)(DataAttribute *dataAttribute, MmsValue *value, ClientConnection connection, void *parameter)
callback handler to intercept/control client access to data attributes
Definition: iec61850_server.h:1056
const char * ClientConnection_getPeerAddress(ClientConnection self)
get the peer address of this connection as string
int32_t IedServer_getInt32AttributeValue(IedServer self, const DataAttribute *dataAttribute)
Get data attribute value of an integer data attribute.
Definition: iec61850_common.h:352
float IedServer_getFloatAttributeValue(IedServer self, const DataAttribute *dataAttribute)
Get data attribute value of a floating point data attribute.
void IedServer_setWriteAccessPolicy(IedServer self, FunctionalConstraint fc, AccessPolicy policy)
Change the default write access policy for functional constraint data with a specific FC...
struct sIedServer * IedServer
Definition: iec61850_server.h:47
Definition: iec61850_server.h:836
MmsValue * IedServer_getFunctionalConstrainedData(IedServer self, DataObject *dataObject, FunctionalConstraint fc)
Get the MmsValue object related to a FunctionalConstrainedData object.
void IedServer_updateInt64AttributeValue(IedServer self, DataAttribute *dataAttribute, int64_t value)
Update the value of an IEC 61850 integer64 data attribute (like BCR actVal)
void(* AttributeChangedHandler)(DataAttribute *dataAttribute, ClientConnection connection)
callback handler to monitor client access to data attributes
Definition: iec61850_server.h:1013
Definition: iec61850_server.h:835
void IedServer_stop(IedServer self)
Stop handling client connections.
void IedServer_setLocalIpAddress(IedServer self, const char *localIpAddress)
Set the local IP address to listen on.
ControlHandlerResult(* ControlWaitForExecutionHandler)(void *parameter, MmsValue *ctlVal, bool test, bool synchroCheck)
Control model callback to perform the dynamic tests (optional).
Definition: iec61850_server.h:889
uint32_t IedServer_getBitStringAttributeValue(IedServer self, const DataAttribute *dataAttribute)
Get data attribute value of a bit string data attribute as integer value.
Definition: iec61850_server.h:838
int IedServer_waitReady(IedServer self, unsigned int timeoutMs)
Wait until a server connection is ready (with timeout)
ControlHandlerResult
result codes for control handler (ControlWaitForExecutionHandler and ControlHandler) ...
Definition: iec61850_server.h:845
MmsServer IedServer_getMmsServer(IedServer self)
Get access to the underlying MmsServer instance.
void IedServer_disableGoosePublishing(IedServer self)
Disable all GOOSE control blocks.
void IedServer_updateUnsignedAttributeValue(IedServer self, DataAttribute *dataAttribute, uint32_t value)
Update the value of an IEC 61850 unsigned integer data attribute.
void IedServer_observeDataAttribute(IedServer self, DataAttribute *dataAttribute, AttributeChangedHandler handler)
Install an observer for a data attribute.
void IedServer_updateAttributeValue(IedServer self, DataAttribute *dataAttribute, MmsValue *value)
Update the MmsValue object of an IEC 61850 data attribute.
MmsDataAccessError
Definition: mms_value.h:47
void IedServer_setFilestoreBasepath(IedServer self, const char *basepath)
Set the virtual filestore basepath for the MMS file services.
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...
Definition: iec61850_server.h:807
void * ClientConnection_getSecurityToken(ClientConnection self)
Get the security token associated with this connection.
struct sClientConnection * ClientConnection
Definition: iec61850_server.h:52
CheckHandlerResult(* ControlPerformCheckHandler)(void *parameter, MmsValue *ctlVal, bool test, bool interlockCheck, ClientConnection connection)
Control model callback to perform the static tests (optional).
Definition: iec61850_server.h:867
AccessPolicy
Definition: iec61850_server.h:1077
Definition: iec61850_server.h:1078
void IedServer_changeActiveSettingGroup(IedServer self, SettingGroupControlBlock *sgcb, uint8_t newActiveSg)
Change active setting group.
uint32_t IedServer_getUInt32AttributeValue(IedServer self, const DataAttribute *dataAttribute)
Get data attribute value of an unsigned integer data attribute.
void IedServer_handleWriteAccess(IedServer self, DataAttribute *dataAttribute, WriteAccessHandler handler, void *parameter)
Install a WriteAccessHandler for a data attribute.
void IedServer_setLogStorage(IedServer self, const char *logRef, LogStorage logStorage)
void IedServer_updateTimestampAttributeValue(IedServer self, DataAttribute *dataAttribute, Timestamp *timestamp)
Update the value of an IEC 61850 UTC time (timestamp) data attribute.
void(* SVCBEventHandler)(SVControlBlock *svcb, int event, void *parameter)
callback handler for SVCB events.
Definition: iec61850_server.h:982
Dbpos
Definition: iec61850_common.h:315
IsoServer IedServer_getIsoServer(IedServer self)
get the IsoServer instance for this IedServer object
void IedServer_setEditSettingGroupConfirmationHandler(IedServer self, SettingGroupControlBlock *sgcb, EditSettingGroupConfirmationHandler handler, void *parameter)
Set the callback handler for the COnfEditSG event.
void IedServer_setControlHandler(IedServer self, DataObject *node, ControlHandler handler, void *parameter)
Set control handler for controllable data object.
void IedServer_updateBooleanAttributeValue(IedServer self, DataAttribute *dataAttribute, bool value)
Update the value of an IEC 61850 boolean data attribute.
void IedServer_enableGoosePublishing(IedServer self)
Enable all GOOSE control blocks.
Definition: iec61850_server.h:1079
void IedServer_setWaitForExecutionHandler(IedServer self, DataObject *node, ControlWaitForExecutionHandler handler, void *parameter)
Set a handler for a controllable data object to perform dynamic tests.
void IedServer_setAuthenticator(IedServer self, AcseAuthenticator authenticator, void *authenticatorParameter)
set the authenticator for this server
IedServer IedServer_create(IedModel *iedModel)
Create a new IedServer instance.
FunctionalConstraint
Definition: iec61850_common.h:202
void IedServer_udpateDbposValue(IedServer self, DataAttribute *dataAttribute, Dbpos value)
Update the value of an IEC 61850 Dbpos (double point/position) data attribute.
void IedServer_updateFloatAttributeValue(IedServer self, DataAttribute *dataAttribute, float value)
Update the value of an IEC 61850 float data attribute.
void IedServer_startThreadless(IedServer self, int tcpPort)
Start handling client connection for non-threaded mode.
void IedServer_setEditSettingGroupChangedHandler(IedServer self, SettingGroupControlBlock *sgcb, EditSettingGroupChangedHandler handler, void *parameter)
Set the callback handler for the SetEditSG event.
uint64_t IedServer_getUTCTimeAttributeValue(IedServer self, const DataAttribute *dataAttribute)
Get data attribute value of a UTC time data attribute.
bool IedServer_getBooleanAttributeValue(IedServer self, const DataAttribute *dataAttribute)
Get data attribute value of a boolean data attribute.
void IedServer_setPerformCheckHandler(IedServer self, DataObject *node, ControlPerformCheckHandler handler, void *parameter)
Set a handler for a controllable data object to perform operative tests.
void IedServer_setSVCBHandler(IedServer self, SVControlBlock *svcb, SVCBEventHandler handler, void *parameter)
Set a handler for SVCB control block events (enable/disable)
ControlHandlerResult(* ControlHandler)(void *parameter, MmsValue *ctlVal, bool test)
Control model callback to actually perform the control operation.
Definition: iec61850_server.h:908
const char * IedServer_getStringAttributeValue(IedServer self, const DataAttribute *dataAttribute)
Get data attribute value of a string type data attribute.
bool IedServer_isRunning(IedServer self)
Check if IedServer instance is listening for client connections.
void IedServer_performPeriodicTasks(IedServer self)
perform periodic background tasks in non-threaded mode
Definition: iec61850_server.h:839
struct sMmsValue MmsValue
Definition: mms_value.h:68
int64_t IedServer_getInt64AttributeValue(IedServer self, const DataAttribute *dataAttribute)
Get data attribute value of an integer data attribute.