use of com.beanit.openiec61850.BasicDataAttribute in project open-smart-grid-platform by OSGP.
the class LogicalDevice method setRandomInt.
protected BasicDataAttribute setRandomInt(final LogicalDeviceNode node, final int min, final int max) {
final BdaInt32 value = (BdaInt32) this.serverModel.findModelNode(this.createNodeName(node), node.getFc());
value.setValue(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 setInt.
protected BasicDataAttribute setInt(final LogicalDeviceNode node, final int val) {
final BdaInt32 value = (BdaInt32) 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 setBoolean.
protected BasicDataAttribute setBoolean(final LogicalDeviceNode node, final boolean b) {
final BdaBoolean value = (BdaBoolean) this.serverModel.findModelNode(this.createNodeName(node), node.getFc());
value.setValue(b);
return value;
}
use of com.beanit.openiec61850.BasicDataAttribute in project open-smart-grid-platform by OSGP.
the class Node method getChangedMagnitudeAttributeForNode.
private BasicDataAttribute getChangedMagnitudeAttributeForNode(final ModelNode node) {
final BdaFloat32 bda = (BdaFloat32) node;
bda.setFloat((float) this.value);
return bda;
}
use of com.beanit.openiec61850.BasicDataAttribute in project open-smart-grid-platform by OSGP.
the class Node method getChangedAttributes.
public List<BasicDataAttribute> getChangedAttributes() {
final List<BasicDataAttribute> changedAttributes = new ArrayList<>();
final BasicDataAttribute changedMagnitudeAttribute = this.getChangedMagnitudeAttribute();
if (changedMagnitudeAttribute != null) {
changedAttributes.add(changedMagnitudeAttribute);
}
final BasicDataAttribute changedTimestampAttribute = this.getChangedTimestampAttribute();
if (changedTimestampAttribute != null) {
changedAttributes.add(changedTimestampAttribute);
}
return changedAttributes;
}
Aggregations