blob: e3046c9669636240be7bfe736e58e7cd879484e1 [file] [log] [blame]
Ben Fredricksond69f38b2015-01-28 20:06:15 -08001package aos.common.actions;
2
3interface StatusInterface {
4 // 0 if the action isn't running or the value from goal.run.
5 uint32_t running;
6};
7
8interface GoalInterface {
9 // 0 to stop or an arbitrary value to put in status.running.
10 uint32_t run;
11};
12
13message Status {
14 // The run value of the instance we're currently running or 0.
15 uint32_t running;
16 // A run value we were previously running or 0.
17 uint32_t last_running;
Daniel Petti3b1e48f2015-02-15 15:57:53 -080018 // If false the action failed to complete and may be in a bad state,
19 // this is a critical problem not a cancellation.
20 bool success;
Ben Fredricksond69f38b2015-01-28 20:06:15 -080021};
22
23message Goal {
24 // The unique value to put into status.running while running this instance or
25 // 0 to cancel.
26 uint32_t run;
Ben Fredrickson9fb2ab12015-02-16 16:42:08 -080027 // Default parameter. The more useful thing to do would be to define your own
28 // goal type to change param to a useful structure.
Brian Silverman5f501032015-05-17 01:40:57 -040029 double params;
Ben Fredricksond69f38b2015-01-28 20:06:15 -080030};
31
32interface ActionQueueGroup {
33 queue Status status;
34 queue Goal goal;
35};