diff --git a/src/iec61850/inc/iec61850_server.h b/src/iec61850/inc/iec61850_server.h index e1e6226f..35b428ce 100644 --- a/src/iec61850/inc/iec61850_server.h +++ b/src/iec61850/inc/iec61850_server.h @@ -1194,6 +1194,16 @@ ControlAction_getClientConnection(ControlAction self); LIB61850_API DataObject* ControlAction_getControlObject(ControlAction self); +/** + * \brief Gets the time of the control, if it's a timeActivatedControl, returns 0, if it's not. + * + * \param self the control action instance + * + * \return the controllable data object instance + */ +LIB61850_API uint64_t +ControlAction_getControlTime(ControlAction self); + /** * \brief Control model callback to perform the static tests (optional). * diff --git a/src/iec61850/server/mms_mapping/control.c b/src/iec61850/server/mms_mapping/control.c index aa818a42..29f12790 100644 --- a/src/iec61850/server/mms_mapping/control.c +++ b/src/iec61850/server/mms_mapping/control.c @@ -1777,5 +1777,13 @@ ControlAction_getControlObject(ControlAction self) return controlObject->dataObject; } +uint64_t +ControlAction_getControlTime(ControlAction self) +{ + ControlObject* controlObject = (ControlObject*) self; + + return controlObject->operateTime; +} + #endif /* (CONFIG_IEC61850_CONTROL_SERVICE == 1) */