Package libmodbus-devel

Development files for libmodbus

http://www.libmodbus.org/

libmodbus is a C library designed to provide a fast and robust implementation of
the Modbus protocol. It runs on Linux, Mac OS X, FreeBSD, QNX and Windows.

This package contains libraries, header files and developer documentation needed
for developing software which uses the libmodbus library.

Library Functions (Section 3)
modbus_close
The modbus_close() function shall close the connection established with the backend set in the context.
modbus_connect
The modbus_connect() function shall etablish a connection to a Modbus server, a network or a bus using the context information of libmodbus context given in...
modbus_flush
The modbus_flush() function shall discard data received but not read to the socket or file descriptor associated to the context ctx.
modbus_free
The modbus_free() function shall free an allocated modbus_t structure.
modbus_get_byte_from_bits
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...
modbus_get_byte_timeout
The modbus_get_byte_timeout() function shall store the timeout interval between two consecutive bytes of the same message in the timeout argument.
modbus_get_float
The modbus_get_float() function shall get a float from 4 bytes in Modbus format. The src array must be pointer on two 16 bits values, for example, if the first...
modbus_get_header_length
The modbus_get_header_length() function shall retrieve the current header length from the backend. This function is convenient to manipulate a message and so...
modbus_get_response_timeout
The modbus_get_response_timeout() function shall store the timeout interval used to wait for a response in the timeout argument.
modbus_get_socket
The modbus_get_socket() function shall return the current socket or file descriptor of the libmodbus context.
modbus_mapping_free
The modbus_mapping_free() function shall free the four arrays of mb_mapping_t structure and finally the mb_mapping_t referenced by mb_mapping.
modbus_mapping_new
The modbus_mapping_new() function shall allocate four arrays to store bits, input bits, registers and inputs registers. The pointers are stored in...
modbus_new_rtu
The modbus_new_rtu() function shall allocate and initialize a modbus_t structure to communicate in RTU mode on a serial line. The device argument specifies the...
modbus_new_tcp
The modbus_new_tcp() function shall allocate and initialize a modbus_t structure to communicate with a Modbus TCP/IPv4 server. The ip argument specifies the IP...
modbus_new_tcp_pi
The modbus_new_tcp_pi() function shall allocate and initialize a modbus_t structure to communicate with a Modbus TCP IPv4 or Ipv6 server. The node argument...
modbus_read_bits
The modbus_read_bits() function shall read the status of the nb bits (coils) to the address addr of the remote device. The result of reading is stored in dest...
modbus_read_input_bits
The modbus_read_input_bits() function shall read the content of the nb input bits to the address addr of the remote device. The result of reading is stored in...
modbus_read_input_registers
The modbus_read_input_registers() function shall read the content of the nb input registers to address addr of the remote device. The result of the reading is...
modbus_read_registers
The modbus_read_registers() function shall read the content of the nb holding registers to the address addr of the remote device. The result of reading is...
modbus_receive
The modbus_receive() function shall receive an indication request from the socket of the context ctx. This function is used by Modbus slave/server to receive...
modbus_receive_confirmation
The modbus_receive_confirmation() function shall receive a request via the socket of the context ctx. This function must be used for debugging purposes because...
modbus_receive_from
The modbus_receive_from() function shall receive an indication request from the socket/file descriptor given in argument 'sockfd. This function is used by...
modbus_reply
The modbus_reply() function shall send a response to received request. The request req given in argument is analyzed, a response is then built and sent by using...
modbus_reply_exception
The modbus_reply_exception() function shall send an exception response based on the exception_code in argument.
modbus_report_slave_id
The modbus_report_slave_id() function shall send a request to the controller to obtain a description of the controller.
modbus_rtu_get_serial_mode
The modbus_rtu_get_serial_mode() function shall return the serial mode currently used by the libmodbus context: MODBUS_RTU_RS232
modbus_rtu_set_serial_mode
The modbus_rtu_set_serial_mode() function shall set the selected serial mode: MODBUS_RTU_RS232
modbus_send_raw_request
The modbus_send_raw_request() function shall send a request via the socket of the context ctx. This function must be used for debugging purposes because you...
modbus_set_bits_from_byte
The modbus_set_bits_from_byte function shall set many bits from a single byte. All 8 bits from the byte value will be written to dest array starting at index...
modbus_set_bits_from_bytes
The modbus_set_bits_from_bytes function shall set bits by reading an array of bytes. All the bits of the bytes read from the first position of the array...
modbus_set_byte_timeout
The modbus_set_byte_timeout() function shall set the timeout interval between two consecutive bytes of the same message. If the delay between is longer than the...
modbus_set_debug
The modbus_set_debug() function shall set the debug flag of the modbus_t context by using the argument boolean. When the boolean value is set to TRUE, many...
modbus_set_error_recovery
The modbus_set_error_recovery() function shall set the error recovery mode to apply when the connection fails or the byte received is not expected. The argument...
modbus_set_float
The modbus_set_float() function shall set a float to 4 bytes in Modbus format. The dest array must be pointer on two 16 bits values to be able to store the full...
modbus_set_response_timeout
The modbus_set_response_timeout() function shall set the timeout interval used to wait for a response. If the waiting before receiving the response is longer...
modbus_set_slave
The modbus_set_slave() function shall set the slave number in the libmodbus context. The behavior depends of network and the role of the device: RTU
modbus_set_socket
The modbus_set_socket() function shall set the socket or file descriptor in the libmodbus context. This function is useful for managing multiple client...
modbus_strerror
The modbus_strerror() function shall return a pointer to an error message string corresponding to the error number specified by the errnum argument. As...
modbus_tcp_listen
The modbus_tcp_listen() function shall create a socket and listen for nb_connection incoming connections.
modbus_write_and_read_registers
The modbus_write_and_read_registers() function shall write the content of the write_nb holding registers from the array src to the address write_addr of the...
modbus_write_bit
The modbus_write_bit() function shall write the status of status at the address addr of the remote device. The value must be set to TRUE or FALSE. The function...
modbus_write_bits
The modbus_write_bits() function shall write the status of the nb bits (coils) from src at the address addr of the remote device. The src array must contains...
modbus_write_register
The modbus_write_register() function shall write the value of value holding registers at the address addr of the remote device. The function uses the Modbus...
modbus_write_registers
The modbus_write_registers() function shall write the content of the nb holding registers from the array src at address addr of the remote device. The function...
Miscellanea (Section 7)
libmodbus
libmodbus is a library to send/receive data with a device which respects the Modbus protocol. This library contains various backends to communicate over...