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 750
11
13#define TCMD_TIMESTAMP_RECORD_SIZE 750
14
16
18
19extern uint16_t TCMD_agenda_last_used_slot;
20
26
27
29
31
33
34uint8_t TCMD_execute_telecommand_in_agenda(const uint16_t tcmd_agenda_slot_num,
35 char *response_output_buf, uint16_t response_output_buf_size
36);
37
39
40
41extern uint32_t TCMD_total_tcmd_queued_count;
43
44#endif // INCLUDE_GUARD__TELECOMMAND_EXECUTOR_H
Definition telecommand_types.h:49
TCMD_agenda_entry_state_enum_t
Definition telecommand_executor.h:21
@ TCMD_AGENDA_ENTRY_INVALID
Definition telecommand_executor.h:22
@ TCMD_AGENDA_ENTRY_EXECUTING
Definition telecommand_executor.h:24
@ TCMD_AGENDA_ENTRY_VALID_AND_PENDING
Definition telecommand_executor.h:23
#define TCMD_AGENDA_SIZE
Definition telecommand_executor.h:10
uint8_t TCMD_agenda_is_valid[TCMD_AGENDA_SIZE]
A flag indicating whether a given index in TCMD_agenda is valid (i.e., filled with a not-yet-executed...
Definition telecommand_executor.c:38
uint16_t TCMD_get_agenda_used_slots_count()
Gets the number of used slots in the agenda (how many valid and pending telecommands).
Definition telecommand_executor.c:139
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:158
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:77
uint8_t TCMD_log_pending_agenda_entries()
Fetches the active agendas and logs each as a JSONL entry.
Definition telecommand_executor.c:458
TCMD_parsed_tcmd_to_execute_t TCMD_agenda[TCMD_AGENDA_SIZE]
The agenda (schedule queue) of telecommands to execute.
Definition telecommand_executor.c:32
uint16_t TCMD_agenda_last_used_slot
Index into TCMD_agenda and TCMD_agenda_is_valid of the last used slot.
Definition telecommand_executor.c:43
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:400
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