Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
SelfTestCapability.cs
1using System;
2using System.Collections.Generic;
3using System.Text;
7
9{
14 {
19 : base()
20 {
21 }
22
26 public bool Available { get; set; }
27
33 public override Grade Supports(ClassTypePair RecordTypeId)
34 {
35 return RecordTypeId.Class == 3 && RecordTypeId.Type == 17 ? Grade.Perfect : Grade.NotAtAll;
36 }
37
45 public override TedsRecord Parse(ClassTypePair RecordTypeId, Binary RawValue, ParsingState State)
46 {
47 return new SelfTestCapability()
48 {
49 Class = RecordTypeId.Class,
50 Type = RecordTypeId.Type,
51 RawValue = RawValue.Body,
52 Available = RawValue.NextBoolean(nameof(SelfTestCapability))
53 };
54 }
55
63 public override void AddFields(ThingReference Thing, DateTime Timestamp, List<Field> Fields, Teds Teds)
64 {
65 Fields.Add(new BooleanField(Thing, Timestamp, "Self-Test Capability", this.Available,
66 FieldType.Status, FieldQoS.AutomaticReadout));
67 }
68
73 public override void AppendDetails(StringBuilder SnifferOutput)
74 {
75 SnifferOutput.Append("SelfTestCapability=");
76 SnifferOutput.AppendLine(this.Available.ToString());
77 }
78 }
79}
override void AppendDetails(StringBuilder SnifferOutput)
Appends record details to sniffer output.
bool Available
This field defines the self-test capabilities of the TransducerChannel.
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.
override Grade Supports(ClassTypePair RecordTypeId)
How well the class supports a specific TEDS field type.
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 boolean value that can be either true or false.
Definition: BooleanField.cs:11
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