- updated server_example_control

pull/244/head
Michael Zillgith 5 years ago
parent 07aaf23238
commit 4cb5ffa8c2

@ -27,6 +27,15 @@ sigint_handler(int signalId)
static CheckHandlerResult static CheckHandlerResult
checkHandler(ControlAction action, void* parameter, MmsValue* ctlVal, bool test, bool interlockCheck) 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)) if (ControlAction_isSelect(action))
printf("check handler called by select command!\n"); printf("check handler called by select command!\n");
else else
@ -63,6 +72,15 @@ controlHandlerForBinaryOutput(ControlAction action, void* parameter, MmsValue* v
printf("control handler called\n"); printf("control handler called\n");
printf(" ctlNum: %i\n", ControlAction_getCtlNum(action)); 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) { if (parameter == IEDMODEL_GenericIO_GGIO1_SPCSO1) {
IedServer_updateUTCTimeAttributeValue(iedServer, IEDMODEL_GenericIO_GGIO1_SPCSO1_t, timestamp); IedServer_updateUTCTimeAttributeValue(iedServer, IEDMODEL_GenericIO_GGIO1_SPCSO1_t, timestamp);
IedServer_updateAttributeValue(iedServer, IEDMODEL_GenericIO_GGIO1_SPCSO1_stVal, value); IedServer_updateAttributeValue(iedServer, IEDMODEL_GenericIO_GGIO1_SPCSO1_stVal, value);

Loading…
Cancel
Save