Chronos Plugins 5.9.0
This documentation covers the plugin interfaces definitions and an example implementation.
Loading...
Searching...
No Matches
Core.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using System.Collections.ObjectModel;
4using System.ComponentModel;
6
7// ReSharper disable once CheckNamespace
8namespace AxelSemrau.Chronos
9{
13 public static class Core
14 {
18 public static IScheduleQueue ExecutionQueue { get; internal set; }
22 public static IEnumerable<IDeviceInfo> Devices { get; internal set; }
26 public static IConfigInfo Config { get; internal set; }
30 public static ICoreUtils Utils { get; internal set; }
31 }
32
36 public interface ICoreUtils
37 {
43 void ExtendAssemblySearchPath(string path);
44 }
45
49 public interface IScheduleQueue : INotifyPropertyChanged
50 {
54 ReadOnlyObservableCollection<IPlannerInfo> Planners { get; }
55
60
70
77 void ClearQueue();
78 }
79
83 public interface IPlannerInfo : INotifyPropertyChanged
84 {
88 string Name { get; }
92 Guid PlannerID { get; }
100 string AbortReason { get; }
104 IReadOnlyList<IJobInfo> Jobs { get; }
105
112 uint RepeatIteration { get; }
113
117 DateTime StartTime { get; }
118
126 bool Paused { get; set; }
127
132
136 bool IsCalculated { get; }
137
141 bool WasStarted { get; }
142
146 TimeSpan Duration { get; }
150 TimeSpan Elapsed { get; }
151
155 bool Failed { get; }
156 }
157
161 public interface IJobInfo : INotifyPropertyChanged
162 {
166 IReadOnlyList<ITaskInfo> Tasks { get; }
179 }
183 public enum JobStatus
184 {
188 Queued,
192 Running,
196 Done,
200 Failed,
204 Postponed,
209 }
210}
Things provided by AxelSemrau Chronos - do not put your own code into this namespace.
JobStatus
Current execution stage of a job.
Definition Core.cs:184
@ Running
The job is currently running.
@ Queued
The job is scheduled for execution at some point in the future.
@ Cancelled
The planner's execution was interrupted.
@ Postponed
The job did not yet run, but it will not be executed during this run of the planner.
@ Failed
Something went wrong while executing this job.
@ Done
The job was completed without serious problems.
Classes and interfaces that are meant for plugins. The classes and interfaces below this namespace ar...
Access to some parts of the core of the Chronos program.
Definition Core.cs:14
static IScheduleQueue ExecutionQueue
The list of schedules that have run, are running or will be run.
Definition Core.cs:18
static IConfigInfo Config
Information about general program configuration, standard folders and similar.
Definition Core.cs:26
static ICoreUtils Utils
Utility functions that don't fit elsewhere.
Definition Core.cs:30
static IEnumerable< IDeviceInfo > Devices
Information about configured devices and their states.
Definition Core.cs:22
Chronos core utility functions.
Definition Core.cs:37
void ExtendAssemblySearchPath(string path)
Add a filesystem path where you expect to find assemblies that you need as references for your plugin...
Access to the schedule execution list.
Definition Core.cs:50
void RemoveFailedPlanners()
Tries to remove failed planners. Use this if you are hiding the normal Chronos GUI from your user and...
void ClearQueue()
Remove all planners in the queue, if possible.
void RemoveDonePlanners()
Remove already finished planners that are not failed.
ReadOnlyObservableCollection< IPlannerInfo > Planners
Information about all planners in the queue.
Definition Core.cs:54
IPlannerInfo CurrentlyRunning
The currently running planner, if any.
Definition Core.cs:59
Some hopefully useful information about a queued planner.
Definition Core.cs:84
string Name
Name as shown to the user.
Definition Core.cs:88
bool WasStarted
The planner has been started at least once.
Definition Core.cs:141
TimeSpan Duration
The time between start and end time - estimated for unstarted/running schedules, real value for finis...
Definition Core.cs:146
IReadOnlyList< IJobInfo > Jobs
Information about the jobs in the planner.
Definition Core.cs:104
Guid PlannerID
Unique identifier for this schedule.
Definition Core.cs:92
ScheduleState State
Current execution state.
Definition Core.cs:96
DateTime StartTime
Time when the planner was started (UTC)
Definition Core.cs:117
uint RepeatIteration
How often was this schedule started?
Definition Core.cs:112
bool Paused
Pauses the execution of the planner.
Definition Core.cs:126
bool CompletedWithoutErrors
True if all of the planner's jobs were done without errors.
Definition Core.cs:131
bool IsCalculated
Has passed the initial calculation phase.
Definition Core.cs:136
bool Failed
True if some job of the schedule failed or was cancelled.
Definition Core.cs:155
string AbortReason
If the planer was aborted: The reason why.
Definition Core.cs:100
TimeSpan Elapsed
How much time has passed between start and completion / current time.
Definition Core.cs:150
Basic information about a job (= diagram row) within a task planer.
Definition Core.cs:162
JobStatus Status
What's up with this job?
Definition Core.cs:170
ISampleListLine SampleListLine
Method and column values that were used to create this job.
Definition Core.cs:178
Get information about the currently active configuration.
Definition Helpers.cs:233