~ubuntu-branches/ubuntu/utopic/libmodbus/utopic

« back to all changes in this revision

Viewing changes to doc/modbus_read_input_bits.3

  • Committer: Package Import Robot
  • Author(s): Ivo De Decker
  • Date: 2013-06-30 12:25:01 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20130630122501-13vkglrt4xzalz1p
Tags: 3.0.4-1
* New upstream release 
* Update standards-version to 3.9.4 (no changes) 
* Enable parallel build
* Enable verbose build to show compiler flags to build log checks 
* Update watch file to filter out unstable versions 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
'\" t
2
 
.\"     Title: modbus_read_input_bits
3
 
.\"    Author: [see the "AUTHORS" section]
4
 
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
5
 
.\"      Date: 05/26/2012
6
 
.\"    Manual: Libmodbus Manual
7
 
.\"    Source: libmodbus 3.0.3
8
 
.\"  Language: English
9
 
.\"
10
 
.TH "MODBUS_READ_INPUT_BI" "3" "05/26/2012" "libmodbus 3\&.0\&.3" "Libmodbus Manual"
11
 
.\" -----------------------------------------------------------------
12
 
.\" * Define some portability stuff
13
 
.\" -----------------------------------------------------------------
14
 
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
 
.\" http://bugs.debian.org/507673
16
 
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
 
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
 
.ie \n(.g .ds Aq \(aq
19
 
.el       .ds Aq '
20
 
.\" -----------------------------------------------------------------
21
 
.\" * set default formatting
22
 
.\" -----------------------------------------------------------------
23
 
.\" disable hyphenation
24
 
.nh
25
 
.\" disable justification (adjust text to left margin only)
26
 
.ad l
27
 
.\" -----------------------------------------------------------------
28
 
.\" * MAIN CONTENT STARTS HERE *
29
 
.\" -----------------------------------------------------------------
30
 
.SH "NAME"
31
 
modbus_read_input_bits \- read many input bits
32
 
.SH "SYNOPSIS"
33
 
.sp
34
 
\fBint modbus_read_input_bits(modbus_t *\fR\fB\fIctx\fR\fR\fB, int \fR\fB\fIaddr\fR\fR\fB, int \fR\fB\fInb\fR\fR\fB, uint8_t *\fR\fB\fIdest\fR\fR\fB);\fR
35
 
.SH "DESCRIPTION"
36
 
.sp
37
 
The \fImodbus_read_input_bits()\fR function shall read the content of the \fInb\fR input bits to the address \fIaddr\fR of the remote device\&. The result of reading is stored in \fIdest\fR array as unsigned bytes (8 bits) set to \fITRUE\fR or \fIFALSE\fR\&.
38
 
.sp
39
 
You must take care to allocate enough memory to store the results in \fIdest\fR (at least \fInb\fR * sizeof(uint8_t))\&.
40
 
.sp
41
 
The function uses the Modbus function code 0x02 (read input status)\&.
42
 
.SH "RETURN VALUE"
43
 
.sp
44
 
The \fImodbus_read_input_status()\fR function shall return the number of read input status if successful\&. Otherwise it shall return \-1 and set errno\&.
45
 
.SH "ERRORS"
46
 
.PP
47
 
EMBMDATA
48
 
.RS 4
49
 
Too many discrete inputs requested
50
 
.RE
51
 
.SH "SEE ALSO"
52
 
.sp
53
 
\fBmodbus_read_input_registers\fR(3)
54
 
.SH "AUTHORS"
55
 
.sp
56
 
The libmodbus documentation was written by St\('ephane Raimbault <\m[blue]\fBstephane\&.raimbault@gmail\&.com\fR\m[]\&\s-2\u[1]\d\s+2>
57
 
.SH "NOTES"
58
 
.IP " 1." 4
59
 
stephane.raimbault@gmail.com
60
 
.RS 4
61
 
\%mailto:stephane.raimbault@gmail.com
62
 
.RE