Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
OutputMessage.cs
1using System;
4
5namespace Waher.Output
6{
10 [CollectionName("OutputMessages")]
11 [TypeName(TypeNameSerialization.None)]
12 [ArchivingTime(731)] // 2 years
13 [Index("NodeId", "Created")]
14 public class OutputMessage
15 {
16 private Guid objectId = Guid.Empty;
17 private Guid nodeId = Guid.Empty;
18 private MessageType type = MessageType.Information;
19 private string eventId = string.Empty;
20 private string body = string.Empty;
21 private DateTime created = DateTime.Now;
22 private DateTime updated = DateTime.MinValue;
23 private int count = 1;
24
29 {
30 }
31
40 public OutputMessage(Guid NodeId, DateTime Timestamp, MessageType Type, string EventId, string Body)
41 {
42 this.nodeId = NodeId;
43 this.created = Timestamp;
44 this.updated = Timestamp;
45 this.type = Type;
46 this.eventId = EventId;
47 this.body = Body;
48 this.count = 1;
49 }
50
54 [ObjectId]
55 public Guid ObjectId
56 {
57 get => this.objectId;
58 set => this.objectId = value;
59 }
60
64 public Guid NodeId
65 {
66 get => this.nodeId;
67 set => this.nodeId = value;
68 }
69
73 public DateTime Created
74 {
75 get => this.created;
76 set => this.created = value;
77 }
78
82 [DefaultValueDateTimeMinValue]
83 public DateTime Updated
84 {
85 get => this.updated;
86 set => this.updated = value;
87 }
88
92 public int Count
93 {
94 get => this.count;
95 set => this.count = value;
96 }
97
101 [DefaultValue(MessageType.Information)]
103 {
104 get => this.type;
105 set => this.type = value;
106 }
107
111 [DefaultValueStringEmpty]
112 public string EventId
113 {
114 get => this.eventId;
115 set => this.eventId = value;
116 }
117
121 [DefaultValueStringEmpty]
122 public string Body
123 {
124 get => this.body;
125 set => this.body = value;
126 }
127 }
128}
Defines a message logged on an output node.
DateTime Created
When node was created.
DateTime Updated
When node was last updated. If it has not been updated, value will be DateTime.MinValue.
OutputMessage(Guid NodeId, DateTime Timestamp, MessageType Type, string EventId, string Body)
Defines a message logged on a geoup node.
int Count
Number of times the message has been reported (updated).
Guid NodeId
Object ID of job node on which message has been logged.
Guid ObjectId
Object ID in persistence layer.
OutputMessage()
Defines a message logged on an output node.
MessageType Type
Message Type
string EventId
Optional Event ID.
string Body
Message body.
TypeNameSerialization
How the type name should be serialized.