libiec61850
1.5.3
|
Typedefs | |
typedef MmsDataAccessError(* | WriteAccessHandler) (DataAttribute *dataAttribute, MmsValue *value, ClientConnection connection, void *parameter) |
callback handler to intercept/control client write access to data attributes More... | |
typedef MmsDataAccessError(* | ReadAccessHandler) (LogicalDevice *ld, LogicalNode *ln, DataObject *dataObject, FunctionalConstraint fc, ClientConnection connection, void *parameter) |
callback handler to control client read access to data attributes More... | |
Enumerations | |
enum | AccessPolicy { ACCESS_POLICY_ALLOW , ACCESS_POLICY_DENY } |
Functions | |
LIB61850_API void | IedServer_handleWriteAccess (IedServer self, DataAttribute *dataAttribute, WriteAccessHandler handler, void *parameter) |
Install a WriteAccessHandler for a data attribute. More... | |
LIB61850_API void | IedServer_handleWriteAccessForComplexAttribute (IedServer self, DataAttribute *dataAttribute, WriteAccessHandler handler, void *parameter) |
Install a WriteAccessHandler for a data attribute and for all sub data attributes. More... | |
LIB61850_API void | IedServer_setWriteAccessPolicy (IedServer self, FunctionalConstraint fc, AccessPolicy policy) |
Change the default write access policy for functional constraint data with a specific FC. More... | |
LIB61850_API void | IedServer_setReadAccessHandler (IedServer self, ReadAccessHandler handler, void *parameter) |
Install the global read access handler. More... | |
typedef MmsDataAccessError(* ReadAccessHandler) (LogicalDevice *ld, LogicalNode *ln, DataObject *dataObject, FunctionalConstraint fc, ClientConnection connection, void *parameter) |
callback handler to control client read access to data attributes
User provided callback function to control MMS client read access to IEC 61850 data objects. The application is to allow read access to data objects for specific clients only. It can be used to implement a role based access control (RBAC).
ld | the logical device the client wants to access |
ln | the logical node the client wants to access |
dataObject | the data object the client wants to access |
fc | the functional constraint of the access |
connection | the client connection that causes the access |
parameter | the user provided parameter |
typedef MmsDataAccessError(* WriteAccessHandler) (DataAttribute *dataAttribute, MmsValue *value, ClientConnection connection, void *parameter) |
callback handler to intercept/control client write access to data attributes
User provided callback function to intercept/control MMS client access to IEC 61850 data attributes. The application can install the same handler multiple times and distinguish data attributes by the dataAttribute parameter. This handler can be used to perform write access control do data attributes. One application can be to allow write access only from a specific client. Another application could be to check if the value is in the allowed range before the write is accepted. When the callback returns DATA_ACCESS_ERROR_SUCCESS the write access is accepted and the stack will update the value automatically. When the callback returns DATA_ACCESS_ERROR_SUCCESS_NO_UPDATE the write access is accepted but the stack will not update the value automatically.
the | data attribute that has been written by an MMS client. |
the | value the client want to write to the data attribute |
connection | the connection object of the client connection that invoked the write operation |
parameter | the user provided parameter |
enum AccessPolicy |
LIB61850_API void IedServer_handleWriteAccess | ( | IedServer | self, |
DataAttribute * | dataAttribute, | ||
WriteAccessHandler | handler, | ||
void * | parameter | ||
) |
Install a WriteAccessHandler for a data attribute.
This instructs the server to monitor write attempts by MMS clients to specific data attributes. If a client tries to write to the monitored data attribute the handler is invoked. The handler can decide if the write access will be allowed or denied. If a WriteAccessHandler is set for a specific data attribute - the default write access policy will not be performed for that data attribute.
NOTE: If the data attribute has sub data attributes, the WriteAccessHandler is not set for the sub data attributes and will not be called when the sub data attribute is written directly!
self | the instance of IedServer to operate on. |
dataAttribute | the data attribute to monitor |
handler | the callback function that is invoked if a client tries to write to the monitored data attribute. |
parameter | a user provided parameter that is passed to the WriteAccessHandler when called. |
LIB61850_API void IedServer_handleWriteAccessForComplexAttribute | ( | IedServer | self, |
DataAttribute * | dataAttribute, | ||
WriteAccessHandler | handler, | ||
void * | parameter | ||
) |
Install a WriteAccessHandler for a data attribute and for all sub data attributes.
This instructs the server to monitor write attempts by MMS clients to specific data attributes. If a client tries to write to the monitored data attribute the handler is invoked. The handler can decide if the write access will be allowed or denied. If a WriteAccessHandler is set for a specific data attribute - the default write access policy will not be performed for that data attribute.
When the data attribute is a complex attribute then the handler will also be installed for all sub data attributes. When the data attribute is a basic data attribute then this function behaves like IedServer_handleWriteAccess.
self | the instance of IedServer to operate on. |
dataAttribute | the data attribute to monitor |
handler | the callback function that is invoked if a client tries to write to the monitored data attribute. |
parameter | a user provided parameter that is passed to the WriteAccessHandler when called. |
LIB61850_API void IedServer_setReadAccessHandler | ( | IedServer | self, |
ReadAccessHandler | handler, | ||
void * | parameter | ||
) |
Install the global read access handler.
The read access handler will be called for every read access before the server grants access to the client.
self | the instance of IedServer to operate on. |
handler | the callback function that is invoked if a client tries to read a data object. |
parameter | a user provided parameter that is passed to the callback function. |
LIB61850_API void IedServer_setWriteAccessPolicy | ( | IedServer | self, |
FunctionalConstraint | fc, | ||
AccessPolicy | policy | ||
) |
Change the default write access policy for functional constraint data with a specific FC.
self | the instance of IedServer to operate on. |
fc | the FC for which to change the default write access policy. |
policy | the new policy to apply. |