Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
BinaryNcap.cs
1using System.Threading.Tasks;
6
8{
12 public class BinaryNcap : Ncap
13 {
17 public BinaryNcap()
18 : base()
19 {
20 }
21
27 public BinaryNcap(MqttTopic Topic, byte[] Value)
28 : base(Topic, Value)
29 {
30 }
31
38 public override Task<DataProcessingResult> DataReported(MqttTopic Topic, MqttContent Content)
39 {
40 return this.DataReported(Topic, Content, Content.Data);
41 }
42
46 public override Task<string> GetTypeName(Language Language)
47 {
48 return Language.GetStringAsync(typeof(RootTopic), 14, "IEEE 1451.1.6 NCAP (BINARY)");
49 }
50
54 public override void SnifferOutput(ICommunicationLayer Output)
55 {
56 }
57
64 public override IMqttData CreateNew(MqttTopic Topic, MqttContent Content)
65 {
66 IMqttData Result = new BinaryNcap(Topic, default);
67 Result.DataReported(Topic, Content);
68 return Result;
69 }
70 }
71}
Information about content received from the MQTT server.
Definition: MqttContent.cs:9
Contains information about a language.
Definition: Language.cs:17
Task< string > GetStringAsync(Type Type, int Id, string Default)
Gets the string value of a string ID. If no such string exists, a string is created with the default ...
Definition: Language.cs:209
Binary-encoded IEEE 1451.1.6 NCAP.
Definition: BinaryNcap.cs:13
override Task< DataProcessingResult > DataReported(MqttTopic Topic, MqttContent Content)
Called when new data has been published.
Definition: BinaryNcap.cs:38
override IMqttData CreateNew(MqttTopic Topic, MqttContent Content)
Creates a new instance of the data.
Definition: BinaryNcap.cs:64
BinaryNcap(MqttTopic Topic, byte[] Value)
Binary-encoded IEEE 1451.1.6 NCAP.
Definition: BinaryNcap.cs:27
BinaryNcap()
Binary-encoded IEEE 1451.1.6 NCAP.
Definition: BinaryNcap.cs:17
override void SnifferOutput(ICommunicationLayer Output)
Outputs the parsed data to the sniffer.
Definition: BinaryNcap.cs:54
override Task< string > GetTypeName(Language Language)
Type name representing data.
Definition: BinaryNcap.cs:46
Abstract base class for IEEE 1451.1.6 NCAPs.
Definition: Ncap.cs:22
IEEE 1451.1.6 root topic node
Definition: RootTopic.cs:13
MQTT Topic information.
Definition: MqttTopic.cs:19
Interface for observable classes implementing communication protocols.
Interface for MQTT Data encapsulations
Definition: IMqttData.cs:38
Task< DataProcessingResult > DataReported(MqttTopic Topic, MqttContent Content)
Called when new data has been published.