Chronos Plugins 5.4.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
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
162 {
166 IReadOnlyList<ITaskInfo> Tasks { get; }
167 }
168}
Things provided by AxelSemrau Chronos - do not put your own code into this namespace.
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
IReadOnlyList< ITaskInfo > Tasks
Information about the tasks contained in this job.
Definition: Core.cs:166
Get information about the currently active configuration.
Definition: Helpers.cs:218