dnp3 (C++ API) 1.6.0
Loading...
Searching...
No Matches
dnp3::ReadHandler Class Reference

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

#include <dnp3.hpp>

Public Member Functions

virtual void begin_fragment (ReadType read_type, const ResponseHeader &header)
 Called when a valid response fragment is received, but before any measurements are processed. More...
 
virtual void end_fragment (ReadType read_type, const ResponseHeader &header)
 Called when all the data from a response fragment has been processed. More...
 
virtual void handle_binary_input (const HeaderInfo &info, BinaryInputIterator &values)
 Handle binary input data. More...
 
virtual void handle_double_bit_binary_input (const HeaderInfo &info, DoubleBitBinaryInputIterator &values)
 Handle double-bit binary input data. More...
 
virtual void handle_binary_output_status (const HeaderInfo &info, BinaryOutputStatusIterator &values)
 Handle binary output status data. More...
 
virtual void handle_counter (const HeaderInfo &info, CounterIterator &values)
 Handle counter data. More...
 
virtual void handle_frozen_counter (const HeaderInfo &info, FrozenCounterIterator &values)
 Handle frozen counter input data. More...
 
virtual void handle_analog_input (const HeaderInfo &info, AnalogInputIterator &values)
 Handle analog input data. More...
 
virtual void handle_frozen_analog_input (const HeaderInfo &info, FrozenAnalogInputIterator &values)
 Handle frozen analog input data. More...
 
virtual void handle_analog_output_status (const HeaderInfo &info, AnalogOutputStatusIterator &values)
 Handle analog output status data. More...
 
virtual void handle_binary_output_command_event (const HeaderInfo &info, BinaryOutputCommandEventIterator &values)
 Handle binary output command events. More...
 
virtual void handle_analog_output_command_event (const HeaderInfo &info, AnalogOutputCommandEventIterator &values)
 Handle analog output command events. More...
 
virtual void handle_unsigned_integer (const HeaderInfo &info, UnsignedIntegerIterator &values)
 Handle unsigned integer values (g102) More...
 
virtual void handle_octet_string (const HeaderInfo &info, OctetStringIterator &values)
 Handle octet string data. More...
 
virtual void handle_string_attr (const HeaderInfo &info, StringAttr attr, uint8_t set, uint8_t variation, const char *value)
 Handle a known or unknown visible string device attribute. More...
 
virtual void handle_variation_list_attr (const HeaderInfo &info, VariationListAttr attr, uint8_t set, uint8_t variation, AttrItemIter &value)
 Handle a known or unknown list of attribute variations. More...
 
virtual void handle_uint_attr (const HeaderInfo &info, UintAttr attr, uint8_t set, uint8_t variation, uint32_t value)
 Handle an unsigned integer device attribute. More...
 
virtual void handle_bool_attr (const HeaderInfo &info, BoolAttr attr, uint8_t set, uint8_t variation, bool value)
 Handle a boolean device attribute. More...
 
virtual void handle_int_attr (const HeaderInfo &info, IntAttr attr, uint8_t set, uint8_t variation, int32_t value)
 Handle a signed integer device attribute. More...
 
virtual void handle_time_attr (const HeaderInfo &info, TimeAttr attr, uint8_t set, uint8_t variation, uint64_t value)
 Handle a DNP3 time device attribute. More...
 
virtual void handle_float_attr (const HeaderInfo &info, FloatAttr attr, uint8_t set, uint8_t variation, double value)
 Handle a floating point device attribute. More...
 
virtual void handle_octet_string_attr (const HeaderInfo &info, OctetStringAttr attr, uint8_t set, uint8_t variation, ByteIterator &value)
 Handle an octet string device attribute. More...
 
virtual void handle_bit_string_attr (const HeaderInfo &info, BitStringAttr attr, uint8_t set, uint8_t variation, ByteIterator &value)
 Handle a bit string device attribute. More...
 

Detailed Description

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

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

Note
this class is an "interface" and only has virtual methods, some of which may have default implementations.

Member Function Documentation

◆ begin_fragment()

virtual void dnp3::ReadHandler::begin_fragment ( ReadType  read_type,
const ResponseHeader header 
)
inlinevirtual

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
Note
This method has a default implementation that does nothing

◆ end_fragment()

virtual void dnp3::ReadHandler::end_fragment ( ReadType  read_type,
const ResponseHeader header 
)
inlinevirtual

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

Parameters
read_typeDescribes what triggered the read event
headerHeader of the fragment
Note
This method has a default implementation that does nothing

◆ handle_analog_input()

virtual void dnp3::ReadHandler::handle_analog_input ( const HeaderInfo info,
AnalogInputIterator values 
)
inlinevirtual

Handle analog input data.

Parameters
infoGroup/variation and qualifier information
valuesiterator of values from the response
Note
This method has a default implementation that does nothing

◆ handle_analog_output_command_event()

virtual void dnp3::ReadHandler::handle_analog_output_command_event ( const HeaderInfo info,
AnalogOutputCommandEventIterator values 
)
inlinevirtual

Handle analog output command events.

Parameters
infoGroup/variation and qualifier information
valuesiterator of values from the response
Note
This method has a default implementation that does nothing

◆ handle_analog_output_status()

virtual void dnp3::ReadHandler::handle_analog_output_status ( const HeaderInfo info,
AnalogOutputStatusIterator values 
)
inlinevirtual

Handle analog output status data.

Parameters
infoGroup/variation and qualifier information
valuesiterator of values from the response
Note
This method has a default implementation that does nothing

◆ handle_binary_input()

virtual void dnp3::ReadHandler::handle_binary_input ( const HeaderInfo info,
BinaryInputIterator values 
)
inlinevirtual

