use of org.opensmartgridplatform.adapter.protocol.iec61850.exceptions.NodeException in project open-smart-grid-platform by OSGP.
the class Iec61850MaximumPowerLimitCommand method execute.
@Override
public MeasurementDto execute(final Iec61850Client client, final DeviceConnection connection, final LogicalDevice logicalDevice, final int logicalDeviceIndex) throws NodeException {
final NodeContainer containingNode = connection.getFcModelNode(logicalDevice, logicalDeviceIndex, LogicalNode.DER_CONTROLLER_CHARACTERISTICS_ONE, DataAttribute.MAXIMUM_POWER_LIMIT, Fc.CF);
client.readNodeDataValues(connection.getConnection().getClientAssociation(), containingNode.getFcmodelNode());
return this.translate(containingNode);
}
use of org.opensmartgridplatform.adapter.protocol.iec61850.exceptions.NodeException in project open-smart-grid-platform by OSGP.
the class Iec61850FrequencyCommand method execute.
@Override
public MeasurementDto execute(final Iec61850Client client, final DeviceConnection connection, final LogicalDevice logicalDevice, final int logicalDeviceIndex) throws NodeException {
final NodeContainer containingNode = connection.getFcModelNode(logicalDevice, logicalDeviceIndex, this.logicalNode, this.dataAttribute, Fc.MX);
client.readNodeDataValues(connection.getConnection().getClientAssociation(), containingNode.getFcmodelNode());
return this.translate(containingNode);
}
use of org.opensmartgridplatform.adapter.protocol.iec61850.exceptions.NodeException in project open-smart-grid-platform by OSGP.
the class Iec61850ImpedanceCommand method execute.
@Override
public MeasurementDto execute(final Iec61850Client client, final DeviceConnection connection, final LogicalDevice logicalDevice, final int logicalDeviceIndex) throws NodeException {
final NodeContainer containingNode = connection.getFcModelNode(logicalDevice, logicalDeviceIndex, this.logicalNode, this.dataAttribute, Fc.MX);
client.readNodeDataValues(connection.getConnection().getClientAssociation(), containingNode.getFcmodelNode());
return this.translate(containingNode);
}
use of org.opensmartgridplatform.adapter.protocol.iec61850.exceptions.NodeException in project open-smart-grid-platform by OSGP.
the class Iec61850TotalEnergyCommand method execute.
@Override
public MeasurementDto execute(final Iec61850Client client, final DeviceConnection connection, final LogicalDevice logicalDevice, final int logicalDeviceIndex) throws NodeException {
final NodeContainer containingNode = connection.getFcModelNode(logicalDevice, logicalDeviceIndex, LogicalNode.GENERATOR_ONE, DataAttribute.TOTAL_ENERGY, Fc.MX);
client.readNodeDataValues(connection.getConnection().getClientAssociation(), containingNode.getFcmodelNode());
return this.translate(containingNode);
}
use of org.opensmartgridplatform.adapter.protocol.iec61850.exceptions.NodeException in project open-smart-grid-platform by OSGP.
the class Iec61850UpdateFirmwareCommand method determineFirmwareUpdateDateTime.
private Date determineFirmwareUpdateDateTime(final Iec61850Client iec61850Client, final DeviceConnection deviceConnection) throws NodeException {
final NodeContainer clock = deviceConnection.getFcModelNode(LogicalDevice.LIGHTING, LogicalNode.STREET_LIGHT_CONFIGURATION, DataAttribute.CLOCK, Fc.CF);
iec61850Client.readNodeDataValues(deviceConnection.getConnection().getClientAssociation(), clock.getFcmodelNode());
final DateTime deviceTime = new DateTime(clock.getDate(SubDataAttribute.CURRENT_TIME));
// Creating a DateTime one minute from now.
return deviceTime.plusMinutes(1).toDate();
}
Aggregations