#include <gtest/gtest.h>
#include <deque>
#include "../com_manager.h"
#include "../ring_buffer.h"
#include "../protocol_nmea.h"
Go to the source code of this file.
Classes | |
struct | data_holder_t |
struct | test_data_t |
Macros | |
#define | DEBUG_PRINTF |
#define | NUM_HANDLES 1 |
#define | PORT_BUFFER_SIZE 8192 |
#define | TASK_PERIOD_MS 1 |
#define | TEST_PROTO_ASCII 1 |
#define | TEST_PROTO_IS 1 |
#define | TEST_PROTO_RTCM3 1 |
#define | TEST_PROTO_UBLOX 1 |
#define | TIMES_TO_DIVIDE_DATA 10 |
Functions | |
void | addDequeToRingBuf (std::deque< data_holder_t > &testDeque, ring_buf_t *rbuf) |
void | disableBroadcasts (CMHANDLE cmHandle, int pHandle) |
void | generateData (std::deque< data_holder_t > &testDeque) |
bool | init (test_data_t &t) |
bool | initComManager (test_data_t &t) |
int | msgHandlerAscii (CMHANDLE cmHandle, int pHandle, const uint8_t *msg, int msgSize) |
int | msgHandlerRtcm3 (CMHANDLE cmHandle, int pHandle, const uint8_t *msg, int msgSize) |
int | msgHandlerUblox (CMHANDLE cmHandle, int pHandle, const uint8_t *msg, int msgSize) |
void | parseDataPortTxBuf (std::deque< data_holder_t > &testDeque, test_data_t &t) |
int | portRead (CMHANDLE cmHandle, int pHandle, unsigned char *buf, int len) |
int | portWrite (CMHANDLE cmHandle, int pHandle, unsigned char *buf, int len) |
void | postRxRead (CMHANDLE cmHandle, int pHandle, p_data_t *dataRead) |
int | prepDevInfo (CMHANDLE cmHandle, int pHandle) |
void | ringBuftoRingBufWrite (ring_buf_t *dst, ring_buf_t *src, int len) |
TEST (ComManager, BasicTxTest) | |
TEST (ComManager, BasicRxTest) | |
TEST (ComManager, SegmentedRxTest) | |
TEST (ComManager, RxWithGarbageTest) | |
TEST (ComManager, Evb2AltDecodeBufferTest) | |
TEST (ComManager, Evb2DataForwardTest) | |
void | writeNvrUserpageFlashCfg (CMHANDLE cmHandle, int pHandle, p_data_t *data) |
Variables | |
std::deque< data_holder_t > | g_testRxDeque |
std::deque< data_holder_t > | g_testTxDeque |
static com_manager_port_t | s_cmPort = {} |
static is_comm_instance_t | s_comm [NUM_HANDLES] = { 0 } |
static uint8_t | s_comm_buffer [NUM_HANDLES *PKT_BUF_SIZE] = { 0 } |
test_data_t | tcm = {} |
#define DEBUG_PRINTF |
Definition at line 27 of file test_com_manager.cpp.
#define NUM_HANDLES 1 |
Definition at line 250 of file test_com_manager.cpp.
#define PORT_BUFFER_SIZE 8192 |
Definition at line 30 of file test_com_manager.cpp.
#define TASK_PERIOD_MS 1 |
Definition at line 23 of file test_com_manager.cpp.
#define TEST_PROTO_ASCII 1 |
Definition at line 19 of file test_com_manager.cpp.
#define TEST_PROTO_IS 1 |
Definition at line 18 of file test_com_manager.cpp.
#define TEST_PROTO_RTCM3 1 |
Definition at line 21 of file test_com_manager.cpp.
#define TEST_PROTO_UBLOX 1 |
Definition at line 20 of file test_com_manager.cpp.
#define TIMES_TO_DIVIDE_DATA 10 |
void addDequeToRingBuf | ( | std::deque< data_holder_t > & | testDeque, |
ring_buf_t * | rbuf | ||
) |
Definition at line 517 of file test_com_manager.cpp.
void disableBroadcasts | ( | CMHANDLE | cmHandle, |
int | pHandle | ||
) |
Definition at line 96 of file test_com_manager.cpp.
void generateData | ( | std::deque< data_holder_t > & | testDeque | ) |
Definition at line 290 of file test_com_manager.cpp.
bool init | ( | test_data_t & | t | ) |
Definition at line 280 of file test_com_manager.cpp.
bool initComManager | ( | test_data_t & | t | ) |
Definition at line 255 of file test_com_manager.cpp.
int msgHandlerAscii | ( | CMHANDLE | cmHandle, |
int | pHandle, | ||
const uint8_t * | msg, | ||
int | msgSize | ||
) |
Definition at line 110 of file test_com_manager.cpp.
int msgHandlerRtcm3 | ( | CMHANDLE | cmHandle, |
int | pHandle, | ||
const uint8_t * | msg, | ||
int | msgSize | ||
) |
Definition at line 211 of file test_com_manager.cpp.
int msgHandlerUblox | ( | CMHANDLE | cmHandle, |
int | pHandle, | ||
const uint8_t * | msg, | ||
int | msgSize | ||
) |
Definition at line 172 of file test_com_manager.cpp.
void parseDataPortTxBuf | ( | std::deque< data_holder_t > & | testDeque, |
test_data_t & | t | ||
) |
Definition at line 554 of file test_com_manager.cpp.
int portRead | ( | CMHANDLE | cmHandle, |
int | pHandle, | ||
unsigned char * | buf, | ||
int | len | ||
) |
Definition at line 69 of file test_com_manager.cpp.
int portWrite | ( | CMHANDLE | cmHandle, |
int | pHandle, | ||
unsigned char * | buf, | ||
int | len | ||
) |
Definition at line 74 of file test_com_manager.cpp.
Definition at line 84 of file test_com_manager.cpp.
int prepDevInfo | ( | CMHANDLE | cmHandle, |
int | pHandle | ||
) |
Definition at line 100 of file test_com_manager.cpp.
void ringBuftoRingBufWrite | ( | ring_buf_t * | dst, |
ring_buf_t * | src, | ||
int | len | ||
) |
Definition at line 599 of file test_com_manager.cpp.
TEST | ( | ComManager | , |
BasicTxTest | |||
) |
Definition at line 609 of file test_com_manager.cpp.
TEST | ( | ComManager | , |
BasicRxTest | |||
) |
Definition at line 649 of file test_com_manager.cpp.
TEST | ( | ComManager | , |
SegmentedRxTest | |||
) |
Definition at line 677 of file test_com_manager.cpp.
TEST | ( | ComManager | , |
RxWithGarbageTest | |||
) |
Definition at line 720 of file test_com_manager.cpp.
TEST | ( | ComManager | , |
Evb2AltDecodeBufferTest | |||
) |
Definition at line 767 of file test_com_manager.cpp.
TEST | ( | ComManager | , |
Evb2DataForwardTest | |||
) |
Definition at line 855 of file test_com_manager.cpp.
Definition at line 105 of file test_com_manager.cpp.
std::deque<data_holder_t> g_testRxDeque |
Definition at line 65 of file test_com_manager.cpp.
std::deque<data_holder_t> g_testTxDeque |
Definition at line 66 of file test_com_manager.cpp.
|
static |
Definition at line 253 of file test_com_manager.cpp.
|
static |
Definition at line 251 of file test_com_manager.cpp.
|
static |
Definition at line 252 of file test_com_manager.cpp.
test_data_t tcm = {} |
Definition at line 64 of file test_com_manager.cpp.