You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

26 lines
896 B

#include <stdio.h>
#include <stdint.h>
#include "../lib/debug_config.h"
// Simple test packet dump
void test_packet_dump() {
uint8_t test_data[] = {0x02, 0x11, 0x22, 0x33, 0x44, 0x55};
// Simulate single-line packet dump
char hex_buf[32];
snprintf(hex_buf, sizeof(hex_buf), "%02x%02x%02x%02x%02x%02x",
test_data[0], test_data[1], test_data[2], test_data[3], test_data[4], test_data[5]);
DEBUG_INFO(DEBUG_CATEGORY_ETCP, "TEST_SEND: len=%zu hex=%s", sizeof(test_data), hex_buf);
DEBUG_INFO(DEBUG_CATEGORY_ETCP, "TEST_COMPACT: link=NULL type=0x%02x ts=0 len=%zu", test_data[0], sizeof(test_data));
}
int main() {
debug_config_init();
debug_set_level(DEBUG_LEVEL_TRACE);
debug_set_categories(DEBUG_CATEGORY_ALL);
DEBUG_INFO(DEBUG_CATEGORY_ETCP, "=== Testing single-line packet dump ===");
test_packet_dump();
return 0;
}