![]() |
Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
|
Base class for all output nodes. More...
Public Member Functions | |
| OutputNode () | |
| Base class for all output nodes. More... | |
| override bool | Equals (object obj) |
| Determines whether the specified object is equal to the current object. More... | |
| override int | GetHashCode () |
| Serves as the default hash function. More... | |
| override string | ToString () |
| virtual Task | LogErrorAsync (string Body) |
| Logs an error message on the node. More... | |
| virtual Task | LogErrorAsync (string EventId, string Body) |
| Logs an error message on the node. More... | |
| virtual Task | LogWarningAsync (string Body) |
| Logs an warning message on the node. More... | |
| virtual Task | LogWarningAsync (string EventId, string Body) |
| Logs an warning message on the node. More... | |
| virtual Task | LogInformationAsync (string Body) |
| Logs an informational message on the node. More... | |
| virtual Task | LogInformationAsync (string EventId, string Body) |
| Logs an informational message on the node. More... | |
| virtual Task | LogMessageAsync (MessageType Type, string Body) |
| Logs a message on the node. More... | |
| virtual async Task | LogMessageAsync (MessageType Type, string EventId, string Body) |
| Logs a message on the node. More... | |
| virtual Task< bool > | RemoveErrorAsync () |
| Removes error messages with an empty event ID from the node. More... | |
| virtual Task< bool > | RemoveErrorAsync (string EventId) |
| Removes error messages with a given event ID from the node. More... | |
| virtual Task< bool > | RemoveWarningAsync () |
| Removes warning messages with an empty event ID from the node. More... | |
| virtual Task< bool > | RemoveWarningAsync (string EventId) |
| Removes warning messages with a given event ID from the node. More... | |
| virtual Task< bool > | RemoveInformationAsync () |
| Removes warning messages with an empty event ID from the node. More... | |
| virtual Task< bool > | RemoveInformationAsync (string EventId) |
| Removes an informational message on the node. More... | |
| virtual Task< bool > | RemoveMessageAsync (MessageType Type) |
| Removes messages with empty event IDs from the node. More... | |
| virtual async Task< bool > | RemoveMessageAsync (MessageType Type, string EventId) |
| Logs a message on the node. More... | |
| abstract Task< string > | GetTypeNameAsync (Language Language) |
| Gets the type name of the node. More... | |
| async Task< INode > | GetParent () |
| Gets the parent of the node. More... | |
| async Task< T > | GetAncestor< T > () |
| Tries to get an ancestor node of a given type, if one exists. More... | |
| virtual Task< bool > | CanViewAsync (RequestOrigin Caller) |
| If the node is visible to the caller. More... | |
| virtual Task< bool > | CanEditAsync (RequestOrigin Caller) |
| If the node can be edited by the caller. More... | |
| virtual Task< bool > | CanAddAsync (RequestOrigin Caller) |
| If the node can be added to by the caller. More... | |
| virtual Task< bool > | CanDestroyAsync (RequestOrigin Caller) |
| If the node can be destroyed to by the caller. More... | |
| virtual async Task< IEnumerable< Parameter > > | GetDisplayableParametersAsync (Language Language, RequestOrigin Caller) |
| Gets displayable parameters. More... | |
| async Task< Parameter[]> | GetDisplayableParameterAraryAsync (Language Language, RequestOrigin Caller) |
| Gets displayable parameters. More... | |
| virtual async Task< IEnumerable< Message > > | GetMessagesAsync (RequestOrigin Caller) |
| Gets messages logged on the node. More... | |
| async Task< Message[]> | GetMessageArrayAsync (RequestOrigin Caller) |
| Gets messages logged on the node. More... | |
| virtual async Task< bool > | MoveUpAsync (RequestOrigin Caller) |
| Tries to move the node up. More... | |
| virtual async Task< bool > | MoveDownAsync (RequestOrigin Caller) |
| Tries to move the node down. More... | |
| virtual async Task< bool > | MoveUpAsync (OutputNode Child, RequestOrigin Caller) |
| Tries to move the child node up. More... | |
| virtual async Task< bool > | MoveDownAsync (OutputNode Child, RequestOrigin Caller) |
| Tries to move the child node down. More... | |
| abstract Task< bool > | AcceptsParentAsync (INode Parent) |
| If the node accepts a presumptive parent, i.e. can be added to that parent (if that parent accepts the node as a child). More... | |
| abstract 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 as a parent). More... | |
| virtual async Task | AddAsync (INode Child) |
| Adds a new child to the node. More... | |
| virtual async Task | UpdateAsync () |
| Updates the node (in persisted storage). More... | |
| virtual async Task< bool > | RemoveAsync (INode Child) |
| Removes a child from the node. More... | |
| virtual async Task | DestroyAsync () |
| Destroys the node. If it is a child to a parent node, it is removed from the parent first. More... | |
Static Public Member Functions | |
| static implicit | operator ThingReference (OutputNode Node) |
| Converts a OutputNode to a ThingReference object. More... | |
| static async Task< string > | GetUniqueNodeId (string OutputId) |
| Gets a Output ID, based on OutputId that is not already available in the database. More... | |
Protected Member Functions | |
| virtual OutputNode[] | SortChildrenAfterLoadLocked (List< OutputNode > Children) |
| Method that allows the node to sort its children, after they have been loaded. More... | |
| virtual OutputNode[] | CheckOrderLocked (List< OutputNode > Children) |
| Checks the ordering of children. More... | |
| virtual async Task | NodeUpdated () |
| Persists changes to the node, and generates a node updated event. More... | |
Properties | |
| Guid | ObjectId [get, set] |
| Object ID in persistence layer. More... | |
| Guid | ParentId [get, set] |
| Object ID of parent node in persistence layer. More... | |
| DateTime | Created [get, set] |
| When node was created. More... | |
| DateTime | Updated [get, set] |
| When node was last updated. If it has not been updated, value will be DateTime.MinValue. More... | |
| int | SiblingOrdinal [get, set] |
| Sibling ordinal, used to order siblings when ordered. More... | |
| string | NodeId [get, set] |
| ID of node. More... | |
| string | SourceId [get] |
| Optional ID of source containing node. More... | |
| string | Partition [get] |
| Optional partition in which the Node ID is unique. More... | |
| virtual string | LocalId [get] |
| If provided, an ID for the node, but unique locally between siblings. Can be null, if Local ID equal to Node ID. More... | |
| virtual string | LogId [get] |
| If provided, an ID for the node, as it would appear or be used in system logs. Can be null, if Log ID equal to Node ID. More... | |
| bool | HasChildren [get] |
| If the source has any child sources. More... | |
| virtual bool | ChildrenOrdered [get] |
| If the children of the node have an intrinsic order (true), or if the order is not important (false). More... | |
| virtual bool | IsReadable [get] |
| If the node can be read. More... | |
| virtual bool | IsControllable [get] |
| If the node can be controlled. More... | |
| virtual bool | HasCommands [get] |
| If the node has registered commands or not. More... | |
| INode | Parent [get] |
| Parent Node, or null if a root node. More... | |
| DateTime | LastChanged [get] |
| When the node was last updated. More... | |
| NodeState | State [get, set] |
| Current overall state of the node. More... | |
| Task< IEnumerable< INode > > | ChildNodes [get] |
| Child nodes. If no child nodes are available, null is returned. More... | |
| virtual Task< IEnumerable< ICommand > > | Commands [get] |
| Available command objects. If no commands are available, null is returned. More... | |
Events | |
| EventHandlerAsync | OnUpdate = null |
| Event raised when node has been updated. More... | |
Base class for all output nodes.
Definition at line 28 of file OutputNode.cs.
| Waher.Output.OutputNode.OutputNode | ( | ) |
Base class for all output nodes.
Definition at line 47 of file OutputNode.cs.
|
pure virtual |
If the node accepts a presumptive child, i.e. can receive as a child (if that child accepts the node as a parent).
| Child | Presumptive child node. |
Implements Waher.Things.INode.
Implemented in Waher.Output.Metering.NodeTypes.InternalDatabaseOutput, and Waher.Output.NodeTypes.Root.
|
pure virtual |
If the node accepts a presumptive parent, i.e. can be added to that parent (if that parent accepts the node as a child).
| Parent | Presumptive parent node. |
Implements Waher.Things.INode.
Implemented in Waher.Output.Metering.NodeTypes.InternalDatabaseOutput, and Waher.Output.NodeTypes.Root.
|
virtual |
Adds a new child to the node.
| Child | New child to add. |
Implements Waher.Things.INode.
Definition at line 1092 of file OutputNode.cs.
|
virtual |
If the node can be added to by the caller.
| Caller | Information about caller. |
Implements Waher.Things.INode.
Definition at line 833 of file OutputNode.cs.
|
virtual |
If the node can be destroyed to by the caller.
| Caller | Information about caller. |
Implements Waher.Things.INode.
Reimplemented in Waher.Output.NodeTypes.Root.
Definition at line 843 of file OutputNode.cs.
|
virtual |
If the node can be edited by the caller.
| Caller | Information about caller. |
Implements Waher.Things.INode.
Reimplemented in Waher.Output.NodeTypes.Root.
Definition at line 823 of file OutputNode.cs.
|
virtual |
If the node is visible to the caller.
| Caller | Information about caller. |
Implements Waher.Things.INode.
Definition at line 813 of file OutputNode.cs.
|
protectedvirtual |
Checks the ordering of children.
| Children | Child nodes. |
Definition at line 770 of file OutputNode.cs.
|
virtual |
Destroys the node. If it is a child to a parent node, it is removed from the parent first.
Implements Waher.Things.INode.
Definition at line 1277 of file OutputNode.cs.
| override bool Waher.Output.OutputNode.Equals | ( | object | obj | ) |
Determines whether the specified object is equal to the current object.
| obj | The object to compare with the current object. |
Definition at line 67 of file OutputNode.cs.
| async Task< T > Waher.Output.OutputNode.GetAncestor< T > | ( | ) |
Tries to get an ancestor node of a given type, if one exists.
| T | : | INode |
Definition at line 646 of file OutputNode.cs.
| async Task< Parameter[]> Waher.Output.OutputNode.GetDisplayableParameterAraryAsync | ( | Language | Language, |
| RequestOrigin | Caller | ||
| ) |
Gets displayable parameters.
| Language | Language to use. |
| Caller | Information about caller. |
Definition at line 908 of file OutputNode.cs.
|
virtual |
Gets displayable parameters.
| Language | Language to use. |
| Caller | Information about caller. |
Implements Waher.Things.INode.
Definition at line 854 of file OutputNode.cs.
| override int Waher.Output.OutputNode.GetHashCode | ( | ) |
Serves as the default hash function.
Definition at line 79 of file OutputNode.cs.
| async Task< Message[]> Waher.Output.OutputNode.GetMessageArrayAsync | ( | RequestOrigin | Caller | ) |
Gets messages logged on the node.
Definition at line 935 of file OutputNode.cs.
|
virtual |
Gets messages logged on the node.
Implements Waher.Things.INode.
Definition at line 919 of file OutputNode.cs.
| async Task< INode > Waher.Output.OutputNode.GetParent | ( | ) |
Gets the parent of the node.
| Exception | If parent is not found. |
Implements Waher.Output.IOutputNode.
Definition at line 627 of file OutputNode.cs.
|
pure virtual |
Gets the type name of the node.
| Language | Language to use. |
Implements Waher.Things.INode.
Implemented in Waher.Output.Metering.NodeTypes.InternalDatabaseOutput, and Waher.Output.NodeTypes.Root.
|
static |
Gets a Output ID, based on OutputId that is not already available in the database.
| OutputId | Desired Output ID |
Definition at line 536 of file OutputNode.cs.
|
virtual |
Logs an error message on the node.
| Body | Message body. |
Implements Waher.Output.IOutputNode.
Definition at line 192 of file OutputNode.cs.
|
virtual |
Logs an error message on the node.
| EventId | Optional Event ID. |
| Body | Message body. |
Implements Waher.Output.IOutputNode.
Definition at line 202 of file OutputNode.cs.
|
virtual |
Logs an informational message on the node.
| Body | Message body. |
Implements Waher.Output.IOutputNode.
Definition at line 230 of file OutputNode.cs.
|
virtual |
Logs an informational message on the node.
| EventId | Optional Event ID. |
| Body | Message body. |
Implements Waher.Output.IOutputNode.
Definition at line 240 of file OutputNode.cs.
|
virtual |
Logs a message on the node.
| Type | Type of message. |
| Body | Message body. |
Implements Waher.Output.IOutputNode.
Definition at line 250 of file OutputNode.cs.
|
virtual |
Logs a message on the node.
| Type | Type of message. |
| EventId | Optional Event ID. |
| Body | Message body. |
Implements Waher.Output.IOutputNode.
Definition at line 261 of file OutputNode.cs.
|
virtual |
Logs an warning message on the node.
| Body | Message body. |
Implements Waher.Output.IOutputNode.
Definition at line 211 of file OutputNode.cs.
|
virtual |
Logs an warning message on the node.
| EventId | Optional Event ID. |
| Body | Message body. |
Implements Waher.Output.IOutputNode.
Definition at line 221 of file OutputNode.cs.
|
virtual |
Tries to move the child node down.
| Child | Child node to move. |
| Caller | Information about caller. |
Definition at line 1028 of file OutputNode.cs.
|
virtual |
Tries to move the node down.
| Caller | Information about caller. |
Implements Waher.Things.INode.
Definition at line 963 of file OutputNode.cs.
|
virtual |
Tries to move the child node up.
| Child | Child node to move. |
| Caller | Information about caller. |
Definition at line 977 of file OutputNode.cs.
|
virtual |
Tries to move the node up.
| Caller | Information about caller. |
Implements Waher.Things.INode.
Definition at line 950 of file OutputNode.cs.
|
protectedvirtual |
Persists changes to the node, and generates a node updated event.
Definition at line 1173 of file OutputNode.cs.
|
static |
Converts a OutputNode to a ThingReference object.
| Node | Metering node. |
Definition at line 55 of file OutputNode.cs.
|
virtual |
Removes a child from the node.
| Child | Child to remove. |
Implements Waher.Things.INode.
Definition at line 1222 of file OutputNode.cs.
|
virtual |
Removes error messages with an empty event ID from the node.
Implements Waher.Output.IOutputNode.
Definition at line 357 of file OutputNode.cs.
|
virtual |
Removes error messages with a given event ID from the node.
| EventId | Optional Event ID. |
Implements Waher.Output.IOutputNode.
Definition at line 366 of file OutputNode.cs.
|
virtual |
Removes warning messages with an empty event ID from the node.
Implements Waher.Output.IOutputNode.
Definition at line 391 of file OutputNode.cs.
|
virtual |
Removes an informational message on the node.
| EventId | Optional Event ID. |
Implements Waher.Output.IOutputNode.
Definition at line 400 of file OutputNode.cs.
|
virtual |
Removes messages with empty event IDs from the node.
| Type | Type of message. |
Implements Waher.Output.IOutputNode.
Definition at line 409 of file OutputNode.cs.
|
virtual |
Logs a message on the node.
| Type | Type of message. |
| EventId | Optional Event ID. |
Implements Waher.Output.IOutputNode.
Definition at line 419 of file OutputNode.cs.
|
virtual |
Removes warning messages with an empty event ID from the node.
Implements Waher.Output.IOutputNode.
Definition at line 374 of file OutputNode.cs.
|
virtual |
Removes warning messages with a given event ID from the node.
| EventId | Optional Event ID. |
Implements Waher.Output.IOutputNode.
Definition at line 383 of file OutputNode.cs.
|
protectedvirtual |
Method that allows the node to sort its children, after they have been loaded.
| Children | Loaded children. |
Definition at line 751 of file OutputNode.cs.
| override string Waher.Output.OutputNode.ToString | ( | ) |
Definition at line 167 of file OutputNode.cs.
|
virtual |
Updates the node (in persisted storage).
Implements Waher.Things.INode.
Definition at line 1209 of file OutputNode.cs.
|
get |
Child nodes. If no child nodes are available, null is returned.
Implements Waher.Things.INode.
Definition at line 693 of file OutputNode.cs.
|
get |
If the children of the node have an intrinsic order (true), or if the order is not important (false).
Implements Waher.Things.INode.
Definition at line 595 of file OutputNode.cs.
|
get |
Available command objects. If no commands are available, null is returned.
Implements Waher.Things.INode.
Definition at line 1336 of file OutputNode.cs.
|
getset |
When node was created.
Definition at line 108 of file OutputNode.cs.
|
get |
If the source has any child sources.
Implements Waher.Things.INode.
Definition at line 581 of file OutputNode.cs.
|
get |
If the node has registered commands or not.
Implements Waher.Things.INode.
Definition at line 613 of file OutputNode.cs.
|
get |
If the node can be controlled.
Implements Waher.Things.INode.
Definition at line 607 of file OutputNode.cs.
|
get |
If the node can be read.
Implements Waher.Things.INode.
Definition at line 601 of file OutputNode.cs.
|
get |
When the node was last updated.
Implements Waher.Things.INode.
Definition at line 668 of file OutputNode.cs.
|
get |
If provided, an ID for the node, but unique locally between siblings. Can be null, if Local ID equal to Node ID.
Implements Waher.Things.INode.
Definition at line 562 of file OutputNode.cs.
|
get |
If provided, an ID for the node, as it would appear or be used in system logs. Can be null, if Log ID equal to Node ID.
Implements Waher.Things.INode.
Definition at line 568 of file OutputNode.cs.
|
getset |
|
getset |
Object ID in persistence layer.
Definition at line 90 of file OutputNode.cs.
|
get |
Parent Node, or null if a root node.
Implements Waher.Things.INode.
Definition at line 620 of file OutputNode.cs.
|
getset |
Object ID of parent node in persistence layer.
Definition at line 99 of file OutputNode.cs.
|
get |
Optional partition in which the Node ID is unique.
Implements Waher.Things.IThingReference.
Definition at line 164 of file OutputNode.cs.
|
getset |
Sibling ordinal, used to order siblings when ordered.
Definition at line 128 of file OutputNode.cs.
|
get |
Optional ID of source containing node.
Implements Waher.Things.IThingReference.
Definition at line 158 of file OutputNode.cs.
|
getset |
Current overall state of the node.
Implements Waher.Things.INode.
Definition at line 683 of file OutputNode.cs.
|
getset |
When node was last updated. If it has not been updated, value will be DateTime.MinValue.
Definition at line 118 of file OutputNode.cs.
| EventHandlerAsync Waher.Output.OutputNode.OnUpdate = null |
Event raised when node has been updated.
Definition at line 524 of file OutputNode.cs.