The device part (well, train part) can't do much, just send status messages when the doors are opened/closed.
More...
|
| override string | ToString () |
| | Important! Without overriding ToString here, you will not be able to pick the device from an autosampler column in the sample list.
|
| void | Connect () |
| | You may have connected to the device before this, but make sure you are connected after this.
|
| void | Disconnect () |
| | You may disconnect now.
|
|
| string | DisplayedTypeName [get] |
| | Text which is displayed in the instruments settings "Autosampler Type" column and in many other places.
|
| string | DeviceTypeDescription [get] |
| | Text which is displayed to make clear which kind of device a named sampler is.
|
| string | Name [get, set] |
| | We have to return a descriptive name that also allows identification of the base device - just do it like the PAL3 and return BaseName + ":" + PartName.
|
| int | Num [get, set] |
| bool? | DoorsOpen [get, set] |
The device part (well, train part) can't do much, just send status messages when the doors are opened/closed.
Definition at line 76 of file Train.cs.
◆ BuildName()
| string MockPlugin.Device.TrainPart.BuildName |
( |
| ) |
|
|
private |
Definition at line 100 of file Train.cs.
101 {
102 switch (mMyType)
103 {
105 return $"{mTrain.Name}:Diner";
107 return $"{mTrain.Name}:Locomotive";
108 default:
109 return $"{mTrain.Name}:Car{Num}";
110 }
111 }
References mMyType.
◆ Connect()
| void MockPlugin.Device.TrainPart.Connect |
( |
| ) |
|
◆ Disconnect()
| void MockPlugin.Device.TrainPart.Disconnect |
( |
| ) |
|
◆ ToString()
| override string MockPlugin.Device.TrainPart.ToString |
( |
| ) |
|
Important! Without overriding ToString here, you will not be able to pick the device from an autosampler column in the sample list.
- Returns
References Name.
◆ mDoorsAreOpen
| bool MockPlugin.Device.TrainPart.mDoorsAreOpen |
|
private |
◆ mMyType
◆ mTrain
| readonly Train MockPlugin.Device.TrainPart.mTrain |
|
private |
◆ DeviceTypeDescription
| string MockPlugin.Device.TrainPart.DeviceTypeDescription |
|
get |
◆ DisplayedTypeName
| string MockPlugin.Device.TrainPart.DisplayedTypeName |
|
get |
◆ DoorsOpen
| bool? MockPlugin.Device.TrainPart.DoorsOpen |
|
getset |
Definition at line 130 of file Train.cs.
131 {
132 get => mDoorsAreOpen;
133 set
134 {
135 if (value != mDoorsAreOpen)
136 {
137 mDoorsAreOpen = value;
138 SetStatusMessage?.Invoke($"Doors are {(value ? "open" : "closed")}");
139 if (!value)
140 {
141 mTrain.ClosedSomeDoor();
142 }
143 }
144 }
145 }
◆ Name
| string MockPlugin.Device.TrainPart.Name |
|
getset |
We have to return a descriptive name that also allows identification of the base device - just do it like the PAL3 and return BaseName + ":" + PartName.
Implements AxelSemrau.Chronos.Plugin.IDevice.
Definition at line 86 of file Train.cs.
87 {
88 get => BuildName();
89 set { var dummy = value; }
90 }
Referenced by ToString().
◆ Num
| int MockPlugin.Device.TrainPart.Num |
|
getset |
◆ ConnectionStateChanged
Not used.
Definition at line 150 of file Train.cs.
151 {
152 add { }
153 remove { }
154 }
◆ SetStatusMessage
| Action<string> MockPlugin.Device.TrainPart.SetStatusMessage |
The documentation for this class was generated from the following file: