Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ExponentKilograms.cs
1using System;
2using System.Collections.Generic;
3using System.Text;
7
9{
14 {
19 : base()
20 {
21 }
22
26 public byte Exponent { get; set; }
27
33 public override Grade Supports(ClassTypePair RecordTypeId)
34 {
35 return RecordTypeId.Class == 3 && RecordTypeId.Type == 54 ? Grade.Perfect : Grade.NotAtAll;
36 }
37
45 public override TedsRecord Parse(ClassTypePair RecordTypeId, Binary RawValue, ParsingState State)
46 {
47 State.Units.Kilograms = RawValue.NextUInt8(nameof(ExponentKilograms));
48
49 return new ExponentKilograms()
50 {
51 Class = RecordTypeId.Class,
52 Type = RecordTypeId.Type,
53 RawValue = RawValue.Body,
54 Exponent = State.Units.Kilograms
55 };
56 }
57
65 public override void AddFields(ThingReference Thing, DateTime Timestamp, List<Field> Fields, Teds Teds)
66 {
67 }
68
73 public override void AppendDetails(StringBuilder SnifferOutput)
74 {
75 SnifferOutput.Append("ExponentKilograms=");
76 SnifferOutput.AppendLine(this.Exponent.ToString());
77 }
78 }
79}
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.
override TedsRecord Parse(ClassTypePair RecordTypeId, Binary RawValue, ParsingState State)
Parses a TEDS record.
override void AddFields(ThingReference Thing, DateTime Timestamp, List< Field > Fields, Teds Teds)
Adds fields to a collection of fields.
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
Contains a reference to a thing
Grade
Grade enumeration
Definition: Grade.cs:7