List of usage examples for org.joda.time DateTimeZone UTC
DateTimeZone UTC
To view the source code for org.joda.time DateTimeZone UTC.
Click Source Link
From source file:com.alliander.osgp.adapter.protocol.iec61850.infra.networking.services.commands.Iec61850LoadActualPowerCommand.java
License:Open Source License
@Override public MeasurementDto translate(final NodeContainer containingNode) { return new MeasurementDto(this.index, DataAttribute.ACTUAL_POWER.getDescription(), QualityConverter.toShort(containingNode.getQuality(SubDataAttribute.QUALITY).getValue()), new DateTime(containingNode.getDate(SubDataAttribute.TIME), DateTimeZone.UTC), containingNode.getChild(SubDataAttribute.MAGNITUDE).getFloat(SubDataAttribute.FLOAT).getFloat()); }
From source file:com.alliander.osgp.adapter.protocol.iec61850.infra.networking.services.commands.Iec61850LoadMaximumActualPowerCommand.java
License:Open Source License
@Override public MeasurementDto translate(final NodeContainer containingNode) { return new MeasurementDto(this.index, DataAttribute.MAX_ACTUAL_POWER.getDescription(), QualityConverter.toShort(containingNode.getQuality(SubDataAttribute.QUALITY).getValue()), new DateTime(containingNode.getDate(SubDataAttribute.TIME), DateTimeZone.UTC), containingNode.getChild(SubDataAttribute.MAGNITUDE).getFloat(SubDataAttribute.FLOAT).getFloat()); }
From source file:com.alliander.osgp.adapter.protocol.iec61850.infra.networking.services.commands.Iec61850LoadMinimumActualPowerCommand.java
License:Open Source License
@Override public MeasurementDto translate(final NodeContainer containingNode) { return new MeasurementDto(this.index, DataAttribute.MIN_ACTUAL_POWER.getDescription(), QualityConverter.toShort(containingNode.getQuality(SubDataAttribute.QUALITY).getValue()), new DateTime(containingNode.getDate(SubDataAttribute.TIME), DateTimeZone.UTC), containingNode.getChild(SubDataAttribute.MAGNITUDE).getFloat(SubDataAttribute.FLOAT).getFloat()); }
From source file:com.alliander.osgp.adapter.protocol.iec61850.infra.networking.services.commands.Iec61850LoadTotalEnergyCommand.java
License:Open Source License
@Override public MeasurementDto translate(final NodeContainer containingNode) { // Load total energy is implemented different on both RTUs // (one uses Int64, the other Int32) // As a workaround first try to read the value as Long // If that fails read the value as Integer long value = 0; try {// w w w . java 2 s. com value = containingNode.getLong(SubDataAttribute.ACTUAL_VALUE).getValue(); } catch (final ClassCastException e) { LOGGER.info("Reading long value resulted in class cast exception, trying to read integer value", e); value = containingNode.getInteger(SubDataAttribute.ACTUAL_VALUE).getValue(); } return new MeasurementDto(this.index, DataAttribute.TOTAL_ENERGY.getDescription(), QualityConverter.toShort(containingNode.getQuality(SubDataAttribute.QUALITY).getValue()), new DateTime(containingNode.getDate(SubDataAttribute.TIME), DateTimeZone.UTC), value); }
From source file:com.alliander.osgp.adapter.protocol.iec61850.infra.networking.services.commands.Iec61850MaximumActualPowerCommand.java
License:Open Source License
@Override public MeasurementDto translate(final NodeContainer containingNode) { return new MeasurementDto(1, DataAttribute.MAX_ACTUAL_POWER.getDescription(), QualityConverter.toShort(containingNode.getQuality(SubDataAttribute.QUALITY).getValue()), new DateTime(containingNode.getDate(SubDataAttribute.TIME), DateTimeZone.UTC), containingNode.getChild(SubDataAttribute.MAGNITUDE).getFloat(SubDataAttribute.FLOAT).getFloat()); }
From source file:com.alliander.osgp.adapter.protocol.iec61850.infra.networking.services.commands.Iec61850MinimumActualPowerCommand.java
License:Open Source License
@Override public MeasurementDto translate(final NodeContainer containingNode) { return new MeasurementDto(1, DataAttribute.MIN_ACTUAL_POWER.getDescription(), QualityConverter.toShort(containingNode.getQuality(SubDataAttribute.QUALITY).getValue()), new DateTime(containingNode.getDate(SubDataAttribute.TIME), DateTimeZone.UTC), containingNode.getChild(SubDataAttribute.MAGNITUDE).getFloat(SubDataAttribute.FLOAT).getFloat()); }
From source file:com.alliander.osgp.adapter.protocol.iec61850.infra.networking.services.commands.Iec61850ModeCommand.java
License:Open Source License
@Override public MeasurementDto translate(final NodeContainer containingNode) { return new MeasurementDto(1, DataAttribute.MODE.getDescription(), QualityConverter.toShort(containingNode.getQuality(SubDataAttribute.QUALITY).getValue()), new DateTime(containingNode.getDate(SubDataAttribute.TIME), DateTimeZone.UTC), containingNode.getByte(SubDataAttribute.STATE).getValue()); }
From source file:com.alliander.osgp.adapter.protocol.iec61850.infra.networking.services.commands.Iec61850OperationalHoursCommand.java
License:Open Source License
@Override public MeasurementDto translate(final NodeContainer containingNode) { return new MeasurementDto(1, DataAttribute.OPERATIONAL_HOURS.getDescription(), QualityConverter.toShort(containingNode.getQuality(SubDataAttribute.QUALITY).getValue()), new DateTime(containingNode.getDate(SubDataAttribute.TIME), DateTimeZone.UTC), containingNode.getInteger(SubDataAttribute.STATE).getValue()); }
From source file:com.alliander.osgp.adapter.protocol.iec61850.infra.networking.services.commands.Iec61850StateCommand.java
License:Open Source License
@Override public MeasurementDto translate(final NodeContainer containingNode) { return new MeasurementDto(1, DataAttribute.STATE.getDescription(), QualityConverter.toShort(containingNode.getQuality(SubDataAttribute.QUALITY).getValue()), new DateTime(containingNode.getDate(SubDataAttribute.TIME), DateTimeZone.UTC), containingNode.getByte(SubDataAttribute.STATE).getValue()); }
From source file:com.alliander.osgp.adapter.protocol.iec61850.infra.networking.services.commands.Iec61850StateOfChargeCommand.java
License:Open Source License
@Override public MeasurementDto translate(final NodeContainer containingNode) { return new MeasurementDto(1, DataAttribute.STATE_OF_CHARGE.getDescription(), QualityConverter.toShort(containingNode.getQuality(SubDataAttribute.QUALITY).getValue()), new DateTime(containingNode.getDate(SubDataAttribute.TIME), DateTimeZone.UTC), containingNode.getChild(SubDataAttribute.MAGNITUDE).getFloat(SubDataAttribute.FLOAT).getFloat()); }