Search in sources :

Example 6 with Fc

use of org.openmuc.openiec61850.Fc in project Protocol-Adapter-IEC61850 by OSGP.

the class LogicalDevice method setRandomByte.

protected BasicDataAttribute setRandomByte(final String node, final Fc fc, final int min, final int max) {
    final BdaInt8 value = (BdaInt8) this.serverModel.findModelNode(this.createNodeName(node), fc);
    value.setValue((byte) ThreadLocalRandom.current().nextInt(min, max));
    return value;
}
Also used : BdaInt8(org.openmuc.openiec61850.BdaInt8)

Example 7 with Fc

use of org.openmuc.openiec61850.Fc in project Protocol-Adapter-IEC61850 by OSGP.

the class LogicalDevice method setRandomFloat.

protected BasicDataAttribute setRandomFloat(final String node, final Fc fc, final int min, final int max) {
    final BdaFloat32 value = (BdaFloat32) this.serverModel.findModelNode(this.createNodeName(node), fc);
    value.setFloat((float) ThreadLocalRandom.current().nextInt(min, max));
    return value;
}
Also used : BdaFloat32(org.openmuc.openiec61850.BdaFloat32)

Example 8 with Fc

use of org.openmuc.openiec61850.Fc in project Protocol-Adapter-IEC61850 by OSGP.

the class LogicalDevice method setInt.

protected BasicDataAttribute setInt(final String node, final Fc fc, final int val) {
    final BdaInt32 value = (BdaInt32) this.serverModel.findModelNode(this.createNodeName(node), fc);
    value.setValue(val);
    return value;
}
Also used : BdaInt32(org.openmuc.openiec61850.BdaInt32)

Example 9 with Fc

use of org.openmuc.openiec61850.Fc in project Protocol-Adapter-IEC61850 by OSGP.

the class LogicalDevice method setRandomInt.

protected BasicDataAttribute setRandomInt(final String node, final Fc fc, final int min, final int max) {
    final BdaInt32 value = (BdaInt32) this.serverModel.findModelNode(this.createNodeName(node), fc);
    value.setValue(ThreadLocalRandom.current().nextInt(min, max));
    return value;
}
Also used : BdaInt32(org.openmuc.openiec61850.BdaInt32)

Example 10 with Fc

use of org.openmuc.openiec61850.Fc in project Protocol-Adapter-IEC61850 by OSGP.

the class LogicalDevice method setTime.

protected BasicDataAttribute setTime(final String node, final Fc fc, final Date date) {
    final BdaTimestamp value = (BdaTimestamp) this.serverModel.findModelNode(this.createNodeName(node), fc);
    value.setDate(date);
    return value;
}
Also used : BdaTimestamp(org.openmuc.openiec61850.BdaTimestamp)

Aggregations

BdaInt32 (org.openmuc.openiec61850.BdaInt32)3 ArrayList (java.util.ArrayList)2 BdaFloat32 (org.openmuc.openiec61850.BdaFloat32)2 BdaInt8 (org.openmuc.openiec61850.BdaInt8)2 FcModelNode (org.openmuc.openiec61850.FcModelNode)2 ModelNode (org.openmuc.openiec61850.ModelNode)2 DataSampleDto (org.osgpfoundation.osgp.dto.da.iec61850.DataSampleDto)2 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 Map (java.util.Map)1 Set (java.util.Set)1 BdaBoolean (org.openmuc.openiec61850.BdaBoolean)1 BdaInt64 (org.openmuc.openiec61850.BdaInt64)1 BdaQuality (org.openmuc.openiec61850.BdaQuality)1 BdaTimestamp (org.openmuc.openiec61850.BdaTimestamp)1 Fc (org.openmuc.openiec61850.Fc)1