Commit 561700b0e41a131930473e864374dc1ef8b56b71
Committed by
Stéphane Raimbault
1 parent
c4290368
Add documentation for modbus_mask_write_register (closes #91)
Showing
2 changed files
with
40 additions
and
0 deletions
doc/Makefile.am
doc/modbus_mask_write_register.txt
0 → 100644
| 1 | +modbus_mask_write_register(3) | |
| 2 | +============================= | |
| 3 | + | |
| 4 | + | |
| 5 | +NAME | |
| 6 | +---- | |
| 7 | +modbus_mask_write_register - mask a single register | |
| 8 | + | |
| 9 | + | |
| 10 | +SYNOPSIS | |
| 11 | +-------- | |
| 12 | +*int modbus_mask_write_register(modbus_t *'ctx', int 'addr', uint16_t 'and', uint16_t 'or');* | |
| 13 | + | |
| 14 | + | |
| 15 | +DESCRIPTION | |
| 16 | +----------- | |
| 17 | +The _modbus_mask_write_register()_ function shall modify the value of the | |
| 18 | +holding register at the address 'addr' of the remote device using the algorithm: | |
| 19 | +new value = (current value AND 'and') OR ('or' AND (NOT 'and')) | |
| 20 | + | |
| 21 | +The function uses the Modbus function code 0x16 (mask single register). | |
| 22 | + | |
| 23 | + | |
| 24 | +RETURN VALUE | |
| 25 | +------------ | |
| 26 | +The _modbus_mask_write_register()_ function shall return 1 if successful. Otherwise | |
| 27 | +it shall return -1 and set errno. | |
| 28 | + | |
| 29 | + | |
| 30 | +SEE ALSO | |
| 31 | +-------- | |
| 32 | +linkmb:modbus_read_registers[3] | |
| 33 | +linkmb:modbus_write_registers[3] | |
| 34 | + | |
| 35 | + | |
| 36 | +AUTHORS | |
| 37 | +------- | |
| 38 | +The libmodbus documentation was written by Stéphane Raimbault | |
| 39 | +<stephane.raimbault@gmail.com> | ... | ... |