Chronos Plugins 5.9.0
This documentation covers the plugin interfaces definitions and an example implementation.
|
A task working on a complex parameter set. More...
Classes | |
class | CompositionData |
Let's pretend the composition is really complex and better done with a custom editor. More... | |
class | CompositionEditor |
Provide an editor for our complex parameter set, the standard component model way. More... | |
Public Types | |
enum | CreamType { Normal , LowFat , Vegan } |
Enum properties result in nice drop-down lists. More... | |
Public Member Functions | |
override string | GetTaskAction () |
Description of the tasks's action (for hints/time table) | |
BrewFrappuccino () | |
override void | Execute () |
Send the recipe to our device. | |
override void | PostValidate () |
Called after the schedule construction is completed. | |
void | PropertyEdited (string propName, object propValue) |
The method editor informs us about changed values. | |
Public Member Functions inherited from MockPlugin.Tasks.CoffeeMachineBaseTask | |
void | SetDevice (IDevice yourDevice) |
virtual void | PreValidate () |
Called before 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) | |
Public Member Functions inherited from AxelSemrau.Chronos.Plugin.ITask | |
Public Member Functions inherited from AxelSemrau.Chronos.Plugin.ITaskForDevice | |
void | SetDevice (IDevice yourDevice) |
Will be called by chronos when building the schedule. | |
Public Member Functions inherited from AxelSemrau.Chronos.Plugin.IWantEditorUpdates |
Properties | |
CompositionData | Composition [get, set] |
Our extremely complex composition which could in no way be done with normal text-editable properties. | |
uint | Volume [get, set] |
uint | CupSize [get, set] |
int? | CalculatedRuntime [get] |
Return some fake runtimes depending on the requested volume. | |
Properties inherited from MockPlugin.Tasks.CoffeeMachineBaseTask | |
IConsumableManipulator | Consumables [get, set] |
You will get an instance of a helper class that helps your task to find the correct consumable puddle. | |
Properties inherited from AxelSemrau.Chronos.Plugin.Consumables.IConsumer | |
Properties inherited from AxelSemrau.Chronos.Plugin.IGiveARuntimeHint |
Events | |
PropertyChangedEventHandler | PropertyChanged |
Private Member Functions | |
void | RegisterConsumption (CompositionData composition) |
Register consumption of coffee / cream with the consumables tracker. | |
Private Attributes | |
CompositionData | mComposition |
MockDevice | mDevInEditor |
Additional Inherited Members | |
Protected Member Functions inherited from MockPlugin.Tasks.CoffeeMachineBaseTask | |
void | CheckForCoffeeMachine (IDevice yourDevice) |
It makes no sense to use any other "Autosampler" than our fake coffee machine here. | |
Protected Attributes inherited from MockPlugin.Tasks.CoffeeMachineBaseTask | |
MockDevice | mDevice |
A task working on a complex parameter set.
This task has some more complex property which is assumed to be not suitable for simple text editing and token substitution or calculations. Therefore, we have to provide an editor of our own. The property data will be serialized and stored within the Chronos method. The Volume parameter can also be set directly from the method editor like a normal property. Additionally, the task has a rough idea of how long it can take.
Definition at line 140 of file MockUseDeviceTasks.cs.
Enum properties result in nice drop-down lists.
Enumerator | |
---|---|
Normal | |
LowFat | |
Vegan |
Definition at line 146 of file MockUseDeviceTasks.cs.
MockPlugin.Tasks.BrewFrappuccino.BrewFrappuccino | ( | ) |
Definition at line 293 of file MockUseDeviceTasks.cs.
References MockPlugin.Tasks.BrewFrappuccino.Composition, and MockPlugin.Tasks.BrewFrappuccino.CupSize.
override void MockPlugin.Tasks.BrewFrappuccino.Execute | ( | ) |
Send the recipe to our device.
Implements AxelSemrau.Chronos.Plugin.ITask.
Definition at line 302 of file MockUseDeviceTasks.cs.
References MockPlugin.Device.MockDevice.BrewFrappuccino(), MockPlugin.Tasks.BrewFrappuccino.Composition, MockPlugin.Tasks.CoffeeMachineBaseTask.mDevice, and MockPlugin.Tasks.BrewFrappuccino.RegisterConsumption().
override string MockPlugin.Tasks.BrewFrappuccino.GetTaskAction | ( | ) |
Description of the tasks's action (for hints/time table)
Implements AxelSemrau.Chronos.Plugin.ITask.
Definition at line 265 of file MockUseDeviceTasks.cs.
References MockPlugin.Tasks.BrewFrappuccino.Composition.
|
virtual |
Called after the schedule construction is completed.
Reimplemented from MockPlugin.Tasks.CoffeeMachineBaseTask.
Definition at line 308 of file MockUseDeviceTasks.cs.
References MockPlugin.Tasks.BrewFrappuccino.Composition, and MockPlugin.Tasks.BrewFrappuccino.RegisterConsumption().
void MockPlugin.Tasks.BrewFrappuccino.PropertyEdited | ( | string | propName, |
object | propValue ) |
The method editor informs us about changed values.
propName | |
propValue |
It is possible that the given propValue can not be converted to our property type - for example, if there is a calculation or a reference to a different task's property in the method editor field.
Implements AxelSemrau.Chronos.Plugin.IWantEditorUpdates.
Definition at line 351 of file MockUseDeviceTasks.cs.
References MockPlugin.Tasks.BrewFrappuccino.mComposition, MockPlugin.Tasks.BrewFrappuccino.mDevInEditor, and MockPlugin.Tasks.BrewFrappuccino.Volume.
|
private |
Register consumption of coffee / cream with the consumables tracker.
composition |
Definition at line 317 of file MockUseDeviceTasks.cs.
References MockPlugin.Tasks.CoffeeMachineBaseTask.Consumables, MockPlugin.Tasks.BrewFrappuccino.CompositionData.Cream, MockPlugin.Consumables.CoffeeConsumableManager.GetLocationIdentifier(), MockPlugin.Tasks.CoffeeMachineBaseTask.mDevice, AxelSemrau.Chronos.Plugin.Consumables.IConsumableManipulator.ModifyLevel(), and MockPlugin.Device.MockDevice.Name.
Referenced by MockPlugin.Tasks.BrewFrappuccino.Execute(), and MockPlugin.Tasks.BrewFrappuccino.PostValidate().
|
private |
Definition at line 238 of file MockUseDeviceTasks.cs.
Referenced by MockPlugin.Tasks.BrewFrappuccino.PropertyEdited().
|
private |
Definition at line 380 of file MockUseDeviceTasks.cs.
Referenced by MockPlugin.Tasks.BrewFrappuccino.PropertyEdited().
|
get |
Return some fake runtimes depending on the requested volume.
Implements AxelSemrau.Chronos.Plugin.IGiveARuntimeHint.
Definition at line 389 of file MockUseDeviceTasks.cs.
|
getset |
Our extremely complex composition which could in no way be done with normal text-editable properties.
Definition at line 244 of file MockUseDeviceTasks.cs.
Referenced by MockPlugin.Tasks.BrewFrappuccino.BrewFrappuccino(), MockPlugin.Tasks.BrewFrappuccino.Execute(), MockPlugin.Tasks.BrewFrappuccino.GetTaskAction(), and MockPlugin.Tasks.BrewFrappuccino.PostValidate().
|
getset |
Definition at line 287 of file MockUseDeviceTasks.cs.
Referenced by MockPlugin.Tasks.BrewFrappuccino.BrewFrappuccino().
|
getset |
Definition at line 272 of file MockUseDeviceTasks.cs.
Referenced by MockPlugin.Tasks.FrappuccinoCompositionEditor.CopyDataToGui(), and MockPlugin.Tasks.BrewFrappuccino.PropertyEdited().
PropertyChangedEventHandler MockPlugin.Tasks.BrewFrappuccino.PropertyChanged |
Definition at line 382 of file MockUseDeviceTasks.cs.