internal SoftwareUpdateCommand(ApplicationLayerParameters parameters, byte[] msg, int startIndex)
            : base(parameters, msg, startIndex, false)
        {
            startIndex += parameters.SizeOfIOA; /* skip IOA */

            if ((msg.Length - startIndex) < GetEncodedSize())
            {
                throw new ASDUParsingException("Message too small");
            }

            this.qos = new SetpointCommandQualifier(msg[startIndex++]);
        }
Beispiel #2
0
        internal SetpointCommandShort(ApplicationLayerParameters parameters, byte[] msg, int startIndex) :
            base(parameters, msg, startIndex, false)
        {
            startIndex += parameters.SizeOfIOA;             /* skip IOA */

            if ((msg.Length - startIndex) < GetEncodedSize())
            {
                throw new ASDUParsingException("Message too small");
            }

            /* parse float value */
            value       = System.BitConverter.ToSingle(msg, startIndex);
            startIndex += 4;

            this.qos = new SetpointCommandQualifier(msg [startIndex++]);
        }
Beispiel #3
0
 public SetpointCommandNormalized(int ObjectAddress, short value, SetpointCommandQualifier qos)
     : base(ObjectAddress)
 {
     this.scaledValue = new ScaledValue(value);
     this.qos         = qos;
 }
Beispiel #4
0
 public SetpointCommandNormalized(int objectAddress, float value, SetpointCommandQualifier qos)
     : base(objectAddress)
 {
     this.scaledValue = new ScaledValue((int)((value * 32767.5) - 0.5));
     this.qos         = qos;
 }
Beispiel #5
0
 public SetpointCommandShortWithCP56Time2a(int objectAddress, float value, SetpointCommandQualifier qos, CP56Time2a timestamp)
     : base(objectAddress, value, qos)
 {
     this.timestamp = timestamp;
 }
Beispiel #6
0
 public SetpointCommandShort(int objectAddress, float value, SetpointCommandQualifier qos)
     : base(objectAddress)
 {
     this.value = value;
     this.qos   = qos;
 }
Beispiel #7
0
 public SetpointCommandScaledWithCP56Time2a(int objectAddress, ScaledValue value, SetpointCommandQualifier qos, CP56Time2a timestamp)
     : base(objectAddress, value, qos)
 {
     this.timestamp = timestamp;
 }
Beispiel #8
0
 public SetpointCommandScaled(int objectAddress, ScaledValue value, SetpointCommandQualifier qos)
     : base(objectAddress)
 {
     this.scaledValue = value;
     this.qos         = qos;
 }
 public SoftwareUpdateCommand(int objectAddress, SetpointCommandQualifier qos)
     : base(objectAddress)
 {
     this.qos = qos;
 }