dnp3 (C API) 1.6.0
Loading...
Searching...
No Matches
dnp3_read_handler_t Struct Reference

Callback interface used to received measurement values received from the outstation. More...

#include <dnp3.h>

Data Fields

void(* begin_fragment )(dnp3_read_type_t, dnp3_response_header_t, void *)
 Called when a valid response fragment is received, but before any measurements are processed. More...
 
void(* end_fragment )(dnp3_read_type_t, dnp3_response_header_t, void *)
 Called when all the data from a response fragment has been processed. More...
 
void(* handle_binary_input )(dnp3_header_info_t, dnp3_binary_input_iterator_t *, void *)
 Handle binary input data. More...
 
void(* handle_double_bit_binary_input )(dnp3_header_info_t, dnp3_double_bit_binary_input_iterator_t *, void *)
 Handle double-bit binary input data. More...
 
void(* handle_binary_output_status )(dnp3_header_info_t, dnp3_binary_output_status_iterator_t *, void *)
 Handle binary output status data. More...
 
void(* handle_counter )(dnp3_header_info_t, dnp3_counter_iterator_t *, void *)
 Handle counter data. More...
 
void(* handle_frozen_counter )(dnp3_header_info_t, dnp3_frozen_counter_iterator_t *, void *)
 Handle frozen counter input data. More...
 
void(* handle_analog_input )(dnp3_header_info_t, dnp3_analog_input_iterator_t *, void *)
 Handle analog input data. More...
 
void(* handle_frozen_analog_input )(dnp3_header_info_t, dnp3_frozen_analog_input_iterator_t *, void *)
 Handle frozen analog input data. More...
 
void(* handle_analog_output_status )(dnp3_header_info_t, dnp3_analog_output_status_iterator_t *, void *)
 Handle analog output status data. More...
 
void(* handle_binary_output_command_event )(dnp3_header_info_t, dnp3_binary_output_command_event_iterator_t *, void *)
 Handle binary output command events. More...
 
void(* handle_analog_output_command_event )(dnp3_header_info_t, dnp3_analog_output_command_event_iterator_t *, void *)
 Handle analog output command events. More...
 
void(* handle_unsigned_integer )(dnp3_header_info_t, dnp3_unsigned_integer_iterator_t *, void *)
 Handle unsigned integer values (g102) More...
 
void(* handle_octet_string )(dnp3_header_info_t, dnp3_octet_string_iterator_t *, void *)
 Handle octet string data. More...
 
void(* handle_string_attr )(dnp3_header_info_t, dnp3_string_attr_t, uint8_t, uint8_t, const char *, void *)
 Handle a known or unknown visible string device attribute. More...
 
void(* handle_variation_list_attr )(dnp3_header_info_t, dnp3_variation_list_attr_t, uint8_t, uint8_t, dnp3_attr_item_iter_t *, void *)
 Handle a known or unknown list of attribute variations. More...
 
void(* handle_uint_attr )(dnp3_header_info_t, dnp3_uint_attr_t, uint8_t, uint8_t, uint32_t, void *)
 Handle an unsigned integer device attribute. More...
 
void(* handle_bool_attr )(dnp3_header_info_t, dnp3_bool_attr_t, uint8_t, uint8_t, bool, void *)
 Handle a boolean device attribute. More...
 
void(* handle_int_attr )(dnp3_header_info_t, dnp3_int_attr_t, uint8_t, uint8_t, int32_t, void *)
 Handle a signed integer device attribute. More...
 
void(* handle_time_attr )(dnp3_header_info_t, dnp3_time_attr_t, uint8_t, uint8_t, uint64_t, void *)
 Handle a DNP3 time device attribute. More...
 
void(* handle_float_attr )(dnp3_header_info_t, dnp3_float_attr_t, uint8_t, uint8_t, double, void *)
 Handle a floating point device attribute. More...
 
void(* handle_octet_string_attr )(dnp3_header_info_t, dnp3_octet_string_attr_t, uint8_t, uint8_t, dnp3_byte_iterator_t *, void *)
 Handle an octet string device attribute. More...
 
void(* handle_bit_string_attr )(dnp3_header_info_t, dnp3_bit_string_attr_t, uint8_t, uint8_t, dnp3_byte_iterator_t *, void *)
 Handle a bit string device attribute. 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

Callback interface used to received measurement values received from the outstation.

Methods are always invoked in the following order. dnp3_read_handler_t::begin_fragment is called first, followed by one or more of the measurement handlers, and finally dnp3_read_handler_t::end_fragment is called.

Field Documentation

◆ begin_fragment

void(* dnp3_read_handler_t::begin_fragment) (dnp3_read_type_t, dnp3_response_header_t, void *)

Called when a valid response fragment is received, but before any measurements are processed.

