- updated server_example_control

pull/239/head
Michael Zillgith 5 years ago
parent a6bad96d25
commit 7e4e396403

@ -27,6 +27,15 @@ sigint_handler(int signalId)
static CheckHandlerResult
checkHandler(ControlAction action, void* parameter, MmsValue* ctlVal, bool test, bool interlockCheck)
{
ClientConnection clientCon = ControlAction_getClientConnection(action);
if (clientCon) {
printf("Control from client %s\n", ClientConnection_getPeerAddress(clientCon));
}
else {
printf("clientCon == NULL\n");
}
if (ControlAction_isSelect(action))
printf("check handler called by select command!\n");
else
@ -63,6 +72,15 @@ controlHandlerForBinaryOutput(ControlAction action, void* parameter, MmsValue* v
printf("control handler called\n");
printf(" ctlNum: %i\n", ControlAction_getCtlNum(action));
ClientConnection clientCon = ControlAction_getClientConnection(action);
if (clientCon) {
printf("Control from client %s\n", ClientConnection_getPeerAddress(clientCon));
}
else {
printf("clientCon == NULL!\n");
}
if (parameter == IEDMODEL_GenericIO_GGIO1_SPCSO1) {
IedServer_updateUTCTimeAttributeValue(iedServer, IEDMODEL_GenericIO_GGIO1_SPCSO1_t, timestamp);
IedServer_updateAttributeValue(iedServer, IEDMODEL_GenericIO_GGIO1_SPCSO1_stVal, value);

Loading…
Cancel
Save