Chronos Plugins 5.4.0
This documentation covers the plugin interfaces definitions and an example implementation.
Loading...
Searching...
No Matches
MockPlugin.Device.Train Class Reference

For lack of a better idea, the demonstration for the multipart device is a train consisting of a locomotive and some different cars. More...

+ Inheritance diagram for MockPlugin.Device.Train:
+ Collaboration diagram for MockPlugin.Device.Train:

Public Member Functions

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.
 
 Train ()
 Just adding all parts of the train. The parts keep references to the full train.
 
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.
 

Properties

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]
 User-selected name for the device instance.
 
Action< ConnectionStateConnectionStateChanged
 Not used.
 
IReadOnlyCollection< IDeviceParts [get]
 Collection of all available parts.
 
- Properties inherited from AxelSemrau.Chronos.Plugin.IMultipartDevice
IReadOnlyCollection< IDeviceParts [get]
 Collection of all available parts.
 
- Properties inherited from AxelSemrau.Chronos.Plugin.IDevice
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]
 User-selected name for the device instance.
 

Events

Action< string > WriteToRunlog
 
- Events inherited from AxelSemrau.Chronos.Plugin.IDevice
Action< ConnectionStateConnectionStateChanged
 Raise this event when your connection state has changed.
 
- Events inherited from AxelSemrau.Chronos.Plugin.IHaveRunlogOutput
Action< string > WriteToRunlog
 Use this event to send output to the Run Control / Runlog page and, if applicable, to the runlog file.
 

Private Attributes

readonly List< TrainPartmAllParts = new List<TrainPart>()
 

Detailed Description

For lack of a better idea, the demonstration for the multipart device is a train consisting of a locomotive and some different cars.

Definition at line 13 of file Train.cs.

Constructor & Destructor Documentation

◆ Train()

MockPlugin.Device.Train.Train ( )

Just adding all parts of the train. The parts keep references to the full train.

Definition at line 32 of file Train.cs.

33 {
34 mAllParts.Add(new TrainPart(this,TrainPartType.Locomotive));
35 mAllParts.Add(new TrainPart(this, TrainPartType.DiningCar));
36 for (int i = 0; i < 7; ++i)
37 {
38 mAllParts.Add(new TrainPart(this, TrainPartType.PassengerCar) {Num = i+57});
39 }
40 }
readonly List< TrainPart > mAllParts
Definition: Train.cs:27

References MockPlugin.Device.Train.mAllParts.

Member Function Documentation

◆ Connect()

void MockPlugin.Device.Train.Connect ( )

You may have connected to the device before this, but make sure you are connected after this.

Implements AxelSemrau.Chronos.Plugin.IDevice.

Definition at line 18 of file Train.cs.

19 {
20 // connection state is irrelevant for the scope of this demonstration.
21 }

◆ Disconnect()

void MockPlugin.Device.Train.Disconnect ( )

You may disconnect now.

Implements AxelSemrau.Chronos.Plugin.IDevice.

Definition at line 23 of file Train.cs.

24 {
25 }

Member Data Documentation

◆ mAllParts

readonly List<TrainPart> MockPlugin.Device.Train.mAllParts = new List<TrainPart>()
private

Definition at line 27 of file Train.cs.

Referenced by MockPlugin.Device.Train.Train().

Property Documentation

◆ ConnectionStateChanged

Action<ConnectionState> MockPlugin.Device.Train.ConnectionStateChanged
addremove

Not used.

Implements AxelSemrau.Chronos.Plugin.IDevice.

Definition at line 45 of file Train.cs.

46 {
47 add { }
48 remove { }
49 }

◆ DeviceTypeDescription

string MockPlugin.Device.Train.DeviceTypeDescription
get

Text which is displayed to make clear which kind of device a named sampler is.

Implements AxelSemrau.Chronos.Plugin.IDevice.

Definition at line 16 of file Train.cs.

◆ DisplayedTypeName

string MockPlugin.Device.Train.DisplayedTypeName
get

Text which is displayed in the instruments settings "Autosampler Type" column and in many other places.

Implements AxelSemrau.Chronos.Plugin.IDevice.

Definition at line 15 of file Train.cs.

◆ Name

string MockPlugin.Device.Train.Name
getset

User-selected name for the device instance.

Please return what you are given. Note: Before Chronos 5.1.8, this was set to "Uninitialized Device" for temporary device instances. With later versions, the name should only be set for a "real" instance.

Implements AxelSemrau.Chronos.Plugin.IDevice.

Definition at line 17 of file Train.cs.

17{ get; set; }

◆ Parts

IReadOnlyCollection<IDevice> MockPlugin.Device.Train.Parts
get

Collection of all available parts.

Implements AxelSemrau.Chronos.Plugin.IMultipartDevice.

Definition at line 51 of file Train.cs.

Event Documentation

◆ WriteToRunlog

Action<string> MockPlugin.Device.Train.WriteToRunlog

Definition at line 62 of file Train.cs.


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