use of org.openmuc.j60870.ie.InformationElement in project open-smart-grid-platform by OSGP.
the class LightMeasurementDeviceAsduFactory method createInformationElementWithTimetag.
private InformationElement[][] createInformationElementWithTimetag(final boolean value, final long timestamp) {
final TimeZone timeZone = TimeZone.getTimeZone(this.timeZoneString);
final boolean invalid = false;
return new InformationElement[][] { { new IeSinglePointWithQuality(value, false, false, false, false), new IeTime56(timestamp, timeZone, invalid) } };
}
use of org.openmuc.j60870.ie.InformationElement in project open-smart-grid-platform by OSGP.
the class Iec60870Server method addTimestamp.
private static InformationElement[][] addTimestamp(final InformationElement[][] informationElements) {
final InformationElement[][] result = Arrays.copyOf(informationElements, 2);
result[1] = new InformationElement[] { new IeTime56(System.currentTimeMillis()) };
return result;
}
use of org.openmuc.j60870.ie.InformationElement in project open-smart-grid-platform by OSGP.
the class Iec60870ServerEventListener method sendInformationUpdateEvent.
public void sendInformationUpdateEvent(final int informationObjectAddress, final InformationElement[][] informationElements) {
final ASdu event = new ASdu(ASduType.M_SP_TB_1, false, CauseOfTransmission.SPONTANEOUS, false, false, 0, 0, new InformationObject(informationObjectAddress, informationElements));
this.iec60870ConnectionRegistry.getAllConnections().forEach(connection -> this.sendEvent(connection, event));
}
Aggregations