Пример #1
0
 public HeaderInfo(GroupVariation variation, QualifierCode qualifier, TimestampMode tsmode, UInt32 headerIndex)
 {
     this.variation   = variation;
     this.qualifier   = qualifier;
     this.tsmode      = tsmode;
     this.headerIndex = headerIndex;
 }
Пример #2
0
 public HeaderInfo(GroupVariation variation, QualifierCode qualifier, TimestampMode tsmode, bool isEvent, bool flagsValid, UInt32 headerIndex)
 {
     this.variation   = variation;
     this.qualifier   = qualifier;
     this.tsmode      = tsmode;
     this.isEvent     = isEvent;
     this.flagsValid  = flagsValid;
     this.headerIndex = headerIndex;
 }
Пример #3
0
 public Measurement(string displayValue, TimestampMode tsmode, MeasType type, UInt16 index, IQualityBitInfo info)
 {
     this.valueAsString = displayValue;
     this.timeStamp = DateTime.Now;
     this.tsmode = tsmode;
     this.type = type;
     this.index = index;
     this.info = info;
     this.quality = 0;
 }
Пример #4
0
 public Measurement(string displayValue, MeasurementBase meas, TimestampMode tsmode, MeasType type, UInt16 index, IQualityBitInfo info)
 {
     this.valueAsString = displayValue;
     this.timeStamp     = (tsmode == TimestampMode.INVALID) ? DateTime.Now : meas.Timestamp;
     this.tsmode        = tsmode;
     this.type          = type;
     this.index         = index;
     this.info          = info;
     this.quality       = meas.Quality;
 }
Пример #5
0
 public Measurement(string displayValue, MeasurementBase meas, TimestampMode tsmode, MeasType type, UInt16 index, IQualityBitInfo info)
 {
     this.valueAsString = displayValue;
     this.timeStamp = (tsmode == TimestampMode.INVALID) ? DateTime.Now : meas.Timestamp;
     this.tsmode = tsmode;
     this.type = type;
     this.index = index;
     this.info = info;
     this.quality = meas.Quality;
 }
Пример #6
0
 public Measurement(string displayValue, TimestampMode tsmode, MeasType type, UInt16 index, IQualityBitInfo info)
 {
     this.valueAsString = displayValue;
     this.timeStamp     = DateTime.Now;
     this.tsmode        = tsmode;
     this.type          = type;
     this.index         = index;
     this.info          = info;
     this.quality       = 0;
 }
Пример #7
0
 /// <summary>
 /// The base class of Timelines. Needed for untyped collections of timelines.
 /// </summary>
 protected TimelineBase(byte[] id)
 {
     _id = id;
     _numGuaranteedSends = 3;
     _lastSendTime       = DateTime.Now;
     _timestampMode      = TimestampMode.Absolute;
     _deliveryMode       = DeliveryMode.ReliableOrdered;
     _maxEntries         = 10;
     _numEntries         = 0;
     _ignoreCachedEvents = false;
     _cacheSize          = _defaultCacheSize;
     _tags = new HashSet <string>();
 }
Пример #8
0
        private static string GetTimeModeString(TimestampMode mode)
        {
            switch (mode)
            {
            case (TimestampMode.INVALID):
                return("local timestamp");

            case (TimestampMode.SYNCHRONIZED):
                return("synchronized");

            default:
                return("unsynchronized");
            }
        }
Пример #9
0
 public static Measurement ToMeasurement(this FrozenCounter meas, UInt16 index, TimestampMode tsmode)
 {
     return(new Measurement(meas.Value.ToString(), meas, tsmode, MeasType.FrozenCounter, index, QualityInfo.counter));
 }
Пример #10
0
 private static string GetTimeModeString(TimestampMode mode)
 {
     switch(mode)
     {
         case(TimestampMode.INVALID):
             return "local timestamp";
         case(TimestampMode.SYNCHRONIZED):
             return "synchronized";
         default:
             return "unsynchronized";
     }
 }
Пример #11
0
 public HeaderInfo(GroupVariation variation, QualifierCode qualifier, TimestampMode tsmode)
 {
     this.variation = variation;
     this.qualifier = qualifier;
     this.tsmode    = tsmode;
 }
Пример #12
0
 public static Measurement ToMeasurement(this OctetString meas, UInt16 index, TimestampMode tsmode)
 {
     return(new Measurement(meas.AsString(), tsmode, MeasType.OctetString, index, QualityInfo.octetString));
 }
 public static Measurement ToMeasurement(this FrozenCounter meas, UInt16 index, TimestampMode tsmode)
 {
     return new Measurement(meas.Value.ToString(), meas, tsmode, MeasType.FrozenCounter, index, QualityInfo.counter);
 }
Пример #14
0
 public void SetTimestampMode(TimestampMode mode)
 {
     MCAResponse response = Client.Send(MCACommand.SetGeneralMode((Mode)((uint)mode)));
     if (response == null) { throw new MCADeviceLostConnectionException(); }
 }
Пример #15
0
 public static Measurement ToMeasurement(this DoubleBitBinary meas, UInt16 index, TimestampMode tsmode)
 {
     return(new Measurement(meas.Value.ToString(), meas, tsmode, MeasType.DoubleBitBinary, index, QualityInfo.doubleBinary));
 }
 public static Measurement ToMeasurement(this AnalogOutputStatus meas, UInt16 index, TimestampMode tsmode)
 {
     return new Measurement(meas.Value.ToString(), meas, tsmode, MeasType.AnalogOutputStatus, index, QualityInfo.analog);
 }
Пример #17
0
 public static Measurement ToMeasurement(this TimeAndInterval meas, UInt16 index, TimestampMode tsmode)
 {
     return(new Measurement(meas.ToString(), tsmode, MeasType.TimeAndInterval, index, QualityInfo.octetString));
 }
 public static Measurement ToMeasurement(this OctetString meas, UInt16 index, TimestampMode tsmode)
 {
     return new Measurement(meas.AsString(), tsmode, MeasType.OctetString, index, QualityInfo.octetString);
 }
 public static Measurement ToMeasurement(this TimeAndInterval meas, UInt16 index, TimestampMode tsmode)
 {
     return new Measurement(meas.ToString(), tsmode, MeasType.TimeAndInterval, index, QualityInfo.octetString);
 }
Пример #20
0
 public static Measurement ToMeasurement(this AnalogOutputStatus meas, UInt16 index, TimestampMode tsmode)
 {
     return(new Measurement(meas.Value.ToString(), meas, tsmode, MeasType.AnalogOutputStatus, index, QualityInfo.analog));
 }
 public static Measurement ToMeasurement(this DoubleBitBinary meas, UInt16 index, TimestampMode tsmode)
 {
     return new Measurement(meas.Value.ToString(), meas, tsmode, MeasType.DoubleBitBinary, index, QualityInfo.doubleBinary);
 }