Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
CalibrationKey.cs
1using System;
2using System.Collections.Generic;
3using System.Text;
7
9{
14 {
19 : base()
20 {
21 }
22
27 public byte Key { get; set; }
28
34 public override Grade Supports(ClassTypePair RecordTypeId)
35 {
36 return RecordTypeId.Class == 3 && RecordTypeId.Type == 10 ? Grade.Perfect : Grade.NotAtAll;
37 }
38
46 public override TedsRecord Parse(ClassTypePair RecordTypeId, Binary RawValue, ParsingState State)
47 {
48 return new CalibrationKey()
49 {
50 Class = RecordTypeId.Class,
51 Type = RecordTypeId.Type,
52 RawValue = RawValue.Body,
53 Key = RawValue.NextUInt8(nameof(CalibrationKey))
54 };
55 }
56
64 public override void AddFields(ThingReference Thing, DateTime Timestamp, List<Field> Fields, Teds Teds)
65 {
66 Fields.Add(new Int32Field(Thing, Timestamp, "Calibration Key", this.Key,
67 FieldType.Status, FieldQoS.AutomaticReadout));
68 }
69
74 public override void AppendDetails(StringBuilder SnifferOutput)
75 {
76 SnifferOutput.Append("CalibrationKey=");
77 SnifferOutput.AppendLine(this.Key.ToString());
78 }
79 }
80}
override void AddFields(ThingReference Thing, DateTime Timestamp, List< Field > Fields, Teds Teds)
Adds fields to a collection of fields.
byte Key
This field contains an enumeration that denotes the calibration capabilities of this TransducerChanne...
override TedsRecord Parse(ClassTypePair RecordTypeId, Binary RawValue, ParsingState State)
Parses a TEDS record.
override Grade Supports(ClassTypePair RecordTypeId)
How well the class supports a specific TEDS field type.
override void AppendDetails(StringBuilder SnifferOutput)
Appends record details to sniffer output.
Represents one record in a TEDS
Definition: TedsRecord.cs:16
byte Class
This field identifies the TEDS being accessed. The value is the TEDS access code found in Table 72.
Definition: TedsRecord.cs:42
Represents a 32-bit integer value.
Definition: Int32Field.cs:10
Contains a reference to a thing
Grade
Grade enumeration
Definition: Grade.cs:7
FieldQoS
Field Quality of Service flags
Definition: FieldQoS.cs:10
FieldType
Field Type flags
Definition: FieldType.cs:10