![]() |
Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
|
Base class for all group nodes. More...
Public Member Functions | |
| GroupNode () | |
| Base class for all group 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 (GroupNode Child, RequestOrigin Caller) |
| Tries to move the child node up. More... | |
| virtual async Task< bool > | MoveDownAsync (GroupNode 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 (GroupNode Node) |
| Converts a GroupNode to a ThingReference object. More... | |
| static async Task< string > | GetUniqueGroupId (string GroupId) |
| Gets a Group ID, based on GroupId that is not already available in the database. More... | |
Protected Member Functions | |
| virtual GroupNode[] | SortChildrenAfterLoadLocked (List< GroupNode > Children) |
| Method that allows the node to sort its children, after they have been loaded. More... | |
| virtual GroupNode[] | CheckOrderLocked (List< GroupNode > 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 group nodes.
Definition at line 28 of file GroupNode.cs.
| Waher.Groups.GroupNode.GroupNode | ( | ) |
Base class for all group nodes.
Definition at line 47 of file GroupNode.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.Groups.Metering.NodeTypes.MeteringGroup, Waher.Groups.Metering.NodeTypes.MeteringGroupReference, Waher.Groups.Metering.NodeTypes.MeteringNodeReference, Waher.Groups.NodeTypes.Group, Waher.Groups.NodeTypes.NodeReference, and Waher.Groups.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.Groups.Metering.NodeTypes.MeteringGroup, Waher.Groups.Metering.NodeTypes.MeteringGroupReference, Waher.Groups.Metering.NodeTypes.MeteringNodeReference, Waher.Groups.NodeTypes.Group, Waher.Groups.NodeTypes.NodeReference, and Waher.Groups.NodeTypes.Root.
|
virtual |
Adds a new child to the node.
| Child | New child to add. |
Implements Waher.Things.INode.
Definition at line 1093 of file GroupNode.cs.
|
virtual |
If the node can be added to by the caller.
| Caller | Information about caller. |
Implements Waher.Things.INode.
Definition at line 834 of file GroupNode.cs.
|
virtual |
If the node can be destroyed to by the caller.
| Caller | Information about caller. |
Implements Waher.Things.INode.
Reimplemented in Waher.Groups.NodeTypes.Root.
Definition at line 844 of file GroupNode.cs.
|
virtual |
If the node can be edited by the caller.
| Caller | Information about caller. |
Implements Waher.Things.INode.
Reimplemented in Waher.Groups.NodeTypes.Root.
Definition at line 824 of file GroupNode.cs.
|
virtual |
If the node is visible to the caller.
| Caller | Information about caller. |
Implements Waher.Things.INode.
Definition at line 814 of file GroupNode.cs.
|
protectedvirtual |
Checks the ordering of children.
| Children | Child nodes. |
Definition at line 771 of file GroupNode.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 1278 of file GroupNode.cs.
| override bool Waher.Groups.GroupNode.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 GroupNode.cs.
| async Task< T > Waher.Groups.GroupNode.GetAncestor< T > | ( | ) |
Tries to get an ancestor node of a given type, if one exists.
| T | : | INode |
Definition at line 647 of file GroupNode.cs.
| async Task< Parameter[]> Waher.Groups.GroupNode.GetDisplayableParameterAraryAsync | ( | Language | Language, |
| RequestOrigin | Caller | ||
| ) |
Gets displayable parameters.
| Language | Language to use. |
| Caller | Information about caller. |
Definition at line 909 of file GroupNode.cs.
|
virtual |
Gets displayable parameters.
| Language | Language to use. |
| Caller | Information about caller. |
Implements Waher.Things.INode.
Definition at line 855 of file GroupNode.cs.
| override int Waher.Groups.GroupNode.GetHashCode | ( | ) |
Serves as the default hash function.
Definition at line 79 of file GroupNode.cs.
| async Task< Message[]> Waher.Groups.GroupNode.GetMessageArrayAsync | ( | RequestOrigin | Caller | ) |
Gets messages logged on the node.
Definition at line 936 of file GroupNode.cs.
|
virtual |
Gets messages logged on the node.
Implements Waher.Things.INode.
Definition at line 920 of file GroupNode.cs.
| async Task< INode > Waher.Groups.GroupNode.GetParent | ( | ) |
Gets the parent of the node.
| Exception | If parent is not found. |
Implements Waher.Groups.IGroupNode.
Definition at line 628 of file GroupNode.cs.
|
pure virtual |
Gets the type name of the node.
| Language | Language to use. |
Implements Waher.Things.INode.
Implemented in Waher.Groups.Metering.NodeTypes.MeteringGroup, Waher.Groups.Metering.NodeTypes.MeteringGroupReference, Waher.Groups.Metering.NodeTypes.MeteringNodeReference, Waher.Groups.NodeTypes.Group, Waher.Groups.NodeTypes.NodeReference, and Waher.Groups.NodeTypes.Root.
|
static |
Gets a Group ID, based on GroupId that is not already available in the database.
| GroupId | Desired Group ID |
Definition at line 536 of file GroupNode.cs.
|
virtual |
Logs an error message on the node.
| Body | Message body. |
Implements Waher.Groups.IGroupNode.
Definition at line 192 of file GroupNode.cs.
|
virtual |
Logs an error message on the node.
| EventId | Optional Event ID. |
| Body | Message body. |
Implements Waher.Groups.IGroupNode.
Definition at line 202 of file GroupNode.cs.
|
virtual |
Logs an informational message on the node.
| Body | Message body. |
Implements Waher.Groups.IGroupNode.
Definition at line 230 of file GroupNode.cs.
|
virtual |
Logs an informational message on the node.
| EventId | Optional Event ID. |
| Body | Message body. |
Implements Waher.Groups.IGroupNode.
Definition at line 240 of file GroupNode.cs.
|
virtual |
Logs a message on the node.
| Type | Type of message. |
| Body | Message body. |
Implements Waher.Groups.IGroupNode.
Definition at line 250 of file GroupNode.cs.
|
virtual |
Logs a message on the node.
| Type | Type of message. |
| EventId | Optional Event ID. |
| Body | Message body. |
Implements Waher.Groups.IGroupNode.
Definition at line 261 of file GroupNode.cs.
|
virtual |
Logs an warning message on the node.
| Body | Message body. |
Implements Waher.Groups.IGroupNode.
Definition at line 211 of file GroupNode.cs.
|
virtual |
Logs an warning message on the node.
| EventId | Optional Event ID. |
| Body | Message body. |
Implements Waher.Groups.IGroupNode.
Definition at line 221 of file GroupNode.cs.
|
virtual |
Tries to move the child node down.
| Child | Child node to move. |
| Caller | Information about caller. |
Definition at line 1029 of file GroupNode.cs.
|
virtual |
Tries to move the node down.
| Caller | Information about caller. |
Implements Waher.Things.INode.
Definition at line 964 of file GroupNode.cs.
|
virtual |
Tries to move the child node up.
| Child | Child node to move. |
| Caller | Information about caller. |
Definition at line 978 of file GroupNode.cs.
|
virtual |
Tries to move the node up.
| Caller | Information about caller. |
Implements Waher.Things.INode.
Definition at line 951 of file GroupNode.cs.
|
protectedvirtual |
Persists changes to the node, and generates a node updated event.
Definition at line 1174 of file GroupNode.cs.
|
static |
Converts a GroupNode to a ThingReference object.
| Node | Metering node. |
Definition at line 55 of file GroupNode.cs.
|
virtual |
Removes a child from the node.
| Child | Child to remove. |
Implements Waher.Things.INode.
Definition at line 1223 of file GroupNode.cs.
|
virtual |
Removes error messages with an empty event ID from the node.
Implements Waher.Groups.IGroupNode.
Definition at line 357 of file GroupNode.cs.
|
virtual |
Removes error messages with a given event ID from the node.
| EventId | Optional Event ID. |
Implements Waher.Groups.IGroupNode.
Definition at line 366 of file GroupNode.cs.
|
virtual |
Removes warning messages with an empty event ID from the node.
Implements Waher.Groups.IGroupNode.
Definition at line 391 of file GroupNode.cs.
|
virtual |
Removes an informational message on the node.
| EventId | Optional Event ID. |
Implements Waher.Groups.IGroupNode.
Definition at line 400 of file GroupNode.cs.
|
virtual |
Removes messages with empty event IDs from the node.
| Type | Type of message. |
Implements Waher.Groups.IGroupNode.
Definition at line 409 of file GroupNode.cs.
|
virtual |
Logs a message on the node.
| Type | Type of message. |
| EventId | Optional Event ID. |
Implements Waher.Groups.IGroupNode.
Definition at line 419 of file GroupNode.cs.
|
virtual |
Removes warning messages with an empty event ID from the node.
Implements Waher.Groups.IGroupNode.
Definition at line 374 of file GroupNode.cs.
|
virtual |
Removes warning messages with a given event ID from the node.
| EventId | Optional Event ID. |
Implements Waher.Groups.IGroupNode.
Definition at line 383 of file GroupNode.cs.
|
protectedvirtual |
Method that allows the node to sort its children, after they have been loaded.
| Children | Loaded children. |
Definition at line 752 of file GroupNode.cs.
| override string Waher.Groups.GroupNode.ToString | ( | ) |
Definition at line 167 of file GroupNode.cs.
|
virtual |
Updates the node (in persisted storage).
Implements Waher.Things.INode.
Definition at line 1210 of file GroupNode.cs.
|
get |
Child nodes. If no child nodes are available, null is returned.
Implements Waher.Things.INode.
Definition at line 694 of file GroupNode.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 596 of file GroupNode.cs.
|
get |
Available command objects. If no commands are available, null is returned.
Implements Waher.Things.INode.
Definition at line 1337 of file GroupNode.cs.
|
getset |
When node was created.
Definition at line 108 of file GroupNode.cs.
|
get |
If the source has any child sources.
Implements Waher.Things.INode.
Definition at line 582 of file GroupNode.cs.
|
get |
If the node has registered commands or not.
Implements Waher.Things.INode.
Definition at line 614 of file GroupNode.cs.
|
get |
If the node can be controlled.
Implements Waher.Things.INode.
Definition at line 608 of file GroupNode.cs.
|
get |
If the node can be read.
Implements Waher.Things.INode.
Definition at line 602 of file GroupNode.cs.
|
get |
When the node was last updated.
Implements Waher.Things.INode.
Definition at line 669 of file GroupNode.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 563 of file GroupNode.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 569 of file GroupNode.cs.
|
getset |
|
getset |
Object ID in persistence layer.
Definition at line 90 of file GroupNode.cs.
|
get |
Parent Node, or null if a root node.
Implements Waher.Things.INode.
Definition at line 621 of file GroupNode.cs.
|
getset |
Object ID of parent node in persistence layer.
Definition at line 99 of file GroupNode.cs.
|
get |
Optional partition in which the Node ID is unique.
Implements Waher.Things.IThingReference.
Definition at line 164 of file GroupNode.cs.
|
getset |
Sibling ordinal, used to order siblings when ordered.
Definition at line 128 of file GroupNode.cs.
|
get |
Optional ID of source containing node.
Implements Waher.Things.IThingReference.
Definition at line 158 of file GroupNode.cs.
|
getset |
Current overall state of the node.
Implements Waher.Things.INode.
Definition at line 684 of file GroupNode.cs.
|
getset |
When node was last updated. If it has not been updated, value will be DateTime.MinValue.
Definition at line 118 of file GroupNode.cs.
| EventHandlerAsync Waher.Groups.GroupNode.OnUpdate = null |
Event raised when node has been updated.
Definition at line 524 of file GroupNode.cs.