modbus_report_slave_id man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

MODBUS_REPORT_SLAVE_(3)	       Libmodbus Manual	       MODBUS_REPORT_SLAVE_(3)

NAME
       modbus_report_slave_id - returns a description of the controller

SYNOPSIS
       int modbus_report_slave_id(modbus_t *ctx, uint8_t *dest);

DESCRIPTION
       The modbus_report_slave_id() function shall send a request to the
       controller to obtain a description of the controller.

       The response stored in dest contains:

       ·   the byte count of the response

       ·   the slave ID, this unique ID is in reality not unique at all so
	   it’s not possible to depend on it to know how the information are
	   packed in the response.

       ·   the run indicator status (0x00 = OFF, 0xFF = ON)

       ·   additional data specific to each controller. For example, libmodbus
	   returns the version of the library as a string.

RETURN VALUE
       The modbus_report_slave_id() function shall return the number of read
       data if successful. Otherwise it shall return -1 and set errno.

EXAMPLE
	   uint8_t *tab_bytes;

	   ...

	   rc = modbus_report_slave_id(ctx, tab_bytes);
	   if (rc > 1) {
	       printf("Run Status Indicator: %s\n", tab_bytes[1] ? "ON" : "OFF");
	   }

AUTHORS
       The libmodbus documentation was written by Stéphane Raimbault
       <stephane.raimbault@gmail.com[1]>

NOTES
	1. stephane.raimbault@gmail.com
	   mailto:stephane.raimbault@gmail.com

libmodbus 3.1.0			  10/06/2013	       MODBUS_REPORT_SLAVE_(3)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net