CTS-SAT-1-OBC-Firmware
Loading...
Searching...
No Matches
rtos_tasks_rx_telecommands.c File Reference
#include "main.h"
#include "rtos_tasks/rtos_task_helpers.h"
#include "rtos_tasks/rtos_tasks_rx_telecommands.h"
#include "telecommand_exec/telecommand_parser.h"
#include "telecommand_exec/telecommand_executor.h"
#include "uart_handler/uart_handler.h"
#include "transforms/arrays.h"
#include "log/log.h"
#include "debug_tools/debug_uart.h"
#include "cmsis_os.h"
#include <string.h>
#include <stdio.h>
#include <time.h>
Include dependency graph for rtos_tasks_rx_telecommands.c:

Enumerations

enum  TCMD_check_result_enum_t { TCMD_CHECK_STATUS_NO_TCMD = 0 , TCMD_CHECK_STATUS_TCMD_SCHEDULED = 1 , TCMD_CHECK_STATUS_TCMD_INVALID_AND_DISCARDED = 2 }
 

Functions

static TCMD_check_result_enum_t check_for_and_handle_new_uart_tcmds ()
 Checks for an available telecommand in the UART buffer, and schedules it for execution.
 
void TASK_handle_uart_telecommands (void *argument)
 
static TCMD_check_result_enum_t check_for_and_handle_new_ax100_kiss_tcmd (uint8_t csp_packet_array[], uint16_t csp_packet_array_len)
 Checks for an available telecommand in the UART buffer, and schedules it for execution.
 
void TASK_handle_ax100_kiss_telecommands (void *argument)
 

Variables

uint32_t AX100_uptime_at_last_received_kiss_tcmd_ms = 0
 The system uptime, as of the last time a telecommand was received by the AX100 (and sent to OBC via KISS)
 

Enumeration Type Documentation

◆ TCMD_check_result_enum_t

Enumerator
TCMD_CHECK_STATUS_NO_TCMD 
TCMD_CHECK_STATUS_TCMD_SCHEDULED 
TCMD_CHECK_STATUS_TCMD_INVALID_AND_DISCARDED 

Function Documentation

◆ check_for_and_handle_new_ax100_kiss_tcmd()

static TCMD_check_result_enum_t check_for_and_handle_new_ax100_kiss_tcmd ( uint8_t csp_packet_array[],
uint16_t csp_packet_array_len )
static

Checks for an available telecommand in the UART buffer, and schedules it for execution.

Returns
0 if no telecommand was available; 1 if a telecommand was found and executed.
Parameters
csp_packet_arrayThe CSP packet to read, starting with 4 bytes of CSP, and reading until null-termination after the CSP header.
csp_packet_array_lenThe length of the csp_packet_array.
Note
This function is only used in this file.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_for_and_handle_new_uart_tcmds()

static TCMD_check_result_enum_t check_for_and_handle_new_uart_tcmds ( )
static

Checks for an available telecommand in the UART buffer, and schedules it for execution.

Returns
0 if no telecommand was available; 1 if a telecommand was found and executed.
Note
This function is only used in this file.
Global extern variables used:
  • UART_telecommand_buffer
  • UART_telecommand_buffer_write_idx
  • UART_telecommand_last_write_time_ms
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TASK_handle_ax100_kiss_telecommands()

void TASK_handle_ax100_kiss_telecommands ( void * argument)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TASK_handle_uart_telecommands()

void TASK_handle_uart_telecommands ( void * argument)
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ AX100_uptime_at_last_received_kiss_tcmd_ms

uint32_t AX100_uptime_at_last_received_kiss_tcmd_ms = 0

The system uptime, as of the last time a telecommand was received by the AX100 (and sent to OBC via KISS)