GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  MODBUS_REPORT_SLAVE_ID (3)

.ds Aq ’

NAME

modbus_report_slave_id - returns a description of the controller

CONTENTS

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:

o

o the byte count of the response

o

o the slave ID, this unique ID is in reality not unique at all so it\(cqs not possible to depend on it to know how the information are packed in the response.

o

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

o

o 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\(&#146;ephane Raimbault <\m[blue]stephane.raimbault@gmail.com\m[][1]>

NOTES

1. stephane.raimbault@gmail.com  mailto:stephane.raimbault@gmail.com
Search for    or go to Top of page |  Section 3 |  Main Index


libmodbus 3&.1&.0 MODBUS_REPORT_SLAVE_ (3) 10/06/2013

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.