|
@@ -254,7 +254,7 @@ int main(void)
|
|
|
printf("OK\n");
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
printf("\nTEST ILLEGAL DATA ADDRESS:\n");
|
|
|
|
|
|
|
|
@@ -333,7 +333,7 @@ int main(void)
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
printf("\nTEST TOO MANY DATA ERROR:\n");
|
|
|
|
|
|
ret = read_coil_status(&mb_param, SLAVE,
|
|
@@ -398,16 +398,17 @@ int main(void)
|
|
|
printf("FAILED\n");
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
+ printf("\nTEST BAD RESPONSE ERROR:\n");
|
|
|
|
|
|
|
|
|
uint16_t *tab_rp_registers_bad = (uint16_t *) malloc(
|
|
|
UT_HOLDING_REGISTERS_NB_POINTS_SPECIAL * sizeof(uint16_t));
|
|
|
- printf("1/1 read_holding_registers: ");
|
|
|
ret = read_holding_registers(&mb_param,
|
|
|
SLAVE, UT_HOLDING_REGISTERS_ADDRESS,
|
|
|
UT_HOLDING_REGISTERS_NB_POINTS_SPECIAL,
|
|
|
tab_rp_registers_bad);
|
|
|
+ printf("* read_holding_registers: ");
|
|
|
if (ret > 0) {
|
|
|
|
|
|
printf("FAILED\n");
|