Chronos Plugins 5.9.0
This documentation covers the plugin interfaces definitions and an example implementation.
Loading...
Searching...
No Matches
MockPlugin.Tasks.UseTrain Class Reference

Just show that some kind of operation can be done with our "Train" device parts. More...

+ Inheritance diagram for MockPlugin.Tasks.UseTrain:
+ Collaboration diagram for MockPlugin.Tasks.UseTrain:

Public Member Functions

void PreValidate ()
 Called before the schedule construction is completed.
 
void PostValidate ()
 Called after the schedule construction is completed.
 
void Execute ()
 Do whatever you have to do with your parameters.
 
string GetTaskAction ()
 Description of the tasks's action (for hints/time table)
 
void SetDevice (IDevice yourDevice)
 Will be called by chronos when building the schedule.
 
- Public Member Functions inherited from AxelSemrau.Chronos.Plugin.ITaskForDevice
- Public Member Functions inherited from AxelSemrau.Chronos.Plugin.ITask

Properties

bool DoorsOpen [get, set]
 

Private Attributes

TrainPart mMyTrainPart
 

Detailed Description

Just show that some kind of operation can be done with our "Train" device parts.

Definition at line 13 of file UseTrain.cs.

Member Function Documentation

◆ Execute()

void MockPlugin.Tasks.UseTrain.Execute ( )

Do whatever you have to do with your parameters.

Implements AxelSemrau.Chronos.Plugin.ITask.

Definition at line 32 of file UseTrain.cs.

33 {
34 mMyTrainPart.DoorsOpen = DoorsOpen;
35 }

References MockPlugin.Tasks.UseTrain.DoorsOpen.

◆ GetTaskAction()

string MockPlugin.Tasks.UseTrain.GetTaskAction ( )

Description of the tasks's action (for hints/time table)

Implements AxelSemrau.Chronos.Plugin.ITask.

Definition at line 37 of file UseTrain.cs.

38 {
39 return $"{(DoorsOpen ? "Opening" : "Closing")} the doors of {mMyTrainPart?.Name ?? "N/A"}";
40 }

◆ PostValidate()

void MockPlugin.Tasks.UseTrain.PostValidate ( )

Called after the schedule construction is completed.

Implements AxelSemrau.Chronos.Plugin.ITask.

Definition at line 22 of file UseTrain.cs.

23 {
24 if (mMyTrainPart == null)
25 {
26 throw new InvalidOperationException("Need a train part as \"Autosampler\"");
27 }
28 }

References MockPlugin.Tasks.UseTrain.mMyTrainPart.

◆ PreValidate()

void MockPlugin.Tasks.UseTrain.PreValidate ( )

Called before the schedule construction is completed.

Implements AxelSemrau.Chronos.Plugin.ITask.

Definition at line 17 of file UseTrain.cs.

18 {
19
20 }

◆ SetDevice()

void MockPlugin.Tasks.UseTrain.SetDevice ( IDevice yourDevice)

Will be called by chronos when building the schedule.

Parameters
yourDevice

Implements AxelSemrau.Chronos.Plugin.ITaskForDevice.

Definition at line 43 of file UseTrain.cs.

44 {
45 mMyTrainPart = yourDevice as TrainPart;
46 }
The device part (well, train part) can't do much, just send status messages when the doors are opened...
Definition Train.cs:77

References MockPlugin.Tasks.UseTrain.mMyTrainPart.

Member Data Documentation

◆ mMyTrainPart

TrainPart MockPlugin.Tasks.UseTrain.mMyTrainPart
private

Property Documentation

◆ DoorsOpen

bool MockPlugin.Tasks.UseTrain.DoorsOpen
getset

Definition at line 30 of file UseTrain.cs.

30{ get; set; }

Referenced by MockPlugin.Tasks.UseTrain.Execute().


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