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;
}
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;
}
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;
}
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;
}
Aggregations