Parameters
read_typeDescribes what triggered the callback, e.g. response to a poll vs an unsolicited response
headerHeader of the fragment
ctxContext data

◆ ctx

void* dnp3_read_handler_t::ctx

Context data.

◆ end_fragment

void(* dnp3_read_handler_t::end_fragment) (dnp3_read_type_t, dnp3_response_header_t, void *)

Called when all the data from a response fragment has been processed.

Parameters
read_typeDescribes what triggered the read event
headerHeader of the fragment
ctxContext data

◆ handle_analog_input

void(* dnp3_read_handler_t::handle_analog_input) (dnp3_header_info_t, dnp3_analog_input_iterator_t *, void *)

Handle analog input data.

Parameters
infoGroup/variation and qualifier information
valuesiterator of values from the response
ctxContext data

◆ handle_analog_output_command_event

void(* dnp3_read_handler_t::handle_analog_output_command_event) (dnp3_header_info_t, dnp3_analog_output_command_event_iterator_t *, void *)

Handle analog output command events.

Parameters
infoGroup/variation and qualifier information
valuesiterator of values from the response
ctxContext data

◆ handle_analog_output_status

void(* dnp3_read_handler_t::handle_analog_output_status) (dnp3_header_info_t, dnp3_analog_output_status_iterator_t *, void *)

Handle analog output status data.

Parameters
infoGroup/variation and qualifier information
valuesiterator of values from the response
ctxContext data

◆ handle_binary_input

void(* dnp3_read_handler_t::handle_binary_input) (dnp3_header_info_t, dnp3_binary_input_iterator_t *, void *)

Handle binary input data.

Parameters
infoGroup/variation and qualifier information
valuesiterator of values from the response
ctxContext data

◆ handle_binary_output_command_event

void(* dnp3_read_handler_t::handle_binary_output_command_event) (dnp3_header_info_t, dnp3_binary_output_command_event_iterator_t *, void *)

Handle binary output command events.

Parameters
infoGroup/variation and qualifier information
valuesiterator of values from the response
ctxContext data

◆ handle_binary_output_status

void(* dnp3_read_handler_t::handle_binary_output_status) (dnp3_header_info_t, dnp3_binary_output_status_iterator_t *, void *)

Handle binary output status data.

Parameters
infoGroup/variation and qualifier information
valuesiterator of values from the response
ctxContext data

◆ handle_bit_string_attr

void(* dnp3_read_handler_t::handle_bit_string_attr) (dnp3_header_info_t, dnp3_bit_string_attr_t, uint8_t, uint8_t, dnp3_byte_iterator_t *, void *)

Handle a bit string device attribute.

Parameters
infoGroup/variation and qualifier information
attrEnumeration describing the attribute associated with the value
setThe set associated with this attribute. Examining this argument is only important if the attr argument is unknown.
variationThe variation associated with this attribute. Examining this argument is only important if the attr argument is unknown.
valueIterator over bytes in the bit-string
ctxContext data

◆ handle_bool_attr

void(* dnp3_read_handler_t::handle_bool_attr) (dnp3_header_info_t, dnp3_bool_attr_t, uint8_t, uint8_t, bool, void *)

Handle a boolean device attribute.

These are actually signed integer values on the wire. This method is only called for known values

Parameters
infoGroup/variation and qualifier information
attrEnumeration describing the attribute associated with the value
setThe set associated with this attribute. Examining this argument is only important if the attr argument is unknown.
variationThe variation associated with this attribute. Examining this argument is only important if the attr argument is unknown.
valueattribute value
ctxContext data

◆ handle_counter

void(* dnp3_read_handler_t::handle_counter) (dnp3_header_info_t, dnp3_counter_iterator_t *, void *)

Handle counter data.

Parameters
infoGroup/variation and qualifier information
valuesiterator of values from the response
ctxContext data

◆ handle_double_bit_binary_input

void(* dnp3_read_handler_t::handle_double_bit_binary_input) (dnp3_header_info_t, dnp3_double_bit_binary_input_iterator_t *, void *)

Handle double-bit binary input data.

Parameters
infoGroup/variation and qualifier information
valuesiterator of values from the response
ctxContext data

◆ handle_float_attr

void(* dnp3_read_handler_t::handle_float_attr) (dnp3_header_info_t, dnp3_float_attr_t, uint8_t, uint8_t, double, void *)

Handle a floating point device attribute.

Parameters
infoGroup/variation and qualifier information
attrEnumeration describing the attribute associated with the value
setThe set associated with this attribute. Examining this argument is only important if the attr argument is unknown.
variationThe variation associated with this attribute. Examining this argument is only important if the attr argument is unknown.
valueAttribute value
ctxContext data

◆ handle_frozen_analog_input

void(* dnp3_read_handler_t::handle_frozen_analog_input) (dnp3_header_info_t, dnp3_frozen_analog_input_iterator_t *, void *)

