Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
INode.cs
1using System;
2using System.Collections.Generic;
3using System.Threading.Tasks;
6
7namespace Waher.Things
8{
12 public enum NodeState
13 {
17 None = 0,
18
22 Information = 1,
23
27 WarningSigned = 2,
28
32 WarningUnsigned = 3,
33
37 ErrorSigned = 4,
38
42 ErrorUnsigned = 5
43 }
44
48 public interface INode : IThingReference
49 {
53 string LocalId
54 {
55 get;
56 }
57
61 string LogId
62 {
63 get;
64 }
65
71
76 {
77 get;
78 }
79
84 {
85 get;
86 }
87
92 {
93 get;
94 }
95
100 {
101 get;
102 }
103
108 {
109 get;
110 }
111
116 {
117 get;
118 }
119
123 DateTime LastChanged
124 {
125 get;
126 }
127
132 {
133 get;
134 }
135
139 Task<IEnumerable<INode>> ChildNodes
140 {
141 get;
142 }
143
149 Task<bool> CanViewAsync(RequestOrigin Caller);
150
156 Task<bool> CanEditAsync(RequestOrigin Caller);
157
163 Task<bool> CanAddAsync(RequestOrigin Caller);
164
170 Task<bool> CanDestroyAsync(RequestOrigin Caller);
171
178 Task<IEnumerable<Parameter>> GetDisplayableParametersAsync(Language Language, RequestOrigin Caller);
179
184 Task<IEnumerable<Message>> GetMessagesAsync(RequestOrigin Caller);
185
191 Task<bool> MoveUpAsync(RequestOrigin Caller);
192
198 Task<bool> MoveDownAsync(RequestOrigin Caller);
199
206
212 Task<bool> AcceptsChildAsync(INode Child);
213
218 Task AddAsync(INode Child);
219
224
230 Task<bool> RemoveAsync(INode Child);
231
236
240 Task<IEnumerable<ICommand>> Commands
241 {
242 get;
243 }
244 }
245}
Contains information about a language.
Definition: Language.cs:17
Tokens available in request.
Definition: RequestOrigin.cs:9
Interface for nodes that are published through the concentrator interface.
Definition: INode.cs:49
Task< IEnumerable< Parameter > > GetDisplayableParametersAsync(Language Language, RequestOrigin Caller)
Gets displayable parameters.
Task< bool > MoveUpAsync(RequestOrigin Caller)
Tries to move the node up.
Task< string > GetTypeNameAsync(Language Language)
Gets the type name of the node.
Task AddAsync(INode Child)
Adds a new child to the node.
bool IsControllable
If the node can be controlled.
Definition: INode.cs:100
Task DestroyAsync()
Destroys the node. If it is a child to a parent node, it is removed from the parent first.
bool IsReadable
If the node can be read.
Definition: INode.cs:92
Task< bool > CanEditAsync(RequestOrigin Caller)
If the node can be edited by the caller.
bool HasCommands
If the node has registered commands or not.
Definition: INode.cs:108
DateTime LastChanged
When the node was last updated.
Definition: INode.cs:124
Task UpdateAsync()
Updates the node (in persisted storage).
NodeState State
Current overall state of the node.
Definition: INode.cs:132
bool HasChildren
If the source has any child sources.
Definition: INode.cs:76
Task< IEnumerable< INode > > ChildNodes
Child nodes. If no child nodes are available, null is returned.
Definition: INode.cs:140
Task< bool > RemoveAsync(INode Child)
Removes a child from the node.
INode Parent
Parent Node, or null if a root node.
Definition: INode.cs:116
Task< IEnumerable< Message > > GetMessagesAsync(RequestOrigin Caller)
Gets messages logged on the node.
string LogId
If provided, an ID for the node, as it would appear or be used in system logs. Can be null,...
Definition: INode.cs:62
Task< IEnumerable< ICommand > > Commands
Available command objects. If no commands are available, null is returned.
Definition: INode.cs:241
string LocalId
If provided, an ID for the node, but unique locally between siblings. Can be null,...
Definition: INode.cs:54
Task< bool > CanAddAsync(RequestOrigin Caller)
If the node can be added to by the caller.
bool ChildrenOrdered
If the children of the node have an intrinsic order (true), or if the order is not important (false).
Definition: INode.cs:84
Task< bool > CanViewAsync(RequestOrigin Caller)
If the node is visible to the caller.
Task< bool > AcceptsParentAsync(INode Parent)
If the node accepts a presumptive parent, i.e. can be added to that parent (if that parent accepts th...
Task< bool > CanDestroyAsync(RequestOrigin Caller)
If the node can be destroyed to by the caller.
Task< bool > AcceptsChildAsync(INode Child)
If the node accepts a presumptive child, i.e. can receive as a child (if that child accepts the node ...
Task< bool > MoveDownAsync(RequestOrigin Caller)
Tries to move the node down.
Interface for thing references.
NodeState
State of a node.
Definition: INode.cs:13