2using System.Collections.Generic;
4using System.Threading.Tasks;
20 private IValue value =
null;
24 private string description;
25 private string variable;
27 private string setEventId;
48 public string Name => this.name;
53 public string Page => this.page;
58 public string Label => this.label;
73 public string Actor => this.actor;
89 public override Task
FromXml(XmlElement Definition)
94 this.description =
XML.
Attribute(Definition,
"description");
99 return base.FromXml(Definition);
108 if (this.value is
null)
111 throw new Exception(
"Field node already has a value defined.");
120 throw new Exception(
"Event not found: " + this.setEventId);
141 return Task.CompletedTask;
161 Output.Write(
"actor \"");
162 Output.Write(this.actor);
163 Output.Write(
"\" as A");
165 Output.Write(this.actor);
166 Output.WriteLine(
">>");
167 Output.WriteLine(
"note right of A : Triggered when external\\ncontrol client sets parameter");
168 Output.Write(
"A --> UC1 : ");
169 Output.WriteLine(this.name);
Root node of a simulation model
bool TryGetEvent(string Id, out IEvent Event)
Tries to get a registered event from the model.
Abstract base class for actors
Abstract base class for values
Value defined by variable.
Abstract base class for control parameter nodes.
void Register(IValue Value)
Registers a value for the argument.
override Task Start()
Starts the node.
string SetEventId
ID of Set event.
Task Prepare(Variables Variables, List< KeyValuePair< string, object > > Tags)
Prepares Variables for the execution of an event.
abstract void AddParameters(List< ControlParameter > Parameters, IActor Actor)
Adds control parameters.
ControlParameterNode(ISimulationNode Parent, Model Model)
Abstract base class for control parameter nodes.
void Release(Variables Variables)
Releases resources at the end of an event.
string Description
Description
override Task FromXml(XmlElement Definition)
Sets properties and attributes of class in accordance with XML definition.
void ExportPlantUml(StreamWriter Output, string Name, int Index)
Exports the node to PlantUML script in a markdown document.
Helps with common XML-related tasks.
static string Attribute(XmlElement E, string Name)
Gets the value of an XML attribute.
Basic interface for simulator nodes. Implementing this interface allows classes with default contruct...
ISimulationNode Parent
Parent node in the simulation model.
Basic interface for simulator nodes. Implementing this interface allows classes with default contruct...
void Register(IEventPreparation PreparationNode)
Registers an event preparation node.
Interface for event preparation nodes
Interface for nodes holding a value node