Handle frozen analog input data.

Parameters
infoGroup/variation and qualifier information
valuesiterator of values from the response
ctxContext data

◆ handle_frozen_counter

void(* dnp3_read_handler_t::handle_frozen_counter) (dnp3_header_info_t, dnp3_frozen_counter_iterator_t *, void *)

Handle frozen counter input data.

Parameters
infoGroup/variation and qualifier information
valuesiterator of values from the response
ctxContext data

◆ handle_int_attr

void(* dnp3_read_handler_t::handle_int_attr) (dnp3_header_info_t, dnp3_int_attr_t, uint8_t, uint8_t, int32_t, void *)

Handle a signed integer device attribute.

There are no defined attributes for this type that aren't mapped to booleans so there is no enumeration

Parameters
infoGroup/variation and qualifier information
attrEnumeration describing the attribute associated with the value
setThe set associated with this attribute. Examining this argument is only important if the attr argument is unknown.
variationThe variation associated with this attribute. Examining this argument is only important if the attr argument is unknown.
valueattribute value
ctxContext data

◆ handle_octet_string

void(* dnp3_read_handler_t::handle_octet_string) (dnp3_header_info_t, dnp3_octet_string_iterator_t *, void *)

Handle octet string data.

Parameters
infoGroup/variation and qualifier information
valuesiterator of values from the response
ctxContext data

◆ handle_octet_string_attr

void(* dnp3_read_handler_t::handle_octet_string_attr) (dnp3_header_info_t, dnp3_octet_string_attr_t, uint8_t, uint8_t, dnp3_byte_iterator_t *, void *)

Handle an octet string device attribute.

Parameters
infoGroup/variation and qualifier information
attrEnumeration describing the attribute associated with the value
setThe set associated with this attribute. Examining this argument is only important if the attr argument is unknown.
variationThe variation associated with this attribute. Examining this argument is only important if the attr argument is unknown.
valueIterator over bytes in the octet-string
ctxContext data

◆ handle_string_attr

void(* dnp3_read_handler_t::handle_string_attr) (dnp3_header_info_t, dnp3_string_attr_t, uint8_t, uint8_t, const char *, void *)

Handle a known or unknown visible string device attribute.

Parameters
infoGroup/variation and qualifier information
attrEnumeration describing the attribute (possibly unknown) associated with the value
setThe set associated with this attribute. Examining this argument is only important if the attr argument is unknown.
variationThe variation associated with this attribute. Examining this argument is only important if the attr argument is unknown.
valueattribute value
ctxContext data

◆ handle_time_attr

void(* dnp3_read_handler_t::handle_time_attr) (dnp3_header_info_t, dnp3_time_attr_t, uint8_t, uint8_t, uint64_t, void *)

Handle a DNP3 time device attribute.

Parameters
infoGroup/variation and qualifier information
attrEnumeration describing the attribute associated with the value
setThe set associated with this attribute. Examining this argument is only important if the attr argument is unknown.
variationThe variation associated with this attribute. Examining this argument is only important if the attr argument is unknown.
value48-bit timestamp representing milliseconds since Unix epoch
ctxContext data

◆ handle_uint_attr

void(* dnp3_read_handler_t::handle_uint_attr) (dnp3_header_info_t, dnp3_uint_attr_t, uint8_t, uint8_t, uint32_t, void *)

Handle an unsigned integer device attribute.

Parameters
infoGroup/variation and qualifier information
attrEnumeration describing the attribute (possibly unknown) associated with the value
setThe set associated with this attribute. Examining this argument is only important if the attr argument is unknown.
variationThe variation associated with this attribute. Examining this argument is only important if the attr argument is unknown.
valueattribute value
ctxContext data

◆ handle_unsigned_integer

void(* dnp3_read_handler_t::handle_unsigned_integer) (dnp3_header_info_t, dnp3_unsigned_integer_iterator_t *, void *)

Handle unsigned integer values (g102)

Parameters
infoGroup/variation and qualifier information
valuesiterator of values from the response
ctxContext data

◆ handle_variation_list_attr

void(* dnp3_read_handler_t::handle_variation_list_attr) (dnp3_header_info_t, dnp3_variation_list_attr_t, uint8_t, uint8_t, dnp3_attr_item_iter_t *, void *)

Handle a known or unknown list of attribute variations.

Parameters
infoGroup/variation and qualifier information
attrEnumeration describing the attribute (possibly unknown) associated with the value
setThe set associated with this attribute. Examining this argument is only important if the attr argument is unknown.
variationThe variation associated with this attribute. Examining this argument is only important if the attr argument is unknown.
valueIterator over a list of variation / properties pairs
ctxContext data

◆ on_destroy

void(* dnp3_read_handler_t::on_destroy) (void *arg)

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

Parameters
argContext data

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