Search in sources :

Example 11 with NodeException

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);
}
Also used : NodeContainer(org.opensmartgridplatform.adapter.protocol.iec61850.infra.networking.helper.NodeContainer)

Example 12 with NodeException

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);
}
Also used : NodeContainer(org.opensmartgridplatform.adapter.protocol.iec61850.infra.networking.helper.NodeContainer)

Example 13 with NodeException

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);
}
Also used : NodeContainer(org.opensmartgridplatform.adapter.protocol.iec61850.infra.networking.helper.NodeContainer)

Example 14 with NodeException

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);
}
Also used : NodeContainer(org.opensmartgridplatform.adapter.protocol.iec61850.infra.networking.helper.NodeContainer)

Example 15 with NodeException

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();
}
Also used : NodeContainer(org.opensmartgridplatform.adapter.protocol.iec61850.infra.networking.helper.NodeContainer) DateTime(org.joda.time.DateTime)

Aggregations

NodeContainer (org.opensmartgridplatform.adapter.protocol.iec61850.infra.networking.helper.NodeContainer)53 Iec61850ClientBaseEventListener (org.opensmartgridplatform.adapter.protocol.iec61850.infra.networking.reporting.Iec61850ClientBaseEventListener)5 BdaBoolean (com.beanit.openiec61850.BdaBoolean)2 Date (java.util.Date)2 DateTime (org.joda.time.DateTime)1 ProfilePair (org.opensmartgridplatform.adapter.protocol.iec61850.domain.valueobjects.ProfilePair)1 LogicalNode (org.opensmartgridplatform.adapter.protocol.iec61850.infra.networking.helper.LogicalNode)1