![]() |
dnp3 (C API) 1.6.0
|
Dynamic information required by the outstation from the user application. More...
#include <dnp3.h>
Data Fields | |
| uint16_t(* | get_processing_delay_ms )(void *) |
| Returns the DELAY_MEASUREMENT delay. More... | |
| dnp3_write_time_result_t(* | write_absolute_time )(uint64_t, void *) |
| Handle a write of the absolute time during time synchronization procedures. More... | |
| dnp3_application_iin_t(* | get_application_iin )(void *) |
| Returns the application-controlled IIN bits. More... | |
| dnp3_restart_delay_t(* | cold_restart )(void *) |
| Request that the outstation perform a cold restart (IEEE-1815 2012, p. 58) More... | |
| dnp3_restart_delay_t(* | warm_restart )(void *) |
| Request that the outstation perform a warm restart (IEEE-1815 2012, p. 58) More... | |
| dnp3_freeze_result_t(* | freeze_counters_all )(dnp3_freeze_type_t, dnp3_database_handle_t *, void *) |
| Freeze all the counters. More... | |
| dnp3_freeze_result_t(* | freeze_counters_all_at_time )(dnp3_database_handle_t *, uint64_t, uint32_t, void *) |
| Freeze all the counters at a requested time and interval. More... | |
| dnp3_freeze_result_t(* | freeze_counters_range )(uint16_t, uint16_t, dnp3_freeze_type_t, dnp3_database_handle_t *, void *) |
| Freeze a range of counters. More... | |
| dnp3_freeze_result_t(* | freeze_counters_range_at_time )(uint16_t, uint16_t, dnp3_database_handle_t *, uint64_t, uint32_t, void *) |
| Freeze a range of counters at a requested time and interval. More... | |
| bool(* | support_write_analog_dead_bands )(void *) |
| Controls outstation support for writing group 34, analog input dead-bands. More... | |
| void(* | begin_write_analog_dead_bands )(void *) |
| Called when the outstation begins processing a header to write analog dead-bands. More... | |
| void(* | write_analog_dead_band )(uint16_t, double, void *) |
| Called when the outstation begins processing a header to write analog dead-bands. More... | |
| void(* | end_write_analog_dead_bands )(void *) |
| Called when the outstation completes processing a header to write analog dead-bands. More... | |
| bool(* | write_string_attr )(uint8_t, uint8_t, dnp3_string_attr_t, const char *, void *) |
| Write a string attribute. This method is only called if the corresponding attribute has been configured as writable. More... | |
| bool(* | write_float_attr )(uint8_t, uint8_t, dnp3_float_attr_t, float, void *) |
| Write a 32-bit floating point attribute. This method is only called if the corresponding attribute has been configured as writable. More... | |
| bool(* | write_double_attr )(uint8_t, uint8_t, dnp3_float_attr_t, double, void *) |
| Write a 64-bit floating point attribute. This method is only called if the corresponding attribute has been configured as writable. More... | |
| bool(* | write_uint_attr )(uint8_t, uint8_t, dnp3_uint_attr_t, uint32_t, void *) |
| Write an unsigned integer attribute. This method is only called if the corresponding attribute has been configured as writable. More... | |
| bool(* | write_int_attr )(uint8_t, uint8_t, dnp3_int_attr_t, int32_t, void *) |
| Write a signed integer attribute. This method is only called if the corresponding attribute has been configured as writable. More... | |
| bool(* | write_octet_string_attr )(uint8_t, uint8_t, dnp3_octet_string_attr_t, dnp3_byte_iterator_t *, void *) |
| Write an octet-string attribute. This method is only called if the corresponding attribute has been configured as writable. More... | |
| bool(* | write_bit_string_attr )(uint8_t, uint8_t, dnp3_bit_string_attr_t, dnp3_byte_iterator_t *, void *) |
| Write a bit-string attribute. This method is only called if the corresponding attribute has been configured as writable. More... | |
| bool(* | write_time_attr )(uint8_t, uint8_t, dnp3_time_attr_t, uint64_t, void *) |
| Write a DNP3 time attribute. This method is only called if the corresponding attribute has been configured as writable. More... | |
| void(* | begin_confirm )(void *) |
| Called when a CONFIRM is received to a response or unsolicited response, but before any previously transmitted events are cleared from the buffer. More... | |
| void(* | event_cleared )(uint64_t, void *) |
| Called when an event is cleared from the buffer due to master acknowledgement. More... | |
| void(* | end_confirm )(dnp3_buffer_state_t, void *) |
| Called when all relevant events have been cleared. More... | |
| void(* | on_destroy )(void *arg) |
| Callback when the underlying owner doesn't need the interface anymore. More... | |
| void * | ctx |
| Context data. More... | |
Dynamic information required by the outstation from the user application.
| void(* dnp3_outstation_application_t::begin_confirm) (void *) |
Called when a CONFIRM is received to a response or unsolicited response, but before any previously transmitted events are cleared from the buffer.
| ctx | Context data |
| void(* dnp3_outstation_application_t::begin_write_analog_dead_bands) (void *) |
Called when the outstation begins processing a header to write analog dead-bands.
| ctx | Context data |
| dnp3_restart_delay_t(* dnp3_outstation_application_t::cold_restart) (void *) |
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.
| ctx | Context data |
| void* dnp3_outstation_application_t::ctx |
Context data.
| void(* dnp3_outstation_application_t::end_confirm) (dnp3_buffer_state_t, void *) |
Called when all relevant events have been cleared.
| state | information about the post-CONFIRM state of the buffer |
| ctx | Context data |
| void(* dnp3_outstation_application_t::end_write_analog_dead_bands) (void *) |
Called when the outstation completes processing a header to write analog dead-bands.
Multiple dead-bands changes can be accumulated in calls to dnp3_outstation_application_t::write_analog_dead_band and then be processed as a batch in this method.
| ctx | Context data |
| void(* dnp3_outstation_application_t::event_cleared) (uint64_t, void *) |
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 |
| ctx | Context data |
| dnp3_freeze_result_t(* dnp3_outstation_application_t::freeze_counters_all) (dnp3_freeze_type_t, dnp3_database_handle_t *, void *) |
Freeze all the counters.
| freeze_type | Type of freeze operation |
| database_handle | Database handle |
| ctx | Context data |
| dnp3_freeze_result_t(* dnp3_outstation_application_t::freeze_counters_all_at_time) (dnp3_database_handle_t *, uint64_t, uint32_t, void *) |
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 |
| ctx | Context data |
| dnp3_freeze_result_t(* dnp3_outstation_application_t::freeze_counters_range) (uint16_t, uint16_t, dnp3_freeze_type_t, dnp3_database_handle_t *, void *) |
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 |
| ctx | Context data |
| dnp3_freeze_result_t(* dnp3_outstation_application_t::freeze_counters_range_at_time) (uint16_t, uint16_t, dnp3_database_handle_t *, uint64_t, uint32_t, void *) |
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 |
| ctx | Context data |
| dnp3_application_iin_t(* dnp3_outstation_application_t::get_application_iin) (void *) |
Returns the application-controlled IIN bits.
| ctx | Context data |
| uint16_t(* dnp3_outstation_application_t::get_processing_delay_ms) (void *) |
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.
| ctx | Context data |
| void(* dnp3_outstation_application_t::on_destroy) (void *arg) |
Callback when the underlying owner doesn't need the interface anymore.
| arg | Context data |
| bool(* dnp3_outstation_application_t::support_write_analog_dead_bands) (void *) |
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 dnp3_outstation_application_t::begin_write_analog_dead_bands
2) Zero or more calls to dnp3_outstation_application_t::write_analog_dead_band
3) A single call to dnp3_outstation_application_t::end_write_analog_dead_bands
| ctx | Context data |
| dnp3_restart_delay_t(* dnp3_outstation_application_t::warm_restart) (void *) |
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.
| ctx | Context data |
| dnp3_write_time_result_t(* dnp3_outstation_application_t::write_absolute_time) (uint64_t, void *) |
Handle a write of the absolute time during time synchronization procedures.
| time | Received time in milliseconds since EPOCH (only 48 bits are used) |
| ctx | Context data |
| void(* dnp3_outstation_application_t::write_analog_dead_band) (uint16_t, double, void *) |
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 |
| ctx | Context data |
| bool(* dnp3_outstation_application_t::write_bit_string_attr) (uint8_t, uint8_t, dnp3_bit_string_attr_t, dnp3_byte_iterator_t *, void *) |
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 |
| ctx | Context data |
| bool(* dnp3_outstation_application_t::write_double_attr) (uint8_t, uint8_t, dnp3_float_attr_t, double, void *) |
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 |
| ctx | Context data |
| bool(* dnp3_outstation_application_t::write_float_attr) (uint8_t, uint8_t, dnp3_float_attr_t, float, void *) |
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 |
| ctx | Context data |
| bool(* dnp3_outstation_application_t::write_int_attr) (uint8_t, uint8_t, dnp3_int_attr_t, int32_t, void *) |
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 |
| ctx | Context data |
| bool(* dnp3_outstation_application_t::write_octet_string_attr) (uint8_t, uint8_t, dnp3_octet_string_attr_t, dnp3_byte_iterator_t *, void *) |
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 |
| ctx | Context data |
| bool(* dnp3_outstation_application_t::write_string_attr) (uint8_t, uint8_t, dnp3_string_attr_t, const char *, void *) |
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 |
| ctx | Context data |
| bool(* dnp3_outstation_application_t::write_time_attr) (uint8_t, uint8_t, dnp3_time_attr_t, uint64_t, void *) |
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 |
| ctx | Context data |
| bool(* dnp3_outstation_application_t::write_uint_attr) (uint8_t, uint8_t, dnp3_uint_attr_t, uint32_t, void *) |
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 |
| ctx | Context data |