rodbus (C API) 1.6.0-RC1
Loading...
Searching...
No Matches
rodbus_bit_read_callback_t Struct Reference

Callbacks received when reading coils or discrete inputs. More...

#include <rodbus.h>

Data Fields

void(* on_complete )(rodbus_bit_value_iterator_t *, void *)
 Invoked when the asynchronous operation completes successfully. More...
 
void(* on_failure )(rodbus_request_error_t, void *)
 Invoked when the asynchronous operation fails. More...
 
void(* on_destroy )(void *arg)
 Callback when the underlying owner doesn't need the interface anymore. More...
 
void * ctx
 Context data. More...
 

Detailed Description

Callbacks received when reading coils or discrete inputs.

On success, the iterator yields exactly the requested number of values in ascending, contiguous address order, beginning at the start of the requested rodbus_address_range_t. A response containing too few or too many values fails the request.

Field Documentation

◆ ctx

void* rodbus_bit_read_callback_t::ctx

Context data.

◆ on_complete

void(* rodbus_bit_read_callback_t::on_complete) (rodbus_bit_value_iterator_t *, void *)

Invoked when the asynchronous operation completes successfully.

Parameters
resultIterator over the values read from the server, in ascending address order
ctxContext data

◆ on_destroy

void(* rodbus_bit_read_callback_t::on_destroy) (void *arg)

Callback when the underlying owner doesn't need the interface anymore.

Parameters
argContext data

◆ on_failure

void(* rodbus_bit_read_callback_t::on_failure) (rodbus_request_error_t, void *)

Invoked when the asynchronous operation fails.

Parameters
errorEnumeration indicating which error occurred
ctxContext data

The documentation for this struct was generated from the following file: