modbus_get_byte_from_bits(3)

modbus_get_byte_from_bits3

Get the value from many bits

Usage

uint8_t modbus_get_byte_from_bits(const uint8_t *src, int index, unsigned int nb_bits);

Overview

The modbus_get_byte_from_bits() function shall extract a value from many bits. All nb_bits bits from src at position index will be read as a single value. To obtain a full byte, set nb_bits to 8.

Return value

The function shall return a byte containing the bits read.

Releases

6 releases since Debian 7 (Wheezy); the text changed 5 times.

  1. 7
  2. 8
  3. 9
  4. 10
  5. 11
  6. 12

Authors

The libmodbus documentation was written by Stéphane Raimbault <[email protected]>

From libmodbus-dev 3.1.6-2.1 in Debian 12 (Bookworm). Parsed by carta from the page's man source.