
Public Member Functions | |
| def | __init__ |
| def | add_date_off (self, date) |
| def | add_day_off (self, day_name) |
| def | add_tasks (self, routines) |
| def | day_off (self) |
Private Member Functions | |
| def | _create_routine |
| def | _delay_scheduling (self, tasks, delay) |
| def | _delay_tasks (self, tasks) |
| def | _instantiate_for_day (self, start_of_day, daily_start, daily_duration, task) |
| def | _instantiate_tasks_for_today (self, routine_tasks) |
| def | _new_day (self) |
| def | _queue_for_scheduling |
| def | _schedule_tasks (self, tasks) |
| def | _start_and_end_day (self) |
| def | _tasks_allowed_fn (self, task) |
An object for running the daily schedule of a robot.
Args:
daily_start (datetime.time): The time of day when all tasks can start, local time.
daily_end (datetime.time): The time of day when all tasks should end start, local time.
pre_start_window (datetime.timedelta): The duration before a task's start that it should be passed to the scheduler. Defaults to 1 hour.
Definition at line 185 of file task_routine.py.
| def task_executor.task_routine.DailyRoutineRunner.__init__ | ( | self, | |
| daily_start, | |||
| daily_end, | |||
| add_tasks_srv, | |||
pre_start_window = timedelta(hours=0.25), |
|||
day_start_cb = None, |
|||
day_end_cb = None, |
|||
tasks_allowed_fn = None |
|||
| ) |
Definition at line 192 of file task_routine.py.
|
private |
Definition at line 358 of file task_routine.py.
|
private |
Definition at line 442 of file task_routine.py.
|
private |
Delays call to the scheduer until the first of these needs to start, then reruns check for scheduling
Definition at line 400 of file task_routine.py.
|
private |
Create a copy of the given task with start and end times instantiated from input variables relative to the start date provided.
Definition at line 474 of file task_routine.py.
|
private |
Definition at line 353 of file task_routine.py.
|
private |
Should be called each new day, in advance of the overall daily start time.
Definition at line 344 of file task_routine.py.
|
private |
Definition at line 368 of file task_routine.py.
|
private |
Definition at line 458 of file task_routine.py.
|
private |
Runs a loop which triggers the start and end of day callbacks
Definition at line 275 of file task_routine.py.
|
private |
Definition at line 272 of file task_routine.py.
| def task_executor.task_routine.DailyRoutineRunner.add_date_off | ( | self, | |
| date | |||
| ) |
Add a datetime.date on which the robot should not work.
Definition at line 261 of file task_routine.py.
| def task_executor.task_routine.DailyRoutineRunner.add_day_off | ( | self, | |
| day_name | |||
| ) |
Add a day of the week, e.g. Saturday, on which the routing should not be run
Definition at line 255 of file task_routine.py.
| def task_executor.task_routine.DailyRoutineRunner.add_tasks | ( | self, | |
| routines | |||
| ) |
Definition at line 320 of file task_routine.py.
| def task_executor.task_routine.DailyRoutineRunner.day_off | ( | self | ) |
Definition at line 265 of file task_routine.py.
| task_executor.task_routine.DailyRoutineRunner.add_tasks_srv |
Definition at line 232 of file task_routine.py.
| task_executor.task_routine.DailyRoutineRunner.all_days |
Definition at line 243 of file task_routine.py.
| task_executor.task_routine.DailyRoutineRunner.current_routine_end |
Definition at line 219 of file task_routine.py.
| task_executor.task_routine.DailyRoutineRunner.current_routine_start |
Definition at line 209 of file task_routine.py.
| task_executor.task_routine.DailyRoutineRunner.daily_start |
Definition at line 202 of file task_routine.py.
| task_executor.task_routine.DailyRoutineRunner.dates_off |
Definition at line 240 of file task_routine.py.
| task_executor.task_routine.DailyRoutineRunner.day_end_cb |
Definition at line 252 of file task_routine.py.
| task_executor.task_routine.DailyRoutineRunner.day_start_cb |
Definition at line 251 of file task_routine.py.
| task_executor.task_routine.DailyRoutineRunner.days_off |
Definition at line 239 of file task_routine.py.
| task_executor.task_routine.DailyRoutineRunner.pre_schedule_delay |
Definition at line 249 of file task_routine.py.
| task_executor.task_routine.DailyRoutineRunner.routine_duration |
Definition at line 203 of file task_routine.py.
| task_executor.task_routine.DailyRoutineRunner.routine_tasks |
Definition at line 231 of file task_routine.py.
| task_executor.task_routine.DailyRoutineRunner.tasks_allowed |
Definition at line 235 of file task_routine.py.