CTS-SAT-1-OBC-Firmware
Loading...
Searching...
No Matches
telecommand_executor.h
Go to the documentation of this file.
1
2#ifndef INCLUDE_GUARD__TELECOMMAND_EXECUTOR_H
3#define INCLUDE_GUARD__TELECOMMAND_EXECUTOR_H
4
5#include <stdint.h>
7
8// Max number of telecommands that can be stored in the agenda (schedule/queue).
9// Memory-constrained.
10#define TCMD_AGENDA_SIZE 1000
11
12// Max number of timestamps that can be stored in the record at at time
13#define TCMD_TIMESTAMP_RECORD_SIZE 500
14// NOTE: Not all functions in `telecommand_executor.c` are declared here. Only the ones that are
15// expected to be called from other modules are declared here. This is intentional.
16
18
20
22
24
25uint8_t TCMD_execute_telecommand_in_agenda(const uint16_t tcmd_agenda_slot_num,
26 char *response_output_buf, uint16_t response_output_buf_size
27);
28
30
31uint8_t TCMD_agenda_delete_by_tssent(uint64_t tssent);
32
33uint8_t TCMD_agenda_fetch();
34
35uint8_t TCMD_agenda_delete_by_name(const char *telecommand_name);
36
37extern uint32_t TCMD_total_tcmd_queued_count;
39
40#endif // INCLUDE_GUARD__TELECOMMAND_EXECUTOR_H
Definition telecommand_types.h:37
uint16_t TCMD_get_agenda_used_slots_count()
Gets the number of used slots in the agenda.
Definition telecommand_executor.c:101
uint8_t TCMD_agenda_fetch()
Fetches the active agendas.
Definition telecommand_executor.c:463
int16_t TCMD_get_last_tcmd_agenda_slot_sent()
void TCMD_agenda_delete_all()
Deletes all entries from the agenda.
Definition telecommand_executor.c:413
uint8_t TCMD_agenda_delete_by_name(const char *telecommand_name)
Deletes all agenda entries with a telecommand name.
Definition telecommand_executor.c:525
int16_t TCMD_get_next_tcmd_agenda_slot_to_execute()
Finds the index into TCMD_agenda (slot_num) of the next telecommand to execute.
Definition telecommand_executor.c:116
uint8_t TCMD_add_tcmd_to_agenda(const TCMD_parsed_tcmd_to_execute_t *parsed_tcmd)
Adds a telecommand to the agenda (schedule/queue) of telecommands to execute.
Definition telecommand_executor.c:41
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.
Definition telecommand_executor.c:357
uint64_t TCMD_latest_received_tcmd_timestamp_sent
Definition telecommand_executor.c:20
uint32_t TCMD_total_tcmd_queued_count
Definition telecommand_executor.c:19
uint8_t TCMD_agenda_delete_by_tssent(uint64_t tssent)
Deletes a telecommand from the agenda by its tssent (timestamp sent) field.
Definition telecommand_executor.c:432