modbus_set_debug.txt 954 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. modbus_set_debug(3)
  2. ===================
  3. NAME
  4. ----
  5. modbus_set_debug - set debug flag of the context
  6. SYNOPSIS
  7. --------
  8. *int modbus_set_debug(modbus_t *'ctx', int 'flag');*
  9. DESCRIPTION
  10. -----------
  11. The *modbus_set_debug()* function shall set the debug flag of the *modbus_t*
  12. context by using the argument _flag_. By default, the boolean flag is set to
  13. `FALSE`. When the _flag_ value is set to `TRUE`, many verbose messages are
  14. displayed on stdout and stderr. For example, this flag is useful to display the
  15. bytes of the Modbus messages.
  16. [verse]
  17. ___________________
  18. [00][14][00][00][00][06][12][03][00][6B][00][03]
  19. Waiting for a confirmation...
  20. <00><14><00><00><00><09><12><03><06><02><2B><00><00><00><00>
  21. ___________________
  22. RETURN VALUE
  23. ------------
  24. The function shall return 0 if successful. Otherwise it shall return -1 and set errno.
  25. AUTHORS
  26. -------
  27. The libmodbus documentation was written by Stéphane Raimbault
  28. <stephane.raimbault@gmail.com>