Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
EventSinkNode.cs
2using System.Threading.Tasks;
3using System.Xml;
6using Waher.Things;
9
11{
15 public abstract class EventSinkNode : ConfigurationNode
16 {
21 : base(null, null)
22 {
23 }
24
32 string SinkId)
33 : base(Source, Parent)
34 {
35 this.SinkId = SinkId;
36 }
37
41 [Page(7, "Configuration")]
42 [Header(146, "Sink ID:")]
43 [ToolTip(147, "ID of the event sink, for logging purposes.")]
44 [Required]
45 public string SinkId { get; set; }
46
50 public override string NodeId => this.SinkId;
51
57 public override Task<bool> AcceptsParentAsync(INode Parent)
58 {
59 return Task.FromResult(Parent is EventSinksNode || Parent is EventFilterNode);
60 }
61
68 public override async Task<IEnumerable<Parameter>> GetDisplayableParametersAsync(Language Language, RequestOrigin Caller)
69 {
70 LinkedList<Parameter> Parameters = new LinkedList<Parameter>();
72
73 Parameters.AddLast(new StringParameter("SinkID", await Namespace.GetStringAsync(145, "Sink ID"), this.SinkId));
74
75 return Parameters;
76 }
77
82 public abstract void Export(XmlWriter Output);
83 }
84}
Contains information about a language.
Definition: Language.cs:17
async Task< Namespace > GetNamespaceAsync(string Name)
Gets the namespace object, given its name, if available.
Definition: Language.cs:99
Contains information about a namespace in a language.
Definition: Namespace.cs:17
Task< LanguageString > GetStringAsync(int Id)
Gets the string object, given its ID, if available.
Definition: Namespace.cs:65
Abstract base class for gateway configuration nodes.
virtual INode Parent
Parent Node, or null if a root node.
GatewayConfigSource Source
Source hosting the node.
Abstract base class for event sink nodes.
EventSinkNode(GatewayConfigSource Source, ConfigurationNode Parent, string SinkId)
Abstract base class for event sink nodes.
abstract void Export(XmlWriter Output)
Exports the event sink definition to XML.
override 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...
override async Task< IEnumerable< Parameter > > GetDisplayableParametersAsync(Language Language, RequestOrigin Caller)
Gets displayable parameters.
EventSinkNode()
Abstract base class for event sink nodes.
Contains configuration of custom event sinks.
Tokens available in request.
Definition: RequestOrigin.cs:9
Interface for nodes that are published through the concentrator interface.
Definition: INode.cs:49