Chronos Plugins  5.2.0
This documentation covers the plugin interfaces definitions and an example implementation.
MockPlugin.Device.DeviceSurveillance Class Reference

Shows how you can directly interact with all configured devices. More...

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

Public Member Functions

void DoYourJob ()
 Will be triggered when the user clicks on the button. The button will be disabled until you return from here. More...
 

Properties

string ButtonCaption [get]
 
Icon ButtonIcon [get]
 
IEnumerable< IDeviceConfiguredDevices [set]
 
- Properties inherited from AxelSemrau.Chronos.Plugin.IWorkWithSampleLists
string ButtonCaption [get]
 Shown on the sample list page More...
 
System.Drawing.Icon ButtonIcon [get]
 Shown in the button, preferred size 22x22 More...
 
- Properties inherited from AxelSemrau.Chronos.Plugin.IDirectDeviceAccess
IEnumerable< IDeviceConfiguredDevices [set]
 List of IDevice for all configured devices in Chronos. More...
 

Events

EventHandler< TraceWriteEventArgsTraceWrite
 
- Events inherited from AxelSemrau.Chronos.Plugin.ITraceLogger
EventHandler< TraceWriteEventArgsTraceWrite
 Chronos will subscribe to this event and log the text provided in the event args. More...
 

Private Member Functions

void Trace (string txt)
 

Detailed Description

Shows how you can directly interact with all configured devices.

This way of interacting is only for very rare scenarios - you should use IToolbox or ITaskForDevice for device access whenever possible.

Definition at line 17 of file DeviceSurveillance.cs.

Member Function Documentation

◆ DoYourJob()

void MockPlugin.Device.DeviceSurveillance.DoYourJob ( )

Will be triggered when the user clicks on the button. The button will be disabled until you return from here.

Please note that this will not be run from the main GUI thread. If you have to do something on the GUI thread, use the Helpers.Gui members.

Implements AxelSemrau.Chronos.Plugin.IWorkWithSampleLists.

Definition at line 23 of file DeviceSurveillance.cs.

24  {
25  // nothing to see here
26  }

◆ Trace()

void MockPlugin.Device.DeviceSurveillance.Trace ( string  txt)
private

Definition at line 52 of file DeviceSurveillance.cs.

53  {
54  TraceWrite?.Invoke(this,new TraceWriteEventArgs(txt));
55  }
For future extension (categories, priorities...)
EventHandler< TraceWriteEventArgs > TraceWrite

References MockPlugin.Device.DeviceSurveillance.TraceWrite.

Property Documentation

◆ ButtonCaption

string MockPlugin.Device.DeviceSurveillance.ButtonCaption
get

Definition at line 21 of file DeviceSurveillance.cs.

◆ ButtonIcon

Icon MockPlugin.Device.DeviceSurveillance.ButtonIcon
get

Definition at line 22 of file DeviceSurveillance.cs.

◆ ConfiguredDevices

IEnumerable<IDevice> MockPlugin.Device.DeviceSurveillance.ConfiguredDevices
set

Definition at line 32 of file DeviceSurveillance.cs.

33  {
34  set
35  {
36  // You could save the list for later use,
37  // you could filter the list for specific interfaces,
38  // you could call methods of the devices at any time -
39  // just make sure you know what you are doing and don't mess with
40  // toolboxes and sequence execution.
41  Trace("** Start device list dump");
42  foreach (var someDev in value)
43  {
44  Trace($"{someDev.Name} of type {someDev.GetType().FullName}, connection state {Helpers.Devices.Single(info => info.Device == someDev).ConnectionState}");
45  }
46  Trace("** End device list dump");
47  }
48  }

Event Documentation

◆ TraceWrite

EventHandler<TraceWriteEventArgs> MockPlugin.Device.DeviceSurveillance.TraceWrite

Definition at line 58 of file DeviceSurveillance.cs.

Referenced by MockPlugin.Device.DeviceSurveillance.Trace().


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