Example #1
0
        public ParameterScaledValue(int objectAddress, ScaledValue value, byte qpm) :
            base(objectAddress)
        {
            scaledValue = value;

            this.qpm = qpm;
        }
Example #2
0
        public ParameterNormalizedValue(int objectAddress, float normalizedValue, byte qpm) :
            base(objectAddress)
        {
            scaledValue = new ScaledValue();

            this.NormalizedValue = normalizedValue;

            this.qpm = qpm;
        }
        internal MeasuredValueNormalizedWithoutQuality(ApplicationLayerParameters parameters, byte[] msg, int startIndex, bool isSequence)
            : base(parameters, msg, startIndex, isSequence)
        {
            if (!isSequence)
            {
                startIndex += parameters.SizeOfIOA; /* skip IOA */
            }
            if ((msg.Length - startIndex) < GetEncodedSize())
            {
                throw new ASDUParsingException("Message too small");
            }

            scaledValue = new ScaledValue(msg, startIndex);
        }
Example #4
0
        internal SetpointCommandNormalized(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");
            }

            scaledValue = new ScaledValue(msg, startIndex);
            startIndex += 2;

            this.qos = new SetpointCommandQualifier(msg [startIndex++]);
        }
Example #5
0
        internal ParameterScaledValue(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");
            }

            scaledValue = new ScaledValue(msg, startIndex);
            startIndex += 2;

            /* parse QDS (quality) */
            qpm = msg [startIndex++];
        }
Example #6
0
        internal MeasuredValueScaled(ApplicationLayerParameters parameters, byte[] msg, int startIndex, bool isSquence)
            : base(parameters, msg, startIndex, isSquence)
        {
            if (!isSquence)
            {
                startIndex += parameters.SizeOfIOA; /* skip IOA */
            }
            if ((msg.Length - startIndex) < GetEncodedSize())
            {
                throw new ASDUParsingException("Message too small");
            }

            scaledValue = new ScaledValue(msg, startIndex);
            startIndex += 2;

            /* parse QDS (quality) */
            quality = new QualityDescriptor(msg[startIndex++]);
        }
Example #7
0
 public ParameterNormalizedValue(int objectAddress, short rawValue, byte qpm) :
     base(objectAddress)
 {
     scaledValue = new ScaledValue(rawValue);
     this.qpm    = qpm;
 }
Example #8
0
 public SetpointCommandNormalized(int ObjectAddress, short value, SetpointCommandQualifier qos)
     : base(ObjectAddress)
 {
     this.scaledValue = new ScaledValue(value);
     this.qos         = qos;
 }
Example #9
0
 public SetpointCommandNormalized(int objectAddress, float value, SetpointCommandQualifier qos)
     : base(objectAddress)
 {
     this.scaledValue = new ScaledValue((int)((value * 32767.5) - 0.5));
     this.qos         = qos;
 }
Example #10
0
 public SetpointCommandScaledWithCP56Time2a(int objectAddress, ScaledValue value, SetpointCommandQualifier qos, CP56Time2a timestamp)
     : base(objectAddress, value, qos)
 {
     this.timestamp = timestamp;
 }
Example #11
0
 public SetpointCommandScaled(int objectAddress, ScaledValue value, SetpointCommandQualifier qos)
     : base(objectAddress)
 {
     this.scaledValue = value;
     this.qos         = qos;
 }
 public MeasuredValueNormalizedWithoutQuality(int objectAddress, short rawValue)
     : base(objectAddress)
 {
     this.scaledValue = new ScaledValue(rawValue);
 }
 public MeasuredValueNormalizedWithoutQuality(int objectAddress, float normalizedValue)
     : base(objectAddress)
 {
     this.scaledValue     = new ScaledValue();
     this.NormalizedValue = normalizedValue;
 }
Example #14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="lib60870.MeasuredValueScaled"/> class.
 /// </summary>
 /// <param name="objectAddress">Information object address</param>
 /// <param name="value">scaled value (range -32768 - 32767) </param>
 /// <param name="quality">quality descriptor (according to IEC 60870-5-101:2003 7.2.6.3)</param>
 public MeasuredValueScaled(int objectAddress, int value, QualityDescriptor quality)
     : base(objectAddress)
 {
     this.scaledValue = new ScaledValue(value);
     this.quality     = quality;
 }