Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
Waher.Output.OutputSource Class Reference

Defines the Output data source. This data source contains a tree structure of output of nodes More...

Inheritance diagram for Waher.Output.OutputSource:
Waher.Things.IDataSource

Public Member Functions

 OutputSource ()
 Defines the Metering Topology data source. This data source contains a tree structure of persistent readable and controllable devices More...
 
Task< string > GetNameAsync (Language Language)
 Gets the name of data source. More...
 
async Task< INodeGetNodeAsync (IThingReference NodeRef)
 Gets the node, given a reference to it. More...
 
Task< bool > CanViewAsync (RequestOrigin Caller)
 If the data source is visible to the caller. More...
 

Static Public Member Functions

static Task< OutputNodeGetNode (string NodeId)
 Gets a node from the Metering Topology More...
 
static async Task< OutputNodeGetNode (IThingReference NodeRef)
 Gets a node from the Metering Topology More...
 
static async Task< int > DeleteOldEvents (TimeSpan MaxAge)
 Deletes old data source events. More...
 
static async Task< int > DeleteOrphans ()
 Deletes orphaned nodes in the metering topology source. More...
 

Static Public Attributes

const string SourceID = "Output"
 Source ID for the output data source. More...
 

Properties

IEnumerable< IDataSourceChildSources [get]
 Child sources. If no child sources are available, null is returned. More...
 
bool HasChildren [get]
 If the source has any child sources. More...
 
DateTime LastChanged [get, set]
 When the source was last updated. More...
 
IEnumerable< INodeRootNodes [get]
 Root node references. If no root nodes are available, null is returned. More...
 
static Root Root [get]
 Root node. More...
 

Events

EventHandlerAsync< SourceEventOnEvent = null
 Event raised when a data source event has been raised. More...
 

Detailed Description

Defines the Output data source. This data source contains a tree structure of output of nodes

Definition at line 19 of file OutputSource.cs.

Constructor & Destructor Documentation

◆ OutputSource()

Waher.Output.OutputSource.OutputSource ( )

Defines the Metering Topology data source. This data source contains a tree structure of persistent readable and controllable devices

Definition at line 36 of file OutputSource.cs.

Member Function Documentation

◆ CanViewAsync()

Task< bool > Waher.Output.OutputSource.CanViewAsync ( RequestOrigin  Caller)

If the data source is visible to the caller.

Parameters
CallerInformation about caller.
Returns
If the source is visible to the caller.

Implements Waher.Things.IDataSource.

Definition at line 192 of file OutputSource.cs.

◆ DeleteOldEvents()

static async Task< int > Waher.Output.OutputSource.DeleteOldEvents ( TimeSpan  MaxAge)
static

Deletes old data source events.

Parameters
MaxAgeMaximum age of events to keep.
Returns
Number of events deleted.

Definition at line 287 of file OutputSource.cs.

◆ DeleteOrphans()

static async Task< int > Waher.Output.OutputSource.DeleteOrphans ( )
static

Deletes orphaned nodes in the metering topology source.

Returns
Number of nodes deleted.

Definition at line 329 of file OutputSource.cs.

◆ GetNameAsync()

Task< string > Waher.Output.OutputSource.GetNameAsync ( Language  Language)

Gets the name of data source.

Parameters
LanguageLanguage to use.
Returns
Localized name of data source.

Implements Waher.Things.IDataSource.

Definition at line 78 of file OutputSource.cs.

◆ GetNode() [1/2]

static async Task< OutputNode > Waher.Output.OutputSource.GetNode ( IThingReference  NodeRef)
static

Gets a node from the Metering Topology

Parameters
NodeRefNode reference
Returns
Node, if found, null otherwise.

Definition at line 108 of file OutputSource.cs.

◆ GetNode() [2/2]

static Task< OutputNode > Waher.Output.OutputSource.GetNode ( string  NodeId)
static

Gets a node from the Metering Topology

Parameters
NodeIdNode ID
Returns
Node, if found, null otherwise.

Definition at line 98 of file OutputSource.cs.

◆ GetNodeAsync()

async Task< INode > Waher.Output.OutputSource.GetNodeAsync ( IThingReference  NodeRef)

Gets the node, given a reference to it.

Parameters
NodeRefNode reference.
Returns
Node, if found, null otherwise.

Implements Waher.Things.IDataSource.

Definition at line 88 of file OutputSource.cs.

Member Data Documentation

◆ SourceID

const string Waher.Output.OutputSource.SourceID = "Output"
static

Source ID for the output data source.

Definition at line 24 of file OutputSource.cs.

Property Documentation

◆ ChildSources

IEnumerable<IDataSource> Waher.Output.OutputSource.ChildSources
get

Child sources. If no child sources are available, null is returned.

Implements Waher.Things.IDataSource.

Definition at line 50 of file OutputSource.cs.

◆ HasChildren

bool Waher.Output.OutputSource.HasChildren
get

If the source has any child sources.

Implements Waher.Things.IDataSource.

Definition at line 55 of file OutputSource.cs.

◆ LastChanged

DateTime Waher.Output.OutputSource.LastChanged
getset

When the source was last updated.

Implements Waher.Things.IDataSource.

Definition at line 60 of file OutputSource.cs.

◆ Root

Root Waher.Output.OutputSource.Root
staticget

Root node.

Definition at line 214 of file OutputSource.cs.

◆ RootNodes

IEnumerable<INode> Waher.Output.OutputSource.RootNodes
get

Root node references. If no root nodes are available, null is returned.

Implements Waher.Things.IDataSource.

Definition at line 200 of file OutputSource.cs.

Event Documentation

◆ OnEvent

EventHandlerAsync<SourceEvent> Waher.Output.OutputSource.OnEvent = null

Event raised when a data source event has been raised.

Definition at line 317 of file OutputSource.cs.


The documentation for this class was generated from the following file: