Go to the source code of this file.
◆ TCMD_AGENDA_SIZE
#define TCMD_AGENDA_SIZE 1000 |
◆ TCMD_TIMESTAMP_RECORD_SIZE
#define TCMD_TIMESTAMP_RECORD_SIZE 500 |
◆ TCMD_add_tcmd_to_agenda()
Adds a telecommand to the agenda (schedule/queue) of telecommands to execute.
- Parameters
-
parsed_tcmd | The parsed telecommand to add to the agenda. |
- Returns
- 0 on success, 1 if the agenda is full.
- Note
- Performs a deep copy of the
parsed_tcmd
arg into the agenda.
◆ TCMD_agenda_delete_all()
void TCMD_agenda_delete_all |
( |
| ) |
|
Deletes all entries from the agenda.
- Returns
- Cannot fail, so no return value.
◆ TCMD_agenda_delete_by_name()
uint8_t TCMD_agenda_delete_by_name |
( |
const char * | telecommand_name | ) |
|
Deletes all agenda entries with a telecommand name.
- Parameters
-
telecommand_name | The name of the telecommand in the agenda to delete. (e.g, hello_world) |
- Returns
- 0 on success, > 0 on error.
- Note
- Calls
LOG_message()
before all returns. Argument is case-insensitive.
◆ TCMD_agenda_delete_by_tssent()
uint8_t TCMD_agenda_delete_by_tssent |
( |
uint64_t | tssent | ) |
|
Deletes a telecommand from the agenda by its tssent
(timestamp sent) field.
- Parameters
-
tssent | The timestamp_sent value of the telecommand to delete. |
- Returns
- 0 on success, 1 if the telecommand was not found.
- Note
- Calls
LOG_message()
to log the deletion before all returns.
◆ TCMD_agenda_fetch()
uint8_t TCMD_agenda_fetch |
( |
| ) |
|
Fetches the active agendas.
- Returns
- 0 on success, 1 if there are no active agendas.
◆ TCMD_execute_telecommand_in_agenda()
uint8_t TCMD_execute_telecommand_in_agenda |
( |
const uint16_t | tcmd_agenda_slot_num, |
|
|
char * | response_output_buf, |
|
|
uint16_t | response_output_buf_size ) |
Executes a telecommand from the agenda immediately.
- Parameters
-
tcmd_agenda_slot_num | The index into TCMD_agenda for the telecommand to execute. |
response_output_buf | A buffer to store the response from the telecommand. |
response_output_buf_size | The size of the response_output_buf . |
- Returns
- 0 on success, 253/254 if an error occurs in the callers, otherwise the error code from the telecommand function.
◆ TCMD_get_agenda_used_slots_count()
uint16_t TCMD_get_agenda_used_slots_count |
( |
| ) |
|
Gets the number of used slots in the agenda.
- Returns
- The number of currently-filled slots in the agenda.
- Note
- This function is mostly intended for "system stats" telecommands and logging.
◆ TCMD_get_last_tcmd_agenda_slot_sent()
int16_t TCMD_get_last_tcmd_agenda_slot_sent |
( |
| ) |
|
◆ TCMD_get_next_tcmd_agenda_slot_to_execute()
int16_t TCMD_get_next_tcmd_agenda_slot_to_execute |
( |
| ) |
|
Finds the index into TCMD_agenda
(slot_num
) of the next telecommand to execute.
- Returns
- The index into
TCMD_agenda
of the next telecommand to execute, or -1 if none are available/ready.
- Note
- This function will return the
slot_num
which has the lowest timestamp_to_execute
value. If multiple slots have the same timestamp_to_execute
, the lowest slot_num
will be returned.
◆ TCMD_latest_received_tcmd_timestamp_sent
uint64_t TCMD_latest_received_tcmd_timestamp_sent |
|
extern |
◆ TCMD_total_tcmd_queued_count
uint32_t TCMD_total_tcmd_queued_count |
|
extern |