|
|
|
@ -129,14 +129,26 @@ main(int argc, char** argv)
|
|
|
|
|
|
|
|
|
|
IedServer_lockDataModel(iedServer);
|
|
|
|
|
|
|
|
|
|
Timestamp iecTimestamp;
|
|
|
|
|
|
|
|
|
|
Timestamp_clearFlags(&iecTimestamp);
|
|
|
|
|
Timestamp_setTimeInMilliseconds(&iecTimestamp, timestamp);
|
|
|
|
|
|
|
|
|
|
/* toggle clock-not-synchronized flag in timestamp */
|
|
|
|
|
if (((int) t % 2) == 0)
|
|
|
|
|
Timestamp_setClockNotSynchronized(&iecTimestamp, true);
|
|
|
|
|
|
|
|
|
|
IedServer_updateFloatAttributeValue(iedServer, IEDMODEL_GenericIO_GGIO1_AnIn1_mag_f, an1);
|
|
|
|
|
IedServer_updateUTCTimeAttributeValue(iedServer, IEDMODEL_GenericIO_GGIO1_AnIn1_t, timestamp);
|
|
|
|
|
IedServer_updateTimestampAttributeValue(iedServer, IEDMODEL_GenericIO_GGIO1_AnIn1_t, &iecTimestamp);
|
|
|
|
|
|
|
|
|
|
IedServer_updateFloatAttributeValue(iedServer, IEDMODEL_GenericIO_GGIO1_AnIn2_mag_f, an2);
|
|
|
|
|
IedServer_updateUTCTimeAttributeValue(iedServer, IEDMODEL_GenericIO_GGIO1_AnIn2_t, timestamp);
|
|
|
|
|
IedServer_updateTimestampAttributeValue(iedServer, IEDMODEL_GenericIO_GGIO1_AnIn2_t, &iecTimestamp);
|
|
|
|
|
|
|
|
|
|
IedServer_updateFloatAttributeValue(iedServer, IEDMODEL_GenericIO_GGIO1_AnIn3_mag_f, an3);
|
|
|
|
|
IedServer_updateUTCTimeAttributeValue(iedServer, IEDMODEL_GenericIO_GGIO1_AnIn3_t, timestamp);
|
|
|
|
|
IedServer_updateTimestampAttributeValue(iedServer, IEDMODEL_GenericIO_GGIO1_AnIn3_t, &iecTimestamp);
|
|
|
|
|
|
|
|
|
|
IedServer_updateFloatAttributeValue(iedServer, IEDMODEL_GenericIO_GGIO1_AnIn4_mag_f, an4);
|
|
|
|
|
IedServer_updateUTCTimeAttributeValue(iedServer, IEDMODEL_GenericIO_GGIO1_AnIn4_t, timestamp);
|
|
|
|
|
IedServer_updateTimestampAttributeValue(iedServer, IEDMODEL_GenericIO_GGIO1_AnIn4_t, &iecTimestamp);
|
|
|
|
|
|
|
|
|
|
IedServer_unlockDataModel(iedServer);
|
|
|
|
|
|
|
|
|
|