Ben Fredrickson | d69f38b | 2015-01-28 20:06:15 -0800 | [diff] [blame] | 1 | package aos.common.actions; |
| 2 | |
| 3 | interface StatusInterface { |
| 4 | // 0 if the action isn't running or the value from goal.run. |
| 5 | uint32_t running; |
| 6 | }; |
| 7 | |
| 8 | interface GoalInterface { |
| 9 | // 0 to stop or an arbitrary value to put in status.running. |
| 10 | uint32_t run; |
| 11 | }; |
| 12 | |
| 13 | message 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 Petti | 3b1e48f | 2015-02-15 15:57:53 -0800 | [diff] [blame^] | 18 | // 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 Fredrickson | d69f38b | 2015-01-28 20:06:15 -0800 | [diff] [blame] | 21 | }; |
| 22 | |
| 23 | message Goal { |
| 24 | // The unique value to put into status.running while running this instance or |
| 25 | // 0 to cancel. |
| 26 | uint32_t run; |
| 27 | }; |
| 28 | |
| 29 | interface ActionQueueGroup { |
| 30 | queue Status status; |
| 31 | queue Goal goal; |
| 32 | }; |