CTS-SAT-1-OBC-Firmware
Loading...
Searching...
No Matches
lfs_search_telecommand_defs.c File Reference
#include <stdio.h>
#include <stdint.h>
#include "littlefs/lfs.h"
#include "littlefs/littlefs_helper.h"
#include "littlefs/littlefs_searching.h"
#include "telecommand_exec/telecommand_args_helpers.h"
#include "transforms/arrays.h"
Include dependency graph for lfs_search_telecommand_defs.c:

Functions

uint8_t TCMDEXEC_fs_count_str_occurrences (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len)
 Count string occurrences in a file.
uint8_t TCMDEXEC_fs_find_nth_str_occurrence (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len)
 Find Nth string occurrence in a file.
uint8_t TCMDEXEC_fs_count_hex_occurrences (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len)
 Count hex byte sequence occurrences in a file.
uint8_t TCMDEXEC_fs_find_nth_hex_occurrence (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len)
 Find Nth hex byte sequence occurrence in a file.

Function Documentation

◆ TCMDEXEC_fs_count_hex_occurrences()

uint8_t TCMDEXEC_fs_count_hex_occurrences ( const char * args_str,
char * response_output_buf,
uint16_t response_output_buf_len )

Count hex byte sequence occurrences in a file.

Parameters
args_str
  • Arg 0: File path as string (haystack)
  • Arg 1: Hex string to search for (e.g. "DEADBEEF")
Here is the call graph for this function:

◆ TCMDEXEC_fs_count_str_occurrences()

uint8_t TCMDEXEC_fs_count_str_occurrences ( const char * args_str,
char * response_output_buf,
uint16_t response_output_buf_len )

Count string occurrences in a file.

Parameters
args_str
  • Arg 0: File path as string (haystack)
  • Arg 1: Needle string to search for
Here is the call graph for this function:

◆ TCMDEXEC_fs_find_nth_hex_occurrence()

uint8_t TCMDEXEC_fs_find_nth_hex_occurrence ( const char * args_str,
char * response_output_buf,
uint16_t response_output_buf_len )

Find Nth hex byte sequence occurrence in a file.

Parameters
args_str
  • Arg 0: File path as string (haystack)
  • Arg 1: Hex string to search for
  • Arg 2: N (1-based)
Here is the call graph for this function:

◆ TCMDEXEC_fs_find_nth_str_occurrence()

uint8_t TCMDEXEC_fs_find_nth_str_occurrence ( const char * args_str,
char * response_output_buf,
uint16_t response_output_buf_len )

Find Nth string occurrence in a file.

Parameters
args_str
  • Arg 0: File path as string (haystack)
  • Arg 1: Needle string to search for
  • Arg 2: N (1-based)
Here is the call graph for this function: