![]() |
dnp3 (C++ API) 1.6.0
|
Dynamic information required by the outstation from the user application. More...
#include <dnp3.hpp>
Public Member Functions | |
| virtual uint16_t | get_processing_delay_ms ()=0 |
| Returns the DELAY_MEASUREMENT delay. More... | |
| virtual WriteTimeResult | write_absolute_time (uint64_t time)=0 |
| Handle a write of the absolute time during time synchronization procedures. More... | |
| virtual ApplicationIin | get_application_iin ()=0 |
| Returns the application-controlled IIN bits. More... | |
| virtual RestartDelay | cold_restart ()=0 |
| Request that the outstation perform a cold restart (IEEE-1815 2012, p. 58) More... | |
| virtual RestartDelay | warm_restart ()=0 |
| Request that the outstation perform a warm restart (IEEE-1815 2012, p. 58) More... | |
| virtual FreezeResult | freeze_counters_all (FreezeType freeze_type, DatabaseHandle &database_handle) |
| Freeze all the counters. More... | |
| virtual FreezeResult | freeze_counters_all_at_time (DatabaseHandle &database_handle, uint64_t time, uint32_t interval) |
| Freeze all the counters at a requested time and interval. More... | |
| virtual FreezeResult | freeze_counters_range (uint16_t start, uint16_t stop, FreezeType freeze_type, DatabaseHandle &database_handle) |
| Freeze a range of counters. More... | |
| virtual FreezeResult | freeze_counters_range_at_time (uint16_t start, uint16_t stop, DatabaseHandle &database_handle, uint64_t time, uint32_t interval) |
| Freeze a range of counters at a requested time and interval. More... | |
| virtual bool | support_write_analog_dead_bands () |
| Controls outstation support for writing group 34, analog input dead-bands. More... | |
| virtual void | begin_write_analog_dead_bands () |
| Called when the outstation begins processing a header to write analog dead-bands. More... | |
| virtual void | write_analog_dead_band (uint16_t index, double dead_band) |
| Called when the outstation begins processing a header to write analog dead-bands. More... | |
| virtual void | end_write_analog_dead_bands () |
| Called when the outstation completes processing a header to write analog dead-bands. More... | |
| virtual bool | write_string_attr (uint8_t set, uint8_t variation, StringAttr attr_type, const char *value) |
| Write a string attribute. This method is only called if the corresponding attribute has been configured as writable. More... | |
| virtual bool | write_float_attr (uint8_t set, uint8_t variation, FloatAttr attr_type, float value) |
| Write a 32-bit floating point attribute. This method is only called if the corresponding attribute has been configured as writable. More... | |
| virtual bool | write_double_attr (uint8_t set, uint8_t variation, FloatAttr attr_type, double value) |
| Write a 64-bit floating point attribute. This method is only called if the corresponding attribute has been configured as writable. More... | |
| virtual bool | write_uint_attr (uint8_t set, uint8_t variation, UintAttr attr_type, uint32_t value) |
| Write an unsigned integer attribute. This method is only called if the corresponding attribute has been configured as writable. More... | |
| virtual bool | write_int_attr (uint8_t set, uint8_t variation, IntAttr attr_type, int32_t value) |
| Write a signed integer attribute. This method is only called if the corresponding attribute has been configured as writable. More... | |
| virtual bool | write_octet_string_attr (uint8_t set, uint8_t variation, OctetStringAttr attr_type, ByteIterator &value) |
| Write an octet-string attribute. This method is only called if the corresponding attribute has been configured as writable. More... | |
| virtual bool | write_bit_string_attr (uint8_t set, uint8_t variation, BitStringAttr attr_type, ByteIterator &value) |
| Write a bit-string attribute. This method is only called if the corresponding attribute has been configured as writable. More... | |
| virtual bool | write_time_attr (uint8_t set, uint8_t variation, TimeAttr attr_type, uint64_t value) |
| Write a DNP3 time attribute. This method is only called if the corresponding attribute has been configured as writable. More... | |
| virtual void | begin_confirm () |
| Called when a CONFIRM is received to a response or unsolicited response, but before any previously transmitted events are cleared from the buffer. More... | |
| virtual void | event_cleared (uint64_t id) |
| Called when an event is cleared from the buffer due to master acknowledgement. More... | |
| virtual void | end_confirm (const BufferState &state) |
| Called when all relevant events have been cleared. More... | |
Dynamic information required by the outstation from the user application.
|
inlinevirtual |
Called when a CONFIRM is received to a response or unsolicited response, but before any previously transmitted events are cleared from the buffer.
|
inlinevirtual |
Called when the outstation begins processing a header to write analog dead-bands.
|
pure virtual |
Request that the outstation perform a cold restart (IEEE-1815 2012, p. 58)
The outstation will not automatically restart. It is the responsibility of the user application to handle this request and take the appropriate action.
|
inlinevirtual |
Called when all relevant events have been cleared.
| state | information about the post-CONFIRM state of the buffer |
|
inlinevirtual |
Called when the outstation completes processing a header to write analog dead-bands.
Multiple dead-bands changes can be accumulated in calls to OutstationApplication::write_analog_dead_band() and then be processed as a batch in this method.
|
inlinevirtual |
Called when an event is cleared from the buffer due to master acknowledgement.
| id | Unique identifier previously assigned to the event by the database in an update method |
|
inlinevirtual |
Freeze all the counters.
| freeze_type | Type of freeze operation |
| database_handle | Database handle |
|
inlinevirtual |
Freeze all the counters at a requested time and interval.
Refer to the table on page 57 of IEEE 1815-2012 to interpret the time and interval parameters correctly
| database_handle | Database handle |
| time | 48-bit DNP3 timestamp in milliseconds since epoch UTC |
| interval | Count of milliseconds representing the interval between freezes relative to the timestamp |
|
inlinevirtual |
Freeze a range of counters.
| start | Start index to freeze (inclusive) |
| stop | Stop index to freeze (inclusive) |
| freeze_type | Type of freeze operation |
| database_handle | Database handle |
|
inlinevirtual |
Freeze a range of counters at a requested time and interval.
Refer to the table on page 57 of IEEE 1815-2012 to interpret the time and interval parameters correctly
| start | Start index to freeze (inclusive) |
| stop | Stop index to freeze (inclusive) |
| database_handle | Database handle |
| time | 48-bit DNP3 timestamp in milliseconds since epoch UTC |
| interval | Count of milliseconds representing the interval between freezes relative to the timestamp |
|
pure virtual |
Returns the application-controlled IIN bits.
|
pure virtual |
Returns the DELAY_MEASUREMENT delay.
The value returned by this method is used in conjunction with the DELAY_MEASUREMENT function code and returned in a g52v2 time delay object as part of a non-LAN time synchronization procedure.
It represents the processing delay from receiving the request to sending the response. This parameter should almost always use the default value of zero as only an RTOS or bare metal system would have access to this level of timing. Modern hardware can almost always respond in less than 1 millisecond anyway.
For more information, see IEEE-1815 2012, p. 64.
|
inlinevirtual |
Controls outstation support for writing group 34, analog input dead-bands.
Returning false, indicates that the writes to group34 should not be processed and requests to do so should be rejected with IIN2.NO_FUNC_CODE_SUPPORT
Returning true will allow the request to process the actual values with a sequence of calls:
1) A single call to OutstationApplication::begin_write_analog_dead_bands()
2) Zero or more calls to OutstationApplication::write_analog_dead_band()
3) A single call to OutstationApplication::end_write_analog_dead_bands()
|
pure virtual |
Request that the outstation perform a warm restart (IEEE-1815 2012, p. 58)
The outstation will not automatically restart. It is the responsibility of the user application to handle this request and take the appropriate action.
|
pure virtual |
Handle a write of the absolute time during time synchronization procedures.
| time | Received time in milliseconds since EPOCH (only 48 bits are used) |
|
inlinevirtual |
Called when the outstation begins processing a header to write analog dead-bands.
Called for each analog dead-band in the write request where an analog input is defined at the specified index.
The dead-band is automatically updated in the database. This callback allows application code to persist the modified value to non-volatile memory if desired
| index | Index of the analog input |
| dead_band | New dead-band value |
|
inlinevirtual |
Write a bit-string attribute. This method is only called if the corresponding attribute has been configured as writable.
| set | Set to which the attribute belongs |
| variation | Variation of the attribute |
| attr_type | Enumeration describing which attribute it is, possibly unknown |
| value | Iterator over bytes of the value |
|
inlinevirtual |
Write a 64-bit floating point attribute. This method is only called if the corresponding attribute has been configured as writable.
| set | Set to which the attribute belongs |
| variation | Variation of the attribute |
| attr_type | Enumeration describing which attribute it is, possibly unknown |
| value | Value of the attribute |
|
inlinevirtual |
Write a 32-bit floating point attribute. This method is only called if the corresponding attribute has been configured as writable.
| set | Set to which the attribute belongs |
| variation | Variation of the attribute |
| attr_type | Enumeration describing which attribute it is, possibly unknown |
| value | Value of the attribute |
|
inlinevirtual |
Write a signed integer attribute. This method is only called if the corresponding attribute has been configured as writable.
| set | Set to which the attribute belongs |
| variation | Variation of the attribute |
| attr_type | Enumeration describing which attribute it is, possibly unknown |
| value | Value of the attribute |
|
inlinevirtual |
Write an octet-string attribute. This method is only called if the corresponding attribute has been configured as writable.
| set | Set to which the attribute belongs |
| variation | Variation of the attribute |
| attr_type | Enumeration describing which attribute it is, possibly unknown |
| value | Iterator over bytes of the value |
|
inlinevirtual |
Write a string attribute. This method is only called if the corresponding attribute has been configured as writable.
| set | Set to which the attribute belongs |
| variation | Variation of the attribute |
| attr_type | Enumeration describing which attribute it is, possibly unknown |
| value | Value of the attribute |
|
inlinevirtual |
Write a DNP3 time attribute. This method is only called if the corresponding attribute has been configured as writable.
| set | Set to which the attribute belongs |
| variation | Variation of the attribute |
| attr_type | Enumeration describing which attribute it is, possibly unknown |
| value | 48-bit DNP3 timestamp value |
|
inlinevirtual |
Write an unsigned integer attribute. This method is only called if the corresponding attribute has been configured as writable.
| set | Set to which the attribute belongs |
| variation | Variation of the attribute |
| attr_type | Enumeration describing which attribute it is, possibly unknown |
| value | Value of the attribute |