Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
WorstCaseError.cs
1
using
System;
2
using
System.Collections.Generic;
3
using
System.Text;
4
using
Waher.Content
;
5
using
Waher.Runtime.Inventory
;
6
using
Waher.Things.Ieee1451.Ieee1451_0.Messages
;
7
using
Waher.Things.SensorData
;
8
9
namespace
Waher.Things.Ieee1451.Ieee1451_0.TEDS.FieldTypes.TransducerChannelTeds
10
{
14
public
class
WorstCaseError
:
TedsRecord
15
{
19
public
WorstCaseError
()
20
: base()
21
{
22
}
23
27
public
float
Value
{
get
;
set
; }
28
34
public
override
Grade
Supports
(
ClassTypePair
RecordTypeId)
35
{
36
return
RecordTypeId.Class == 3 && RecordTypeId.Type == 15 ? Grade.Perfect :
Grade
.NotAtAll;
37
}
38
46
public
override
TedsRecord
Parse
(
ClassTypePair
RecordTypeId,
Binary
RawValue
,
ParsingState
State)
47
{
48
return
new
WorstCaseError
()
49
{
50
Class
= RecordTypeId.
Class
,
51
Type
= RecordTypeId.
Type
,
52
RawValue
=
RawValue
.Body,
53
Value
=
RawValue
.NextSingle(nameof(
WorstCaseError
))
54
};
55
}
56
64
public
override
void
AddFields
(
ThingReference
Thing, DateTime Timestamp, List<Field> Fields,
Teds
Teds
)
65
{
66
Fields.Add(
new
QuantityField
(Thing, Timestamp, (
Teds
?.FieldName ??
"Value"
) +
", Worst-case Error"
, this.
Value
,
67
Math.Min(
CommonTypes
.
GetNrDecimals
(
this
.Value), (
byte
)2),
Teds
?.
Unit
??
string
.Empty,
68
FieldType
.Status,
FieldQoS
.AutomaticReadout));
69
}
70
75
public
override
void
AppendDetails
(StringBuilder SnifferOutput)
76
{
77
SnifferOutput.Append(
"WorstCaseError="
);
78
SnifferOutput.AppendLine(this.
Value
.ToString());
79
}
80
}
81
}
Waher.Content.CommonTypes
Helps with parsing of commong data types.
Definition:
CommonTypes.cs:13
Waher.Content.CommonTypes.GetNrDecimals
static byte GetNrDecimals(double x)
Calculates the number of decimals of a floating-point number.
Definition:
CommonTypes.cs:903
Waher.Things.Ieee1451.Ieee1451_0.Messages.Binary
IEEE 1451.0 Binary object
Definition:
Binary.cs:20
Waher.Things.Ieee1451.Ieee1451_0.Messages.Teds
IEEE 1451.0 TEDS
Definition:
Teds.cs:14
Waher.Things.Ieee1451.Ieee1451_0.Messages.Teds.Unit
string Unit
Field unit of value, if found, otherwise the empty string.
Definition:
Teds.cs:69
Waher.Things.Ieee1451.Ieee1451_0.TEDS.FieldTypes.ParsingState
Contains parsing information.
Definition:
ParsingState.cs:9
Waher.Things.Ieee1451.Ieee1451_0.TEDS.FieldTypes.TransducerChannelTeds.WorstCaseError
TEDS Uncertainty under worst-case conditions (§6.5.2.20)
Definition:
WorstCaseError.cs:15
Waher.Things.Ieee1451.Ieee1451_0.TEDS.FieldTypes.TransducerChannelTeds.WorstCaseError.WorstCaseError
WorstCaseError()
TEDS Uncertainty under worst-case conditions (§6.5.2.20)
Definition:
WorstCaseError.cs:19
Waher.Things.Ieee1451.Ieee1451_0.TEDS.FieldTypes.TransducerChannelTeds.WorstCaseError.Value
float Value
The “Combined Standard Uncertainty”
Definition:
WorstCaseError.cs:27
Waher.Things.Ieee1451.Ieee1451_0.TEDS.FieldTypes.TransducerChannelTeds.WorstCaseError.AddFields
override void AddFields(ThingReference Thing, DateTime Timestamp, List< Field > Fields, Teds Teds)
Adds fields to a collection of fields.
Definition:
WorstCaseError.cs:64
Waher.Things.Ieee1451.Ieee1451_0.TEDS.FieldTypes.TransducerChannelTeds.WorstCaseError.Parse
override TedsRecord Parse(ClassTypePair RecordTypeId, Binary RawValue, ParsingState State)
Parses a TEDS record.
Definition:
WorstCaseError.cs:46
Waher.Things.Ieee1451.Ieee1451_0.TEDS.FieldTypes.TransducerChannelTeds.WorstCaseError.AppendDetails
override void AppendDetails(StringBuilder SnifferOutput)
Appends record details to sniffer output.
Definition:
WorstCaseError.cs:75
Waher.Things.Ieee1451.Ieee1451_0.TEDS.FieldTypes.TransducerChannelTeds.WorstCaseError.Supports
override Grade Supports(ClassTypePair RecordTypeId)
How well the class supports a specific TEDS field type.
Definition:
WorstCaseError.cs:34
Waher.Things.Ieee1451.Ieee1451_0.TEDS.TedsRecord
Represents one record in a TEDS
Definition:
TedsRecord.cs:16
Waher.Things.Ieee1451.Ieee1451_0.TEDS.TedsRecord.RawValue
byte[] RawValue
TEDS Raw Record value
Definition:
TedsRecord.cs:52
Waher.Things.Ieee1451.Ieee1451_0.TEDS.TedsRecord.Type
byte Type
TEDS Record Type
Definition:
TedsRecord.cs:47
Waher.Things.Ieee1451.Ieee1451_0.TEDS.TedsRecord.Class
byte Class
This field identifies the TEDS being accessed. The value is the TEDS access code found in Table 72.
Definition:
TedsRecord.cs:42
Waher.Things.SensorData.QuantityField
Represents a physical quantity value.
Definition:
QuantityField.cs:14
Waher.Things.ThingReference
Contains a reference to a thing
Definition:
ThingReference.cs:13
Waher.Content
Definition:
Array.cs:6
Waher.Runtime.Inventory
Definition:
TypesLoader.cs:9
Waher.Runtime.Inventory.Grade
Grade
Grade enumeration
Definition:
Grade.cs:7
Waher.Things.Ieee1451.Ieee1451_0.Messages
Definition:
Binary.cs:15
Waher.Things.Ieee1451.Ieee1451_0.TEDS.FieldTypes.TransducerChannelTeds
Definition:
CalibrationKey.cs:9
Waher.Things.SensorData
Definition:
BooleanField.cs:6
Waher.Things.SensorData.FieldQoS
FieldQoS
Field Quality of Service flags
Definition:
FieldQoS.cs:10
Waher.Things.SensorData.FieldType
FieldType
Field Type flags
Definition:
FieldType.cs:10
Waher.Things.Ieee1451.Ieee1451_0.TEDS.FieldTypes.ClassTypePair
Identifies a Field Type in a TEDS.
Definition:
ClassTypePair.cs:7
Waher.Things.Ieee1451.Ieee1451_0.TEDS.FieldTypes.ClassTypePair.Type
byte Type
Field Type in class.
Definition:
ClassTypePair.cs:27
Waher.Things.Ieee1451.Ieee1451_0.TEDS.FieldTypes.ClassTypePair.Class
byte Class
TEDS class.
Definition:
ClassTypePair.cs:22
IoTGateway
Things
Waher.Things.Ieee1451
Ieee1451_0
TEDS
FieldTypes
TransducerChannelTeds
WorstCaseError.cs
Generated by
1.9.5