VSF Documented
Data Fields
vsf_test_data_t Struct Reference

#include <vsf_test.h>

Data Fields

void(* init )(vsf_test_data_t *data)
 
void(* sync )(vsf_test_data_t *data, vsf_test_data_cmd_t cmd)
 
uint32_t idx
 
uint32_t status
 Test status, vsf_test_status_t.
 
char * request_str
 
uint32_t req_continue
 
uint32_t result
 
struct { 
 
   const char *   function_name 
 
   const char *   file_name 
 
   const char *   condition 
 
   uint32_t   line 
 
error 
 

Field Documentation

◆ init

void(* vsf_test_data_t::init) (vsf_test_data_t *data)

This function is called after each power-up and before performing data synchronization. In it, we can initialize the peripherals needed to synchronize the data.

◆ sync

void(* vsf_test_data_t::sync) (vsf_test_data_t *data, vsf_test_data_cmd_t cmd)

Synchronize data according to different commands. All commands are actively sent by the device, some commands are only sent, and some commands need to wait for a response from the auxiliary device after they are sent. All commands are not sent during the test case run, so there is no need to worry about real-time.

◆ idx

uint32_t vsf_test_data_t::idx

No matter how many test cases there are, there is only one copy of the persistent data on the device side. So using a 32bit variable to save the data here is not significantly wasteful. The current test case, the initial value is 0. It will be incremented once every test is completed, and will be set to 0 after all tests are completed.

◆ status

uint32_t vsf_test_data_t::status

Test status, vsf_test_status_t.

◆ request_str

char* vsf_test_data_t::request_str

The test request information from the device, which will be sent to the assist device and confirm from the assist device whether the test is supported or not.

◆ req_continue

uint32_t vsf_test_data_t::req_continue

Before the start of the current test, the device will confirm with the secondary device whether the current test is supported. If it is not supported this variable will have a value of VSF_TEST_REQ_NO_SUPPORT, if it is supported this variable will have a value of VSF_TEST_REQ_SUPPORT.

◆ result

uint32_t vsf_test_data_t::result

The results of the device's current test. Please note that a successful test on the device side does not represent the final result, and the assist device may modify the test result to a test failure depending on the actual situation.

◆ function_name

const char* vsf_test_data_t::function_name

◆ file_name

const char* vsf_test_data_t::file_name

◆ condition

const char* vsf_test_data_t::condition

◆ line

uint32_t vsf_test_data_t::line

◆ [struct]

struct { ... } vsf_test_data_t::error

More information is logged here when the test is asserted or goes to an exception.