Handle binary input data.

Parameters
infoGroup/variation and qualifier information
valuesiterator of values from the response
Note
This method has a default implementation that does nothing

◆ handle_binary_output_command_event()

virtual void dnp3::ReadHandler::handle_binary_output_command_event ( const HeaderInfo info,
BinaryOutputCommandEventIterator values 
)
inlinevirtual

Handle binary output command events.

Parameters
infoGroup/variation and qualifier information
valuesiterator of values from the response
Note
This method has a default implementation that does nothing

◆ handle_binary_output_status()

virtual void dnp3::ReadHandler::handle_binary_output_status ( const HeaderInfo info,
BinaryOutputStatusIterator values 
)
inlinevirtual

Handle binary output status data.

Parameters
infoGroup/variation and qualifier information
valuesiterator of values from the response
Note
This method has a default implementation that does nothing

◆ handle_bit_string_attr()

virtual void dnp3::ReadHandler::handle_bit_string_attr ( const HeaderInfo info,
BitStringAttr  attr,
uint8_t  set,
uint8_t  variation,
ByteIterator value 
)
inlinevirtual

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
Note
This method has a default implementation that does nothing

◆ handle_bool_attr()

virtual void dnp3::ReadHandler::handle_bool_attr ( const HeaderInfo info,
BoolAttr  attr,
uint8_t  set,
uint8_t  variation,
bool  value 
)
inlinevirtual

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
Note
This method has a default implementation that does nothing

◆ handle_counter()

virtual void dnp3::ReadHandler::handle_counter ( const HeaderInfo info,
CounterIterator values 
)
inlinevirtual

Handle counter data.

Parameters
infoGroup/variation and qualifier information
valuesiterator of values from the response
Note
This method has a default implementation that does nothing

◆ handle_double_bit_binary_input()

virtual void dnp3::ReadHandler::handle_double_bit_binary_input ( const HeaderInfo info,
DoubleBitBinaryInputIterator values 
)
inlinevirtual

Handle double-bit binary input data.

Parameters
infoGroup/variation and qualifier information
valuesiterator of values from the response
Note
This method has a default implementation that does nothing

◆ handle_float_attr()

virtual void dnp3::ReadHandler::handle_float_attr ( const HeaderInfo info,
FloatAttr  attr,
uint8_t  set,
uint8_t  variation,
double  value 
)
inlinevirtual

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
Note
This method has a default implementation that does nothing

◆ handle_frozen_analog_input()

virtual void dnp3::ReadHandler::handle_frozen_analog_input ( const HeaderInfo info,
FrozenAnalogInputIterator values 
)
inlinevirtual

Handle frozen analog input data.

Parameters
infoGroup/variation and qualifier information
valuesiterator of values from the response
Note
This method has a default implementation that does nothing

◆ handle_frozen_counter()

virtual void dnp3::ReadHandler::handle_frozen_counter ( const HeaderInfo info,
FrozenCounterIterator values 
)
inlinevirtual

Handle frozen counter input data.

Parameters
infoGroup/variation and qualifier information
valuesiterator of values from the response
Note
This method has a default implementation that does nothing

◆ handle_int_attr()

virtual void dnp3::ReadHandler::handle_int_attr ( const HeaderInfo info,
IntAttr  attr,
uint8_t  set,
uint8_t  variation,
int32_t  value 
)
inlinevirtual

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
Note
This method has a default implementation that does nothing

◆ handle_octet_string()

virtual void dnp3::ReadHandler::handle_octet_string ( const HeaderInfo info,
OctetStringIterator values 
)
inlinevirtual

Handle octet string data.

Parameters
infoGroup/variation and qualifier information
valuesiterator of values from the response
Note
This method has a default implementation that does nothing

◆ handle_octet_string_attr()

virtual void dnp3::ReadHandler::handle_octet_string_attr ( const HeaderInfo info,
OctetStringAttr  attr,
uint8_t  set,
uint8_t  variation,
ByteIterator value 
)
inlinevirtual

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
Note
This method has a default implementation that does nothing

◆ handle_string_attr()

virtual void dnp3::ReadHandler::handle_string_attr ( const HeaderInfo info,
StringAttr  attr,
uint8_t  set,
uint8_t  variation,
const char *  value 
)
inlinevirtual

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
Note
This method has a default implementation that does nothing

◆ handle_time_attr()

virtual void dnp3::ReadHandler::handle_time_attr ( const HeaderInfo info,
TimeAttr  attr,
uint8_t  set,
uint8_t  variation,
uint64_t  value 
)
inlinevirtual

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
Note
This method has a default implementation that does nothing

◆ handle_uint_attr()

virtual void dnp3::ReadHandler::handle_uint_attr ( const HeaderInfo info,
UintAttr  attr,
uint8_t  set,
uint8_t  variation,
uint32_t  value 
)
inlinevirtual

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
Note
This method has a default implementation that does nothing

◆ handle_unsigned_integer()

virtual void dnp3::ReadHandler::handle_unsigned_integer ( const HeaderInfo info,
UnsignedIntegerIterator values 
)
inlinevirtual

Handle unsigned integer values (g102)

Parameters
infoGroup/variation and qualifier information
valuesiterator of values from the response
Note
This method has a default implementation that does nothing

◆ handle_variation_list_attr()

virtual void dnp3::ReadHandler::handle_variation_list_attr ( const HeaderInfo info,
VariationListAttr  attr,
uint8_t  set,
uint8_t  variation,
AttrItemIter value 
)
inlinevirtual

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
Note
This method has a default implementation that does nothing

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