Helper interface functions.
More...
|
ewf_result | ewf_interface_send_command (ewf_interface *interface_ptr, const char *command_str) |
| Send a command. More...
|
|
ewf_result | ewf_interface_send_commands (ewf_interface *interface_ptr, const char *command_str,...) |
| Send a command. More...
|
|
ewf_result | ewf_interface_drop_all_responses (ewf_interface *interface_ptr) |
| Drop all responses from the interface. More...
|
|
ewf_result | ewf_interface_drop_response (ewf_interface *interface_ptr) |
| Drop a single response from the interface. More...
|
|
ewf_result | ewf_interface_get_response (ewf_interface *interface_ptr, uint8_t **response_out) |
| Get a response from the interface. More...
|
|
ewf_result | ewf_interface_verify_response (ewf_interface *interface_ptr, const char *expected_str) |
| Verify an interface response, compare against a string. More...
|
|
ewf_result | ewf_interface_verify_responses (ewf_interface *interface_ptr, uint32_t response_count, const char **expected_str_arr) |
| Verify an interface response, compare agains an array of strings. More...
|
|
ewf_result | ewf_interface_verify_response_starts_with (ewf_interface *interface_ptr, const char *expected_start_str) |
| Verify if interface response starts with expected string. More...
|
|
ewf_result | ewf_interface_verify_response_ends_with (ewf_interface *interface_ptr, const char *expected_end_str) |
| Verify if interface response starts with expected string. More...
|
|
Helper interface functions.
*** group_interface_callback
◆ ewf_interface_drop_all_responses()
Drop all responses from the interface.
- Returns
- ewf_result success and error conditions
◆ ewf_interface_drop_response()
Drop a single response from the interface.
- Returns
- ewf_result success and error conditions
◆ ewf_interface_get_response()
Get a response from the interface.
- Parameters
-
a | pointer to a pointer that will hold the response on return |
- Returns
- ewf_result success and error conditions
◆ ewf_interface_send_command()
Send a command.
- Parameters
-
command_str | a pointer to a null terminated string with the command to be sent |
- Returns
- ewf_result success and error conditions
Helpers
◆ ewf_interface_send_commands()
Send a command.
- Parameters
-
command_str | a pointer to a null terminated string with the command to be sent This function will take one or more string pointers and it should be terminated with a last parameter equal to NULL |
- Returns
- ewf_result success and error conditions
◆ ewf_interface_verify_response()
Verify an interface response, compare against a string.
- Parameters
-
[in] | expected_str | a pointer to a NULL terminated string that will be compared agains the interface response. If different, the function will return an error code, if equal, the function will return a success code. |
- Returns
- ewf_result success and error conditions
◆ ewf_interface_verify_response_ends_with()
ewf_result ewf_interface_verify_response_ends_with |
( |
ewf_interface * |
interface_ptr, |
|
|
const char * |
expected_end_str |
|
) |
| |
Verify if interface response starts with expected string.
- Parameters
-
[in] | expected_end_str | a pointer to a NULL terminated string that will be compared against the interface response. If different, the function will return an error code, if equal or ends with expected string, the function will return a success code. |
- Returns
- ewf_result success and error conditions
◆ ewf_interface_verify_response_starts_with()
ewf_result ewf_interface_verify_response_starts_with |
( |
ewf_interface * |
interface_ptr, |
|
|
const char * |
expected_start_str |
|
) |
| |
Verify if interface response starts with expected string.
- Parameters
-
[in] | expected_start_str | a pointer to a NULL terminated string that will be compared against the interface response. If different, the function will return an error code, if equal or starts with expected string, the function will return a success code. |
- Returns
- ewf_result success and error conditions
◆ ewf_interface_verify_responses()
ewf_result ewf_interface_verify_responses |
( |
ewf_interface * |
interface_ptr, |
|
|
uint32_t |
response_count, |
|
|
const char ** |
expected_str_arr |
|
) |
| |
Verify an interface response, compare agains an array of strings.
- Parameters
-
[in] | expected_str_arr | is array of NULL terminated strings that will be compared against the interface response. If different, the function will return an error code, if match is found, the function will return a success code. |
- Returns
- ewf_result success and error conditions