Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OreSat task scheduler #8

Open
ryanpdx opened this issue Aug 27, 2023 · 0 comments
Open

OreSat task scheduler #8

ryanpdx opened this issue Aug 27, 2023 · 0 comments
Assignees

Comments

@ryanpdx
Copy link
Member

ryanpdx commented Aug 27, 2023

We need to implement OreSat state machine and task scheduler.

Should enforce no overlapping tasks.

Will need to deal shared data between services and saving the task queue.

Task list (will be add to)

  • standby: default and fallback mode, only critical systems on
  • flatsat (aka test): basically standby, but user can turn on any cards as needed
  • star-tracker-capture: turn on star tracker take x image(s), transfer image(s) to c3, turn off the star-tracker
  • star-track: turn on the star-tracker and do star tracking until end time, turn off star tracker
  • gps-time-sync: turn on gps, gps card will sync to gps time, sync c3 to gps card time, turn off gps. See GPS Time Sync Functionality #3
  • cfc-capture: turn on cfc, caputre image(s), turn off cfc
  • bbq: do a bbq roll, tbd
  • dxwifi: turn on dxwifi, broadcast image(s) over dxwifi, turn off dxwifi
  • update: turn on a card, tell it to update, turn off card
  • ...

New EDL commands for scheduling

schedule

args:

  • mode (uint8): mode id
  • start_dt (uint64): start scet datetime (can be zero for run right now)
  • end_dt (uint64): end scet datetime (can be zero if mode has a fixed duration)
  • mode_args (list): specific args for the mode

return_values:

  • id (uint32): unique id for new task scheduled (generated by c3)

cancel

args:

  • id (uint32): unique id for new task to cancel

return_values:

  • id (uint32): readback of id

status

args:

  • id (uint32): unique id for new task to status of

return_values:

  • mode (uint8): mode of task schedule
  • start_dt (uint64): start scet dt of the task schedule
  • end_dt (uint64): end scet dt of the task schedule
  • cancelled (bool): the task is cancel

list

args:

  • type (uint8): all / scheduled / cancel

return_values:

  • list of:
    • mode (uint8): mode of task schedule
    • start_dt (uint64): start scet dt of the task schedule
    • end_dt (uint64): end scet dt of the task schedule
    • cancelled (bool): the task is cancel
@ryanpdx ryanpdx self-assigned this Nov 16, 2023
@ryanpdx ryanpdx changed the title OreSat state machine and task scheduler OreSat task scheduler Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

1 participant