Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
SampleDefinitionDataModelLength.cs
1using System;
2using System.Collections.Generic;
3using System.Text;
7
9{
14 {
19 : base()
20 {
21 }
22
26 public byte DataModelLength;
27
33 public override Grade Supports(ClassTypePair RecordTypeId)
34 {
35 return RecordTypeId.Class == 3 && RecordTypeId.Type == 41 ? Grade.Perfect : Grade.NotAtAll;
36 }
37
45 public override TedsRecord Parse(ClassTypePair RecordTypeId, Binary RawValue, ParsingState State)
46 {
47 State.SampleDefinition.DataModelLength = RawValue.NextUInt8(null);
48
49 if (RawValue.HasSniffers)
50 RawValue.SniffValue(nameof(this.DataModelLength), State.SampleDefinition.DataModelLength.ToString());
51
53 {
54 Class = RecordTypeId.Class,
55 Type = RecordTypeId.Type,
56 RawValue = RawValue.Body,
57 DataModelLength = State.SampleDefinition.DataModelLength
58 };
59 }
60
68 public override void AddFields(ThingReference Thing, DateTime Timestamp, List<Field> Fields, Teds Teds)
69 {
70 }
71
76 public override void AppendDetails(StringBuilder SnifferOutput)
77 {
78 SnifferOutput.Append("DataModelLength=");
79 SnifferOutput.AppendLine(this.DataModelLength.ToString());
80 }
81 }
82}
override void AppendDetails(StringBuilder SnifferOutput)
Appends record details to sniffer output.
override Grade Supports(ClassTypePair RecordTypeId)
How well the class supports a specific TEDS field type.
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