Search in sources :

Example 26 with BasicDataAttribute

use of com.beanit.openiec61850.BasicDataAttribute in project open-smart-grid-platform by OSGP.

the class LogicalDevice method setByte.

protected BasicDataAttribute setByte(final LogicalDeviceNode node, final byte val) {
    final BdaInt8 value = (BdaInt8) this.serverModel.findModelNode(this.createNodeName(node), node.getFc());
    value.setValue(val);
    return value;
}
Also used : BdaInt8(com.beanit.openiec61850.BdaInt8)

Example 27 with BasicDataAttribute

use of com.beanit.openiec61850.BasicDataAttribute in project open-smart-grid-platform by OSGP.

the class LogicalDevice method setRandomFloat.

protected BasicDataAttribute setRandomFloat(final LogicalDeviceNode node, final int min, final int max) {
    final BdaFloat32 value = (BdaFloat32) this.serverModel.findModelNode(this.createNodeName(node), node.getFc());
    value.setFloat((float) ThreadLocalRandom.current().nextInt(min, max));
    return value;
}
Also used : BdaFloat32(com.beanit.openiec61850.BdaFloat32)

Example 28 with BasicDataAttribute

use of com.beanit.openiec61850.BasicDataAttribute in project open-smart-grid-platform by OSGP.

the class LogicalDevice method incrementInt.

protected BasicDataAttribute incrementInt(final LogicalDeviceNode node) {
    final BdaInt32 value = (BdaInt32) this.serverModel.findModelNode(this.createNodeName(node), node.getFc());
    value.setValue(value.getValue() + 1);
    return value;
}
Also used : BdaInt32(com.beanit.openiec61850.BdaInt32)

Example 29 with BasicDataAttribute

use of com.beanit.openiec61850.BasicDataAttribute in project open-smart-grid-platform by OSGP.

the class Node method getChangedTimestampAttributeForNode.

private BasicDataAttribute getChangedTimestampAttributeForNode(final ModelNode node) {
    final BdaTimestamp bda = (BdaTimestamp) node;
    bda.setCurrentTime();
    return bda;
}
Also used : BdaTimestamp(com.beanit.openiec61850.BdaTimestamp)

Aggregations

BasicDataAttribute (com.beanit.openiec61850.BasicDataAttribute)11 ArrayList (java.util.ArrayList)7 BasicDataAttribute (org.openmuc.openiec61850.BasicDataAttribute)4 LogicalDevice (org.opensmartgridplatform.simulator.protocol.iec61850.server.logicaldevices.LogicalDevice)4 LogicalDevice (com.alliander.osgp.simulator.protocol.iec61850.server.logicaldevices.LogicalDevice)3 BdaFloat32 (com.beanit.openiec61850.BdaFloat32)3 BdaInt32 (com.beanit.openiec61850.BdaInt32)3 BdaInt8 (com.beanit.openiec61850.BdaInt8)3 BdaTimestamp (com.beanit.openiec61850.BdaTimestamp)2 BdaVisibleString (com.beanit.openiec61850.BdaVisibleString)2 ModelNode (com.beanit.openiec61850.ModelNode)2 ServerModel (com.beanit.openiec61850.ServerModel)2 Date (java.util.Date)2 Scheduled (org.springframework.scheduling.annotation.Scheduled)2 BdaBoolean (com.beanit.openiec61850.BdaBoolean)1 BdaInt64 (com.beanit.openiec61850.BdaInt64)1 BdaQuality (com.beanit.openiec61850.BdaQuality)1 SclParseException (com.beanit.openiec61850.SclParseException)1 IOException (java.io.IOException)1 Matcher (java.util.regex.Matcher)1