Resolve #18 *TST? should return 0 as OK
- it should be completely customizable, what return value is return
from the callback function
- Returning 0 from callback means "test was OK"
- Other number means, that some error bits are set
- Type of callback is still wrong - it should be int and not
scpi_result_t but it will change API. It will be part of next version
| | |
| | | return SCPI_RES_OK; |
| | | } |
| | | |
| | | /** |
| | | * Return 0 as OK and other number as error |
| | | */ |
| | | scpi_result_t SCPI_Test(scpi_t * context) { |
| | | (void) context; |
| | | iprintf("**Test\r\n"); |
| | | return SCPI_RES_OK; |
| | | return 0; |
| | | } |
| | | |
| | | scpi_result_t SCPI_Reset(scpi_t * context) { |
| | |
| | | return SCPI_RES_OK; |
| | | } |
| | | |
| | | /** |
| | | * Return 0 as OK and other number as error |
| | | */ |
| | | scpi_result_t SCPI_Test(scpi_t * context) { |
| | | fprintf(stderr, "**Test\r\n"); |
| | | return SCPI_RES_OK; |
| | | return 0; |
| | | } |
| | | |
| | | scpi_result_t SCPI_Reset(scpi_t * context) { |
| | |
| | | return SCPI_RES_OK; |
| | | } |
| | | |
| | | /** |
| | | * Return 0 as OK and other number as error |
| | | */ |
| | | scpi_result_t SCPI_Test(scpi_t * context) { |
| | | fprintf(stderr, "**Test\r\n"); |
| | | return SCPI_RES_OK; |
| | | return 0; |
| | | } |
| | | |
| | | scpi_result_t SCPI_Reset(scpi_t * context) { |
| | |
| | | return SCPI_RES_OK; |
| | | } |
| | | |
| | | /** |
| | | * Return 0 as OK and other number as error |
| | | */ |
| | | scpi_result_t SCPI_Test(scpi_t * context) { |
| | | fprintf(stderr, "**Test\r\n"); |
| | | return SCPI_RES_OK; |
| | | return 0; |
| | | } |
| | | |
| | | scpi_result_t SCPI_Reset(scpi_t * context) { |
| | |
| | | return SCPI_RES_OK; |
| | | } |
| | | |
| | | /** |
| | | * Return 0 as OK and other number as error |
| | | */ |
| | | scpi_result_t SCPI_Test(scpi_t * context) { |
| | | fprintf(stderr, "**Test\r\n"); |
| | | return SCPI_RES_OK; |
| | | return 0; |
| | | } |
| | | |
| | | scpi_result_t SCPI_Reset(scpi_t * context) { |