1using System.Collections.Generic;
24 this.FieldName =
null;
25 this.FieldUnit =
null;
26 this.Unit =
string.Empty;
30 if (Record is TEDS.FieldTypes.TransducerChannelTeds.PhysicalUnits TedsUnits)
38 if (Script.Units.Unit.TryGetCategory(
this.FieldUnit, out
IUnitCategory Category))
39 this.FieldName = Category.Name;
69 public string Unit {
get; }
79 List<Field> Fields =
new List<Field>();
81 return Fields.ToArray();
92 Fields.Add(
new StringField(Thing, Timestamp,
"Application ID",
96 Fields.Add(
new StringField(Thing, Timestamp,
"NCAP ID",
100 Fields.Add(
new StringField(Thing, Timestamp,
"TIM ID",
108 Record.
AddFields(Thing, Timestamp, Fields,
this);
override string ToString()
Contains methods for simple hash calculations.
static string BinaryToString(byte[] Data)
Converts an array of bytes to a string with their hexadecimal representations (in lower case).
ushort ChannelId
Channel ID
Field[] GetFields(ThingReference Thing, DateTime Timestamp)
Gets the information in the record, as an array of fields.
string FieldName
Field name of value, if found, otherwise null.
Unit FieldUnit
Field unit of value, if found, otherwise null.
virtual void AddFields(ThingReference Thing, DateTime Timestamp, List< Field > Fields)
Adds fields to a collection of fields.
Teds(ChannelAddress ChannelInfo, TedsRecord[] Records)
IEEE 1451.0 TEDS
ChannelAddress ChannelInfo
Address information.
TedsRecord[] Records
TLV records available in TEDS
Represents one record in a TEDS
virtual void AddFields(ThingReference Thing, DateTime Timestamp, List< Field > Fields, Teds Teds)
Adds fields to a collection of fields.
Base class for all sensor data fields.
Represents a 32-bit integer value.
Represents a string value.
Contains a reference to a thing
Interface for a category of units.
FieldQoS
Field Quality of Service flags
FieldType
Field Type flags
Unit TryCreateUnit()
Tries to create a unit from the description available in the object.