Esempio n. 1
0
        public MeasuredValueNormalizedWithoutQuality(int objectAddress, float value)
            : base(objectAddress)
        {
            this.scaledValue = new ScaledValue((int)(value * 32767f));

            this.NormalizedValue = value;
        }
        public ParameterScaledValue(int objectAddress, ScaledValue value, byte qpm) :
            base(objectAddress)
        {
            scaledValue = value;

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

            this.NormalizedValue = normalizedValue;

            this.qpm = qpm;
        }
Esempio n. 4
0
 internal MeasuredValueNormalizedWithoutQuality(ConnectionParameters parameters, byte[] msg, int startIndex, bool isSequence) :
     base(parameters, msg, startIndex, false)
 {
     if (!isSequence)
     {
         startIndex += parameters.SizeOfIOA; /* skip IOA */
     }
     scaledValue = new ScaledValue(msg, startIndex);
 }
Esempio n. 5
0
        internal SetpointCommandScaled(ConnectionParameters parameters, byte[] msg, int startIndex) :
            base(parameters, msg, startIndex, false)
        {
            startIndex += parameters.SizeOfIOA; /* skip IOA */

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

            this.qos = new SetpointCommandQualifier(msg[startIndex++]);
        }
        internal ParameterScaledValue(ConnectionParameters parameters, byte[] msg, int startIndex) :
            base(parameters, msg, startIndex, false)
        {
            startIndex += parameters.SizeOfIOA;             /* skip IOA */

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

            /* parse QDS (quality) */
            qpm = msg [startIndex++];
        }
Esempio n. 7
0
        internal MeasuredValueScaled(ConnectionParameters parameters, byte[] msg, int startIndex, bool isSquence) :
            base(parameters, msg, startIndex, isSquence)
        {
            if (!isSquence)
            {
                startIndex += parameters.SizeOfIOA; /* skip IOA */
            }
            scaledValue = new ScaledValue(msg, startIndex);
            startIndex += 2;

            /* parse QDS (quality) */
            quality = new QualityDescriptor(msg[startIndex++]);
        }
Esempio n. 8
0
        internal SetpointCommandNormalized(ConnectionParameters parameters, byte[] msg, int startIndex) :
            base(parameters, msg, startIndex, false)
        {
            scaledValue = new ScaledValue();

            startIndex += parameters.SizeOfIOA;             /* skip IOA */

            scaledValue.Value  = msg [startIndex++];
            scaledValue.Value += (msg [startIndex++] * 0x100);

            if (scaledValue.Value > 32767)
            {
                scaledValue.Value = scaledValue.Value - 65536;
            }

            this.qos = new SetpointCommandQualifier(msg [startIndex++]);
        }
Esempio n. 9
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;
 }
 public ParameterNormalizedValue(int objectAddress, short rawValue, byte qpm) :
     base(objectAddress)
 {
     scaledValue = new ScaledValue(rawValue);
     this.qpm    = qpm;
 }
Esempio n. 11
0
 public SetpointCommandScaledWithCP56Time2a(int objectAddress, ScaledValue value, SetpointCommandQualifier qos, CP56Time2a timestamp)
     : base(objectAddress, value, qos)
 {
     this.timestamp = timestamp;
 }
Esempio n. 12
0
 public SetpointCommandScaled(int objectAddress, ScaledValue value, SetpointCommandQualifier qos)
     : base(objectAddress)
 {
     this.scaledValue = value;
     this.qos         = qos;
 }
Esempio n. 13
0
 public SetpointCommandNormalized(int ObjectAddress, short value, SetpointCommandQualifier qos)
     : base(ObjectAddress)
 {
     this.scaledValue = new ScaledValue(value);
     this.qos         = qos;
 }
Esempio n. 14
0
 public SetpointCommandNormalized(int objectAddress, float value, SetpointCommandQualifier qos)
     : base(objectAddress)
 {
     this.scaledValue = new ScaledValue((int)((value * 32767.5) - 0.5));
     this.qos         = qos;
 }
 public MeasuredValueNormalizedWithoutQuality(int objectAddress, short value)
     : base(objectAddress)
 {
     this.scaledValue = new ScaledValue(value);
 }
 public MeasuredValueNormalizedWithoutQuality(int objectAddress, float normalizedValue)
     : base(objectAddress)
 {
     this.scaledValue     = new ScaledValue();
     this.NormalizedValue = normalizedValue;
 }