dnp3  0.9.0
Classes | Macros | Typedefs | Enumerations | Functions
dnp3.h File Reference
#include <stdbool.h>
#include <stdint.h>

Go to the source code of this file.

Classes

struct  dnp3_logging_config_t
 Logging configuration options. More...
 
struct  dnp3_logger_t
 Logging interface that receives the log messages and writes them somewhere. More...
 
struct  dnp3_decode_level_t
 Controls the decoding of transmitted and received data at the application, transport, link, and physical layers. More...
 
struct  dnp3_runtime_config_t
 Runtime configuration. More...
 
struct  dnp3_control_t
 APDU Control field. More...
 
struct  dnp3_control_code_t
 CROB (dnp3_g12v1_t) control code. More...
 
struct  dnp3_g12v1_t
 Control Relay Output Block. More...
 
struct  dnp3_flags_t
 Collection of individual flag bits represented by an underlying mask value. More...
 
struct  dnp3_timestamp_t
 Timestamp value. More...
 
struct  dnp3_binary_t
 Binary point. More...
 
struct  dnp3_double_bit_binary_t
 DoubleBitBinary point. More...
 
struct  dnp3_binary_output_status_t
 BinaryOutputStatus point. More...
 
struct  dnp3_counter_t
 Counter point. More...
 
struct  dnp3_frozen_counter_t
 FrozenCounter point. More...
 
struct  dnp3_analog_t
 Analog point. More...
 
struct  dnp3_analog_output_status_t
 AnalogOutputStatus point. More...
 
struct  dnp3_byte_t
 Single byte struct. More...
 
struct  dnp3_octet_string_t
 Octet String point. More...
 
struct  dnp3_port_state_listener_t
 Callback interface for receiving updates about the state of a serial port. More...
 
struct  dnp3_retry_strategy_t
 Retry strategy configuration. More...
 
struct  dnp3_serial_port_settings_t
 Serial port settings. More...
 
struct  dnp3_iin1_t
 First IIN byte. More...
 
struct  dnp3_iin2_t
 Second IIN byte. More...
 
struct  dnp3_iin_t
 Pair of IIN bytes. More...
 
struct  dnp3_response_header_t
 Response header information. More...
 
struct  dnp3_header_info_t
 Object header information. More...
 
struct  dnp3_read_handler_t
 General handler that will receive all values read from the outstation. More...
 
struct  dnp3_master_channel_config_t
 Generic configuration for a MasterChannel. More...
 
struct  dnp3_client_state_listener_t
 Callback for monitoring the client TCP connection state. More...
 
struct  dnp3_connect_strategy_t
 Timing parameters for connection attempts. More...
 
struct  dnp3_association_id_t
 Association identifier. More...
 
struct  dnp3_poll_id_t
 Poll identifier. More...
 
struct  dnp3_event_classes_t
 Event classes. More...
 
struct  dnp3_classes_t
 Class 0, 1, 2 and 3 config. More...
 
struct  dnp3_association_config_t
 Association configuration. More...
 
struct  dnp3_timestamp_utc_t
 Timestamp value returned by dnp3_association_handler_t::get_current_time. More...
 
struct  dnp3_association_handler_t
 Callbacks for a particular outstation association. More...
 
struct  dnp3_read_task_callback_t
 Handler for read tasks. More...
 
struct  dnp3_command_task_callback_t
 Handler for command tasks. More...
 
struct  dnp3_time_sync_task_callback_t
 Handler for time synchronization tasks. More...
 
struct  dnp3_restart_result_t
 Result of a restart task. More...
 
struct  dnp3_restart_task_callback_t
 Handler for restart tasks. More...
 
struct  dnp3_link_status_callback_t
 Handler for link status check. More...
 
struct  dnp3_update_options_t
 Options that control how the update is performed. More...
 
struct  dnp3_binary_config_t
 Binary Input configuration. More...
 
struct  dnp3_double_bit_binary_config_t
 Double-Bit Binary Input configuration. More...
 
struct  dnp3_binary_output_status_config_t
 Binary Output Status configuration. More...
 
struct  dnp3_counter_config_t
 Counter configuration. More...
 
struct  dnp3_frozen_counter_config_t
 Frozen Counter configuration. More...
 
struct  dnp3_analog_config_t
 Analog configuration. More...
 
struct  dnp3_analog_output_status_config_t
 Analog Output Status configuration. More...
 
struct  dnp3_class_zero_config_t
 Controls which types are reported during a Class 0 read. More...
 
struct  dnp3_outstation_features_t
 Optional outstation features that can be enabled or disabled. More...
 
struct  dnp3_outstation_config_t
 Outstation configuration. More...
 
struct  dnp3_event_buffer_config_t
 Maximum number of events for each type. More...
 
struct  dnp3_application_iin_t
 Application-controlled IIN bits. More...
 
struct  dnp3_restart_delay_t
 Restart delay used by dnp3_outstation_application_t::cold_restart and dnp3_outstation_application_t::warm_restart. More...
 
struct  dnp3_outstation_application_t
 Dynamic information required by the outstation from the user application. More...
 
struct  dnp3_request_header_t
 Application-layer header for requests. More...
 
struct  dnp3_outstation_information_t
 Informational callbacks that the outstation doesn't rely on to function. More...
 
struct  dnp3_control_handler_t
 Callbacks for handling controls. More...
 
struct  dnp3_connection_state_listener_t
 Callback interface for connection state events. More...
 
struct  dnp3_outstation_transaction_t
 Outstation transaction interface. More...
 

Macros

#define DNP3_VERSION_MAJOR   0
 
#define DNP3_VERSION_MINOR   9
 
#define DNP3_VERSION_PATCH   0
 
#define DNP3_VERSION_STRING   "0.9.0"
 
#define DNP3_FLAG_ONLINE   0x01
 Object value is 'good' / 'valid' / 'nominal'.
 
#define DNP3_FLAG_RESTART   0x02
 Object value has not been updated since device restart.
 
#define DNP3_FLAG_COMM_LOST   0x04
 Object value represents the last value available before a communication failure occurred. Should never be set by originating devices.
 
#define DNP3_FLAG_REMOTE_FORCED   0x08
 Object value is overridden in a downstream reporting device.
 
#define DNP3_FLAG_LOCAL_FORCED   0x10
 Object value is overridden by the device reporting this flag.
 
#define DNP3_FLAG_CHATTER_FILTER   0x20
 Object value is changing state rapidly (device dependent meaning)
 
#define DNP3_FLAG_OVER_RANGE   0x20
 Object's true exceeds the measurement range of the reported variation.
 
#define DNP3_FLAG_DISCONTINUITY   0x40
 Reported counter value cannot be compared against a prior value to obtain the correct count difference.
 
#define DNP3_FLAG_REFERENCE_ERR   0x40
 Object's value might not have the expected level of accuracy.
 

Typedefs

typedef enum dnp3_param_error_t dnp3_param_error_t
 Error type used throughout the library.
 
typedef enum dnp3_log_level_t dnp3_log_level_t
 Log level. More...
 
typedef enum dnp3_time_format_t dnp3_time_format_t
 Describes if and how the time will be formatted in log messages.
 
typedef enum dnp3_log_output_format_t dnp3_log_output_format_t
 Describes how each log event is formatted.
 
typedef struct dnp3_logging_config_t dnp3_logging_config_t
 Logging configuration options.
 
typedef struct dnp3_logger_t dnp3_logger_t
 Logging interface that receives the log messages and writes them somewhere.
 
typedef enum dnp3_app_decode_level_t dnp3_app_decode_level_t
 Controls how transmitted and received application-layer fragments are decoded at the INFO log level.
 
typedef enum dnp3_transport_decode_level_t dnp3_transport_decode_level_t
 Controls how transmitted and received transport segments are decoded at the INFO log level.
 
typedef enum dnp3_link_decode_level_t dnp3_link_decode_level_t
 Controls how transmitted and received link frames are decoded at the INFO log level.
 
typedef enum dnp3_phys_decode_level_t dnp3_phys_decode_level_t
 Controls how data transmitted at the physical layer (TCP, serial, etc) is logged.
 
typedef struct dnp3_decode_level_t dnp3_decode_level_t
 Controls the decoding of transmitted and received data at the application, transport, link, and physical layers.
 
typedef struct dnp3_runtime_t dnp3_runtime_t
 Handle to the underlying runtime.
 
typedef struct dnp3_runtime_config_t dnp3_runtime_config_t
 Runtime configuration.
 
typedef struct dnp3_control_t dnp3_control_t
 APDU Control field.
 
typedef enum dnp3_trip_close_code_t dnp3_trip_close_code_t
 Trip-Close Code field, used in conjunction with dnp3_op_type_t to specify a control operation.
 
typedef enum dnp3_op_type_t dnp3_op_type_t
 Operation Type field, used in conjunction with dnp3_trip_close_code_t to specify a control operation.
 
typedef struct dnp3_control_code_t dnp3_control_code_t
 CROB (dnp3_g12v1_t) control code.
 
typedef struct dnp3_g12v1_t dnp3_g12v1_t
 Control Relay Output Block.
 
typedef struct dnp3_flags_t dnp3_flags_t
 Collection of individual flag bits represented by an underlying mask value.
 
typedef enum dnp3_time_quality_t dnp3_time_quality_t
 Timestamp quality.
 
typedef struct dnp3_timestamp_t dnp3_timestamp_t
 Timestamp value.
 
typedef enum dnp3_double_bit_t dnp3_double_bit_t
 Double-bit binary input value.
 
typedef struct dnp3_binary_t dnp3_binary_t
 Binary point.
 
typedef struct dnp3_binary_iterator_t dnp3_binary_iterator_t
 Iterator of dnp3_binary_t. See dnp3_binary_next.
 
typedef struct dnp3_double_bit_binary_t dnp3_double_bit_binary_t
 DoubleBitBinary point.
 
typedef struct dnp3_double_bit_binary_iterator_t dnp3_double_bit_binary_iterator_t
 Iterator of dnp3_double_bit_binary_t. See dnp3_doublebitbinary_next.
 
typedef struct dnp3_binary_output_status_t dnp3_binary_output_status_t
 BinaryOutputStatus point.
 
typedef struct dnp3_binary_output_status_iterator_t dnp3_binary_output_status_iterator_t
 Iterator of dnp3_binary_output_status_t. See dnp3_binaryoutputstatus_next.
 
typedef struct dnp3_counter_t dnp3_counter_t
 Counter point.
 
typedef struct dnp3_counter_iterator_t dnp3_counter_iterator_t
 Iterator of dnp3_counter_t. See dnp3_counter_next.
 
typedef struct dnp3_frozen_counter_t dnp3_frozen_counter_t
 FrozenCounter point.
 
typedef struct dnp3_frozen_counter_iterator_t dnp3_frozen_counter_iterator_t
 Iterator of dnp3_frozen_counter_t. See dnp3_frozencounter_next.
 
typedef struct dnp3_analog_t dnp3_analog_t
 Analog point.
 
typedef struct dnp3_analog_iterator_t dnp3_analog_iterator_t
 Iterator of dnp3_analog_t. See dnp3_analog_next.
 
typedef struct dnp3_analog_output_status_t dnp3_analog_output_status_t
 AnalogOutputStatus point.
 
typedef struct dnp3_analog_output_status_iterator_t dnp3_analog_output_status_iterator_t
 Iterator of dnp3_analog_output_status_t. See dnp3_analogoutputstatus_next.
 
typedef struct dnp3_byte_t dnp3_byte_t
 Single byte struct.
 
typedef struct dnp3_byte_iterator_t dnp3_byte_iterator_t
 Iterator of dnp3_byte_t. See dnp3_byte_next.
 
typedef struct dnp3_octet_string_t dnp3_octet_string_t
 Octet String point.
 
typedef struct dnp3_octet_string_iterator_t dnp3_octet_string_iterator_t
 Iterator of dnp3_octet_string_t. See dnp3_octetstring_next.
 
typedef enum dnp3_port_state_t dnp3_port_state_t
 State of the serial port.
 
typedef struct dnp3_port_state_listener_t dnp3_port_state_listener_t
 Callback interface for receiving updates about the state of a serial port.
 
typedef enum dnp3_variation_t dnp3_variation_t
 Group/Variation.
 
typedef struct dnp3_retry_strategy_t dnp3_retry_strategy_t
 Retry strategy configuration. More...
 
typedef enum dnp3_data_bits_t dnp3_data_bits_t
 Number of bits per character.
 
typedef enum dnp3_flow_control_t dnp3_flow_control_t
 Flow control modes.
 
typedef enum dnp3_parity_t dnp3_parity_t
 Parity checking modes.
 
typedef enum dnp3_stop_bits_t dnp3_stop_bits_t
 Number of stop bits.
 
typedef struct dnp3_serial_port_settings_t dnp3_serial_port_settings_t
 Serial port settings.
 
typedef enum dnp3_link_error_mode_t dnp3_link_error_mode_t
 Controls how errors in parsed link-layer frames are handled. This behavior is configurable for physical layers with built-in error correction like TCP as the connection might be through a terminal server.
 
typedef enum dnp3_response_function_t dnp3_response_function_t
 Type of response.
 
typedef struct dnp3_iin1_t dnp3_iin1_t
 First IIN byte.
 
typedef enum dnp3_iin1_flag_t dnp3_iin1_flag_t
 First IIN bit flags.
 
typedef struct dnp3_iin2_t dnp3_iin2_t
 Second IIN byte.
 
typedef enum dnp3_iin2_flag_t dnp3_iin2_flag_t
 Second IIN bit flags.
 
typedef struct dnp3_iin_t dnp3_iin_t
 Pair of IIN bytes.
 
typedef struct dnp3_response_header_t dnp3_response_header_t
 Response header information.
 
typedef enum dnp3_qualifier_code_t dnp3_qualifier_code_t
 Qualifier code used in the response.
 
typedef struct dnp3_header_info_t dnp3_header_info_t
 Object header information.
 
typedef enum dnp3_read_type_t dnp3_read_type_t
 Describes the source of a read event.
 
typedef struct dnp3_read_handler_t dnp3_read_handler_t
 General handler that will receive all values read from the outstation.
 
typedef struct dnp3_endpoint_list_t dnp3_endpoint_list_t
 List of IP endpoints. More...
 
typedef struct dnp3_master_channel_config_t dnp3_master_channel_config_t
 Generic configuration for a MasterChannel.
 
typedef enum dnp3_client_state_t dnp3_client_state_t
 State of the client connection. More...
 
typedef struct dnp3_client_state_listener_t dnp3_client_state_listener_t
 Callback for monitoring the client TCP connection state.
 
typedef struct dnp3_master_channel_t dnp3_master_channel_t
 Represents a communication channel for a master station. More...
 
typedef struct dnp3_connect_strategy_t dnp3_connect_strategy_t
 Timing parameters for connection attempts.
 
typedef struct dnp3_association_id_t dnp3_association_id_t
 Association identifier. More...
 
typedef struct dnp3_poll_id_t dnp3_poll_id_t
 Poll identifier. More...
 
typedef struct dnp3_event_classes_t dnp3_event_classes_t
 Event classes.
 
typedef struct dnp3_classes_t dnp3_classes_t
 Class 0, 1, 2 and 3 config.
 
typedef enum dnp3_auto_time_sync_t dnp3_auto_time_sync_t
 Automatic time synchronization configuration.
 
typedef struct dnp3_association_config_t dnp3_association_config_t
 Association configuration.
 
typedef struct dnp3_timestamp_utc_t dnp3_timestamp_utc_t
 Timestamp value returned by dnp3_association_handler_t::get_current_time. More...
 
typedef struct dnp3_association_handler_t dnp3_association_handler_t
 Callbacks for a particular outstation association.
 
typedef struct dnp3_request_t dnp3_request_t
 Custom request. More...
 
typedef enum dnp3_read_result_t dnp3_read_result_t
 Result of a read operation.
 
typedef struct dnp3_read_task_callback_t dnp3_read_task_callback_t
 Handler for read tasks.
 
typedef struct dnp3_commands_t dnp3_commands_t
 Builder type used to construct command requests.
 
typedef enum dnp3_command_mode_t dnp3_command_mode_t
 Command operation mode.
 
typedef enum dnp3_command_result_t dnp3_command_result_t
 Result of a command.
 
typedef struct dnp3_command_task_callback_t dnp3_command_task_callback_t
 Handler for command tasks.
 
typedef enum dnp3_time_sync_mode_t dnp3_time_sync_mode_t
 Time synchronization mode.
 
typedef enum dnp3_time_sync_result_t dnp3_time_sync_result_t
 Result of a time sync operation.
 
typedef struct dnp3_time_sync_task_callback_t dnp3_time_sync_task_callback_t
 Handler for time synchronization tasks.
 
typedef enum dnp3_restart_error_t dnp3_restart_error_t
 Result of a restart operation.
 
typedef struct dnp3_restart_result_t dnp3_restart_result_t
 Result of a restart task.
 
typedef struct dnp3_restart_task_callback_t dnp3_restart_task_callback_t
 Handler for restart tasks.
 
typedef enum dnp3_link_status_result_t dnp3_link_status_result_t
 Result of a link status check. See dnp3_master_channel_check_link_status.
 
typedef struct dnp3_link_status_callback_t dnp3_link_status_callback_t
 Handler for link status check.
 
typedef struct dnp3_database_t dnp3_database_t
 Internal database access. More...
 
typedef enum dnp3_event_class_t dnp3_event_class_t
 Event class.
 
typedef enum dnp3_event_mode_t dnp3_event_mode_t
 Controls how events are processed when updating values in the database.
 
typedef struct dnp3_update_options_t dnp3_update_options_t
 Options that control how the update is performed. More...
 
typedef enum dnp3_static_binary_variation_t dnp3_static_binary_variation_t
 Static binary input variation.
 
typedef enum dnp3_event_binary_variation_t dnp3_event_binary_variation_t
 Event binary input variation.
 
typedef struct dnp3_binary_config_t dnp3_binary_config_t
 Binary Input configuration.
 
typedef enum dnp3_static_double_bit_binary_variation_t dnp3_static_double_bit_binary_variation_t
 Static double-bit binary input variation.
 
typedef enum dnp3_event_double_bit_binary_variation_t dnp3_event_double_bit_binary_variation_t
 Event double-bit binary input variation.
 
typedef struct dnp3_double_bit_binary_config_t dnp3_double_bit_binary_config_t
 Double-Bit Binary Input configuration.
 
typedef enum dnp3_static_binary_output_status_variation_t dnp3_static_binary_output_status_variation_t
 Static binary output status variation.
 
typedef enum dnp3_event_binary_output_status_variation_t dnp3_event_binary_output_status_variation_t
 Event binary output status variation.
 
typedef struct dnp3_binary_output_status_config_t dnp3_binary_output_status_config_t
 Binary Output Status configuration.
 
typedef enum dnp3_static_counter_variation_t dnp3_static_counter_variation_t
 Static counter variation.
 
typedef enum dnp3_event_counter_variation_t dnp3_event_counter_variation_t
 Event counter variation.
 
typedef struct dnp3_counter_config_t dnp3_counter_config_t
 Counter configuration.
 
typedef enum dnp3_static_frozen_counter_variation_t dnp3_static_frozen_counter_variation_t
 Static frozen counter variation.
 
typedef enum dnp3_event_frozen_counter_variation_t dnp3_event_frozen_counter_variation_t
 Event frozen counter variation.
 
typedef struct dnp3_frozen_counter_config_t dnp3_frozen_counter_config_t
 Frozen Counter configuration.
 
typedef enum dnp3_static_analog_variation_t dnp3_static_analog_variation_t
 Static analog variation.
 
typedef enum dnp3_event_analog_variation_t dnp3_event_analog_variation_t
 Event analog variation.
 
typedef struct dnp3_analog_config_t dnp3_analog_config_t
 Analog configuration.
 
typedef enum dnp3_static_analog_output_status_variation_t dnp3_static_analog_output_status_variation_t
 Static analog output status variation.
 
typedef enum dnp3_event_analog_output_status_variation_t dnp3_event_analog_output_status_variation_t
 Event analog output status variation.
 
typedef struct dnp3_analog_output_status_config_t dnp3_analog_output_status_config_t
 Analog Output Status configuration.
 
typedef struct dnp3_octet_string_value_t dnp3_octet_string_value_t
 Collection of uint8_t. See dnp3_octet_string_add and dnp3_octet_string_destroy.
 
typedef struct dnp3_class_zero_config_t dnp3_class_zero_config_t
 Controls which types are reported during a Class 0 read.
 
typedef struct dnp3_outstation_features_t dnp3_outstation_features_t
 Optional outstation features that can be enabled or disabled.
 
typedef struct dnp3_outstation_config_t dnp3_outstation_config_t
 Outstation configuration.
 
typedef struct dnp3_event_buffer_config_t dnp3_event_buffer_config_t
 Maximum number of events for each type. More...
 
typedef enum dnp3_restart_delay_type_t dnp3_restart_delay_type_t
 Type of restart delay value. Used by dnp3_restart_delay_t.
 
typedef struct dnp3_application_iin_t dnp3_application_iin_t
 Application-controlled IIN bits.
 
typedef struct dnp3_restart_delay_t dnp3_restart_delay_t
 Restart delay used by dnp3_outstation_application_t::cold_restart and dnp3_outstation_application_t::warm_restart. More...
 
typedef enum dnp3_write_time_result_t dnp3_write_time_result_t
 Write time result used by dnp3_outstation_application_t::write_absolute_time.
 
typedef enum dnp3_freeze_type_t dnp3_freeze_type_t
 Freeze operation type.
 
typedef enum dnp3_freeze_result_t dnp3_freeze_result_t
 Result of a freeze operation.
 
typedef struct dnp3_outstation_application_t dnp3_outstation_application_t
 Dynamic information required by the outstation from the user application.
 
typedef enum dnp3_function_code_t dnp3_function_code_t
 Application layer function code.
 
typedef struct dnp3_request_header_t dnp3_request_header_t
 Application-layer header for requests.
 
typedef enum dnp3_broadcast_action_t dnp3_broadcast_action_t
 Enumeration describing how the outstation processed a broadcast request.
 
typedef struct dnp3_outstation_information_t dnp3_outstation_information_t
 Informational callbacks that the outstation doesn't rely on to function. More...
 
typedef enum dnp3_command_status_t dnp3_command_status_t
 Enumeration received from an outstation in response to command request.
 
typedef enum dnp3_operate_type_t dnp3_operate_type_t
 Enumeration describing how the master requested the control operation.
 
typedef struct dnp3_control_handler_t dnp3_control_handler_t
 Callbacks for handling controls.
 
typedef enum dnp3_connection_state_t dnp3_connection_state_t
 Outstation connection state for connection-oriented transports, e.g. TCP.
 
typedef struct dnp3_connection_state_listener_t dnp3_connection_state_listener_t
 Callback interface for connection state events.
 
typedef struct dnp3_outstation_transaction_t dnp3_outstation_transaction_t
 Outstation transaction interface.
 
typedef struct dnp3_outstation_t dnp3_outstation_t
 Outstation handle. More...
 
typedef struct dnp3_address_filter_t dnp3_address_filter_t
 Outstation address filter.
 
typedef struct dnp3_tcp_server_t dnp3_tcp_server_t
 TCP server that listens for connections and routes the messages to outstations. More...
 

Enumerations

enum  dnp3_param_error_t {
  DNP3_PARAM_ERROR_OK = 0, DNP3_PARAM_ERROR_NULL_PARAMETER = 1, DNP3_PARAM_ERROR_ASSOCIATION_DOES_NOT_EXIST = 2, DNP3_PARAM_ERROR_ASSOCIATION_DUPLICATE_ADDRESS = 3,
  DNP3_PARAM_ERROR_INVALID_SOCKET_ADDRESS = 4, DNP3_PARAM_ERROR_INVALID_DNP3_ADDRESS = 5, DNP3_PARAM_ERROR_INVALID_BUFFER_SIZE = 6, DNP3_PARAM_ERROR_ADDRESS_FILTER_CONFLICT = 7,
  DNP3_PARAM_ERROR_SERVER_ALREADY_STARTED = 8, DNP3_PARAM_ERROR_SERVER_BIND_ERROR = 9, DNP3_PARAM_ERROR_MASTER_ALREADY_SHUTDOWN = 10, DNP3_PARAM_ERROR_RUNTIME_CREATION_FAILURE = 11,
  DNP3_PARAM_ERROR_RUNTIME_DESTROYED = 12, DNP3_PARAM_ERROR_RUNTIME_CANNOT_BLOCK_WITHIN_ASYNC = 13, DNP3_PARAM_ERROR_LOGGING_ALREADY_CONFIGURED = 14, DNP3_PARAM_ERROR_POINT_DOES_NOT_EXIST = 15
}
 Error type used throughout the library. More...
 
enum  dnp3_log_level_t {
  DNP3_LOG_LEVEL_ERROR = 0, DNP3_LOG_LEVEL_WARN = 1, DNP3_LOG_LEVEL_INFO = 2, DNP3_LOG_LEVEL_DEBUG = 3,
  DNP3_LOG_LEVEL_TRACE = 4
}
 Log level. More...
 
enum  dnp3_time_format_t { DNP3_TIME_FORMAT_NONE = 0, DNP3_TIME_FORMAT_RFC3339 = 1, DNP3_TIME_FORMAT_SYSTEM = 2 }
 Describes if and how the time will be formatted in log messages. More...
 
enum  dnp3_log_output_format_t { DNP3_LOG_OUTPUT_FORMAT_TEXT = 0, DNP3_LOG_OUTPUT_FORMAT_JSON = 1 }
 Describes how each log event is formatted. More...
 
enum  dnp3_app_decode_level_t { DNP3_APP_DECODE_LEVEL_NOTHING = 0, DNP3_APP_DECODE_LEVEL_HEADER = 1, DNP3_APP_DECODE_LEVEL_OBJECT_HEADERS = 2, DNP3_APP_DECODE_LEVEL_OBJECT_VALUES = 3 }
 Controls how transmitted and received application-layer fragments are decoded at the INFO log level. More...
 
enum  dnp3_transport_decode_level_t { DNP3_TRANSPORT_DECODE_LEVEL_NOTHING = 0, DNP3_TRANSPORT_DECODE_LEVEL_HEADER = 1, DNP3_TRANSPORT_DECODE_LEVEL_PAYLOAD = 2 }
 Controls how transmitted and received transport segments are decoded at the INFO log level. More...
 
enum  dnp3_link_decode_level_t { DNP3_LINK_DECODE_LEVEL_NOTHING = 0, DNP3_LINK_DECODE_LEVEL_HEADER = 1, DNP3_LINK_DECODE_LEVEL_PAYLOAD = 2 }
 Controls how transmitted and received link frames are decoded at the INFO log level. More...
 
enum  dnp3_phys_decode_level_t { DNP3_PHYS_DECODE_LEVEL_NOTHING = 0, DNP3_PHYS_DECODE_LEVEL_LENGTH = 1, DNP3_PHYS_DECODE_LEVEL_DATA = 2 }
 Controls how data transmitted at the physical layer (TCP, serial, etc) is logged. More...
 
enum  dnp3_trip_close_code_t { DNP3_TRIP_CLOSE_CODE_NUL = 0, DNP3_TRIP_CLOSE_CODE_CLOSE = 1, DNP3_TRIP_CLOSE_CODE_TRIP = 2, DNP3_TRIP_CLOSE_CODE_RESERVED = 3 }
 Trip-Close Code field, used in conjunction with dnp3_op_type_t to specify a control operation. More...
 
enum  dnp3_op_type_t {
  DNP3_OP_TYPE_NUL = 0, DNP3_OP_TYPE_PULSE_ON = 1, DNP3_OP_TYPE_PULSE_OFF = 2, DNP3_OP_TYPE_LATCH_ON = 3,
  DNP3_OP_TYPE_LATCH_OFF = 4
}
 Operation Type field, used in conjunction with dnp3_trip_close_code_t to specify a control operation. More...
 
enum  dnp3_time_quality_t { DNP3_TIME_QUALITY_SYNCHRONIZED = 0, DNP3_TIME_QUALITY_NOT_SYNCHRONIZED = 1, DNP3_TIME_QUALITY_INVALID = 2 }
 Timestamp quality. More...
 
enum  dnp3_double_bit_t { DNP3_DOUBLE_BIT_INTERMEDIATE = 0, DNP3_DOUBLE_BIT_DETERMINED_OFF = 1, DNP3_DOUBLE_BIT_DETERMINED_ON = 2, DNP3_DOUBLE_BIT_INDETERMINATE = 3 }
 Double-bit binary input value. More...
 
enum  dnp3_port_state_t { DNP3_PORT_STATE_DISABLED = 0, DNP3_PORT_STATE_WAIT = 1, DNP3_PORT_STATE_OPEN = 2, DNP3_PORT_STATE_SHUTDOWN = 3 }
 State of the serial port. More...
 
enum  dnp3_variation_t {
  DNP3_VARIATION_GROUP1_VAR0 = 0, DNP3_VARIATION_GROUP1_VAR1 = 1, DNP3_VARIATION_GROUP1_VAR2 = 2, DNP3_VARIATION_GROUP2_VAR0 = 3,
  DNP3_VARIATION_GROUP2_VAR1 = 4, DNP3_VARIATION_GROUP2_VAR2 = 5, DNP3_VARIATION_GROUP2_VAR3 = 6, DNP3_VARIATION_GROUP3_VAR0 = 7,
  DNP3_VARIATION_GROUP3_VAR1 = 8, DNP3_VARIATION_GROUP3_VAR2 = 9, DNP3_VARIATION_GROUP4_VAR0 = 10, DNP3_VARIATION_GROUP4_VAR1 = 11,
  DNP3_VARIATION_GROUP4_VAR2 = 12, DNP3_VARIATION_GROUP4_VAR3 = 13, DNP3_VARIATION_GROUP10_VAR0 = 14, DNP3_VARIATION_GROUP10_VAR1 = 15,
  DNP3_VARIATION_GROUP10_VAR2 = 16, DNP3_VARIATION_GROUP11_VAR0 = 17, DNP3_VARIATION_GROUP11_VAR1 = 18, DNP3_VARIATION_GROUP11_VAR2 = 19,
  DNP3_VARIATION_GROUP12_VAR0 = 20, DNP3_VARIATION_GROUP12_VAR1 = 21, DNP3_VARIATION_GROUP20_VAR0 = 22, DNP3_VARIATION_GROUP20_VAR1 = 23,
  DNP3_VARIATION_GROUP20_VAR2 = 24, DNP3_VARIATION_GROUP20_VAR5 = 25, DNP3_VARIATION_GROUP20_VAR6 = 26, DNP3_VARIATION_GROUP21_VAR0 = 27,
  DNP3_VARIATION_GROUP21_VAR1 = 28, DNP3_VARIATION_GROUP21_VAR2 = 29, DNP3_VARIATION_GROUP21_VAR5 = 30, DNP3_VARIATION_GROUP21_VAR6 = 31,
  DNP3_VARIATION_GROUP21_VAR9 = 32, DNP3_VARIATION_GROUP21_VAR10 = 33, DNP3_VARIATION_GROUP22_VAR0 = 34, DNP3_VARIATION_GROUP22_VAR1 = 35,
  DNP3_VARIATION_GROUP22_VAR2 = 36, DNP3_VARIATION_GROUP22_VAR5 = 37, DNP3_VARIATION_GROUP22_VAR6 = 38, DNP3_VARIATION_GROUP23_VAR0 = 39,
  DNP3_VARIATION_GROUP23_VAR1 = 40, DNP3_VARIATION_GROUP23_VAR2 = 41, DNP3_VARIATION_GROUP23_VAR5 = 42, DNP3_VARIATION_GROUP23_VAR6 = 43,
  DNP3_VARIATION_GROUP30_VAR0 = 44, DNP3_VARIATION_GROUP30_VAR1 = 45, DNP3_VARIATION_GROUP30_VAR2 = 46, DNP3_VARIATION_GROUP30_VAR3 = 47,
  DNP3_VARIATION_GROUP30_VAR4 = 48, DNP3_VARIATION_GROUP30_VAR5 = 49, DNP3_VARIATION_GROUP30_VAR6 = 50, DNP3_VARIATION_GROUP32_VAR0 = 51,
  DNP3_VARIATION_GROUP32_VAR1 = 52, DNP3_VARIATION_GROUP32_VAR2 = 53, DNP3_VARIATION_GROUP32_VAR3 = 54, DNP3_VARIATION_GROUP32_VAR4 = 55,
  DNP3_VARIATION_GROUP32_VAR5 = 56, DNP3_VARIATION_GROUP32_VAR6 = 57, DNP3_VARIATION_GROUP32_VAR7 = 58, DNP3_VARIATION_GROUP32_VAR8 = 59,
  DNP3_VARIATION_GROUP40_VAR0 = 60, DNP3_VARIATION_GROUP40_VAR1 = 61, DNP3_VARIATION_GROUP40_VAR2 = 62, DNP3_VARIATION_GROUP40_VAR3 = 63,
  DNP3_VARIATION_GROUP40_VAR4 = 64, DNP3_VARIATION_GROUP41_VAR0 = 65, DNP3_VARIATION_GROUP41_VAR1 = 66, DNP3_VARIATION_GROUP41_VAR2 = 67,
  DNP3_VARIATION_GROUP41_VAR3 = 68, DNP3_VARIATION_GROUP41_VAR4 = 69, DNP3_VARIATION_GROUP42_VAR0 = 70, DNP3_VARIATION_GROUP42_VAR1 = 71,
  DNP3_VARIATION_GROUP42_VAR2 = 72, DNP3_VARIATION_GROUP42_VAR3 = 73, DNP3_VARIATION_GROUP42_VAR4 = 74, DNP3_VARIATION_GROUP42_VAR5 = 75,
  DNP3_VARIATION_GROUP42_VAR6 = 76, DNP3_VARIATION_GROUP42_VAR7 = 77, DNP3_VARIATION_GROUP42_VAR8 = 78, DNP3_VARIATION_GROUP50_VAR1 = 79,
  DNP3_VARIATION_GROUP50_VAR3 = 80, DNP3_VARIATION_GROUP50_VAR4 = 81, DNP3_VARIATION_GROUP51_VAR1 = 82, DNP3_VARIATION_GROUP51_VAR2 = 83,
  DNP3_VARIATION_GROUP52_VAR1 = 84, DNP3_VARIATION_GROUP52_VAR2 = 85, DNP3_VARIATION_GROUP60_VAR1 = 86, DNP3_VARIATION_GROUP60_VAR2 = 87,
  DNP3_VARIATION_GROUP60_VAR3 = 88, DNP3_VARIATION_GROUP60_VAR4 = 89, DNP3_VARIATION_GROUP80_VAR1 = 90, DNP3_VARIATION_GROUP110 = 91,
  DNP3_VARIATION_GROUP111 = 92
}
 Group/Variation. More...
 
enum  dnp3_data_bits_t { DNP3_DATA_BITS_FIVE = 0, DNP3_DATA_BITS_SIX = 1, DNP3_DATA_BITS_SEVEN = 2, DNP3_DATA_BITS_EIGHT = 3 }
 Number of bits per character. More...
 
enum  dnp3_flow_control_t { DNP3_FLOW_CONTROL_NONE = 0, DNP3_FLOW_CONTROL_SOFTWARE = 1, DNP3_FLOW_CONTROL_HARDWARE = 2 }
 Flow control modes. More...
 
enum  dnp3_parity_t { DNP3_PARITY_NONE = 0, DNP3_PARITY_ODD = 1, DNP3_PARITY_EVEN = 2 }
 Parity checking modes. More...
 
enum  dnp3_stop_bits_t { DNP3_STOP_BITS_ONE = 0, DNP3_STOP_BITS_TWO = 1 }
 Number of stop bits. More...
 
enum  dnp3_link_error_mode_t { DNP3_LINK_ERROR_MODE_DISCARD = 0, DNP3_LINK_ERROR_MODE_CLOSE = 1 }
 Controls how errors in parsed link-layer frames are handled. This behavior is configurable for physical layers with built-in error correction like TCP as the connection might be through a terminal server. More...
 
enum  dnp3_response_function_t { DNP3_RESPONSE_FUNCTION_RESPONSE = 0, DNP3_RESPONSE_FUNCTION_UNSOLICITED_RESPONSE = 1 }
 Type of response. More...
 
enum  dnp3_iin1_flag_t {
  DNP3_IIN1_FLAG_BROADCAST = 0, DNP3_IIN1_FLAG_CLASS1_EVENTS = 1, DNP3_IIN1_FLAG_CLASS2_EVENTS = 2, DNP3_IIN1_FLAG_CLASS3_EVENTS = 3,
  DNP3_IIN1_FLAG_NEED_TIME = 4, DNP3_IIN1_FLAG_LOCAL_CONTROL = 5, DNP3_IIN1_FLAG_DEVICE_TROUBLE = 6, DNP3_IIN1_FLAG_DEVICE_RESTART = 7
}
 First IIN bit flags. More...
 
enum  dnp3_iin2_flag_t {
  DNP3_IIN2_FLAG_NO_FUNC_CODE_SUPPORT = 0, DNP3_IIN2_FLAG_OBJECT_UNKNOWN = 1, DNP3_IIN2_FLAG_PARAMETER_ERROR = 2, DNP3_IIN2_FLAG_EVENT_BUFFER_OVERFLOW = 3,
  DNP3_IIN2_FLAG_ALREADY_EXECUTING = 4, DNP3_IIN2_FLAG_CONFIG_CORRUPT = 5
}
 Second IIN bit flags. More...
 
enum  dnp3_qualifier_code_t {
  DNP3_QUALIFIER_CODE_RANGE8 = 0, DNP3_QUALIFIER_CODE_RANGE16 = 1, DNP3_QUALIFIER_CODE_ALL_OBJECTS = 2, DNP3_QUALIFIER_CODE_COUNT8 = 3,
  DNP3_QUALIFIER_CODE_COUNT16 = 4, DNP3_QUALIFIER_CODE_COUNT_AND_PREFIX8 = 5, DNP3_QUALIFIER_CODE_COUNT_AND_PREFIX16 = 6, DNP3_QUALIFIER_CODE_FREE_FORMAT16 = 7
}
 Qualifier code used in the response. More...
 
enum  dnp3_read_type_t { DNP3_READ_TYPE_STARTUP_INTEGRITY = 0, DNP3_READ_TYPE_UNSOLICITED = 1, DNP3_READ_TYPE_SINGLE_POLL = 2, DNP3_READ_TYPE_PERIODIC_POLL = 3 }
 Describes the source of a read event. More...
 
enum  dnp3_client_state_t {
  DNP3_CLIENT_STATE_DISABLED = 0, DNP3_CLIENT_STATE_CONNECTING = 1, DNP3_CLIENT_STATE_CONNECTED = 2, DNP3_CLIENT_STATE_WAIT_AFTER_FAILED_CONNECT = 3,
  DNP3_CLIENT_STATE_WAIT_AFTER_DISCONNECT = 4, DNP3_CLIENT_STATE_SHUTDOWN = 5
}
 State of the client connection. More...
 
enum  dnp3_auto_time_sync_t { DNP3_AUTO_TIME_SYNC_NONE = 0, DNP3_AUTO_TIME_SYNC_LAN = 1, DNP3_AUTO_TIME_SYNC_NON_LAN = 2 }
 Automatic time synchronization configuration. More...
 
enum  dnp3_read_result_t {
  DNP3_READ_RESULT_SUCCESS = 0, DNP3_READ_RESULT_TOO_MANY_REQUESTS = 1, DNP3_READ_RESULT_BAD_RESPONSE = 2, DNP3_READ_RESULT_RESPONSE_TIMEOUT = 3,
  DNP3_READ_RESULT_WRITE_ERROR = 4, DNP3_READ_RESULT_NO_CONNECTION = 5, DNP3_READ_RESULT_SHUTDOWN = 6, DNP3_READ_RESULT_ASSOCIATION_REMOVED = 7
}
 Result of a read operation. More...
 
enum  dnp3_command_mode_t { DNP3_COMMAND_MODE_DIRECT_OPERATE = 0, DNP3_COMMAND_MODE_SELECT_BEFORE_OPERATE = 1 }
 Command operation mode. More...
 
enum  dnp3_command_result_t {
  DNP3_COMMAND_RESULT_SUCCESS = 0, DNP3_COMMAND_RESULT_BAD_STATUS = 1, DNP3_COMMAND_RESULT_HEADER_MISMATCH = 2, DNP3_COMMAND_RESULT_TOO_MANY_REQUESTS = 3,
  DNP3_COMMAND_RESULT_BAD_RESPONSE = 4, DNP3_COMMAND_RESULT_RESPONSE_TIMEOUT = 5, DNP3_COMMAND_RESULT_WRITE_ERROR = 6, DNP3_COMMAND_RESULT_NO_CONNECTION = 7,
  DNP3_COMMAND_RESULT_SHUTDOWN = 8, DNP3_COMMAND_RESULT_ASSOCIATION_REMOVED = 9
}
 Result of a command. More...
 
enum  dnp3_time_sync_mode_t { DNP3_TIME_SYNC_MODE_LAN = 0, DNP3_TIME_SYNC_MODE_NON_LAN = 1 }
 Time synchronization mode. More...
 
enum  dnp3_time_sync_result_t {
  DNP3_TIME_SYNC_RESULT_SUCCESS = 0, DNP3_TIME_SYNC_RESULT_CLOCK_ROLLBACK = 1, DNP3_TIME_SYNC_RESULT_SYSTEM_TIME_NOT_UNIX = 2, DNP3_TIME_SYNC_RESULT_BAD_OUTSTATION_TIME_DELAY = 3,
  DNP3_TIME_SYNC_RESULT_OVERFLOW = 4, DNP3_TIME_SYNC_RESULT_STILL_NEEDS_TIME = 5, DNP3_TIME_SYNC_RESULT_SYSTEM_TIME_NOT_AVAILABLE = 6, DNP3_TIME_SYNC_RESULT_IIN_ERROR = 7,
  DNP3_TIME_SYNC_RESULT_TOO_MANY_REQUESTS = 8, DNP3_TIME_SYNC_RESULT_BAD_RESPONSE = 9, DNP3_TIME_SYNC_RESULT_RESPONSE_TIMEOUT = 10, DNP3_TIME_SYNC_RESULT_WRITE_ERROR = 11,
  DNP3_TIME_SYNC_RESULT_NO_CONNECTION = 12, DNP3_TIME_SYNC_RESULT_SHUTDOWN = 13, DNP3_TIME_SYNC_RESULT_ASSOCIATION_REMOVED = 14
}
 Result of a time sync operation. More...
 
enum  dnp3_restart_error_t {
  DNP3_RESTART_ERROR_OK = 0, DNP3_RESTART_ERROR_TOO_MANY_REQUESTS = 1, DNP3_RESTART_ERROR_BAD_RESPONSE = 2, DNP3_RESTART_ERROR_RESPONSE_TIMEOUT = 3,
  DNP3_RESTART_ERROR_WRITE_ERROR = 4, DNP3_RESTART_ERROR_NO_CONNECTION = 5, DNP3_RESTART_ERROR_SHUTDOWN = 6, DNP3_RESTART_ERROR_ASSOCIATION_REMOVED = 7
}
 Result of a restart operation. More...
 
enum  dnp3_link_status_result_t { DNP3_LINK_STATUS_RESULT_SUCCESS = 0, DNP3_LINK_STATUS_RESULT_UNEXPECTED_RESPONSE = 1, DNP3_LINK_STATUS_RESULT_TASK_ERROR = 2 }
 Result of a link status check. See dnp3_master_channel_check_link_status. More...
 
enum  dnp3_event_class_t { DNP3_EVENT_CLASS_NONE = 0, DNP3_EVENT_CLASS_CLASS1 = 1, DNP3_EVENT_CLASS_CLASS2 = 2, DNP3_EVENT_CLASS_CLASS3 = 3 }
 Event class. More...
 
enum  dnp3_event_mode_t { DNP3_EVENT_MODE_DETECT = 0, DNP3_EVENT_MODE_FORCE = 1, DNP3_EVENT_MODE_SUPPRESS = 2 }
 Controls how events are processed when updating values in the database. More...
 
enum  dnp3_static_binary_variation_t { DNP3_STATIC_BINARY_VARIATION_GROUP1_VAR1 = 0, DNP3_STATIC_BINARY_VARIATION_GROUP1_VAR2 = 1 }
 Static binary input variation. More...
 
enum  dnp3_event_binary_variation_t { DNP3_EVENT_BINARY_VARIATION_GROUP2_VAR1 = 0, DNP3_EVENT_BINARY_VARIATION_GROUP2_VAR2 = 1, DNP3_EVENT_BINARY_VARIATION_GROUP2_VAR3 = 2 }
 Event binary input variation. More...
 
enum  dnp3_static_double_bit_binary_variation_t { DNP3_STATIC_DOUBLE_BIT_BINARY_VARIATION_GROUP3_VAR1 = 0, DNP3_STATIC_DOUBLE_BIT_BINARY_VARIATION_GROUP3_VAR2 = 1 }
 Static double-bit binary input variation. More...
 
enum  dnp3_event_double_bit_binary_variation_t { DNP3_EVENT_DOUBLE_BIT_BINARY_VARIATION_GROUP4_VAR1 = 0, DNP3_EVENT_DOUBLE_BIT_BINARY_VARIATION_GROUP4_VAR2 = 1, DNP3_EVENT_DOUBLE_BIT_BINARY_VARIATION_GROUP4_VAR3 = 2 }
 Event double-bit binary input variation. More...
 
enum  dnp3_static_binary_output_status_variation_t { DNP3_STATIC_BINARY_OUTPUT_STATUS_VARIATION_GROUP10_VAR1 = 0, DNP3_STATIC_BINARY_OUTPUT_STATUS_VARIATION_GROUP10_VAR2 = 1 }
 Static binary output status variation. More...
 
enum  dnp3_event_binary_output_status_variation_t { DNP3_EVENT_BINARY_OUTPUT_STATUS_VARIATION_GROUP11_VAR1 = 0, DNP3_EVENT_BINARY_OUTPUT_STATUS_VARIATION_GROUP11_VAR2 = 1 }
 Event binary output status variation. More...
 
enum  dnp3_static_counter_variation_t { DNP3_STATIC_COUNTER_VARIATION_GROUP20_VAR1 = 0, DNP3_STATIC_COUNTER_VARIATION_GROUP20_VAR2 = 1, DNP3_STATIC_COUNTER_VARIATION_GROUP20_VAR5 = 2, DNP3_STATIC_COUNTER_VARIATION_GROUP20_VAR6 = 3 }
 Static counter variation. More...
 
enum  dnp3_event_counter_variation_t { DNP3_EVENT_COUNTER_VARIATION_GROUP22_VAR1 = 0, DNP3_EVENT_COUNTER_VARIATION_GROUP22_VAR2 = 1, DNP3_EVENT_COUNTER_VARIATION_GROUP22_VAR5 = 2, DNP3_EVENT_COUNTER_VARIATION_GROUP22_VAR6 = 3 }
 Event counter variation. More...
 
enum  dnp3_static_frozen_counter_variation_t {
  DNP3_STATIC_FROZEN_COUNTER_VARIATION_GROUP21_VAR1 = 0, DNP3_STATIC_FROZEN_COUNTER_VARIATION_GROUP21_VAR2 = 1, DNP3_STATIC_FROZEN_COUNTER_VARIATION_GROUP21_VAR5 = 2, DNP3_STATIC_FROZEN_COUNTER_VARIATION_GROUP21_VAR6 = 3,
  DNP3_STATIC_FROZEN_COUNTER_VARIATION_GROUP21_VAR9 = 4, DNP3_STATIC_FROZEN_COUNTER_VARIATION_GROUP21_VAR10 = 5
}
 Static frozen counter variation. More...
 
enum  dnp3_event_frozen_counter_variation_t { DNP3_EVENT_FROZEN_COUNTER_VARIATION_GROUP23_VAR1 = 0, DNP3_EVENT_FROZEN_COUNTER_VARIATION_GROUP23_VAR2 = 1, DNP3_EVENT_FROZEN_COUNTER_VARIATION_GROUP23_VAR5 = 2, DNP3_EVENT_FROZEN_COUNTER_VARIATION_GROUP23_VAR6 = 3 }
 Event frozen counter variation. More...
 
enum  dnp3_static_analog_variation_t {
  DNP3_STATIC_ANALOG_VARIATION_GROUP30_VAR1 = 0, DNP3_STATIC_ANALOG_VARIATION_GROUP30_VAR2 = 1, DNP3_STATIC_ANALOG_VARIATION_GROUP30_VAR3 = 2, DNP3_STATIC_ANALOG_VARIATION_GROUP30_VAR4 = 3,
  DNP3_STATIC_ANALOG_VARIATION_GROUP30_VAR5 = 4, DNP3_STATIC_ANALOG_VARIATION_GROUP30_VAR6 = 5
}
 Static analog variation. More...
 
enum  dnp3_event_analog_variation_t {
  DNP3_EVENT_ANALOG_VARIATION_GROUP32_VAR1 = 0, DNP3_EVENT_ANALOG_VARIATION_GROUP32_VAR2 = 1, DNP3_EVENT_ANALOG_VARIATION_GROUP32_VAR3 = 2, DNP3_EVENT_ANALOG_VARIATION_GROUP32_VAR4 = 3,
  DNP3_EVENT_ANALOG_VARIATION_GROUP32_VAR5 = 4, DNP3_EVENT_ANALOG_VARIATION_GROUP32_VAR6 = 5, DNP3_EVENT_ANALOG_VARIATION_GROUP32_VAR7 = 6, DNP3_EVENT_ANALOG_VARIATION_GROUP32_VAR8 = 7
}
 Event analog variation. More...
 
enum  dnp3_static_analog_output_status_variation_t { DNP3_STATIC_ANALOG_OUTPUT_STATUS_VARIATION_GROUP40_VAR1 = 0, DNP3_STATIC_ANALOG_OUTPUT_STATUS_VARIATION_GROUP40_VAR2 = 1, DNP3_STATIC_ANALOG_OUTPUT_STATUS_VARIATION_GROUP40_VAR3 = 2, DNP3_STATIC_ANALOG_OUTPUT_STATUS_VARIATION_GROUP40_VAR4 = 3 }
 Static analog output status variation. More...
 
enum  dnp3_event_analog_output_status_variation_t {
  DNP3_EVENT_ANALOG_OUTPUT_STATUS_VARIATION_GROUP42_VAR1 = 0, DNP3_EVENT_ANALOG_OUTPUT_STATUS_VARIATION_GROUP42_VAR2 = 1, DNP3_EVENT_ANALOG_OUTPUT_STATUS_VARIATION_GROUP42_VAR3 = 2, DNP3_EVENT_ANALOG_OUTPUT_STATUS_VARIATION_GROUP42_VAR4 = 3,
  DNP3_EVENT_ANALOG_OUTPUT_STATUS_VARIATION_GROUP42_VAR5 = 4, DNP3_EVENT_ANALOG_OUTPUT_STATUS_VARIATION_GROUP42_VAR6 = 5, DNP3_EVENT_ANALOG_OUTPUT_STATUS_VARIATION_GROUP42_VAR7 = 6, DNP3_EVENT_ANALOG_OUTPUT_STATUS_VARIATION_GROUP42_VAR8 = 7
}
 Event analog output status variation. More...
 
enum  dnp3_restart_delay_type_t { DNP3_RESTART_DELAY_TYPE_NOT_SUPPORTED = 0, DNP3_RESTART_DELAY_TYPE_SECONDS = 1, DNP3_RESTART_DELAY_TYPE_MILLISECONDS = 2 }
 Type of restart delay value. Used by dnp3_restart_delay_t. More...
 
enum  dnp3_write_time_result_t { DNP3_WRITE_TIME_RESULT_NOT_SUPPORTED = 0, DNP3_WRITE_TIME_RESULT_INVALID_VALUE = 1, DNP3_WRITE_TIME_RESULT_OK = 2 }
 Write time result used by dnp3_outstation_application_t::write_absolute_time. More...
 
enum  dnp3_freeze_type_t { DNP3_FREEZE_TYPE_IMMEDIATE_FREEZE = 0, DNP3_FREEZE_TYPE_FREEZE_AND_CLEAR = 1 }
 Freeze operation type. More...
 
enum  dnp3_freeze_result_t { DNP3_FREEZE_RESULT_SUCCESS = 0, DNP3_FREEZE_RESULT_PARAMETER_ERROR = 1, DNP3_FREEZE_RESULT_NOT_SUPPORTED = 2 }
 Result of a freeze operation. More...
 
enum  dnp3_function_code_t {
  DNP3_FUNCTION_CODE_CONFIRM = 0, DNP3_FUNCTION_CODE_READ = 1, DNP3_FUNCTION_CODE_WRITE = 2, DNP3_FUNCTION_CODE_SELECT = 3,
  DNP3_FUNCTION_CODE_OPERATE = 4, DNP3_FUNCTION_CODE_DIRECT_OPERATE = 5, DNP3_FUNCTION_CODE_DIRECT_OPERATE_NO_RESPONSE = 6, DNP3_FUNCTION_CODE_IMMEDIATE_FREEZE = 7,
  DNP3_FUNCTION_CODE_IMMEDIATE_FREEZE_NO_RESPONSE = 8, DNP3_FUNCTION_CODE_FREEZE_CLEAR = 9, DNP3_FUNCTION_CODE_FREEZE_CLEAR_NO_RESPONSE = 10, DNP3_FUNCTION_CODE_FREEZE_AT_TIME = 11,
  DNP3_FUNCTION_CODE_FREEZE_AT_TIME_NO_RESPONSE = 12, DNP3_FUNCTION_CODE_COLD_RESTART = 13, DNP3_FUNCTION_CODE_WARM_RESTART = 14, DNP3_FUNCTION_CODE_INITIALIZE_DATA = 15,
  DNP3_FUNCTION_CODE_INITIALIZE_APPLICATION = 16, DNP3_FUNCTION_CODE_START_APPLICATION = 17, DNP3_FUNCTION_CODE_STOP_APPLICATION = 18, DNP3_FUNCTION_CODE_SAVE_CONFIGURATION = 19,
  DNP3_FUNCTION_CODE_ENABLE_UNSOLICITED = 20, DNP3_FUNCTION_CODE_DISABLE_UNSOLICITED = 21, DNP3_FUNCTION_CODE_ASSIGN_CLASS = 22, DNP3_FUNCTION_CODE_DELAY_MEASURE = 23,
  DNP3_FUNCTION_CODE_RECORD_CURRENT_TIME = 24, DNP3_FUNCTION_CODE_OPEN_FILE = 25, DNP3_FUNCTION_CODE_CLOSE_FILE = 26, DNP3_FUNCTION_CODE_DELETE_FILE = 27,
  DNP3_FUNCTION_CODE_GET_FILE_INFO = 28, DNP3_FUNCTION_CODE_AUTHENTICATE_FILE = 29, DNP3_FUNCTION_CODE_ABORT_FILE = 30, DNP3_FUNCTION_CODE_RESPONSE = 31,
  DNP3_FUNCTION_CODE_UNSOLICITED_RESPONSE = 32
}
 Application layer function code. More...
 
enum  dnp3_broadcast_action_t { DNP3_BROADCAST_ACTION_PROCESSED = 0, DNP3_BROADCAST_ACTION_IGNORED_BY_CONFIGURATION = 1, DNP3_BROADCAST_ACTION_BAD_OBJECT_HEADERS = 2, DNP3_BROADCAST_ACTION_UNSUPPORTED_FUNCTION = 3 }
 Enumeration describing how the outstation processed a broadcast request. More...
 
enum  dnp3_command_status_t {
  DNP3_COMMAND_STATUS_SUCCESS = 0, DNP3_COMMAND_STATUS_TIMEOUT = 1, DNP3_COMMAND_STATUS_NO_SELECT = 2, DNP3_COMMAND_STATUS_FORMAT_ERROR = 3,
  DNP3_COMMAND_STATUS_NOT_SUPPORTED = 4, DNP3_COMMAND_STATUS_ALREADY_ACTIVE = 5, DNP3_COMMAND_STATUS_HARDWARE_ERROR = 6, DNP3_COMMAND_STATUS_LOCAL = 7,
  DNP3_COMMAND_STATUS_TOO_MANY_OPS = 8, DNP3_COMMAND_STATUS_NOT_AUTHORIZED = 9, DNP3_COMMAND_STATUS_AUTOMATION_INHIBIT = 10, DNP3_COMMAND_STATUS_PROCESSING_LIMITED = 11,
  DNP3_COMMAND_STATUS_OUT_OF_RANGE = 12, DNP3_COMMAND_STATUS_DOWNSTREAM_LOCAL = 13, DNP3_COMMAND_STATUS_ALREADY_COMPLETE = 14, DNP3_COMMAND_STATUS_BLOCKED = 15,
  DNP3_COMMAND_STATUS_CANCELED = 16, DNP3_COMMAND_STATUS_BLOCKED_OTHER_MASTER = 17, DNP3_COMMAND_STATUS_DOWNSTREAM_FAIL = 18, DNP3_COMMAND_STATUS_NON_PARTICIPATING = 19,
  DNP3_COMMAND_STATUS_UNKNOWN = 20
}
 Enumeration received from an outstation in response to command request. More...
 
enum  dnp3_operate_type_t { DNP3_OPERATE_TYPE_SELECT_BEFORE_OPERATE = 0, DNP3_OPERATE_TYPE_DIRECT_OPERATE = 1, DNP3_OPERATE_TYPE_DIRECT_OPERATE_NO_ACK = 2 }
 Enumeration describing how the master requested the control operation. More...
 
enum  dnp3_connection_state_t { DNP3_CONNECTION_STATE_CONNECTED = 0, DNP3_CONNECTION_STATE_DISCONNECTED = 1 }
 Outstation connection state for connection-oriented transports, e.g. TCP. More...
 

Functions

static const char * dnp3_param_error_to_string (dnp3_param_error_t value)
 Converts a dnp3_param_error_t to a string. More...
 
static const char * dnp3_log_level_to_string (dnp3_log_level_t value)
 Converts a dnp3_log_level_t to a string. More...
 
static const char * dnp3_time_format_to_string (dnp3_time_format_t value)
 Converts a dnp3_time_format_t to a string. More...
 
static const char * dnp3_log_output_format_to_string (dnp3_log_output_format_t value)
 Converts a dnp3_log_output_format_t to a string. More...
 
static dnp3_logging_config_t dnp3_logging_config_init ()
 Initialize dnp3_logging_config_t to default values. More...
 
static dnp3_logger_t dnp3_logger_init (void(*on_message)(dnp3_log_level_t, const char *, void *), void(*on_destroy)(void *arg), void *ctx)
 Initialize a dnp3_logger_t interface. More...
 
dnp3_param_error_t dnp3_configure_logging (dnp3_logging_config_t config, dnp3_logger_t logger)
 Set the callback that will receive all the log messages. More...
 
static const char * dnp3_app_decode_level_to_string (dnp3_app_decode_level_t value)
 Converts a dnp3_app_decode_level_t to a string. More...
 
static const char * dnp3_transport_decode_level_to_string (dnp3_transport_decode_level_t value)
 Converts a dnp3_transport_decode_level_t to a string. More...
 
static const char * dnp3_link_decode_level_to_string (dnp3_link_decode_level_t value)
 Converts a dnp3_link_decode_level_t to a string. More...
 
static const char * dnp3_phys_decode_level_to_string (dnp3_phys_decode_level_t value)
 Converts a dnp3_phys_decode_level_t to a string. More...
 
static dnp3_decode_level_t dnp3_decode_level_init ()
 Initialize dnp3_decode_level_t to default values. More...
 
static dnp3_runtime_config_t dnp3_runtime_config_init ()
 Initialize dnp3_runtime_config_t to default values. More...
 
dnp3_param_error_t dnp3_runtime_new (dnp3_runtime_config_t config, dnp3_runtime_t **out)
 Creates a new runtime for running the protocol stack. More...
 
void dnp3_runtime_destroy (dnp3_runtime_t *runtime)
 Destroy a runtime. More...
 
static dnp3_control_t dnp3_control_init (bool fir, bool fin, bool con, bool uns, uint8_t seq)
 Initialize dnp3_control_t to default values. More...
 
static const char * dnp3_trip_close_code_to_string (dnp3_trip_close_code_t value)
 Converts a dnp3_trip_close_code_t to a string. More...
 
static const char * dnp3_op_type_to_string (dnp3_op_type_t value)
 Converts a dnp3_op_type_t to a string. More...
 
static dnp3_control_code_t dnp3_control_code_init (dnp3_trip_close_code_t tcc, bool clear, dnp3_op_type_t op_type)
 Initialize dnp3_control_code_t to default values. More...
 
static dnp3_g12v1_t dnp3_g12v1_init (dnp3_control_code_t code, uint8_t count, uint32_t on_time, uint32_t off_time)
 Initialize dnp3_g12v1_t to default values. More...
 
static dnp3_flags_t dnp3_flags_init (uint8_t value)
 Initialize dnp3_flags_t to default values. More...
 
static const char * dnp3_time_quality_to_string (dnp3_time_quality_t value)
 Converts a dnp3_time_quality_t to a string. More...
 
static dnp3_timestamp_t dnp3_timestamp_init (uint64_t value, dnp3_time_quality_t quality)
 Initialize dnp3_timestamp_t to default values. More...
 
dnp3_timestamp_t dnp3_timestamp_invalid ()
 Creates an invalid timestamp struct. More...
 
dnp3_timestamp_t dnp3_timestamp_synchronized (uint64_t value)
 Creates a synchronized timestamp struct. More...
 
dnp3_timestamp_t dnp3_timestamp_not_synchronized (uint64_t value)
 Creates a not synchronized timestamp struct. More...
 
static const char * dnp3_double_bit_to_string (dnp3_double_bit_t value)
 Converts a dnp3_double_bit_t to a string. More...
 
static dnp3_binary_t dnp3_binary_init (uint16_t index, bool value, dnp3_flags_t flags, dnp3_timestamp_t time)
 Initialize dnp3_binary_t to default values. More...
 
dnp3_binary_tdnp3_binary_next (dnp3_binary_iterator_t *it)
 Get the next value of the iterator. More...
 
static dnp3_double_bit_binary_t dnp3_double_bit_binary_init (uint16_t index, dnp3_double_bit_t value, dnp3_flags_t flags, dnp3_timestamp_t time)
 Initialize dnp3_double_bit_binary_t to default values. More...
 
dnp3_double_bit_binary_tdnp3_doublebitbinary_next (dnp3_double_bit_binary_iterator_t *it)
 Get the next value of the iterator. More...
 
static dnp3_binary_output_status_t dnp3_binary_output_status_init (uint16_t index, bool value, dnp3_flags_t flags, dnp3_timestamp_t time)
 Initialize dnp3_binary_output_status_t to default values. More...
 
dnp3_binary_output_status_tdnp3_binaryoutputstatus_next (dnp3_binary_output_status_iterator_t *it)
 Get the next value of the iterator. More...
 
static dnp3_counter_t dnp3_counter_init (uint16_t index, uint32_t value, dnp3_flags_t flags, dnp3_timestamp_t time)
 Initialize dnp3_counter_t to default values. More...
 
dnp3_counter_tdnp3_counter_next (dnp3_counter_iterator_t *it)
 Get the next value of the iterator. More...
 
static dnp3_frozen_counter_t dnp3_frozen_counter_init (uint16_t index, uint32_t value, dnp3_flags_t flags, dnp3_timestamp_t time)
 Initialize dnp3_frozen_counter_t to default values. More...
 
dnp3_frozen_counter_tdnp3_frozencounter_next (dnp3_frozen_counter_iterator_t *it)
 Get the next value of the iterator. More...
 
static dnp3_analog_t dnp3_analog_init (uint16_t index, double value, dnp3_flags_t flags, dnp3_timestamp_t time)
 Initialize dnp3_analog_t to default values. More...
 
dnp3_analog_tdnp3_analog_next (dnp3_analog_iterator_t *it)
 Get the next value of the iterator. More...
 
static dnp3_analog_output_status_t dnp3_analog_output_status_init (uint16_t index, double value, dnp3_flags_t flags, dnp3_timestamp_t time)
 Initialize dnp3_analog_output_status_t to default values. More...
 
dnp3_analog_output_status_tdnp3_analogoutputstatus_next (dnp3_analog_output_status_iterator_t *it)
 Get the next value of the iterator. More...
 
static dnp3_byte_t dnp3_byte_init (uint8_t value)
 Initialize dnp3_byte_t to default values. More...
 
dnp3_byte_tdnp3_byte_next (dnp3_byte_iterator_t *it)
 Get the next value of the iterator. More...
 
static dnp3_octet_string_t dnp3_octet_string_init (uint16_t index, dnp3_byte_iterator_t *value)
 Initialize dnp3_octet_string_t to default values. More...
 
dnp3_octet_string_tdnp3_octetstring_next (dnp3_octet_string_iterator_t *it)
 Get the next value of the iterator. More...
 
static const char * dnp3_port_state_to_string (dnp3_port_state_t value)
 Converts a dnp3_port_state_t to a string. More...
 
static dnp3_port_state_listener_t dnp3_port_state_listener_init (void(*on_change)(dnp3_port_state_t, void *), void(*on_destroy)(void *arg), void *ctx)
 Initialize a dnp3_port_state_listener_t interface. More...
 
static const char * dnp3_variation_to_string (dnp3_variation_t value)
 Converts a dnp3_variation_t to a string. More...
 
static dnp3_retry_strategy_t dnp3_retry_strategy_init ()
 Initialize dnp3_retry_strategy_t to default values. More...
 
static const char * dnp3_data_bits_to_string (dnp3_data_bits_t value)
 Converts a dnp3_data_bits_t to a string. More...
 
static const char * dnp3_flow_control_to_string (dnp3_flow_control_t value)
 Converts a dnp3_flow_control_t to a string. More...
 
static const char * dnp3_parity_to_string (dnp3_parity_t value)
 Converts a dnp3_parity_t to a string. More...
 
static const char * dnp3_stop_bits_to_string (dnp3_stop_bits_t value)
 Converts a dnp3_stop_bits_t to a string. More...
 
static dnp3_serial_port_settings_t dnp3_serial_port_settings_init ()
 Initialize dnp3_serial_port_settings_t to default values. More...
 
static const char * dnp3_link_error_mode_to_string (dnp3_link_error_mode_t value)
 Converts a dnp3_link_error_mode_t to a string. More...
 
static const char * dnp3_response_function_to_string (dnp3_response_function_t value)
 Converts a dnp3_response_function_t to a string. More...
 
static dnp3_iin1_t dnp3_iin1_init (uint8_t value)
 Initialize dnp3_iin1_t to default values. More...
 
static const char * dnp3_iin1_flag_to_string (dnp3_iin1_flag_t value)
 Converts a dnp3_iin1_flag_t to a string. More...
 
bool dnp3_iin1_is_set (dnp3_iin1_t *iin1, dnp3_iin1_flag_t flag)
 Check if a particular flag is set in the IIN1 byte. More...
 
static dnp3_iin2_t dnp3_iin2_init (uint8_t value)
 Initialize dnp3_iin2_t to default values. More...
 
static const char * dnp3_iin2_flag_to_string (dnp3_iin2_flag_t value)
 Converts a dnp3_iin2_flag_t to a string. More...
 
bool dnp3_iin2_is_set (dnp3_iin2_t *iin2, dnp3_iin2_flag_t flag)
 Check if a particular flag is set in the IIN2 byte. More...
 
static dnp3_iin_t dnp3_iin_init (dnp3_iin1_t iin1, dnp3_iin2_t iin2)
 Initialize dnp3_iin_t to default values. More...
 
static dnp3_response_header_t dnp3_response_header_init (dnp3_control_t control, dnp3_response_function_t func, dnp3_iin_t iin)
 Initialize dnp3_response_header_t to default values. More...
 
static const char * dnp3_qualifier_code_to_string (dnp3_qualifier_code_t value)
 Converts a dnp3_qualifier_code_t to a string. More...
 
static dnp3_header_info_t dnp3_header_info_init (dnp3_variation_t variation, dnp3_qualifier_code_t qualifier)
 Initialize dnp3_header_info_t to default values. More...
 
static const char * dnp3_read_type_to_string (dnp3_read_type_t value)
 Converts a dnp3_read_type_t to a string. More...
 
static dnp3_read_handler_t dnp3_read_handler_init (void(*begin_fragment)(dnp3_read_type_t, dnp3_response_header_t, void *), void(*end_fragment)(dnp3_read_type_t, dnp3_response_header_t, void *), void(*handle_binary)(dnp3_header_info_t, dnp3_binary_iterator_t *, void *), void(*handle_double_bit_binary)(dnp3_header_info_t, dnp3_double_bit_binary_iterator_t *, void *), void(*handle_binary_output_status)(dnp3_header_info_t, dnp3_binary_output_status_iterator_t *, void *), void(*handle_counter)(dnp3_header_info_t, dnp3_counter_iterator_t *, void *), void(*handle_frozen_counter)(dnp3_header_info_t, dnp3_frozen_counter_iterator_t *, void *), void(*handle_analog)(dnp3_header_info_t, dnp3_analog_iterator_t *, void *), void(*handle_analog_output_status)(dnp3_header_info_t, dnp3_analog_output_status_iterator_t *, void *), void(*handle_octet_string)(dnp3_header_info_t, dnp3_octet_string_iterator_t *, void *), void(*on_destroy)(void *arg), void *ctx)
 Initialize a dnp3_read_handler_t interface. More...
 
dnp3_endpoint_list_tdnp3_endpoint_list_new (const char *main_endpoint)
 Create a new list of IP endpoints. More...
 
void dnp3_endpoint_list_destroy (dnp3_endpoint_list_t *list)
 Delete a previously allocated endpoint list. More...
 
void dnp3_endpoint_list_add (dnp3_endpoint_list_t *list, const char *endpoint)
 Add an IP endpoint to the list. More...
 
static dnp3_master_channel_config_t dnp3_master_channel_config_init (uint16_t address)
 Initialize dnp3_master_channel_config_t to default values. More...
 
static const char * dnp3_client_state_to_string (dnp3_client_state_t value)
 Converts a dnp3_client_state_t to a string. More...
 
static dnp3_client_state_listener_t dnp3_client_state_listener_init (void(*on_change)(dnp3_client_state_t, void *), void(*on_destroy)(void *arg), void *ctx)
 Initialize a dnp3_client_state_listener_t interface. More...
 
static dnp3_connect_strategy_t dnp3_connect_strategy_init ()
 Initialize dnp3_connect_strategy_t to default values. More...
 
dnp3_param_error_t dnp3_master_channel_create_tcp (dnp3_runtime_t *runtime, dnp3_link_error_mode_t link_error_mode, dnp3_master_channel_config_t config, dnp3_endpoint_list_t *endpoints, dnp3_connect_strategy_t connect_strategy, dnp3_client_state_listener_t listener, dnp3_master_channel_t **out)
 Create a master channel that connects to the specified TCP endpoint(s) More...
 
dnp3_param_error_t dnp3_master_channel_create_serial (dnp3_runtime_t *runtime, dnp3_master_channel_config_t config, const char *path, dnp3_serial_port_settings_t serial_params, uint64_t open_retry_delay, dnp3_port_state_listener_t listener, dnp3_master_channel_t **out)
 Create a master channel on the specified serial port. More...
 
void dnp3_master_channel_destroy (dnp3_master_channel_t *channel)
 Shutdown a dnp3_master_channel_t and release all resources. More...
 
dnp3_param_error_t dnp3_master_channel_enable (dnp3_master_channel_t *channel)
 start communications More...
 
dnp3_param_error_t dnp3_master_channel_disable (dnp3_master_channel_t *channel)
 stop communications More...
 
static dnp3_event_classes_t dnp3_event_classes_init (bool class1, bool class2, bool class3)
 Initialize dnp3_event_classes_t to default values. More...
 
dnp3_event_classes_t dnp3_event_classes_all ()
 Initialize all three event classes to true. More...
 
dnp3_event_classes_t dnp3_event_classes_none ()
 Initialize all three event classes to false. More...
 
static dnp3_classes_t dnp3_classes_init (bool class0, bool class1, bool class2, bool class3)
 Initialize dnp3_classes_t to default values. More...
 
dnp3_classes_t dnp3_classes_all ()
 Class 1230. More...
 
dnp3_classes_t dnp3_classes_none ()
 No class. More...
 
static const char * dnp3_auto_time_sync_to_string (dnp3_auto_time_sync_t value)
 Converts a dnp3_auto_time_sync_t to a string. More...
 
static dnp3_association_config_t dnp3_association_config_init (dnp3_event_classes_t disable_unsol_classes, dnp3_event_classes_t enable_unsol_classes, dnp3_classes_t startup_integrity_classes, dnp3_event_classes_t event_scan_on_events_available)
 Initialize dnp3_association_config_t to default values. More...
 
static dnp3_timestamp_utc_t dnp3_timestamp_utc_init (uint64_t value, bool is_valid)
 Initialize dnp3_timestamp_utc_t to default values. More...
 
dnp3_timestamp_utc_t dnp3_timestamp_utc_valid (uint64_t value)
 Create a valid timestamp value. More...
 
dnp3_timestamp_utc_t dnp3_timestamp_utc_invalid ()
 Create an invalid timestamp value. More...
 
static dnp3_association_handler_t dnp3_association_handler_init (dnp3_timestamp_utc_t(*get_current_time)(void *), void(*on_destroy)(void *arg), void *ctx)
 Initialize a dnp3_association_handler_t interface. More...
 
dnp3_request_tdnp3_request_new ()
 Create a new request. More...
 
dnp3_request_tdnp3_request_new_class (bool class0, bool class1, bool class2, bool class3)
 Create a new request asking for classes. More...
 
void dnp3_request_destroy (dnp3_request_t *request)
 Destroy a request created with dnp3_request_new or dnp3_request_new_class. More...
 
void dnp3_request_add_one_byte_header (dnp3_request_t *request, dnp3_variation_t variation, uint8_t start, uint8_t stop)
 Add a one-byte start/stop variation interrogation. More...
 
void dnp3_request_add_two_byte_header (dnp3_request_t *request, dnp3_variation_t variation, uint16_t start, uint16_t stop)
 Add a two-byte start/stop variation interrogation. More...
 
void dnp3_request_add_all_objects_header (dnp3_request_t *request, dnp3_variation_t variation)
 Add an all objects variation interrogation. More...
 
dnp3_param_error_t dnp3_master_channel_add_association (dnp3_master_channel_t *channel, uint16_t address, dnp3_association_config_t config, dnp3_read_handler_t read_handler, dnp3_association_handler_t association_handler, dnp3_association_id_t *out)
 Add an association to the channel. More...
 
dnp3_param_error_t dnp3_master_channel_remove_association (dnp3_master_channel_t *channel, dnp3_association_id_t id)
 Remove an association from the channel. More...
 
dnp3_param_error_t dnp3_master_channel_add_poll (dnp3_master_channel_t *channel, dnp3_association_id_t id, dnp3_request_t *request, uint64_t period, dnp3_poll_id_t *out)
 Add a periodic poll to an association. More...
 
dnp3_param_error_t dnp3_master_channel_remove_poll (dnp3_master_channel_t *channel, dnp3_poll_id_t poll_id)
 Add a periodic poll to an association. More...
 
dnp3_param_error_t dnp3_master_channel_demand_poll (dnp3_master_channel_t *channel, dnp3_poll_id_t poll_id)
 Demand the immediate execution of a poll previously created with dnp3_master_channel_add_poll. More...
 
dnp3_param_error_t dnp3_master_channel_set_decode_level (dnp3_master_channel_t *channel, dnp3_decode_level_t decode_level)
 Set the decoding level for the channel. More...
 
dnp3_param_error_t dnp3_master_channel_get_decode_level (dnp3_master_channel_t *channel, dnp3_decode_level_t *out)
 Get the decoding level for the channel. More...
 
static const char * dnp3_read_result_to_string (dnp3_read_result_t value)
 Converts a dnp3_read_result_t to a string. More...
 
static dnp3_read_task_callback_t dnp3_read_task_callback_init (void(*on_complete)(dnp3_read_result_t, void *), void(*on_destroy)(void *arg), void *ctx)
 Initialize a dnp3_read_task_callback_t interface. More...
 
dnp3_param_error_t dnp3_master_channel_read (dnp3_master_channel_t *channel, dnp3_association_id_t association, dnp3_request_t *request, dnp3_read_task_callback_t callback)
 Perform a read on the association. More...
 
dnp3_commands_tdnp3_commands_new ()
 Create a new set of commands. More...
 
void dnp3_commands_destroy (dnp3_commands_t *command)
 Destroy set of commands. More...
 
void dnp3_commands_finish_header (dnp3_commands_t *commands)
 Finish any partially completed header. This allows for the construction of two headers with the same type and index. More...
 
void dnp3_commands_add_g12v1_u8 (dnp3_commands_t *command, uint8_t idx, dnp3_g12v1_t header)
 Add a CROB with 1-byte prefix index. More...
 
void dnp3_commands_add_g12v1_u16 (dnp3_commands_t *command, uint16_t idx, dnp3_g12v1_t header)
 Add a CROB with 2-byte prefix index. More...
 
void dnp3_commands_add_g41v1_u8 (dnp3_commands_t *command, uint8_t idx, int32_t value)
 Add a Analog Output command (signed 32-bit integer) with 1-byte prefix index. More...
 
void dnp3_commands_add_g41v1_u16 (dnp3_commands_t *command, uint16_t idx, int32_t value)
 Add a Analog Output command (signed 32-bit integer) with 2-byte prefix index. More...
 
void dnp3_commands_add_g41v2_u8 (dnp3_commands_t *command, uint8_t idx, int16_t value)
 Add a Analog Output command (signed 16-bit integer) with 1-byte prefix index. More...
 
void dnp3_commands_add_g41v2_u16 (dnp3_commands_t *command, uint16_t idx, int16_t value)
 Add a Analog Output command (signed 16-bit integer) with 2-byte prefix index. More...
 
void dnp3_commands_add_g41v3_u8 (dnp3_commands_t *command, uint8_t idx, float value)
 Add a Analog Output command (single-precision float) with 1-byte prefix index. More...
 
void dnp3_commands_add_g41v3_u16 (dnp3_commands_t *commands, uint16_t idx, float value)
 Add a Analog Output command (single-precision float) with 2-byte prefix index. More...
 
void dnp3_commands_add_g41v4_u8 (dnp3_commands_t *commands, uint8_t idx, double value)
 Add a Analog Output command (double-precision float) with 1-byte prefix index. More...
 
void dnp3_commands_add_g41v4_u16 (dnp3_commands_t *commands, uint16_t idx, double value)
 Add a Analog Output command (double-precision float) with 2-byte prefix index. More...
 
static const char * dnp3_command_mode_to_string (dnp3_command_mode_t value)
 Converts a dnp3_command_mode_t to a string. More...
 
static const char * dnp3_command_result_to_string (dnp3_command_result_t value)
 Converts a dnp3_command_result_t to a string. More...
 
static dnp3_command_task_callback_t dnp3_command_task_callback_init (void(*on_complete)(dnp3_command_result_t, void *), void(*on_destroy)(void *arg), void *ctx)
 Initialize a dnp3_command_task_callback_t interface. More...
 
dnp3_param_error_t dnp3_master_channel_operate (dnp3_master_channel_t *channel, dnp3_association_id_t association, dnp3_command_mode_t mode, dnp3_commands_t *command, dnp3_command_task_callback_t callback)
 Asynchronously perform a command operation on the association. More...
 
static const char * dnp3_time_sync_mode_to_string (dnp3_time_sync_mode_t value)
 Converts a dnp3_time_sync_mode_t to a string. More...
 
static const char * dnp3_time_sync_result_to_string (dnp3_time_sync_result_t value)
 Converts a dnp3_time_sync_result_t to a string. More...
 
static dnp3_time_sync_task_callback_t dnp3_time_sync_task_callback_init (void(*on_complete)(dnp3_time_sync_result_t, void *), void(*on_destroy)(void *arg), void *ctx)
 Initialize a dnp3_time_sync_task_callback_t interface. More...
 
dnp3_param_error_t dnp3_master_channel_sync_time (dnp3_master_channel_t *channel, dnp3_association_id_t association, dnp3_time_sync_mode_t mode, dnp3_time_sync_task_callback_t callback)
 Asynchronously perform a time sync operation to the association. More...
 
static const char * dnp3_restart_error_to_string (dnp3_restart_error_t value)
 Converts a dnp3_restart_error_t to a string. More...
 
static dnp3_restart_result_t dnp3_restart_result_init (dnp3_restart_error_t error, uint64_t delay)
 Initialize dnp3_restart_result_t to default values. More...
 
static dnp3_restart_task_callback_t dnp3_restart_task_callback_init (void(*on_complete)(dnp3_restart_result_t, void *), void(*on_destroy)(void *arg), void *ctx)
 Initialize a dnp3_restart_task_callback_t interface. More...
 
dnp3_param_error_t dnp3_master_channel_cold_restart (dnp3_master_channel_t *channel, dnp3_association_id_t association, dnp3_restart_task_callback_t callback)
 Asynchronously perform a cold restart operation to the association. More...
 
dnp3_param_error_t dnp3_master_channel_warm_restart (dnp3_master_channel_t *channel, dnp3_association_id_t association, dnp3_restart_task_callback_t callback)
 Asynchronously perform a warm restart operation to the association. More...
 
static const char * dnp3_link_status_result_to_string (dnp3_link_status_result_t value)
 Converts a dnp3_link_status_result_t to a string. More...
 
static dnp3_link_status_callback_t dnp3_link_status_callback_init (void(*on_complete)(dnp3_link_status_result_t, void *), void(*on_destroy)(void *arg), void *ctx)
 Initialize a dnp3_link_status_callback_t interface. More...
 
dnp3_param_error_t dnp3_master_channel_check_link_status (dnp3_master_channel_t *channel, dnp3_association_id_t association, dnp3_link_status_callback_t callback)
 Asynchronously perform a link status check. More...
 
static const char * dnp3_event_class_to_string (dnp3_event_class_t value)
 Converts a dnp3_event_class_t to a string. More...
 
static const char * dnp3_event_mode_to_string (dnp3_event_mode_t value)
 Converts a dnp3_event_mode_t to a string. More...
 
static dnp3_update_options_t dnp3_update_options_init ()
 Initialize dnp3_update_options_t to default values. More...
 
static const char * dnp3_static_binary_variation_to_string (dnp3_static_binary_variation_t value)
 Converts a dnp3_static_binary_variation_t to a string. More...
 
static const char * dnp3_event_binary_variation_to_string (dnp3_event_binary_variation_t value)
 Converts a dnp3_event_binary_variation_t to a string. More...
 
static dnp3_binary_config_t dnp3_binary_config_init ()
 Initialize dnp3_binary_config_t to default values. More...
 
bool dnp3_database_add_binary (dnp3_database_t *db, uint16_t index, dnp3_event_class_t point_class, dnp3_binary_config_t config)
 Add a new Binary Input point. More...
 
bool dnp3_database_remove_binary (dnp3_database_t *db, uint16_t index)
 Remove a Binary Input point. More...
 
bool dnp3_database_update_binary (dnp3_database_t *db, dnp3_binary_t value, dnp3_update_options_t options)
 Update a Binary Input point. More...
 
dnp3_param_error_t dnp3_database_get_binary (dnp3_database_t *db, uint16_t index, dnp3_binary_t *out)
 Get a Binary Input point. More...
 
static const char * dnp3_static_double_bit_binary_variation_to_string (dnp3_static_double_bit_binary_variation_t value)
 Converts a dnp3_static_double_bit_binary_variation_t to a string. More...
 
static const char * dnp3_event_double_bit_binary_variation_to_string (dnp3_event_double_bit_binary_variation_t value)
 Converts a dnp3_event_double_bit_binary_variation_t to a string. More...
 
static dnp3_double_bit_binary_config_t dnp3_double_bit_binary_config_init ()
 Initialize dnp3_double_bit_binary_config_t to default values. More...
 
bool dnp3_database_add_double_bit_binary (dnp3_database_t *db, uint16_t index, dnp3_event_class_t point_class, dnp3_double_bit_binary_config_t config)
 Add a new Double-Bit Binary Input point. More...
 
bool dnp3_database_remove_double_bit_binary (dnp3_database_t *db, uint16_t index)
 Remove a Double-Bit Binary Input point. More...
 
bool dnp3_database_update_double_bit_binary (dnp3_database_t *db, dnp3_double_bit_binary_t value, dnp3_update_options_t options)
 Update a Double-Bit Binary Input point. More...
 
dnp3_param_error_t dnp3_database_get_double_bit_binary (dnp3_database_t *db, uint16_t index, dnp3_double_bit_binary_t *out)
 Get a Double-Bit Binary Input point. More...
 
static const char * dnp3_static_binary_output_status_variation_to_string (dnp3_static_binary_output_status_variation_t value)
 Converts a dnp3_static_binary_output_status_variation_t to a string. More...
 
static const char * dnp3_event_binary_output_status_variation_to_string (dnp3_event_binary_output_status_variation_t value)
 Converts a dnp3_event_binary_output_status_variation_t to a string. More...
 
static dnp3_binary_output_status_config_t dnp3_binary_output_status_config_init ()
 Initialize dnp3_binary_output_status_config_t to default values. More...
 
bool dnp3_database_add_binary_output_status (dnp3_database_t *db, uint16_t index, dnp3_event_class_t point_class, dnp3_binary_output_status_config_t config)
 Add a new Binary Output Status point. More...
 
bool dnp3_database_remove_binary_output_status (dnp3_database_t *db, uint16_t index)
 Remove a Binary Output Status point. More...
 
bool dnp3_database_update_binary_output_status (dnp3_database_t *db, dnp3_binary_output_status_t value, dnp3_update_options_t options)
 Update a Binary Output Status point. More...
 
dnp3_param_error_t dnp3_database_get_binary_output_status (dnp3_database_t *db, uint16_t index, dnp3_binary_output_status_t *out)
 Get a Binary Output Status point. More...
 
static const char * dnp3_static_counter_variation_to_string (dnp3_static_counter_variation_t value)
 Converts a dnp3_static_counter_variation_t to a string. More...
 
static const char * dnp3_event_counter_variation_to_string (dnp3_event_counter_variation_t value)
 Converts a dnp3_event_counter_variation_t to a string. More...
 
static dnp3_counter_config_t dnp3_counter_config_init ()
 Initialize dnp3_counter_config_t to default values. More...
 
bool dnp3_database_add_counter (dnp3_database_t *db, uint16_t index, dnp3_event_class_t point_class, dnp3_counter_config_t config)
 Add a new Counter point. More...
 
bool dnp3_database_remove_counter (dnp3_database_t *db, uint16_t index)
 Remove a Counter point. More...
 
bool dnp3_database_update_counter (dnp3_database_t *db, dnp3_counter_t value, dnp3_update_options_t options)
 Update a Counter point. More...
 
dnp3_param_error_t dnp3_database_get_counter (dnp3_database_t *db, uint16_t index, dnp3_counter_t *out)
 Get a Counter point. More...
 
static const char * dnp3_static_frozen_counter_variation_to_string (dnp3_static_frozen_counter_variation_t value)
 Converts a dnp3_static_frozen_counter_variation_t to a string. More...
 
static const char * dnp3_event_frozen_counter_variation_to_string (dnp3_event_frozen_counter_variation_t value)
 Converts a dnp3_event_frozen_counter_variation_t to a string. More...
 
static dnp3_frozen_counter_config_t dnp3_frozen_counter_config_init ()
 Initialize dnp3_frozen_counter_config_t to default values. More...
 
bool dnp3_database_add_frozen_counter (dnp3_database_t *db, uint16_t index, dnp3_event_class_t point_class, dnp3_frozen_counter_config_t config)
 Add a new Frozen Counter point. More...
 
bool dnp3_database_remove_frozen_counter (dnp3_database_t *db, uint16_t index)
 Remove a Frozen Counter point. More...
 
bool dnp3_database_update_frozen_counter (dnp3_database_t *db, dnp3_frozen_counter_t value, dnp3_update_options_t options)
 Update an Frozen Counter point. More...
 
dnp3_param_error_t dnp3_database_get_frozen_counter (dnp3_database_t *db, uint16_t index, dnp3_frozen_counter_t *out)
 Get a Frozen Counter point. More...
 
static const char * dnp3_static_analog_variation_to_string (dnp3_static_analog_variation_t value)
 Converts a dnp3_static_analog_variation_t to a string. More...
 
static const char * dnp3_event_analog_variation_to_string (dnp3_event_analog_variation_t value)
 Converts a dnp3_event_analog_variation_t to a string. More...
 
static dnp3_analog_config_t dnp3_analog_config_init ()
 Initialize dnp3_analog_config_t to default values. More...
 
bool dnp3_database_add_analog (dnp3_database_t *db, uint16_t index, dnp3_event_class_t point_class, dnp3_analog_config_t config)
 Add a new Analog point. More...
 
bool dnp3_database_remove_analog (dnp3_database_t *db, uint16_t index)
 Remove an Analog point. More...
 
bool dnp3_database_update_analog (dnp3_database_t *db, dnp3_analog_t value, dnp3_update_options_t options)
 Update a Analog point. More...
 
dnp3_param_error_t dnp3_database_get_analog (dnp3_database_t *db, uint16_t index, dnp3_analog_t *out)
 Get a Analog point. More...
 
static const char * dnp3_static_analog_output_status_variation_to_string (dnp3_static_analog_output_status_variation_t value)
 Converts a dnp3_static_analog_output_status_variation_t to a string. More...
 
static const char * dnp3_event_analog_output_status_variation_to_string (dnp3_event_analog_output_status_variation_t value)
 Converts a dnp3_event_analog_output_status_variation_t to a string. More...
 
static dnp3_analog_output_status_config_t dnp3_analog_output_status_config_init ()
 Initialize dnp3_analog_output_status_config_t to default values. More...
 
bool dnp3_database_add_analog_output_status (dnp3_database_t *db, uint16_t index, dnp3_event_class_t point_class, dnp3_analog_output_status_config_t config)
 Add a new Analog Output Status point. More...
 
bool dnp3_database_remove_analog_output_status (dnp3_database_t *db, uint16_t index)
 Remove an Analog Output Status point. More...
 
bool dnp3_database_update_analog_output_status (dnp3_database_t *db, dnp3_analog_output_status_t value, dnp3_update_options_t options)
 Update a Analog Output Status point. More...
 
dnp3_param_error_t dnp3_database_get_analog_output_status (dnp3_database_t *db, uint16_t index, dnp3_analog_output_status_t *out)
 Get a Analog Output Status point. More...
 
dnp3_octet_string_value_tdnp3_octet_string_new ()
 Create a new octet string. More...
 
void dnp3_octet_string_destroy (dnp3_octet_string_value_t *octet_string)
 Deallocate an octet string. More...
 
void dnp3_octet_string_add (dnp3_octet_string_value_t *octet_string, uint8_t value)
 Create a new octet string. More...
 
bool dnp3_database_add_octet_string (dnp3_database_t *db, uint16_t index, dnp3_event_class_t point_class)
 Add a new Octet String point. More...
 
bool dnp3_database_remove_octet_string (dnp3_database_t *db, uint16_t index)
 Remove an Octet String point. More...
 
bool dnp3_database_update_octet_string (dnp3_database_t *db, uint16_t index, dnp3_octet_string_value_t *value, dnp3_update_options_t options)
 Update an Octet String point. More...
 
static dnp3_class_zero_config_t dnp3_class_zero_config_init ()
 Initialize dnp3_class_zero_config_t to default values. More...
 
static dnp3_outstation_features_t dnp3_outstation_features_init ()
 Initialize dnp3_outstation_features_t to default values. More...
 
static dnp3_outstation_config_t dnp3_outstation_config_init (uint16_t outstation_address, uint16_t master_address)
 Initialize dnp3_outstation_config_t to default values. More...
 
static dnp3_event_buffer_config_t dnp3_event_buffer_config_init (uint16_t max_binary, uint16_t max_double_bit_binary, uint16_t max_binary_output_status, uint16_t max_counter, uint16_t max_frozen_counter, uint16_t max_analog, uint16_t max_analog_output_status, uint16_t max_octet_string)
 Initialize dnp3_event_buffer_config_t to default values. More...
 
dnp3_event_buffer_config_t dnp3_event_buffer_config_all_types (uint16_t max)
 Initialize an event buffer configuration with the same maximum values for all types. More...
 
dnp3_event_buffer_config_t dnp3_event_buffer_config_no_events ()
 Initialize an event buffer configuration to support no events. More...
 
static const char * dnp3_restart_delay_type_to_string (dnp3_restart_delay_type_t value)
 Converts a dnp3_restart_delay_type_t to a string. More...
 
static dnp3_application_iin_t dnp3_application_iin_init ()
 Initialize dnp3_application_iin_t to default values. More...
 
static dnp3_restart_delay_t dnp3_restart_delay_init (dnp3_restart_delay_type_t restart_type, uint16_t value)
 Initialize dnp3_restart_delay_t to default values. More...
 
dnp3_restart_delay_t dnp3_restart_delay_not_supported ()
 Creates a restart delay that indicates that this operation is not supported. More...
 
dnp3_restart_delay_t dnp3_restart_delay_seconds (uint16_t value)
 Creates a restart delay with a value specified in seconds. More...
 
dnp3_restart_delay_t dnp3_restart_delay_millis (uint16_t value)
 Creates a restart delay with a value specified in milliseconds. More...
 
static const char * dnp3_write_time_result_to_string (dnp3_write_time_result_t value)
 Converts a dnp3_write_time_result_t to a string. More...
 
static const char * dnp3_freeze_type_to_string (dnp3_freeze_type_t value)
 Converts a dnp3_freeze_type_t to a string. More...
 
static const char * dnp3_freeze_result_to_string (dnp3_freeze_result_t value)
 Converts a dnp3_freeze_result_t to a string. More...
 
static dnp3_outstation_application_t dnp3_outstation_application_init (uint16_t(*get_processing_delay_ms)(void *), dnp3_write_time_result_t(*write_absolute_time)(uint64_t, void *), dnp3_application_iin_t(*get_application_iin)(void *), dnp3_restart_delay_t(*cold_restart)(void *), dnp3_restart_delay_t(*warm_restart)(void *), dnp3_freeze_result_t(*freeze_counters_all)(dnp3_freeze_type_t, dnp3_database_t *, void *), dnp3_freeze_result_t(*freeze_counters_range)(uint16_t, uint16_t, dnp3_freeze_type_t, dnp3_database_t *, void *), void(*on_destroy)(void *arg), void *ctx)
 Initialize a dnp3_outstation_application_t interface. More...
 
static const char * dnp3_function_code_to_string (dnp3_function_code_t value)
 Converts a dnp3_function_code_t to a string. More...
 
static dnp3_request_header_t dnp3_request_header_init (dnp3_control_t control, dnp3_function_code_t function)
 Initialize dnp3_request_header_t to default values. More...
 
static const char * dnp3_broadcast_action_to_string (dnp3_broadcast_action_t value)
 Converts a dnp3_broadcast_action_t to a string. More...
 
static dnp3_outstation_information_t dnp3_outstation_information_init (void(*process_request_from_idle)(dnp3_request_header_t, void *), void(*broadcast_received)(dnp3_function_code_t, dnp3_broadcast_action_t, void *), void(*enter_solicited_confirm_wait)(uint8_t, void *), void(*solicited_confirm_timeout)(uint8_t, void *), void(*solicited_confirm_received)(uint8_t, void *), void(*solicited_confirm_wait_new_request)(void *), void(*wrong_solicited_confirm_seq)(uint8_t, uint8_t, void *), void(*unexpected_confirm)(bool, uint8_t, void *), void(*enter_unsolicited_confirm_wait)(uint8_t, void *), void(*unsolicited_confirm_timeout)(uint8_t, bool, void *), void(*unsolicited_confirmed)(uint8_t, void *), void(*clear_restart_iin)(void *), void(*on_destroy)(void *arg), void *ctx)
 Initialize a dnp3_outstation_information_t interface. More...
 
static const char * dnp3_command_status_to_string (dnp3_command_status_t value)
 Converts a dnp3_command_status_t to a string. More...
 
static const char * dnp3_operate_type_to_string (dnp3_operate_type_t value)
 Converts a dnp3_operate_type_t to a string. More...
 
static dnp3_control_handler_t dnp3_control_handler_init (void(*begin_fragment)(void *), void(*end_fragment)(void *), dnp3_command_status_t(*select_g12v1)(dnp3_g12v1_t, uint16_t, dnp3_database_t *, void *), dnp3_command_status_t(*operate_g12v1)(dnp3_g12v1_t, uint16_t, dnp3_operate_type_t, dnp3_database_t *, void *), dnp3_command_status_t(*select_g41v1)(int32_t, uint16_t, dnp3_database_t *, void *), dnp3_command_status_t(*operate_g41v1)(int32_t, uint16_t, dnp3_operate_type_t, dnp3_database_t *, void *), dnp3_command_status_t(*select_g41v2)(int16_t, uint16_t, dnp3_database_t *, void *), dnp3_command_status_t(*operate_g41v2)(int16_t, uint16_t, dnp3_operate_type_t, dnp3_database_t *, void *), dnp3_command_status_t(*select_g41v3)(float, uint16_t, dnp3_database_t *, void *), dnp3_command_status_t(*operate_g41v3)(float, uint16_t, dnp3_operate_type_t, dnp3_database_t *, void *), dnp3_command_status_t(*select_g41v4)(double, uint16_t, dnp3_database_t *, void *), dnp3_command_status_t(*operate_g41v4)(double, uint16_t, dnp3_operate_type_t, dnp3_database_t *, void *), void(*on_destroy)(void *arg), void *ctx)
 Initialize a dnp3_control_handler_t interface. More...
 
static const char * dnp3_connection_state_to_string (dnp3_connection_state_t value)
 Converts a dnp3_connection_state_t to a string. More...
 
static dnp3_connection_state_listener_t dnp3_connection_state_listener_init (void(*on_change)(dnp3_connection_state_t, void *), void(*on_destroy)(void *arg), void *ctx)
 Initialize a dnp3_connection_state_listener_t interface. More...
 
static dnp3_outstation_transaction_t dnp3_outstation_transaction_init (void(*execute)(dnp3_database_t *, void *), void(*on_destroy)(void *arg), void *ctx)
 Initialize a dnp3_outstation_transaction_t interface. More...
 
dnp3_param_error_t dnp3_outstation_create_serial_session (dnp3_runtime_t *runtime, const char *serial_path, dnp3_serial_port_settings_t settings, dnp3_outstation_config_t config, dnp3_event_buffer_config_t event_config, dnp3_outstation_application_t application, dnp3_outstation_information_t information, dnp3_control_handler_t control_handler, dnp3_outstation_t **out)
 Create an outstation instance running on a serial port. More...
 
void dnp3_outstation_destroy (dnp3_outstation_t *outstation)
 Free resources of the outstation. More...
 
void dnp3_outstation_transaction (dnp3_outstation_t *outstation, dnp3_outstation_transaction_t callback)
 Execute transaction to modify the internal database of the outstation. More...
 
dnp3_param_error_t dnp3_outstation_set_decode_level (dnp3_outstation_t *outstation, dnp3_decode_level_t level)
 Set decoding log level. More...
 
dnp3_address_filter_tdnp3_address_filter_any ()
 Create an address filter that accepts any IP address. More...
 
dnp3_param_error_t dnp3_address_filter_new (const char *address, dnp3_address_filter_t **out)
 Create an address filter that accepts any IP address. More...
 
dnp3_param_error_t dnp3_address_filter_add (dnp3_address_filter_t *address_filter, const char *address)
 Add an accepted IP address to the filter. More...
 
void dnp3_address_filter_destroy (dnp3_address_filter_t *address_filter)
 Destroy an address filter. More...
 
dnp3_param_error_t dnp3_tcpserver_new (dnp3_runtime_t *runtime, dnp3_link_error_mode_t link_error_mode, const char *address, dnp3_tcp_server_t **out)
 Create a new TCP server. More...
 
void dnp3_tcpserver_destroy (dnp3_tcp_server_t *server)
 Gracefully shutdown all the outstations associated to this server, stops the server and release resources. More...
 
dnp3_param_error_t dnp3_tcpserver_add_outstation (dnp3_tcp_server_t *server, dnp3_outstation_config_t config, dnp3_event_buffer_config_t event_config, dnp3_outstation_application_t application, dnp3_outstation_information_t information, dnp3_control_handler_t control_handler, dnp3_connection_state_listener_t listener, dnp3_address_filter_t *filter, dnp3_outstation_t **out)
 Add an outstation to the server. More...
 
dnp3_param_error_t dnp3_tcpserver_bind (dnp3_tcp_server_t *server)
 Bind the server to the port and starts listening. Also starts all the outstations associated to it. More...
 

Typedef Documentation

◆ dnp3_association_id_t

Association identifier.

Warning
This struct should never be initialized or modified by user code

◆ dnp3_client_state_t

State of the client connection.

Use by the dnp3_client_state_listener_t.

◆ dnp3_database_t

Internal database access.

Warning
This object is only valid within the transaction.

◆ dnp3_endpoint_list_t

List of IP endpoints.

You can write IP addresses or DNS names and the port to connect to. e.g. "127.0.0.1:20000" or "dnp3.myorg.com:20000".

◆ dnp3_event_buffer_config_t

Maximum number of events for each type.

A value of zero means that events will not be buffered for that type.

◆ dnp3_log_level_t

Log level.

Used in dnp3_logger_t::on_message callback to identify the log level of a message.

◆ dnp3_master_channel_t

Represents a communication channel for a master station.

To communicate with a particular outstation, you need to add an association with dnp3_master_channel_add_association.

Warning
The class methods that return a value (e.g. as dnp3_master_channel_add_association) cannot be called from within a callback.

◆ dnp3_outstation_information_t

Informational callbacks that the outstation doesn't rely on to function.

It may be useful to certain applications to assess the health of the communication or to count statistics

◆ dnp3_outstation_t

Outstation handle.

Use this handle to modify the internal database.

◆ dnp3_poll_id_t

Poll identifier.

Warning
This struct should never be initialized or modified by user code

◆ dnp3_request_t

Custom request.

Whenever a method takes a request as a parameter, the request is internally copied. Therefore, it is possible to reuse the same requests over and over.

◆ dnp3_restart_delay_t

Restart delay used by dnp3_outstation_application_t::cold_restart and dnp3_outstation_application_t::warm_restart.

If dnp3_restart_delay_t::restart_type is not DNP3_RESTART_DELAY_TYPE_NOT_SUPPORTED, then the dnp3_restart_delay_t::value is valid. Otherwise, the outstation will return IIN2.0 NO_FUNC_CODE_SUPPORT.

◆ dnp3_retry_strategy_t

Retry strategy configuration.

The strategy uses an exponential back-off with a minimum and maximum value.

◆ dnp3_tcp_server_t

TCP server that listens for connections and routes the messages to outstations.

To add outstations to it, use dnp3_tcpserver_add_outstation. Once all the outstations are added, the server can be started with dnp3_tcpserver_bind.

dnp3_tcpserver_destroy is used to gracefully shutdown all the outstations and the server.

◆ dnp3_timestamp_utc_t

◆ dnp3_update_options_t

Options that control how the update is performed.

99% of the time, the default value should be used.

Enumeration Type Documentation

◆ dnp3_app_decode_level_t

Controls how transmitted and received application-layer fragments are decoded at the INFO log level.

Enumerator
DNP3_APP_DECODE_LEVEL_NOTHING 

Decode nothing.

DNP3_APP_DECODE_LEVEL_HEADER 

Decode the header-only.

DNP3_APP_DECODE_LEVEL_OBJECT_HEADERS 

Decode the header and the object headers.

DNP3_APP_DECODE_LEVEL_OBJECT_VALUES 

Decode the header, the object headers, and the object values.

◆ dnp3_auto_time_sync_t

Automatic time synchronization configuration.

Enumerator
DNP3_AUTO_TIME_SYNC_NONE 

Do not perform automatic time sync.

DNP3_AUTO_TIME_SYNC_LAN 

Perform automatic time sync with Record Current Time (0x18) function code.

DNP3_AUTO_TIME_SYNC_NON_LAN 

Perform automatic time sync with Delay Measurement (0x17) function code.

◆ dnp3_broadcast_action_t

Enumeration describing how the outstation processed a broadcast request.

Enumerator
DNP3_BROADCAST_ACTION_PROCESSED 

Outstation processed the broadcast.

DNP3_BROADCAST_ACTION_IGNORED_BY_CONFIGURATION 

Outstation ignored the broadcast message b/c it is disabled by configuration.

DNP3_BROADCAST_ACTION_BAD_OBJECT_HEADERS 

Outstation was unable to parse the object headers and ignored the request.

DNP3_BROADCAST_ACTION_UNSUPPORTED_FUNCTION 

Outstation ignore the broadcast message b/c the function is not supported via Broadcast.

◆ dnp3_client_state_t

State of the client connection.

Use by the dnp3_client_state_listener_t.

Enumerator
DNP3_CLIENT_STATE_DISABLED 

Client is disabled and idle until disabled.

DNP3_CLIENT_STATE_CONNECTING 

Client is trying to establish a connection to the remote device.

DNP3_CLIENT_STATE_CONNECTED 

Client is connected to the remote device.

DNP3_CLIENT_STATE_WAIT_AFTER_FAILED_CONNECT 

Failed to establish a connection, waiting before retrying.

DNP3_CLIENT_STATE_WAIT_AFTER_DISCONNECT 

Client was disconnected, waiting before retrying.

DNP3_CLIENT_STATE_SHUTDOWN 

Client is shutting down.

◆ dnp3_command_mode_t

Command operation mode.

Enumerator
DNP3_COMMAND_MODE_DIRECT_OPERATE 

Perform a Direct Operate (0x05)

DNP3_COMMAND_MODE_SELECT_BEFORE_OPERATE 

Perform a Select and Operate (0x03 then 0x04)

◆ dnp3_command_result_t

Result of a command.

Enumerator
DNP3_COMMAND_RESULT_SUCCESS 

Command was a success.

DNP3_COMMAND_RESULT_BAD_STATUS 

Outstation indicated that a command was not SUCCESS.

DNP3_COMMAND_RESULT_HEADER_MISMATCH 

Number of headers or objects in the response didn't match the number in the request.

DNP3_COMMAND_RESULT_TOO_MANY_REQUESTS 

too many user requests queued

DNP3_COMMAND_RESULT_BAD_RESPONSE 

response was malformed or contained object headers

DNP3_COMMAND_RESULT_RESPONSE_TIMEOUT 

timeout occurred before receiving a response

DNP3_COMMAND_RESULT_WRITE_ERROR 

insufficient buffer space to serialize the request

DNP3_COMMAND_RESULT_NO_CONNECTION 

no connection

DNP3_COMMAND_RESULT_SHUTDOWN 

master was shutdown

DNP3_COMMAND_RESULT_ASSOCIATION_REMOVED 

association was removed mid-task

◆ dnp3_command_status_t

Enumeration received from an outstation in response to command request.

Enumerator
DNP3_COMMAND_STATUS_SUCCESS 

command was accepted, initiated, or queued (value == 0)

DNP3_COMMAND_STATUS_TIMEOUT 

command timed out before completing (value == 1)

DNP3_COMMAND_STATUS_NO_SELECT 

command requires being selected before operate, configuration issue (value == 2)

DNP3_COMMAND_STATUS_FORMAT_ERROR 

bad control code or timing values (value == 3)

DNP3_COMMAND_STATUS_NOT_SUPPORTED 

command is not implemented (value == 4)

DNP3_COMMAND_STATUS_ALREADY_ACTIVE 

command is all ready in progress or its all ready in that mode (value == 5)

DNP3_COMMAND_STATUS_HARDWARE_ERROR 

something is stopping the command, often a local/remote interlock (value == 6)

DNP3_COMMAND_STATUS_LOCAL 

the function governed by the control is in local only control (value == 7)

DNP3_COMMAND_STATUS_TOO_MANY_OPS 

the command has been done too often and has been throttled (value == 8)

DNP3_COMMAND_STATUS_NOT_AUTHORIZED 

the command was rejected because the device denied it or an RTU intercepted it (value == 9)

DNP3_COMMAND_STATUS_AUTOMATION_INHIBIT 

command not accepted because it was prevented or inhibited by a local automation process, such as interlocking logic or synchrocheck (value == 10)

DNP3_COMMAND_STATUS_PROCESSING_LIMITED 

command not accepted because the device cannot process any more activities than are presently in progress (value == 11)

DNP3_COMMAND_STATUS_OUT_OF_RANGE 

command not accepted because the value is outside the acceptable range permitted for this point (value == 12)

DNP3_COMMAND_STATUS_DOWNSTREAM_LOCAL 

command not accepted because the outstation is forwarding the request to another downstream device which reported LOCAL (value == 13)

DNP3_COMMAND_STATUS_ALREADY_COMPLETE 

command not accepted because the outstation has already completed the requested operation (value == 14)

DNP3_COMMAND_STATUS_BLOCKED 

command not accepted because the requested function is specifically blocked at the outstation (value == 15)

DNP3_COMMAND_STATUS_CANCELED 

command not accepted because the operation was cancelled (value == 16)

DNP3_COMMAND_STATUS_BLOCKED_OTHER_MASTER 

command not accepted because another master is communicating with the outstation and has exclusive rights to operate this control point (value == 17)

DNP3_COMMAND_STATUS_DOWNSTREAM_FAIL 

command not accepted because the outstation is forwarding the request to another downstream device which cannot be reached or is otherwise incapable of performing the request (value == 18)

DNP3_COMMAND_STATUS_NON_PARTICIPATING 

(deprecated) indicates the outstation shall not issue or perform the control operation (value == 126)

DNP3_COMMAND_STATUS_UNKNOWN 

aptures any value not defined in the enumeration

◆ dnp3_connection_state_t

Outstation connection state for connection-oriented transports, e.g. TCP.

Enumerator
DNP3_CONNECTION_STATE_CONNECTED 

Connected to the master.

DNP3_CONNECTION_STATE_DISCONNECTED 

Disconnected from the master.

◆ dnp3_data_bits_t

Number of bits per character.

Enumerator
DNP3_DATA_BITS_FIVE 

5 bits per character

DNP3_DATA_BITS_SIX 

6 bits per character

DNP3_DATA_BITS_SEVEN 

7 bits per character

DNP3_DATA_BITS_EIGHT 

8 bits per character

◆ dnp3_double_bit_t

Double-bit binary input value.

Enumerator
DNP3_DOUBLE_BIT_INTERMEDIATE 

Transition between conditions.

DNP3_DOUBLE_BIT_DETERMINED_OFF 

Determined to be OFF.

DNP3_DOUBLE_BIT_DETERMINED_ON 

Determined to be ON.

DNP3_DOUBLE_BIT_INDETERMINATE 

Abnormal or custom condition.

◆ dnp3_event_analog_output_status_variation_t

Event analog output status variation.

Enumerator
DNP3_EVENT_ANALOG_OUTPUT_STATUS_VARIATION_GROUP42_VAR1 

Analog output event - 32-bit without time.

DNP3_EVENT_ANALOG_OUTPUT_STATUS_VARIATION_GROUP42_VAR2 

Analog output event - 16-bit without time.

DNP3_EVENT_ANALOG_OUTPUT_STATUS_VARIATION_GROUP42_VAR3 

Analog output event - 32-bit with time.

DNP3_EVENT_ANALOG_OUTPUT_STATUS_VARIATION_GROUP42_VAR4 

Analog output event - 16-bit with time.

DNP3_EVENT_ANALOG_OUTPUT_STATUS_VARIATION_GROUP42_VAR5 

Analog output event - single-precision, floating-point without time.

DNP3_EVENT_ANALOG_OUTPUT_STATUS_VARIATION_GROUP42_VAR6 

Analog output event - double-precision, floating-point without time.

DNP3_EVENT_ANALOG_OUTPUT_STATUS_VARIATION_GROUP42_VAR7 

Analog output event - single-precision, floating-point with time.

DNP3_EVENT_ANALOG_OUTPUT_STATUS_VARIATION_GROUP42_VAR8 

Analog output event - double-precision, floating-point with time.

◆ dnp3_event_analog_variation_t

Event analog variation.

Enumerator
DNP3_EVENT_ANALOG_VARIATION_GROUP32_VAR1 

Analog input event - 32-bit without time.

DNP3_EVENT_ANALOG_VARIATION_GROUP32_VAR2 

Analog input event - 16-bit without time.

DNP3_EVENT_ANALOG_VARIATION_GROUP32_VAR3 

Analog input event - 32-bit with time.

DNP3_EVENT_ANALOG_VARIATION_GROUP32_VAR4 

Analog input event - 16-bit with time.

DNP3_EVENT_ANALOG_VARIATION_GROUP32_VAR5 

Analog input event - single-precision, floating-point without time.

DNP3_EVENT_ANALOG_VARIATION_GROUP32_VAR6 

Analog input event - double-precision, floating-point without time.

DNP3_EVENT_ANALOG_VARIATION_GROUP32_VAR7 

Analog input event - single-precision, floating-point with time.

DNP3_EVENT_ANALOG_VARIATION_GROUP32_VAR8 

Analog input event - double-precision, floating-point with time.

◆ dnp3_event_binary_output_status_variation_t

Event binary output status variation.

Enumerator
DNP3_EVENT_BINARY_OUTPUT_STATUS_VARIATION_GROUP11_VAR1 

Binary output event - status without time.

DNP3_EVENT_BINARY_OUTPUT_STATUS_VARIATION_GROUP11_VAR2 

Binary output event - status with time.

◆ dnp3_event_binary_variation_t

Event binary input variation.

Enumerator
DNP3_EVENT_BINARY_VARIATION_GROUP2_VAR1 

Binary input event - without time.

DNP3_EVENT_BINARY_VARIATION_GROUP2_VAR2 

Binary input event - with absolute time.

DNP3_EVENT_BINARY_VARIATION_GROUP2_VAR3 

Binary input event - with relative time.

◆ dnp3_event_class_t

Event class.

Enumerator
DNP3_EVENT_CLASS_NONE 

Does not generate events.

DNP3_EVENT_CLASS_CLASS1 

Class 1 event.

DNP3_EVENT_CLASS_CLASS2 

Class 2 event.

DNP3_EVENT_CLASS_CLASS3 

Class 3 event.

◆ dnp3_event_counter_variation_t

Event counter variation.

Enumerator
DNP3_EVENT_COUNTER_VARIATION_GROUP22_VAR1 

Counter event - 32-bit with flag.

DNP3_EVENT_COUNTER_VARIATION_GROUP22_VAR2 

Counter event - 16-bit with flag.

DNP3_EVENT_COUNTER_VARIATION_GROUP22_VAR5 

Counter event - 32-bit with flag and time.

DNP3_EVENT_COUNTER_VARIATION_GROUP22_VAR6 

Counter event - 16-bit with flag and time.

◆ dnp3_event_double_bit_binary_variation_t

Event double-bit binary input variation.

Enumerator
DNP3_EVENT_DOUBLE_BIT_BINARY_VARIATION_GROUP4_VAR1 

Double-bit binary input event - without time.

DNP3_EVENT_DOUBLE_BIT_BINARY_VARIATION_GROUP4_VAR2 

Double-bit binary input event - with absolute time.

DNP3_EVENT_DOUBLE_BIT_BINARY_VARIATION_GROUP4_VAR3 

Double-bit binary input event - with relative time.

◆ dnp3_event_frozen_counter_variation_t

Event frozen counter variation.

Enumerator
DNP3_EVENT_FROZEN_COUNTER_VARIATION_GROUP23_VAR1 

Frozen Counter event - 32-bit with flag.

DNP3_EVENT_FROZEN_COUNTER_VARIATION_GROUP23_VAR2 

Frozen Counter event - 16-bit with flag.

DNP3_EVENT_FROZEN_COUNTER_VARIATION_GROUP23_VAR5 

Frozen Counter event - 32-bit with flag and time.

DNP3_EVENT_FROZEN_COUNTER_VARIATION_GROUP23_VAR6 

Frozen Counter event - 16-bit with flag and time.

◆ dnp3_event_mode_t

Controls how events are processed when updating values in the database.

Enumerator
DNP3_EVENT_MODE_DETECT 

Detect events in a type dependent fashion.

This is the default mode that should be used. 
DNP3_EVENT_MODE_FORCE 

Produce an event whether the value has changed or not.

DNP3_EVENT_MODE_SUPPRESS 

Never produce an event regardless of change.

◆ dnp3_flow_control_t

Flow control modes.

Enumerator
DNP3_FLOW_CONTROL_NONE 

No flow control.

DNP3_FLOW_CONTROL_SOFTWARE 

Flow control using XON/XOFF bytes.

DNP3_FLOW_CONTROL_HARDWARE 

Flow control using RTS/CTS signals.

◆ dnp3_freeze_result_t

Result of a freeze operation.

Enumerator
DNP3_FREEZE_RESULT_SUCCESS 

Freeze operation was successful.

DNP3_FREEZE_RESULT_PARAMETER_ERROR 

One of the point is invalid.

DNP3_FREEZE_RESULT_NOT_SUPPORTED 

The demanded freeze operation is not supported by this device.

◆ dnp3_freeze_type_t

Freeze operation type.

Enumerator
DNP3_FREEZE_TYPE_IMMEDIATE_FREEZE 

Copy the current value of a counter to the associated point.

DNP3_FREEZE_TYPE_FREEZE_AND_CLEAR 

Copy the current value of a counter to the associated point and clear the current value to 0.

◆ dnp3_function_code_t

Application layer function code.

Enumerator
DNP3_FUNCTION_CODE_CONFIRM 

Master sends this to an outstation to confirm the receipt of an Application Layer fragment (value == 0)

DNP3_FUNCTION_CODE_READ 

Outstation shall return the data specified by the objects in the request (value == 1)

DNP3_FUNCTION_CODE_WRITE 

Outstation shall store the data specified by the objects in the request (value == 2)

DNP3_FUNCTION_CODE_SELECT 

Outstation shall select (or arm) the output points specified by the objects in the request in preparation for a subsequent operate command (value == 3)

DNP3_FUNCTION_CODE_OPERATE 

Outstation shall activate the output points selected (or armed) by a previous select function code command (value == 4)

DNP3_FUNCTION_CODE_DIRECT_OPERATE 

Outstation shall immediately actuate the output points specified by the objects in the request (value == 5)

DNP3_FUNCTION_CODE_DIRECT_OPERATE_NO_RESPONSE 

Same as DirectOperate but outstation shall not send a response (value == 6)

DNP3_FUNCTION_CODE_IMMEDIATE_FREEZE 

Outstation shall copy the point data values specified by the objects in the request to a separate freeze buffer (value == 7)

DNP3_FUNCTION_CODE_IMMEDIATE_FREEZE_NO_RESPONSE 

Same as ImmediateFreeze but outstation shall not send a response (value == 8)

DNP3_FUNCTION_CODE_FREEZE_CLEAR 

Outstation shall copy the point data values specified by the objects in the request into a separate freeze buffer and then clear the values (value == 9)

DNP3_FUNCTION_CODE_FREEZE_CLEAR_NO_RESPONSE 

Same as FreezeClear but outstation shall not send a response (value == 10)

DNP3_FUNCTION_CODE_FREEZE_AT_TIME 

Outstation shall copy the point data values specified by the objects in the request to a separate freeze buffer at the time and/or time intervals specified in a special time data information object (value == 11)

DNP3_FUNCTION_CODE_FREEZE_AT_TIME_NO_RESPONSE 

Same as FreezeAtTime but outstation shall not send a response (value == 12)

DNP3_FUNCTION_CODE_COLD_RESTART 

Outstation shall perform a complete reset of all hardware and software in the device (value == 13)

DNP3_FUNCTION_CODE_WARM_RESTART 

Outstation shall reset only portions of the device (value == 14)

DNP3_FUNCTION_CODE_INITIALIZE_DATA 

Obsolete-Do not use for new designs (value == 15)

DNP3_FUNCTION_CODE_INITIALIZE_APPLICATION 

Outstation shall place the applications specified by the objects in the request into the ready to run state (value == 16)

DNP3_FUNCTION_CODE_START_APPLICATION 

Outstation shall start running the applications specified by the objects in the request (value == 17)

DNP3_FUNCTION_CODE_STOP_APPLICATION 

Outstation shall stop running the applications specified by the objects in the request (value == 18)

DNP3_FUNCTION_CODE_SAVE_CONFIGURATION 

This code is deprecated-Do not use for new designs (value == 19)

DNP3_FUNCTION_CODE_ENABLE_UNSOLICITED 

Enables outstation to initiate unsolicited responses from points specified by the objects in the request (value == 20)

DNP3_FUNCTION_CODE_DISABLE_UNSOLICITED 

Prevents outstation from initiating unsolicited responses from points specified by the objects in the request (value == 21)

DNP3_FUNCTION_CODE_ASSIGN_CLASS 

Outstation shall assign the events generated by the points specified by the objects in the request to one of the classes (value == 22)

DNP3_FUNCTION_CODE_DELAY_MEASURE 

Outstation shall report the time it takes to process and initiate the transmission of its response (value == 23)

DNP3_FUNCTION_CODE_RECORD_CURRENT_TIME 

Outstation shall save the time when the last octet of this message is received (value == 24)

DNP3_FUNCTION_CODE_OPEN_FILE 

Outstation shall open a file (value == 25)

DNP3_FUNCTION_CODE_CLOSE_FILE 

Outstation shall close a file (value == 26)

DNP3_FUNCTION_CODE_DELETE_FILE 

Outstation shall delete a file (value == 27)

DNP3_FUNCTION_CODE_GET_FILE_INFO 

Outstation shall retrieve information about a file (value == 28)

DNP3_FUNCTION_CODE_AUTHENTICATE_FILE 

Outstation shall return a file authentication key (value == 29)

DNP3_FUNCTION_CODE_ABORT_FILE 

Outstation shall abort a file transfer operation (value == 30)

DNP3_FUNCTION_CODE_RESPONSE 

Master shall interpret this fragment as an Application Layer response to an ApplicationLayer request (value == 129)

DNP3_FUNCTION_CODE_UNSOLICITED_RESPONSE 

Master shall interpret this fragment as an unsolicited response that was not prompted by an explicit request (value == 130)

◆ dnp3_iin1_flag_t

First IIN bit flags.

Enumerator
DNP3_IIN1_FLAG_BROADCAST 

Indicate that the message was broadcasted.

DNP3_IIN1_FLAG_CLASS1_EVENTS 

Outstation has Class 1 events not reported yet.

DNP3_IIN1_FLAG_CLASS2_EVENTS 

Outstation has Class 2 events not reported yet.

DNP3_IIN1_FLAG_CLASS3_EVENTS 

Outstation has Class 3 events not reported yet.

DNP3_IIN1_FLAG_NEED_TIME 

Outstation indicates it requires time synchronization from the master.

DNP3_IIN1_FLAG_LOCAL_CONTROL 

At least one point of the outstation is in the local operation mode.

DNP3_IIN1_FLAG_DEVICE_TROUBLE 

Outstation reports abnormal condition.

DNP3_IIN1_FLAG_DEVICE_RESTART 

Outstation has restarted.

◆ dnp3_iin2_flag_t

Second IIN bit flags.

Enumerator
DNP3_IIN2_FLAG_NO_FUNC_CODE_SUPPORT 

Function code is not supported by the outstation.

DNP3_IIN2_FLAG_OBJECT_UNKNOWN 

Request contains an unknown point.

DNP3_IIN2_FLAG_PARAMETER_ERROR 

Unable to parse request or invalid qualifier code.

DNP3_IIN2_FLAG_EVENT_BUFFER_OVERFLOW 

Event buffer overflow, at least one event was lost.

DNP3_IIN2_FLAG_ALREADY_EXECUTING 

Cannot perform operation because an execution is already in progress.

DNP3_IIN2_FLAG_CONFIG_CORRUPT 

Outstation reports a configuration corruption.

◆ dnp3_link_decode_level_t

Controls how transmitted and received link frames are decoded at the INFO log level.

Enumerator
DNP3_LINK_DECODE_LEVEL_NOTHING 

Decode nothing.

DNP3_LINK_DECODE_LEVEL_HEADER 

Decode the header.

DNP3_LINK_DECODE_LEVEL_PAYLOAD 

Decode the header and the raw payload as hexadecimal.

◆ dnp3_link_error_mode_t

Controls how errors in parsed link-layer frames are handled. This behavior is configurable for physical layers with built-in error correction like TCP as the connection might be through a terminal server.

Enumerator
DNP3_LINK_ERROR_MODE_DISCARD 

Framing errors are discarded. The link-layer parser is reset on any error, and the parser begins scanning for 0x0564. This is always the behavior for serial ports.

DNP3_LINK_ERROR_MODE_CLOSE 

Framing errors are bubbled up to calling code, closing the session. Suitable for physical layers that provide error correction like TCP.

◆ dnp3_link_status_result_t

Result of a link status check. See dnp3_master_channel_check_link_status.

Enumerator
DNP3_LINK_STATUS_RESULT_SUCCESS 

The outstation responded with a valid LINK_STATUS.

DNP3_LINK_STATUS_RESULT_UNEXPECTED_RESPONSE 

There was activity on the link, but it wasn't a LINK_STATUS.

DNP3_LINK_STATUS_RESULT_TASK_ERROR 

The task failed for some reason (e.g. the master was shutdown)

◆ dnp3_log_level_t

Log level.

Used in dnp3_logger_t::on_message callback to identify the log level of a message.

Enumerator
DNP3_LOG_LEVEL_ERROR 

Error log level.

DNP3_LOG_LEVEL_WARN 

Warning log level.

DNP3_LOG_LEVEL_INFO 

Information log level.

DNP3_LOG_LEVEL_DEBUG 

Debugging log level.

DNP3_LOG_LEVEL_TRACE 

Trace log level.

◆ dnp3_log_output_format_t

Describes how each log event is formatted.

Enumerator
DNP3_LOG_OUTPUT_FORMAT_TEXT 

A simple text-based format.

DNP3_LOG_OUTPUT_FORMAT_JSON 

Output formatted as JSON.

◆ dnp3_op_type_t

Operation Type field, used in conjunction with dnp3_trip_close_code_t to specify a control operation.

Enumerator
DNP3_OP_TYPE_NUL 

NUL (0)

DNP3_OP_TYPE_PULSE_ON 

PULSE_ON (1)

DNP3_OP_TYPE_PULSE_OFF 

PULSE_OFF (2)

DNP3_OP_TYPE_LATCH_ON 

LATCH_ON (3)

DNP3_OP_TYPE_LATCH_OFF 

LATCH_OFF(4)

◆ dnp3_operate_type_t

Enumeration describing how the master requested the control operation.

Enumerator
DNP3_OPERATE_TYPE_SELECT_BEFORE_OPERATE 

control point was properly selected before the operate request

DNP3_OPERATE_TYPE_DIRECT_OPERATE 

operate the control via a DirectOperate request

DNP3_OPERATE_TYPE_DIRECT_OPERATE_NO_ACK 

operate the control via a DirectOperateNoAck request

◆ dnp3_param_error_t

Error type used throughout the library.

Enumerator
DNP3_PARAM_ERROR_OK 

Success, i.e. no error occurred.

DNP3_PARAM_ERROR_NULL_PARAMETER 

Null parameter.

DNP3_PARAM_ERROR_ASSOCIATION_DOES_NOT_EXIST 

The specified association does not exist.

DNP3_PARAM_ERROR_ASSOCIATION_DUPLICATE_ADDRESS 

Duplicate association address.

DNP3_PARAM_ERROR_INVALID_SOCKET_ADDRESS 

Invalid socket address.

DNP3_PARAM_ERROR_INVALID_DNP3_ADDRESS 

Invalid link-layer DNP3 address.

DNP3_PARAM_ERROR_INVALID_BUFFER_SIZE 

Invalid buffer size.

DNP3_PARAM_ERROR_ADDRESS_FILTER_CONFLICT 

Conflict in the address filter specification.

DNP3_PARAM_ERROR_SERVER_ALREADY_STARTED 

Server already started.

DNP3_PARAM_ERROR_SERVER_BIND_ERROR 

Server failed to bind to the specified port.

DNP3_PARAM_ERROR_MASTER_ALREADY_SHUTDOWN 

Master was already shutdown.

DNP3_PARAM_ERROR_RUNTIME_CREATION_FAILURE 

Failed to create tokio runtime.

DNP3_PARAM_ERROR_RUNTIME_DESTROYED 

Runtime was already disposed of.

DNP3_PARAM_ERROR_RUNTIME_CANNOT_BLOCK_WITHIN_ASYNC 

Runtime cannot execute blocking call within asynchronous context.

DNP3_PARAM_ERROR_LOGGING_ALREADY_CONFIGURED 

Logging can only be configured once.

DNP3_PARAM_ERROR_POINT_DOES_NOT_EXIST 

Point does not exist.

◆ dnp3_parity_t

Parity checking modes.

Enumerator
DNP3_PARITY_NONE 

No parity bit.

DNP3_PARITY_ODD 

Parity bit sets odd number of 1 bits.

DNP3_PARITY_EVEN 

Parity bit sets even number of 1 bits.

◆ dnp3_phys_decode_level_t

Controls how data transmitted at the physical layer (TCP, serial, etc) is logged.

Enumerator
DNP3_PHYS_DECODE_LEVEL_NOTHING 

Log nothing.

DNP3_PHYS_DECODE_LEVEL_LENGTH 

Log only the length of data that is sent and received.

DNP3_PHYS_DECODE_LEVEL_DATA 

Log the length and the actual data that is sent and received.

◆ dnp3_port_state_t

State of the serial port.

Enumerator
DNP3_PORT_STATE_DISABLED 

Disabled until enabled.

DNP3_PORT_STATE_WAIT 

Waiting to perform an open retry.

DNP3_PORT_STATE_OPEN 

Port is open.

DNP3_PORT_STATE_SHUTDOWN 

Task has been shut down.

◆ dnp3_qualifier_code_t

Qualifier code used in the response.

Enumerator
DNP3_QUALIFIER_CODE_RANGE8 

8-bit start stop (0x00)

DNP3_QUALIFIER_CODE_RANGE16 

16-bit start stop (0x01)

DNP3_QUALIFIER_CODE_ALL_OBJECTS 

All objects (0x06)

DNP3_QUALIFIER_CODE_COUNT8 

8-bit count (0x07)

DNP3_QUALIFIER_CODE_COUNT16 

16-bit count (0x08)

DNP3_QUALIFIER_CODE_COUNT_AND_PREFIX8 

8-bit count and prefix (0x17)

DNP3_QUALIFIER_CODE_COUNT_AND_PREFIX16 

16-bit count and prefix (0x28)

DNP3_QUALIFIER_CODE_FREE_FORMAT16 

16-bit free format (0x5B)

◆ dnp3_read_result_t

Result of a read operation.

Enumerator
DNP3_READ_RESULT_SUCCESS 

Read was perform successfully.

DNP3_READ_RESULT_TOO_MANY_REQUESTS 

too many user requests queued

DNP3_READ_RESULT_BAD_RESPONSE 

response was malformed or contained object headers

DNP3_READ_RESULT_RESPONSE_TIMEOUT 

timeout occurred before receiving a response

DNP3_READ_RESULT_WRITE_ERROR 

insufficient buffer space to serialize the request

DNP3_READ_RESULT_NO_CONNECTION 

no connection

DNP3_READ_RESULT_SHUTDOWN 

master was shutdown

DNP3_READ_RESULT_ASSOCIATION_REMOVED 

association was removed mid-task

◆ dnp3_read_type_t

Describes the source of a read event.

Enumerator
DNP3_READ_TYPE_STARTUP_INTEGRITY 

Startup integrity poll.

DNP3_READ_TYPE_UNSOLICITED 

Unsolicited message.

DNP3_READ_TYPE_SINGLE_POLL 

Single poll requested by the user.

DNP3_READ_TYPE_PERIODIC_POLL 

Periodic poll configured by the user.

◆ dnp3_response_function_t

Type of response.

Enumerator
DNP3_RESPONSE_FUNCTION_RESPONSE 

Solicited response.

DNP3_RESPONSE_FUNCTION_UNSOLICITED_RESPONSE 

Unsolicited response.

◆ dnp3_restart_delay_type_t

Type of restart delay value. Used by dnp3_restart_delay_t.

Enumerator
DNP3_RESTART_DELAY_TYPE_NOT_SUPPORTED 

Restart mode not supported.

DNP3_RESTART_DELAY_TYPE_SECONDS 

Value is in seconds (corresponds to g51v1)

DNP3_RESTART_DELAY_TYPE_MILLISECONDS 

Value is in milliseconds (corresponds to g51v2)

◆ dnp3_restart_error_t

Result of a restart operation.

Enumerator
DNP3_RESTART_ERROR_OK 

Restart was perform successfully.

DNP3_RESTART_ERROR_TOO_MANY_REQUESTS 

too many user requests queued

DNP3_RESTART_ERROR_BAD_RESPONSE 

response was malformed or contained object headers

DNP3_RESTART_ERROR_RESPONSE_TIMEOUT 

timeout occurred before receiving a response

DNP3_RESTART_ERROR_WRITE_ERROR 

insufficient buffer space to serialize the request

DNP3_RESTART_ERROR_NO_CONNECTION 

no connection

DNP3_RESTART_ERROR_SHUTDOWN 

master was shutdown

DNP3_RESTART_ERROR_ASSOCIATION_REMOVED 

association was removed mid-task

◆ dnp3_static_analog_output_status_variation_t

Static analog output status variation.

Enumerator
DNP3_STATIC_ANALOG_OUTPUT_STATUS_VARIATION_GROUP40_VAR1 

Analog output status - 32-bit with flag.

DNP3_STATIC_ANALOG_OUTPUT_STATUS_VARIATION_GROUP40_VAR2 

Analog output status - 16-bit with flag.

DNP3_STATIC_ANALOG_OUTPUT_STATUS_VARIATION_GROUP40_VAR3 

Analog output status - single-precision, floating-point with flag.

DNP3_STATIC_ANALOG_OUTPUT_STATUS_VARIATION_GROUP40_VAR4 

Analog output status - double-precision, floating-point with flag.

◆ dnp3_static_analog_variation_t

Static analog variation.

Enumerator
DNP3_STATIC_ANALOG_VARIATION_GROUP30_VAR1 

Analog input - 32-bit with flag.

DNP3_STATIC_ANALOG_VARIATION_GROUP30_VAR2 

Analog input - 16-bit with flag.

DNP3_STATIC_ANALOG_VARIATION_GROUP30_VAR3 

Analog input - 32-bit without flag.

DNP3_STATIC_ANALOG_VARIATION_GROUP30_VAR4 

Analog input - 16-bit without flag.

DNP3_STATIC_ANALOG_VARIATION_GROUP30_VAR5 

Analog input - single-precision, floating-point with flag.

DNP3_STATIC_ANALOG_VARIATION_GROUP30_VAR6 

Analog input - double-precision, floating-point with flag.

◆ dnp3_static_binary_output_status_variation_t

Static binary output status variation.

Enumerator
DNP3_STATIC_BINARY_OUTPUT_STATUS_VARIATION_GROUP10_VAR1 

Binary output - packed format.

DNP3_STATIC_BINARY_OUTPUT_STATUS_VARIATION_GROUP10_VAR2 

Binary output - output status with flags.

◆ dnp3_static_binary_variation_t

Static binary input variation.

Enumerator
DNP3_STATIC_BINARY_VARIATION_GROUP1_VAR1 

Binary input - packed format.

DNP3_STATIC_BINARY_VARIATION_GROUP1_VAR2 

Binary input - with flags.

◆ dnp3_static_counter_variation_t

Static counter variation.

Enumerator
DNP3_STATIC_COUNTER_VARIATION_GROUP20_VAR1 

Counter - 32-bit with flag.

DNP3_STATIC_COUNTER_VARIATION_GROUP20_VAR2 

Counter - 16-bit with flag.

DNP3_STATIC_COUNTER_VARIATION_GROUP20_VAR5 

Counter - 32-bit without flag.

DNP3_STATIC_COUNTER_VARIATION_GROUP20_VAR6 

Counter - 16-bit without flag.

◆ dnp3_static_double_bit_binary_variation_t

Static double-bit binary input variation.

Enumerator
DNP3_STATIC_DOUBLE_BIT_BINARY_VARIATION_GROUP3_VAR1 

Double-bit binary input - packed format.

DNP3_STATIC_DOUBLE_BIT_BINARY_VARIATION_GROUP3_VAR2 

Double-bit binary input - with flags.

◆ dnp3_static_frozen_counter_variation_t

Static frozen counter variation.

Enumerator
DNP3_STATIC_FROZEN_COUNTER_VARIATION_GROUP21_VAR1 

Frozen Counter - 32-bit with flag.

DNP3_STATIC_FROZEN_COUNTER_VARIATION_GROUP21_VAR2 

Frozen Counter - 16-bit with flag.

DNP3_STATIC_FROZEN_COUNTER_VARIATION_GROUP21_VAR5 

Frozen Counter - 32-bit with flag and time.

DNP3_STATIC_FROZEN_COUNTER_VARIATION_GROUP21_VAR6 

Frozen Counter - 16-bit with flag and time.

DNP3_STATIC_FROZEN_COUNTER_VARIATION_GROUP21_VAR9 

Frozen Counter - 32-bit without flag.

DNP3_STATIC_FROZEN_COUNTER_VARIATION_GROUP21_VAR10 

Frozen Counter - 16-bit without flag.

◆ dnp3_stop_bits_t

Number of stop bits.

Enumerator
DNP3_STOP_BITS_ONE 

One stop bit.

DNP3_STOP_BITS_TWO 

Two stop bits.

◆ dnp3_time_format_t

Describes if and how the time will be formatted in log messages.

Enumerator
DNP3_TIME_FORMAT_NONE 

Don't format the timestamp as part of the message.

DNP3_TIME_FORMAT_RFC3339 

Format the time using RFC 3339.

DNP3_TIME_FORMAT_SYSTEM 

Format the time in a human readable format e.g. 'Jun 25 14:27:12.955'.

◆ dnp3_time_quality_t

Timestamp quality.

Enumerator
DNP3_TIME_QUALITY_SYNCHRONIZED 

The timestamp is UTC synchronized at the remote device.

DNP3_TIME_QUALITY_NOT_SYNCHRONIZED 

The device indicates the timestamp may be not be synchronized.

DNP3_TIME_QUALITY_INVALID 

Timestamp is not valid, ignore the value and use a local timestamp.

◆ dnp3_time_sync_mode_t

Time synchronization mode.

Enumerator
DNP3_TIME_SYNC_MODE_LAN 

Perform a LAN time sync with Record Current Time (0x18) function code.

DNP3_TIME_SYNC_MODE_NON_LAN 

Perform a non-LAN time sync with Delay Measurement (0x17) function code.

◆ dnp3_time_sync_result_t

Result of a time sync operation.

Enumerator
DNP3_TIME_SYNC_RESULT_SUCCESS 

Time synchronization operation was a success.

DNP3_TIME_SYNC_RESULT_CLOCK_ROLLBACK 

Detected a clock rollback.

DNP3_TIME_SYNC_RESULT_SYSTEM_TIME_NOT_UNIX 

The system time cannot be converted to a Unix timestamp.

DNP3_TIME_SYNC_RESULT_BAD_OUTSTATION_TIME_DELAY 

Outstation time delay exceeded the response delay.

DNP3_TIME_SYNC_RESULT_OVERFLOW 

Overflow in calculation.

DNP3_TIME_SYNC_RESULT_STILL_NEEDS_TIME 

Outstation did not clear the NEED_TIME IIN bit.

DNP3_TIME_SYNC_RESULT_SYSTEM_TIME_NOT_AVAILABLE 

System time not available.

DNP3_TIME_SYNC_RESULT_IIN_ERROR 

Outstation indicated an error.

DNP3_TIME_SYNC_RESULT_TOO_MANY_REQUESTS 

too many user requests queued

DNP3_TIME_SYNC_RESULT_BAD_RESPONSE 

response was malformed or contained object headers

DNP3_TIME_SYNC_RESULT_RESPONSE_TIMEOUT 

timeout occurred before receiving a response

DNP3_TIME_SYNC_RESULT_WRITE_ERROR 

insufficient buffer space to serialize the request

DNP3_TIME_SYNC_RESULT_NO_CONNECTION 

no connection

DNP3_TIME_SYNC_RESULT_SHUTDOWN 

master was shutdown

DNP3_TIME_SYNC_RESULT_ASSOCIATION_REMOVED 

association was removed mid-task

◆ dnp3_transport_decode_level_t

Controls how transmitted and received transport segments are decoded at the INFO log level.

Enumerator
DNP3_TRANSPORT_DECODE_LEVEL_NOTHING 

Decode nothing.

DNP3_TRANSPORT_DECODE_LEVEL_HEADER 

Decode the header.

DNP3_TRANSPORT_DECODE_LEVEL_PAYLOAD 

Decode the header and the raw payload as hexadecimal.

◆ dnp3_trip_close_code_t

Trip-Close Code field, used in conjunction with dnp3_op_type_t to specify a control operation.

Enumerator
DNP3_TRIP_CLOSE_CODE_NUL 

NUL (0)

DNP3_TRIP_CLOSE_CODE_CLOSE 

CLOSE (1)

DNP3_TRIP_CLOSE_CODE_TRIP 

TRIP (2)

DNP3_TRIP_CLOSE_CODE_RESERVED 

RESERVED (3)

◆ dnp3_variation_t

Group/Variation.

Enumerator
DNP3_VARIATION_GROUP1_VAR0 

Binary Input - Default variation.

DNP3_VARIATION_GROUP1_VAR1 

Binary Input - Packed format.

DNP3_VARIATION_GROUP1_VAR2 

Binary Input - With flags.

DNP3_VARIATION_GROUP2_VAR0 

Binary Input Event - Default variation.

DNP3_VARIATION_GROUP2_VAR1 

Binary Input Event - Without time.

DNP3_VARIATION_GROUP2_VAR2 

Binary Input Event - With absolute time.

DNP3_VARIATION_GROUP2_VAR3 

Binary Input Event - With relative time.

DNP3_VARIATION_GROUP3_VAR0 

Double-bit Binary Input - Default variation.

DNP3_VARIATION_GROUP3_VAR1 

Double-bit Binary Input - Packed format.

DNP3_VARIATION_GROUP3_VAR2 

Double-bit Binary Input - With flags.

DNP3_VARIATION_GROUP4_VAR0 

Double-bit Binary Input Event - Default variation.

DNP3_VARIATION_GROUP4_VAR1 

Double-bit Binary Input Event - Without time.

DNP3_VARIATION_GROUP4_VAR2 

Double-bit Binary Input Event - With absolute time.

DNP3_VARIATION_GROUP4_VAR3 

Double-bit Binary Input Event - With relative time.

DNP3_VARIATION_GROUP10_VAR0 

Binary Output - Default variation.

DNP3_VARIATION_GROUP10_VAR1 

Binary Output - Packed format.

DNP3_VARIATION_GROUP10_VAR2 

Binary Output - With flags.

DNP3_VARIATION_GROUP11_VAR0 

Binary Output Event - Default variation.

DNP3_VARIATION_GROUP11_VAR1 

Binary Output Event - Without time.

DNP3_VARIATION_GROUP11_VAR2 

Binary Output Event - With time.

DNP3_VARIATION_GROUP12_VAR0 

Binary Output Command - Control Relay Output Block.

DNP3_VARIATION_GROUP12_VAR1 

Binary Output Command - Pattern Control Block.

DNP3_VARIATION_GROUP20_VAR0 

Counter - Default variation.

DNP3_VARIATION_GROUP20_VAR1 

Counter - 32-bit with flags.

DNP3_VARIATION_GROUP20_VAR2 

Counter - 16-bit with flags.

DNP3_VARIATION_GROUP20_VAR5 

Counter - 32-bit without flag.

DNP3_VARIATION_GROUP20_VAR6 

Counter - 16-bit without flag.

DNP3_VARIATION_GROUP21_VAR0 

Frozen Counter - Default variation.

DNP3_VARIATION_GROUP21_VAR1 

Frozen Counter - 32-bit with flags.

DNP3_VARIATION_GROUP21_VAR2 

Frozen Counter - 16-bit with flags.

DNP3_VARIATION_GROUP21_VAR5 

Frozen Counter - 32-bit with flags and time.

DNP3_VARIATION_GROUP21_VAR6 

Frozen Counter - 16-bit with flags and time.

DNP3_VARIATION_GROUP21_VAR9 

Frozen Counter - 32-bit without flag.

DNP3_VARIATION_GROUP21_VAR10 

Frozen Counter - 16-bit without flag.

DNP3_VARIATION_GROUP22_VAR0 

Counter Event - Default variation.

DNP3_VARIATION_GROUP22_VAR1 

Counter Event - 32-bit with flags.

DNP3_VARIATION_GROUP22_VAR2 

Counter Event - 16-bit with flags.

DNP3_VARIATION_GROUP22_VAR5 

Counter Event - 32-bit with flags and time.

DNP3_VARIATION_GROUP22_VAR6 

Counter Event - 16-bit with flags and time.

DNP3_VARIATION_GROUP23_VAR0 

Frozen Counter Event - Default variation.

DNP3_VARIATION_GROUP23_VAR1 

Frozen Counter Event - 32-bit with flags.

DNP3_VARIATION_GROUP23_VAR2 

Frozen Counter Event - 16-bit with flags.

DNP3_VARIATION_GROUP23_VAR5 

Frozen Counter Event - 32-bit with flags and time.

DNP3_VARIATION_GROUP23_VAR6 

Frozen Counter Event - 16-bit with flags and time.

DNP3_VARIATION_GROUP30_VAR0 

Analog Input - Default variation.

DNP3_VARIATION_GROUP30_VAR1 

Analog Input - 32-bit with flags.

DNP3_VARIATION_GROUP30_VAR2 

Analog Input - 16-bit with flags.

DNP3_VARIATION_GROUP30_VAR3 

Analog Input - 32-bit without flag.

DNP3_VARIATION_GROUP30_VAR4 

Analog Input - 16-bit without flag.

DNP3_VARIATION_GROUP30_VAR5 

Analog Input - Single-precision floating point with flags.

DNP3_VARIATION_GROUP30_VAR6 

Analog Input - Double-precision floating point with flags.

DNP3_VARIATION_GROUP32_VAR0 

Analog Input Event - Default variation.

DNP3_VARIATION_GROUP32_VAR1 

Analog Input Event - 32-bit without time.

DNP3_VARIATION_GROUP32_VAR2 

Analog Input Event - 16-bit without time.

DNP3_VARIATION_GROUP32_VAR3 

Analog Input Event - 32-bit with time.

DNP3_VARIATION_GROUP32_VAR4 

Analog Input Event - 16-bit with time.

DNP3_VARIATION_GROUP32_VAR5 

Analog Input Event - Single-precision floating point without time.

DNP3_VARIATION_GROUP32_VAR6 

Analog Input Event - Double-precision floating point without time.

DNP3_VARIATION_GROUP32_VAR7 

Analog Input Event - Single-precision floating point with time.

DNP3_VARIATION_GROUP32_VAR8 

Analog Input Event - Double-precision floating point with time.

DNP3_VARIATION_GROUP40_VAR0 

Analog Output Status - Default variation.

DNP3_VARIATION_GROUP40_VAR1 

Analog Output Status - 32-bit with flags.

DNP3_VARIATION_GROUP40_VAR2 

Analog Output Status - 16-bit with flags.

DNP3_VARIATION_GROUP40_VAR3 

Analog Output Status - Single-precision floating point with flags.

DNP3_VARIATION_GROUP40_VAR4 

Analog Output Status - Double-precision floating point with flags.

DNP3_VARIATION_GROUP41_VAR0 

Analog Output - Default variation.

DNP3_VARIATION_GROUP41_VAR1 

Analog Output - 32-bit.

DNP3_VARIATION_GROUP41_VAR2 

Analog Output - 16-bit.

DNP3_VARIATION_GROUP41_VAR3 

Analog Output - Single-precision floating point.

DNP3_VARIATION_GROUP41_VAR4 

Analog Output - Double-precision floating point.

DNP3_VARIATION_GROUP42_VAR0 

Analog Output Event - Default variation.

DNP3_VARIATION_GROUP42_VAR1 

Analog Output Event - 32-bit without time.

DNP3_VARIATION_GROUP42_VAR2 

Analog Output Event - 16-bit without time.

DNP3_VARIATION_GROUP42_VAR3 

Analog Output Event - 32-bit with time.

DNP3_VARIATION_GROUP42_VAR4 

Analog Output Event - 16-bit with time.

DNP3_VARIATION_GROUP42_VAR5 

Analog Output Event - Single-precision floating point without time.

DNP3_VARIATION_GROUP42_VAR6 

Analog Output Event - Double-precision floating point without time.

DNP3_VARIATION_GROUP42_VAR7 

Analog Output Event - Single-preicions floating point with time.

DNP3_VARIATION_GROUP42_VAR8 

Analog Output Event - Double-preicions floating point with time.

DNP3_VARIATION_GROUP50_VAR1 

Time and Date - Absolute time.

DNP3_VARIATION_GROUP50_VAR3 

Time and Date - Absolute time at last recorded time.

DNP3_VARIATION_GROUP50_VAR4 

Time and Date - Indexed absolute time and long interval.

DNP3_VARIATION_GROUP51_VAR1 

Time and date CTO - Absolute time, synchronized.

DNP3_VARIATION_GROUP51_VAR2 

Time and date CTO - Absolute time, unsynchronized.

DNP3_VARIATION_GROUP52_VAR1 

Time delay - Coarse.

DNP3_VARIATION_GROUP52_VAR2 

Time delay - Fine.

DNP3_VARIATION_GROUP60_VAR1 

Class objects - Class 0 data.

DNP3_VARIATION_GROUP60_VAR2 

Class objects - Class 1 data.

DNP3_VARIATION_GROUP60_VAR3 

Class objects - Class 2 data.

DNP3_VARIATION_GROUP60_VAR4 

Class objects - Class 3 data.

DNP3_VARIATION_GROUP80_VAR1 

Internal Indications - Packed format.

DNP3_VARIATION_GROUP110 

Octet String.

DNP3_VARIATION_GROUP111 

Octet String Event.

◆ dnp3_write_time_result_t

Write time result used by dnp3_outstation_application_t::write_absolute_time.

Enumerator
DNP3_WRITE_TIME_RESULT_NOT_SUPPORTED 

Writing time is not supported by this outstation (translated to NO_FUNC_CODE_SUPPORT).

DNP3_WRITE_TIME_RESULT_INVALID_VALUE 

The provided value was invalid (translated to PARAM_ERROR)

DNP3_WRITE_TIME_RESULT_OK 

The write time operation succeeded.

Function Documentation

◆ dnp3_address_filter_add()

dnp3_param_error_t dnp3_address_filter_add ( dnp3_address_filter_t address_filter,
const char *  address 
)

Add an accepted IP address to the filter.

Parameters
address_filterAddress filter to modify
addressIP address to add
Returns
Error code

◆ dnp3_address_filter_any()

dnp3_address_filter_t* dnp3_address_filter_any ( )

Create an address filter that accepts any IP address.

Returns
Address filter

◆ dnp3_address_filter_destroy()

void dnp3_address_filter_destroy ( dnp3_address_filter_t address_filter)

Destroy an address filter.

Parameters
address_filterAddress filter to destroy

◆ dnp3_address_filter_new()

dnp3_param_error_t dnp3_address_filter_new ( const char *  address,
dnp3_address_filter_t **  out 
)

Create an address filter that accepts any IP address.

Parameters
addressIP address to accept
outAddress filter
Returns
Error code

◆ dnp3_analog_config_init()

static dnp3_analog_config_t dnp3_analog_config_init ( )
static

Initialize dnp3_analog_config_t to default values.

Returns
New instance of dnp3_analog_config_t

◆ dnp3_analog_init()

static dnp3_analog_t dnp3_analog_init ( uint16_t  index,
double  value,
dnp3_flags_t  flags,
dnp3_timestamp_t  time 
)
static

Initialize dnp3_analog_t to default values.

Parameters
indexPoint index
valuePoint value
flagsPoint flags
timePoint timestamp
Returns
New instance of dnp3_analog_t

◆ dnp3_analog_next()

dnp3_analog_t* dnp3_analog_next ( dnp3_analog_iterator_t it)

Get the next value of the iterator.

Parameters
itIterator
Returns
Next value of the iterator or NULL if the iterator reached the end

◆ dnp3_analog_output_status_config_init()

static dnp3_analog_output_status_config_t dnp3_analog_output_status_config_init ( )
static

Initialize dnp3_analog_output_status_config_t to default values.

Returns
New instance of dnp3_analog_output_status_config_t

◆ dnp3_analog_output_status_init()

static dnp3_analog_output_status_t dnp3_analog_output_status_init ( uint16_t  index,
double  value,
dnp3_flags_t  flags,
dnp3_timestamp_t  time 
)
static

Initialize dnp3_analog_output_status_t to default values.

Parameters
indexPoint index
valuePoint value
flagsPoint flags
timePoint timestamp
Returns
New instance of dnp3_analog_output_status_t

◆ dnp3_analogoutputstatus_next()

dnp3_analog_output_status_t* dnp3_analogoutputstatus_next ( dnp3_analog_output_status_iterator_t it)

Get the next value of the iterator.

Parameters
itIterator
Returns
Next value of the iterator or NULL if the iterator reached the end

◆ dnp3_app_decode_level_to_string()

static const char* dnp3_app_decode_level_to_string ( dnp3_app_decode_level_t  value)
static

Converts a dnp3_app_decode_level_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_application_iin_init()

static dnp3_application_iin_t dnp3_application_iin_init ( )
static

Initialize dnp3_application_iin_t to default values.

Returns
New instance of dnp3_application_iin_t

◆ dnp3_association_config_init()

static dnp3_association_config_t dnp3_association_config_init ( dnp3_event_classes_t  disable_unsol_classes,
dnp3_event_classes_t  enable_unsol_classes,
dnp3_classes_t  startup_integrity_classes,
dnp3_event_classes_t  event_scan_on_events_available 
)
static

Initialize dnp3_association_config_t to default values.

Parameters
disable_unsol_classesClasses to disable unsolicited responses at startup
enable_unsol_classesClasses to enable unsolicited responses at startup
startup_integrity_classesStartup integrity classes to ask on master startup and when an outstation restart is detected.
event_scan_on_events_availableClasses to automatically send reads when the IIN bit is asserted
Returns
New instance of dnp3_association_config_t

◆ dnp3_association_handler_init()

static dnp3_association_handler_t dnp3_association_handler_init ( dnp3_timestamp_utc_t(*)(void *)  get_current_time,
void(*)(void *arg)  on_destroy,
void *  ctx 
)
static

Initialize a dnp3_association_handler_t interface.

Parameters
get_current_timeReturns the current time or an invalid time if none is available
on_destroyCallback when the underlying owner doesn't need the interface anymore
ctxContext data

◆ dnp3_auto_time_sync_to_string()

static const char* dnp3_auto_time_sync_to_string ( dnp3_auto_time_sync_t  value)
static

Converts a dnp3_auto_time_sync_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_binary_config_init()

static dnp3_binary_config_t dnp3_binary_config_init ( )
static

Initialize dnp3_binary_config_t to default values.

Returns
New instance of dnp3_binary_config_t

◆ dnp3_binary_init()

static dnp3_binary_t dnp3_binary_init ( uint16_t  index,
bool  value,
dnp3_flags_t  flags,
dnp3_timestamp_t  time 
)
static

Initialize dnp3_binary_t to default values.

Parameters
indexPoint index
valuePoint value
flagsPoint flags
timePoint timestamp
Returns
New instance of dnp3_binary_t

◆ dnp3_binary_next()

dnp3_binary_t* dnp3_binary_next ( dnp3_binary_iterator_t it)

Get the next value of the iterator.

Parameters
itIterator
Returns
Next value of the iterator or NULL if the iterator reached the end

◆ dnp3_binary_output_status_config_init()

static dnp3_binary_output_status_config_t dnp3_binary_output_status_config_init ( )
static

Initialize dnp3_binary_output_status_config_t to default values.

Returns
New instance of dnp3_binary_output_status_config_t

◆ dnp3_binary_output_status_init()

static dnp3_binary_output_status_t dnp3_binary_output_status_init ( uint16_t  index,
bool  value,
dnp3_flags_t  flags,
dnp3_timestamp_t  time 
)
static

Initialize dnp3_binary_output_status_t to default values.

Parameters
indexPoint index
valuePoint value
flagsPoint flags
timePoint timestamp
Returns
New instance of dnp3_binary_output_status_t

◆ dnp3_binaryoutputstatus_next()

dnp3_binary_output_status_t* dnp3_binaryoutputstatus_next ( dnp3_binary_output_status_iterator_t it)

Get the next value of the iterator.

Parameters
itIterator
Returns
Next value of the iterator or NULL if the iterator reached the end

◆ dnp3_broadcast_action_to_string()

static const char* dnp3_broadcast_action_to_string ( dnp3_broadcast_action_t  value)
static

Converts a dnp3_broadcast_action_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_byte_init()

static dnp3_byte_t dnp3_byte_init ( uint8_t  value)
static

Initialize dnp3_byte_t to default values.

Parameters
valueByte value
Returns
New instance of dnp3_byte_t

◆ dnp3_byte_next()

dnp3_byte_t* dnp3_byte_next ( dnp3_byte_iterator_t it)

Get the next value of the iterator.

Parameters
itIterator
Returns
Next value of the iterator or NULL if the iterator reached the end

◆ dnp3_class_zero_config_init()

static dnp3_class_zero_config_t dnp3_class_zero_config_init ( )
static

Initialize dnp3_class_zero_config_t to default values.

Returns
New instance of dnp3_class_zero_config_t

◆ dnp3_classes_all()

dnp3_classes_t dnp3_classes_all ( )

Class 1230.

Returns
Class 1230

◆ dnp3_classes_init()

static dnp3_classes_t dnp3_classes_init ( bool  class0,
bool  class1,
bool  class2,
bool  class3 
)
static

Initialize dnp3_classes_t to default values.

Parameters
class0Class 0 (static data)
class1Class 1 events
class2Class 2 events
class3Class 3 events
Returns
New instance of dnp3_classes_t

◆ dnp3_classes_none()

dnp3_classes_t dnp3_classes_none ( )

No class.

Returns
No class

◆ dnp3_client_state_listener_init()

static dnp3_client_state_listener_t dnp3_client_state_listener_init ( void(*)(dnp3_client_state_t, void *)  on_change,
void(*)(void *arg)  on_destroy,
void *  ctx 
)
static

Initialize a dnp3_client_state_listener_t interface.

Parameters
on_changeCalled when the client state changed
on_destroyCallback when the underlying owner doesn't need the interface anymore
ctxContext data

◆ dnp3_client_state_to_string()

static const char* dnp3_client_state_to_string ( dnp3_client_state_t  value)
static

Converts a dnp3_client_state_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_command_mode_to_string()

static const char* dnp3_command_mode_to_string ( dnp3_command_mode_t  value)
static

Converts a dnp3_command_mode_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_command_result_to_string()

static const char* dnp3_command_result_to_string ( dnp3_command_result_t  value)
static

Converts a dnp3_command_result_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_command_status_to_string()

static const char* dnp3_command_status_to_string ( dnp3_command_status_t  value)
static

Converts a dnp3_command_status_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_command_task_callback_init()

static dnp3_command_task_callback_t dnp3_command_task_callback_init ( void(*)(dnp3_command_result_t, void *)  on_complete,
void(*)(void *arg)  on_destroy,
void *  ctx 
)
static

Initialize a dnp3_command_task_callback_t interface.

Parameters
on_completeCalled when the command task reached completion or failed
on_destroyCallback when the underlying owner doesn't need the interface anymore
ctxContext data

◆ dnp3_commands_add_g12v1_u16()

void dnp3_commands_add_g12v1_u16 ( dnp3_commands_t command,
uint16_t  idx,
dnp3_g12v1_t  header 
)

Add a CROB with 2-byte prefix index.

Parameters
commandCommand to modify
idxIndex of the point to send the command to
headerCROB data

◆ dnp3_commands_add_g12v1_u8()

void dnp3_commands_add_g12v1_u8 ( dnp3_commands_t command,
uint8_t  idx,
dnp3_g12v1_t  header 
)

Add a CROB with 1-byte prefix index.

Parameters
commandCommands to modify
idxIndex of the point to send the command to
headerCROB data

◆ dnp3_commands_add_g41v1_u16()

void dnp3_commands_add_g41v1_u16 ( dnp3_commands_t command,
uint16_t  idx,
int32_t  value 
)

Add a Analog Output command (signed 32-bit integer) with 2-byte prefix index.

Parameters
commandCommands to modify
idxIndex of the point to send the command to
valueValue to set the analog output to

◆ dnp3_commands_add_g41v1_u8()

void dnp3_commands_add_g41v1_u8 ( dnp3_commands_t command,
uint8_t  idx,
int32_t  value 
)

Add a Analog Output command (signed 32-bit integer) with 1-byte prefix index.

Parameters
commandCommand to modify
idxIndex of the point to send the command to
valueValue to set the analog output to

◆ dnp3_commands_add_g41v2_u16()

void dnp3_commands_add_g41v2_u16 ( dnp3_commands_t command,
uint16_t  idx,
int16_t  value 
)

Add a Analog Output command (signed 16-bit integer) with 2-byte prefix index.

Parameters
commandCommands to modify
idxIndex of the point to send the command to
valueValue to set the analog output to

◆ dnp3_commands_add_g41v2_u8()

void dnp3_commands_add_g41v2_u8 ( dnp3_commands_t command,
uint8_t  idx,
int16_t  value 
)

Add a Analog Output command (signed 16-bit integer) with 1-byte prefix index.

Parameters
commandCommands to modify
idxIndex of the point to send the command to
valueValue to set the analog output to

◆ dnp3_commands_add_g41v3_u16()

void dnp3_commands_add_g41v3_u16 ( dnp3_commands_t commands,
uint16_t  idx,
float  value 
)

Add a Analog Output command (single-precision float) with 2-byte prefix index.

Parameters
commandsCommands to modify
idxIndex of the point to send the command to
valueValue to set the analog output to

◆ dnp3_commands_add_g41v3_u8()

void dnp3_commands_add_g41v3_u8 ( dnp3_commands_t command,
uint8_t  idx,
float  value 
)

Add a Analog Output command (single-precision float) with 1-byte prefix index.

Parameters
commandCommands to modify
idxIndex of the point to send the command to
valueValue to set the analog output to

◆ dnp3_commands_add_g41v4_u16()

void dnp3_commands_add_g41v4_u16 ( dnp3_commands_t commands,
uint16_t  idx,
double  value 
)

Add a Analog Output command (double-precision float) with 2-byte prefix index.

Parameters
commandsCommands to modify
idxIndex of the point to send the command to
valueValue to set the analog output to

◆ dnp3_commands_add_g41v4_u8()

void dnp3_commands_add_g41v4_u8 ( dnp3_commands_t commands,
uint8_t  idx,
double  value 
)

Add a Analog Output command (double-precision float) with 1-byte prefix index.

Parameters
commandsCommands to modify
idxIndex of the point to send the command to
valueValue to set the analog output to

◆ dnp3_commands_destroy()

void dnp3_commands_destroy ( dnp3_commands_t command)

Destroy set of commands.

Parameters
commandSet of commands to destroy

◆ dnp3_commands_finish_header()

void dnp3_commands_finish_header ( dnp3_commands_t commands)

Finish any partially completed header. This allows for the construction of two headers with the same type and index.

Parameters
commandsCommands on which to finish the header

◆ dnp3_commands_new()

dnp3_commands_t* dnp3_commands_new ( )

Create a new set of commands.

Returns
Handle to the created set of commands

◆ dnp3_configure_logging()

dnp3_param_error_t dnp3_configure_logging ( dnp3_logging_config_t  config,
dnp3_logger_t  logger 
)

Set the callback that will receive all the log messages.

There is only a single globally allocated logger. Calling this method a second time will return an error.

If this method is never called, no logging will be performed.

Parameters
configConfiguration options for logging
loggerLogger that will receive each logged message
Returns
Error code

◆ dnp3_connect_strategy_init()

static dnp3_connect_strategy_t dnp3_connect_strategy_init ( )
static

Initialize dnp3_connect_strategy_t to default values.

Returns
New instance of dnp3_connect_strategy_t

◆ dnp3_connection_state_listener_init()

static dnp3_connection_state_listener_t dnp3_connection_state_listener_init ( void(*)(dnp3_connection_state_t, void *)  on_change,
void(*)(void *arg)  on_destroy,
void *  ctx 
)
static

Initialize a dnp3_connection_state_listener_t interface.

Parameters
on_changeCalled when the connection state changes
on_destroyCallback when the underlying owner doesn't need the interface anymore
ctxContext data

◆ dnp3_connection_state_to_string()

static const char* dnp3_connection_state_to_string ( dnp3_connection_state_t  value)
static

Converts a dnp3_connection_state_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_control_code_init()

static dnp3_control_code_t dnp3_control_code_init ( dnp3_trip_close_code_t  tcc,
bool  clear,
dnp3_op_type_t  op_type 
)
static

Initialize dnp3_control_code_t to default values.

Parameters
tccThis field is used in conjunction with the op_type field to specify a control operation
clearSupport for this field is optional. When the clear bit is set, the device shall remove pending control commands for that index and stop any control operation that is in progress for that index. The indexed point shall go to the state that it would have if the command were allowed to complete normally.
op_typeThis field is used in conjunction with the tcc field to specify a control operation
Returns
New instance of dnp3_control_code_t

◆ dnp3_control_handler_init()

static dnp3_control_handler_t dnp3_control_handler_init ( void(*)(void *)  begin_fragment,
void(*)(void *)  end_fragment,
dnp3_command_status_t(*)(dnp3_g12v1_t, uint16_t, dnp3_database_t *, void *)  select_g12v1,
dnp3_command_status_t(*)(dnp3_g12v1_t, uint16_t, dnp3_operate_type_t, dnp3_database_t *, void *)  operate_g12v1,
dnp3_command_status_t(*)(int32_t, uint16_t, dnp3_database_t *, void *)  select_g41v1,
dnp3_command_status_t(*)(int32_t, uint16_t, dnp3_operate_type_t, dnp3_database_t *, void *)  operate_g41v1,
dnp3_command_status_t(*)(int16_t, uint16_t, dnp3_database_t *, void *)  select_g41v2,
dnp3_command_status_t(*)(int16_t, uint16_t, dnp3_operate_type_t, dnp3_database_t *, void *)  operate_g41v2,
dnp3_command_status_t(*)(float, uint16_t, dnp3_database_t *, void *)  select_g41v3,
dnp3_command_status_t(*)(float, uint16_t, dnp3_operate_type_t, dnp3_database_t *, void *)  operate_g41v3,
dnp3_command_status_t(*)(double, uint16_t, dnp3_database_t *, void *)  select_g41v4,
dnp3_command_status_t(*)(double, uint16_t, dnp3_operate_type_t, dnp3_database_t *, void *)  operate_g41v4,
void(*)(void *arg)  on_destroy,
void *  ctx 
)
static

Initialize a dnp3_control_handler_t interface.

Parameters
begin_fragmentNotifies the start of a command fragment
end_fragmentNotifies the end of a command fragment
select_g12v1Select a CROB, but do not operate
operate_g12v1Operate a control point
select_g41v1Select an analog output, but do not operate
operate_g41v1Operate a control point
select_g41v2Select an analog output, but do not operate
operate_g41v2Operate a control point
select_g41v3Select an analog output, but do not operate
operate_g41v3Operate a control point
select_g41v4Select an analog output, but do not operate
operate_g41v4Operate a control point
on_destroyCallback when the underlying owner doesn't need the interface anymore
ctxContext data

◆ dnp3_control_init()

static dnp3_control_t dnp3_control_init ( bool  fir,
bool  fin,
bool  con,
bool  uns,
uint8_t  seq 
)
static

Initialize dnp3_control_t to default values.

Parameters
firFirst fragment in the message
finFinal fragment of the message
conRequires confirmation
unsUnsolicited response
seqSequence number
Returns
New instance of dnp3_control_t

◆ dnp3_counter_config_init()

static dnp3_counter_config_t dnp3_counter_config_init ( )
static

Initialize dnp3_counter_config_t to default values.

Returns
New instance of dnp3_counter_config_t

◆ dnp3_counter_init()

static dnp3_counter_t dnp3_counter_init ( uint16_t  index,
uint32_t  value,
dnp3_flags_t  flags,
dnp3_timestamp_t  time 
)
static

Initialize dnp3_counter_t to default values.

Parameters
indexPoint index
valuePoint value
flagsPoint flags
timePoint timestamp
Returns
New instance of dnp3_counter_t

◆ dnp3_counter_next()

dnp3_counter_t* dnp3_counter_next ( dnp3_counter_iterator_t it)

Get the next value of the iterator.

Parameters
itIterator
Returns
Next value of the iterator or NULL if the iterator reached the end

◆ dnp3_data_bits_to_string()

static const char* dnp3_data_bits_to_string ( dnp3_data_bits_t  value)
static

Converts a dnp3_data_bits_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_database_add_analog()

bool dnp3_database_add_analog ( dnp3_database_t db,
uint16_t  index,
dnp3_event_class_t  point_class,
dnp3_analog_config_t  config 
)

Add a new Analog point.

Parameters
dbDatabase
indexIndex of the point
point_classEvent class
configConfiguration
Returns
True if the point was successfully added, false otherwise

◆ dnp3_database_add_analog_output_status()

bool dnp3_database_add_analog_output_status ( dnp3_database_t db,
uint16_t  index,
dnp3_event_class_t  point_class,
dnp3_analog_output_status_config_t  config 
)

Add a new Analog Output Status point.

Parameters
dbDatabase
indexIndex of the point
point_classEvent class
configConfiguration
Returns
True if the point was successfully added, false otherwise

◆ dnp3_database_add_binary()

bool dnp3_database_add_binary ( dnp3_database_t db,
uint16_t  index,
dnp3_event_class_t  point_class,
dnp3_binary_config_t  config 
)

Add a new Binary Input point.

Parameters
dbDatabase
indexIndex of the point
point_classEvent class
configConfiguration
Returns
True if the point was successfully added, false otherwise

◆ dnp3_database_add_binary_output_status()

bool dnp3_database_add_binary_output_status ( dnp3_database_t db,
uint16_t  index,
dnp3_event_class_t  point_class,
dnp3_binary_output_status_config_t  config 
)

Add a new Binary Output Status point.

Parameters
dbDatabase
indexIndex of the point
point_classEvent class
configConfiguration
Returns
True if the point was successfully added, false otherwise

◆ dnp3_database_add_counter()

bool dnp3_database_add_counter ( dnp3_database_t db,
uint16_t  index,
dnp3_event_class_t  point_class,
dnp3_counter_config_t  config 
)

Add a new Counter point.

Parameters
dbDatabase
indexIndex of the point
point_classEvent class
configConfiguration
Returns
True if the point was successfully added, false otherwise

◆ dnp3_database_add_double_bit_binary()

bool dnp3_database_add_double_bit_binary ( dnp3_database_t db,
uint16_t  index,
dnp3_event_class_t  point_class,
dnp3_double_bit_binary_config_t  config 
)

Add a new Double-Bit Binary Input point.

Parameters
dbDatabase
indexIndex of the point
point_classEvent class
configConfiguration
Returns
True if the point was successfully added, false otherwise

◆ dnp3_database_add_frozen_counter()

bool dnp3_database_add_frozen_counter ( dnp3_database_t db,
uint16_t  index,
dnp3_event_class_t  point_class,
dnp3_frozen_counter_config_t  config 
)

Add a new Frozen Counter point.

Parameters
dbDatabase
indexIndex of the point
point_classEvent class
configConfiguration
Returns
True if the point was successfully added, false otherwise

◆ dnp3_database_add_octet_string()

bool dnp3_database_add_octet_string ( dnp3_database_t db,
uint16_t  index,
dnp3_event_class_t  point_class 
)

Add a new Octet String point.

Parameters
dbDatabase
indexIndex of the point
point_classEvent class
Returns
True if the point was successfully added, false otherwise

◆ dnp3_database_get_analog()

dnp3_param_error_t dnp3_database_get_analog ( dnp3_database_t db,
uint16_t  index,
dnp3_analog_t out 
)

Get a Analog point.

Parameters
dbDatabase
indexIndex of the point to get
outAnalog point
Returns
Error code

◆ dnp3_database_get_analog_output_status()

dnp3_param_error_t dnp3_database_get_analog_output_status ( dnp3_database_t db,
uint16_t  index,
dnp3_analog_output_status_t out 
)

Get a Analog Output Status point.

Parameters
dbDatabase
indexIndex of the point to get
outAnalog Output Status point
Returns
Error code

◆ dnp3_database_get_binary()

dnp3_param_error_t dnp3_database_get_binary ( dnp3_database_t db,
uint16_t  index,
dnp3_binary_t out 
)

Get a Binary Input point.

Parameters
dbDatabase
indexIndex of the point to get
outBinary Input point
Returns
Error code

◆ dnp3_database_get_binary_output_status()

dnp3_param_error_t dnp3_database_get_binary_output_status ( dnp3_database_t db,
uint16_t  index,
dnp3_binary_output_status_t out 
)

Get a Binary Output Status point.

Parameters
dbDatabase
indexIndex of the point to get
outBinary Output Status point
Returns
Error code

◆ dnp3_database_get_counter()

dnp3_param_error_t dnp3_database_get_counter ( dnp3_database_t db,
uint16_t  index,
dnp3_counter_t out 
)

Get a Counter point.

Parameters
dbDatabase
indexIndex of the point to get
outCounter point
Returns
Error code

◆ dnp3_database_get_double_bit_binary()

dnp3_param_error_t dnp3_database_get_double_bit_binary ( dnp3_database_t db,
uint16_t  index,
dnp3_double_bit_binary_t out 
)

Get a Double-Bit Binary Input point.

Parameters
dbDatabase
indexIndex of the point to get
outDouble-Bit Binary Input point
Returns
Error code

◆ dnp3_database_get_frozen_counter()

dnp3_param_error_t dnp3_database_get_frozen_counter ( dnp3_database_t db,
uint16_t  index,
dnp3_frozen_counter_t out 
)

Get a Frozen Counter point.

Parameters
dbDatabase
indexIndex of the point to get
outFrozen Counter point
Returns
Error code

◆ dnp3_database_remove_analog()

bool dnp3_database_remove_analog ( dnp3_database_t db,
uint16_t  index 
)

Remove an Analog point.

Parameters
dbDatabase
indexIndex of the point
Returns
True if the point was successfully removed, false otherwise

◆ dnp3_database_remove_analog_output_status()

bool dnp3_database_remove_analog_output_status ( dnp3_database_t db,
uint16_t  index 
)

Remove an Analog Output Status point.

Parameters
dbDatabase
indexIndex of the point
Returns
True if the point was successfully removed, false otherwise

◆ dnp3_database_remove_binary()

bool dnp3_database_remove_binary ( dnp3_database_t db,
uint16_t  index 
)

Remove a Binary Input point.

Parameters
dbDatabase
indexIndex of the point
Returns
True if the point was successfully removed, false otherwise

◆ dnp3_database_remove_binary_output_status()

bool dnp3_database_remove_binary_output_status ( dnp3_database_t db,
uint16_t  index 
)

Remove a Binary Output Status point.

Parameters
dbDatabase
indexIndex of the point
Returns
True if the point was successfully removed, false otherwise

◆ dnp3_database_remove_counter()

bool dnp3_database_remove_counter ( dnp3_database_t db,
uint16_t  index 
)

Remove a Counter point.

Parameters
dbDatabase
indexIndex of the point
Returns
True if the point was successfully removed, false otherwise

◆ dnp3_database_remove_double_bit_binary()

bool dnp3_database_remove_double_bit_binary ( dnp3_database_t db,
uint16_t  index 
)

Remove a Double-Bit Binary Input point.

Parameters
dbDatabase
indexIndex of the point
Returns
True if the point was successfully removed, false otherwise

◆ dnp3_database_remove_frozen_counter()

bool dnp3_database_remove_frozen_counter ( dnp3_database_t db,
uint16_t  index 
)

Remove a Frozen Counter point.

Parameters
dbDatabase
indexIndex of the point
Returns
True if the point was successfully removed, false otherwise

◆ dnp3_database_remove_octet_string()

bool dnp3_database_remove_octet_string ( dnp3_database_t db,
uint16_t  index 
)

Remove an Octet String point.

Parameters
dbDatabase
indexIndex of the point
Returns
True if the point was successfully removed, false otherwise

◆ dnp3_database_update_analog()

bool dnp3_database_update_analog ( dnp3_database_t db,
dnp3_analog_t  value,
dnp3_update_options_t  options 
)

Update a Analog point.

Parameters
dbDatabase
valueNew value of the point
optionsUpdate options
Returns
True if the point was successfully updated, false otherwise

◆ dnp3_database_update_analog_output_status()

bool dnp3_database_update_analog_output_status ( dnp3_database_t db,
dnp3_analog_output_status_t  value,
dnp3_update_options_t  options 
)

Update a Analog Output Status point.

Parameters
dbDatabase
valueNew value of the point
optionsUpdate options
Returns
True if the point was successfully updated, false otherwise

◆ dnp3_database_update_binary()

bool dnp3_database_update_binary ( dnp3_database_t db,
dnp3_binary_t  value,
dnp3_update_options_t  options 
)

Update a Binary Input point.

Parameters
dbDatabase
valueNew value of the point
optionsUpdate options
Returns
True if the point was successfully updated, false otherwise

◆ dnp3_database_update_binary_output_status()

bool dnp3_database_update_binary_output_status ( dnp3_database_t db,
dnp3_binary_output_status_t  value,
dnp3_update_options_t  options 
)

Update a Binary Output Status point.

Parameters
dbDatabase
valueNew value of the point
optionsUpdate options
Returns
True if the point was successfully updated, false otherwise

◆ dnp3_database_update_counter()

bool dnp3_database_update_counter ( dnp3_database_t db,
dnp3_counter_t  value,
dnp3_update_options_t  options 
)

Update a Counter point.

Parameters
dbDatabase
valueNew value of the point
optionsUpdate options
Returns
True if the point was successfully updated, false otherwise

◆ dnp3_database_update_double_bit_binary()

bool dnp3_database_update_double_bit_binary ( dnp3_database_t db,
dnp3_double_bit_binary_t  value,
dnp3_update_options_t  options 
)

Update a Double-Bit Binary Input point.

Parameters
dbDatabase
valueNew value of the point
optionsUpdate options
Returns
True if the point was successfully updated, false otherwise

◆ dnp3_database_update_frozen_counter()

bool dnp3_database_update_frozen_counter ( dnp3_database_t db,
dnp3_frozen_counter_t  value,
dnp3_update_options_t  options 
)

Update an Frozen Counter point.

Parameters
dbDatabase
valueNew value of the point
optionsUpdate options
Returns
True if the point was successfully updated, false otherwise

◆ dnp3_database_update_octet_string()

bool dnp3_database_update_octet_string ( dnp3_database_t db,
uint16_t  index,
dnp3_octet_string_value_t value,
dnp3_update_options_t  options 
)

Update an Octet String point.

Parameters
dbDatabase
indexIndex of the octet string
valueNew value of the point
optionsUpdate options
Returns
True if the point was successfully updated, false otherwise

◆ dnp3_decode_level_init()

static dnp3_decode_level_t dnp3_decode_level_init ( )
static

Initialize dnp3_decode_level_t to default values.

Returns
New instance of dnp3_decode_level_t

◆ dnp3_double_bit_binary_config_init()

static dnp3_double_bit_binary_config_t dnp3_double_bit_binary_config_init ( )
static

Initialize dnp3_double_bit_binary_config_t to default values.

Returns
New instance of dnp3_double_bit_binary_config_t

◆ dnp3_double_bit_binary_init()

static dnp3_double_bit_binary_t dnp3_double_bit_binary_init ( uint16_t  index,
dnp3_double_bit_t  value,
dnp3_flags_t  flags,
dnp3_timestamp_t  time 
)
static

Initialize dnp3_double_bit_binary_t to default values.

Parameters
indexPoint index
valuePoint value
flagsPoint flags
timePoint timestamp
Returns
New instance of dnp3_double_bit_binary_t

◆ dnp3_double_bit_to_string()

static const char* dnp3_double_bit_to_string ( dnp3_double_bit_t  value)
static

Converts a dnp3_double_bit_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_doublebitbinary_next()

dnp3_double_bit_binary_t* dnp3_doublebitbinary_next ( dnp3_double_bit_binary_iterator_t it)

Get the next value of the iterator.

Parameters
itIterator
Returns
Next value of the iterator or NULL if the iterator reached the end

◆ dnp3_endpoint_list_add()

void dnp3_endpoint_list_add ( dnp3_endpoint_list_t list,
const char *  endpoint 
)

Add an IP endpoint to the list.

You can write IP addresses or DNS names and the port to connect to. e.g. "127.0.0.1:20000" or "dnp3.myorg.com:20000".

Parameters
listEndpoint list to modify
endpointEndpoint to add to the list

◆ dnp3_endpoint_list_destroy()

void dnp3_endpoint_list_destroy ( dnp3_endpoint_list_t list)

Delete a previously allocated endpoint list.

Parameters
listEndpoint list to destroy

◆ dnp3_endpoint_list_new()

dnp3_endpoint_list_t* dnp3_endpoint_list_new ( const char *  main_endpoint)

Create a new list of IP endpoints.

You can write IP addresses or DNS names and the port to connect to. e.g. "127.0.0.1:20000" or "dnp3.myorg.com:20000".

Parameters
main_endpointMain endpoint
Returns
New endpoint list

◆ dnp3_event_analog_output_status_variation_to_string()

static const char* dnp3_event_analog_output_status_variation_to_string ( dnp3_event_analog_output_status_variation_t  value)
static

Converts a dnp3_event_analog_output_status_variation_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_event_analog_variation_to_string()

static const char* dnp3_event_analog_variation_to_string ( dnp3_event_analog_variation_t  value)
static

Converts a dnp3_event_analog_variation_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_event_binary_output_status_variation_to_string()

static const char* dnp3_event_binary_output_status_variation_to_string ( dnp3_event_binary_output_status_variation_t  value)
static

Converts a dnp3_event_binary_output_status_variation_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_event_binary_variation_to_string()

static const char* dnp3_event_binary_variation_to_string ( dnp3_event_binary_variation_t  value)
static

Converts a dnp3_event_binary_variation_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_event_buffer_config_all_types()

dnp3_event_buffer_config_t dnp3_event_buffer_config_all_types ( uint16_t  max)

Initialize an event buffer configuration with the same maximum values for all types.

Parameters
maxMaximum value to set all types
Returns
Event buffer configuration

◆ dnp3_event_buffer_config_init()

static dnp3_event_buffer_config_t dnp3_event_buffer_config_init ( uint16_t  max_binary,
uint16_t  max_double_bit_binary,
uint16_t  max_binary_output_status,
uint16_t  max_counter,
uint16_t  max_frozen_counter,
uint16_t  max_analog,
uint16_t  max_analog_output_status,
uint16_t  max_octet_string 
)
static

Initialize dnp3_event_buffer_config_t to default values.

Parameters
max_binaryMaximum number of Binary Input events (g2)
max_double_bit_binaryMaximum number of Double-Bit Binary Input events (g4)
max_binary_output_statusMaximum number of Binary Output Status events (g11)
max_counterMaximum number of Counter events (g22)
max_frozen_counterMaximum number of Frozen Counter events (g23)
max_analogMaximum number of Analog Input events (g32)
max_analog_output_statusMaximum number of Analog Output Status events (g42)
max_octet_stringMaximum number of Octet String events (g111)
Returns
New instance of dnp3_event_buffer_config_t

◆ dnp3_event_buffer_config_no_events()

dnp3_event_buffer_config_t dnp3_event_buffer_config_no_events ( )

Initialize an event buffer configuration to support no events.

Returns
Event buffer configuration

◆ dnp3_event_class_to_string()

static const char* dnp3_event_class_to_string ( dnp3_event_class_t  value)
static

Converts a dnp3_event_class_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_event_classes_all()

dnp3_event_classes_t dnp3_event_classes_all ( )

Initialize all three event classes to true.

Returns
Initialized value

◆ dnp3_event_classes_init()

static dnp3_event_classes_t dnp3_event_classes_init ( bool  class1,
bool  class2,
bool  class3 
)
static

Initialize dnp3_event_classes_t to default values.

Parameters
class1Class 1 events
class2Class 2 events
class3Class 3 events
Returns
New instance of dnp3_event_classes_t

◆ dnp3_event_classes_none()

dnp3_event_classes_t dnp3_event_classes_none ( )

Initialize all three event classes to false.

Returns
Initialized value

◆ dnp3_event_counter_variation_to_string()

static const char* dnp3_event_counter_variation_to_string ( dnp3_event_counter_variation_t  value)
static

Converts a dnp3_event_counter_variation_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_event_double_bit_binary_variation_to_string()

static const char* dnp3_event_double_bit_binary_variation_to_string ( dnp3_event_double_bit_binary_variation_t  value)
static

Converts a dnp3_event_double_bit_binary_variation_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_event_frozen_counter_variation_to_string()

static const char* dnp3_event_frozen_counter_variation_to_string ( dnp3_event_frozen_counter_variation_t  value)
static

Converts a dnp3_event_frozen_counter_variation_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_event_mode_to_string()

static const char* dnp3_event_mode_to_string ( dnp3_event_mode_t  value)
static

Converts a dnp3_event_mode_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_flags_init()

static dnp3_flags_t dnp3_flags_init ( uint8_t  value)
static

Initialize dnp3_flags_t to default values.

Parameters
valuebit-mask representing a set of individual flag bits
Returns
New instance of dnp3_flags_t

◆ dnp3_flow_control_to_string()

static const char* dnp3_flow_control_to_string ( dnp3_flow_control_t  value)
static

Converts a dnp3_flow_control_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_freeze_result_to_string()

static const char* dnp3_freeze_result_to_string ( dnp3_freeze_result_t  value)
static

Converts a dnp3_freeze_result_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_freeze_type_to_string()

static const char* dnp3_freeze_type_to_string ( dnp3_freeze_type_t  value)
static

Converts a dnp3_freeze_type_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_frozen_counter_config_init()

static dnp3_frozen_counter_config_t dnp3_frozen_counter_config_init ( )
static

Initialize dnp3_frozen_counter_config_t to default values.

Returns
New instance of dnp3_frozen_counter_config_t

◆ dnp3_frozen_counter_init()

static dnp3_frozen_counter_t dnp3_frozen_counter_init ( uint16_t  index,
uint32_t  value,
dnp3_flags_t  flags,
dnp3_timestamp_t  time 
)
static

Initialize dnp3_frozen_counter_t to default values.

Parameters
indexPoint index
valuePoint value
flagsPoint flags
timePoint timestamp
Returns
New instance of dnp3_frozen_counter_t

◆ dnp3_frozencounter_next()

dnp3_frozen_counter_t* dnp3_frozencounter_next ( dnp3_frozen_counter_iterator_t it)

Get the next value of the iterator.

Parameters
itIterator
Returns
Next value of the iterator or NULL if the iterator reached the end

◆ dnp3_function_code_to_string()

static const char* dnp3_function_code_to_string ( dnp3_function_code_t  value)
static

Converts a dnp3_function_code_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_g12v1_init()

static dnp3_g12v1_t dnp3_g12v1_init ( dnp3_control_code_t  code,
uint8_t  count,
uint32_t  on_time,
uint32_t  off_time 
)
static

Initialize dnp3_g12v1_t to default values.

Parameters
codeControl code
countCount
on_timeDuration the output drive remains active (in milliseconds)
off_timeDuration the output drive remains non-active (in milliseconds)
Returns
New instance of dnp3_g12v1_t

◆ dnp3_header_info_init()

static dnp3_header_info_t dnp3_header_info_init ( dnp3_variation_t  variation,
dnp3_qualifier_code_t  qualifier 
)
static

Initialize dnp3_header_info_t to default values.

Parameters
variationGroup/Variation used in the response
qualifierQualitifer used in the response
Returns
New instance of dnp3_header_info_t

◆ dnp3_iin1_flag_to_string()

static const char* dnp3_iin1_flag_to_string ( dnp3_iin1_flag_t  value)
static

Converts a dnp3_iin1_flag_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_iin1_init()

static dnp3_iin1_t dnp3_iin1_init ( uint8_t  value)
static

Initialize dnp3_iin1_t to default values.

Parameters
valueByte value
Returns
New instance of dnp3_iin1_t

◆ dnp3_iin1_is_set()

bool dnp3_iin1_is_set ( dnp3_iin1_t iin1,
dnp3_iin1_flag_t  flag 
)

Check if a particular flag is set in the IIN1 byte.

Parameters
iin1IIN1 to check
flagFlag to check
Returns
true if the flag is set, false otherwise

◆ dnp3_iin2_flag_to_string()

static const char* dnp3_iin2_flag_to_string ( dnp3_iin2_flag_t  value)
static

Converts a dnp3_iin2_flag_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_iin2_init()

static dnp3_iin2_t dnp3_iin2_init ( uint8_t  value)
static

Initialize dnp3_iin2_t to default values.

Parameters
valueByte value
Returns
New instance of dnp3_iin2_t

◆ dnp3_iin2_is_set()

bool dnp3_iin2_is_set ( dnp3_iin2_t iin2,
dnp3_iin2_flag_t  flag 
)

Check if a particular flag is set in the IIN2 byte.

Parameters
iin2IIN2 to check
flagFlag to check
Returns
true if the flag is set, false otherwise

◆ dnp3_iin_init()

static dnp3_iin_t dnp3_iin_init ( dnp3_iin1_t  iin1,
dnp3_iin2_t  iin2 
)
static

Initialize dnp3_iin_t to default values.

Parameters
iin1First IIN byte
iin2Second IIN byte
Returns
New instance of dnp3_iin_t

◆ dnp3_link_decode_level_to_string()

static const char* dnp3_link_decode_level_to_string ( dnp3_link_decode_level_t  value)
static

Converts a dnp3_link_decode_level_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_link_error_mode_to_string()

static const char* dnp3_link_error_mode_to_string ( dnp3_link_error_mode_t  value)
static

Converts a dnp3_link_error_mode_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_link_status_callback_init()

static dnp3_link_status_callback_t dnp3_link_status_callback_init ( void(*)(dnp3_link_status_result_t, void *)  on_complete,
void(*)(void *arg)  on_destroy,
void *  ctx 
)
static

Initialize a dnp3_link_status_callback_t interface.

Parameters
on_completeCalled when a link status is received
on_destroyCallback when the underlying owner doesn't need the interface anymore
ctxContext data

◆ dnp3_link_status_result_to_string()

static const char* dnp3_link_status_result_to_string ( dnp3_link_status_result_t  value)
static

Converts a dnp3_link_status_result_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_log_level_to_string()

static const char* dnp3_log_level_to_string ( dnp3_log_level_t  value)
static

Converts a dnp3_log_level_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_log_output_format_to_string()

static const char* dnp3_log_output_format_to_string ( dnp3_log_output_format_t  value)
static

Converts a dnp3_log_output_format_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_logger_init()

static dnp3_logger_t dnp3_logger_init ( void(*)(dnp3_log_level_t, const char *, void *)  on_message,
void(*)(void *arg)  on_destroy,
void *  ctx 
)
static

Initialize a dnp3_logger_t interface.

Parameters
on_messageCalled when a log message was received and should be logged
on_destroyCallback when the underlying owner doesn't need the interface anymore
ctxContext data

◆ dnp3_logging_config_init()

static dnp3_logging_config_t dnp3_logging_config_init ( )
static

Initialize dnp3_logging_config_t to default values.

Returns
New instance of dnp3_logging_config_t

◆ dnp3_master_channel_add_association()

dnp3_param_error_t dnp3_master_channel_add_association ( dnp3_master_channel_t channel,
uint16_t  address,
dnp3_association_config_t  config,
dnp3_read_handler_t  read_handler,
dnp3_association_handler_t  association_handler,
dnp3_association_id_t out 
)

Add an association to the channel.

Parameters
channeldnp3_master_channel_t on which the association will be created
addressDNP3 data-link address of the remote outstation
configAssociation configuration
read_handlerInterface uses to load measurement data
association_handlerAssociation specific callbacks such as time synchronization
outId of the association
Returns
Error code

◆ dnp3_master_channel_add_poll()

dnp3_param_error_t dnp3_master_channel_add_poll ( dnp3_master_channel_t channel,
dnp3_association_id_t  id,
dnp3_request_t request,
uint64_t  period,
dnp3_poll_id_t out 
)

Add a periodic poll to an association.

Each result of the poll will be sent to the dnp3_read_handler_t of the association.

Parameters
channeldnp3_master_channel_t on which to apply the operation
idAssociation on which to add the poll
requestRequest to perform
periodPeriod to wait between each poll (in ms) (milliseconds)
outId of the created poll
Returns
Error code

◆ dnp3_master_channel_check_link_status()

dnp3_param_error_t dnp3_master_channel_check_link_status ( dnp3_master_channel_t channel,
dnp3_association_id_t  association,
dnp3_link_status_callback_t  callback 
)

Asynchronously perform a link status check.

Parameters
channeldnp3_master_channel_t on which to perform the operation
associationId of the association
callbackCallback that will receive the result of the link status
Returns
Error code

◆ dnp3_master_channel_cold_restart()

dnp3_param_error_t dnp3_master_channel_cold_restart ( dnp3_master_channel_t channel,
dnp3_association_id_t  association,
dnp3_restart_task_callback_t  callback 
)

Asynchronously perform a cold restart operation to the association.

Parameters
channeldnp3_master_channel_t on which to perform the operation
associationId of the association
callbackCallback that will receive the result of the restart
Returns
Error code

◆ dnp3_master_channel_config_init()

static dnp3_master_channel_config_t dnp3_master_channel_config_init ( uint16_t  address)
static

Initialize dnp3_master_channel_config_t to default values.

Parameters
addressLocal DNP3 data-link address
Returns
New instance of dnp3_master_channel_config_t

◆ dnp3_master_channel_create_serial()

dnp3_param_error_t dnp3_master_channel_create_serial ( dnp3_runtime_t runtime,
dnp3_master_channel_config_t  config,
const char *  path,
dnp3_serial_port_settings_t  serial_params,
uint64_t  open_retry_delay,
dnp3_port_state_listener_t  listener,
dnp3_master_channel_t **  out 
)

Create a master channel on the specified serial port.

The returned master must be gracefully shutdown with dnp3_master_channel_destroy when done.

Parameters
runtimeRuntime to use to drive asynchronous operations of the master
configGeneric configuration for the channel
pathPath to the serial device. Generally /dev/tty0 on Linux and COM1 on Windows.
serial_paramsSerial port settings
open_retry_delaydelay between attempts to open the serial port (milliseconds)
listenerListener to receive updates on the status of the serial port
outHandle to the master created, NULL if an error occurred
Returns
Error code

◆ dnp3_master_channel_create_tcp()

dnp3_param_error_t dnp3_master_channel_create_tcp ( dnp3_runtime_t runtime,
dnp3_link_error_mode_t  link_error_mode,
dnp3_master_channel_config_t  config,
dnp3_endpoint_list_t endpoints,
dnp3_connect_strategy_t  connect_strategy,
dnp3_client_state_listener_t  listener,
dnp3_master_channel_t **  out 
)

Create a master channel that connects to the specified TCP endpoint(s)

Parameters
runtimeRuntime to use to drive asynchronous operations of the master
link_error_modeControls how link errors are handled with respect to the TCP session
configGeneric configuration for the channel
endpointsList of IP endpoints.
connect_strategyControls the timing of (re)connection attempts
listenerTCP connection listener used to receive updates on the status of the connection
outHandle to the master created, NULL if an error occurred
Returns
Error code

◆ dnp3_master_channel_demand_poll()

dnp3_param_error_t dnp3_master_channel_demand_poll ( dnp3_master_channel_t channel,
dnp3_poll_id_t  poll_id 
)

Demand the immediate execution of a poll previously created with dnp3_master_channel_add_poll.

This method returns immediately. The result will be sent to the registered dnp3_read_handler_t.

This method resets the internal timer of the poll.

Parameters
channeldnp3_master_channel_t on which to apply the operation
poll_idId of the poll
Returns
Error code

◆ dnp3_master_channel_destroy()

void dnp3_master_channel_destroy ( dnp3_master_channel_t channel)

Shutdown a dnp3_master_channel_t and release all resources.

Parameters
channeldnp3_master_channel_t to destroy

◆ dnp3_master_channel_disable()

dnp3_param_error_t dnp3_master_channel_disable ( dnp3_master_channel_t channel)

stop communications

Parameters
channeldnp3_master_channel_t to disable
Returns
Error code

◆ dnp3_master_channel_enable()

dnp3_param_error_t dnp3_master_channel_enable ( dnp3_master_channel_t channel)

start communications

Parameters
channeldnp3_master_channel_t to enable
Returns
Error code

◆ dnp3_master_channel_get_decode_level()

dnp3_param_error_t dnp3_master_channel_get_decode_level ( dnp3_master_channel_t channel,
dnp3_decode_level_t out 
)

Get the decoding level for the channel.

Parameters
channeldnp3_master_channel_t on which to apply the operation
outDecode level
Returns
Error code

◆ dnp3_master_channel_operate()

dnp3_param_error_t dnp3_master_channel_operate ( dnp3_master_channel_t channel,
dnp3_association_id_t  association,
dnp3_command_mode_t  mode,
dnp3_commands_t command,
dnp3_command_task_callback_t  callback 
)

Asynchronously perform a command operation on the association.

Parameters
channeldnp3_master_channel_t on which to perform the operation
associationId of the association
modeOperation mode
commandCommand to send
callbackCallback that will receive the result of the command
Returns
Error code

◆ dnp3_master_channel_read()

dnp3_param_error_t dnp3_master_channel_read ( dnp3_master_channel_t channel,
dnp3_association_id_t  association,
dnp3_request_t request,
dnp3_read_task_callback_t  callback 
)

Perform a read on the association.

The callback will be called once the read is completely received, but the actual values will be sent to the dnp3_read_handler_t of the association.

Parameters
channeldnp3_master_channel_t on which to perform the operation
associationAssociation on which to perform the read
requestRequest to send
callbackCallback that will be invoked once the read is complete
Returns
Error code

◆ dnp3_master_channel_remove_association()

dnp3_param_error_t dnp3_master_channel_remove_association ( dnp3_master_channel_t channel,
dnp3_association_id_t  id 
)

Remove an association from the channel.

Parameters
channeldnp3_master_channel_t on which to apply the operation
idId of the association
Returns
Error code

◆ dnp3_master_channel_remove_poll()

dnp3_param_error_t dnp3_master_channel_remove_poll ( dnp3_master_channel_t channel,
dnp3_poll_id_t  poll_id 
)

Add a periodic poll to an association.

Each result of the poll will be sent to the dnp3_read_handler_t of the association.

Parameters
channeldnp3_master_channel_t on which to apply the operation
poll_idId of the created poll
Returns
Error code

◆ dnp3_master_channel_set_decode_level()

dnp3_param_error_t dnp3_master_channel_set_decode_level ( dnp3_master_channel_t channel,
dnp3_decode_level_t  decode_level 
)

Set the decoding level for the channel.

Parameters
channeldnp3_master_channel_t on which to apply the operation
decode_levelDecoding level
Returns
Error code

◆ dnp3_master_channel_sync_time()

dnp3_param_error_t dnp3_master_channel_sync_time ( dnp3_master_channel_t channel,
dnp3_association_id_t  association,
dnp3_time_sync_mode_t  mode,
dnp3_time_sync_task_callback_t  callback 
)

Asynchronously perform a time sync operation to the association.

Parameters
channeldnp3_master_channel_t on which to perform the operation
associationId of the association
modeTime sync mode
callbackCallback that will receive the result of the time sync
Returns
Error code

◆ dnp3_master_channel_warm_restart()

dnp3_param_error_t dnp3_master_channel_warm_restart ( dnp3_master_channel_t channel,
dnp3_association_id_t  association,
dnp3_restart_task_callback_t  callback 
)

Asynchronously perform a warm restart operation to the association.

Parameters
channeldnp3_master_channel_t on which to perform the operation
associationId of the association
callbackCallback that will receive the result of the restart
Returns
Error code

◆ dnp3_octet_string_add()

void dnp3_octet_string_add ( dnp3_octet_string_value_t octet_string,
uint8_t  value 
)

Create a new octet string.

Parameters
octet_stringOctet String to modify
valueByte to add

◆ dnp3_octet_string_destroy()

void dnp3_octet_string_destroy ( dnp3_octet_string_value_t octet_string)

Deallocate an octet string.

Parameters
octet_stringOctet String to destroy

◆ dnp3_octet_string_init()

static dnp3_octet_string_t dnp3_octet_string_init ( uint16_t  index,
dnp3_byte_iterator_t value 
)
static

Initialize dnp3_octet_string_t to default values.

Parameters
indexPoint index
valuePoint value
Returns
New instance of dnp3_octet_string_t

◆ dnp3_octet_string_new()

dnp3_octet_string_value_t* dnp3_octet_string_new ( )

Create a new octet string.

Returns
Empty octet string

◆ dnp3_octetstring_next()

dnp3_octet_string_t* dnp3_octetstring_next ( dnp3_octet_string_iterator_t it)

Get the next value of the iterator.

Parameters
itIterator
Returns
Next value of the iterator or NULL if the iterator reached the end

◆ dnp3_op_type_to_string()

static const char* dnp3_op_type_to_string ( dnp3_op_type_t  value)
static

Converts a dnp3_op_type_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_operate_type_to_string()

static const char* dnp3_operate_type_to_string ( dnp3_operate_type_t  value)
static

Converts a dnp3_operate_type_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_outstation_application_init()

static dnp3_outstation_application_t dnp3_outstation_application_init ( uint16_t(*)(void *)  get_processing_delay_ms,
dnp3_write_time_result_t(*)(uint64_t, void *)  write_absolute_time,
dnp3_application_iin_t(*)(void *)  get_application_iin,
dnp3_restart_delay_t(*)(void *)  cold_restart,
dnp3_restart_delay_t(*)(void *)  warm_restart,
dnp3_freeze_result_t(*)(dnp3_freeze_type_t, dnp3_database_t *, void *)  freeze_counters_all,
dnp3_freeze_result_t(*)(uint16_t, uint16_t, dnp3_freeze_type_t, dnp3_database_t *, void *)  freeze_counters_range,
void(*)(void *arg)  on_destroy,
void *  ctx 
)
static

Initialize a dnp3_outstation_application_t interface.

Parameters
get_processing_delay_msReturns the DELAY_MEASUREMENT delay
write_absolute_timeHandle a write of the absolute time during time synchronization procedures.
get_application_iinReturns the application-controlled IIN bits
cold_restartRequest that the outstation perform a cold restart (IEEE-1815 2012, p. 58)
warm_restartRequest that the outstation perform a warm restart (IEEE-1815 2012, p. 58)
freeze_counters_allFreeze all the counters
freeze_counters_rangeFreeze a range of counters
on_destroyCallback when the underlying owner doesn't need the interface anymore
ctxContext data

◆ dnp3_outstation_config_init()

static dnp3_outstation_config_t dnp3_outstation_config_init ( uint16_t  outstation_address,
uint16_t  master_address 
)
static

Initialize dnp3_outstation_config_t to default values.

Parameters
outstation_addressLink-layer outstation address
master_addressLink-layer master address
Returns
New instance of dnp3_outstation_config_t

◆ dnp3_outstation_create_serial_session()

dnp3_param_error_t dnp3_outstation_create_serial_session ( dnp3_runtime_t runtime,
const char *  serial_path,
dnp3_serial_port_settings_t  settings,
dnp3_outstation_config_t  config,
dnp3_event_buffer_config_t  event_config,
dnp3_outstation_application_t  application,
dnp3_outstation_information_t  information,
dnp3_control_handler_t  control_handler,
dnp3_outstation_t **  out 
)

Create an outstation instance running on a serial port.

Parameters
runtimeruntime on which to spawn the outstation
serial_pathPath of the serial device
settingssettings for the serial port
configoutstation configuration
event_configevent buffer configuration
applicationapplication interface
informationinformational events interface
control_handlercontrol handler interface
outOutstation instance or NULL if the port cannot be opened
Returns
Error code

◆ dnp3_outstation_destroy()

void dnp3_outstation_destroy ( dnp3_outstation_t outstation)

Free resources of the outstation.

Warning
This does not shutdown the outstation. Only dnp3_tcpserver_destroy will properly shutdown the outstation.
Parameters
outstationOutstation to destroy

◆ dnp3_outstation_features_init()

static dnp3_outstation_features_t dnp3_outstation_features_init ( )
static

Initialize dnp3_outstation_features_t to default values.

Returns
New instance of dnp3_outstation_features_t

◆ dnp3_outstation_information_init()

static dnp3_outstation_information_t dnp3_outstation_information_init ( void(*)(dnp3_request_header_t, void *)  process_request_from_idle,
void(*)(dnp3_function_code_t, dnp3_broadcast_action_t, void *)  broadcast_received,
void(*)(uint8_t, void *)  enter_solicited_confirm_wait,
void(*)(uint8_t, void *)  solicited_confirm_timeout,
void(*)(uint8_t, void *)  solicited_confirm_received,
void(*)(void *)  solicited_confirm_wait_new_request,
void(*)(uint8_t, uint8_t, void *)  wrong_solicited_confirm_seq,
void(*)(bool, uint8_t, void *)  unexpected_confirm,
void(*)(uint8_t, void *)  enter_unsolicited_confirm_wait,
void(*)(uint8_t, bool, void *)  unsolicited_confirm_timeout,
void(*)(uint8_t, void *)  unsolicited_confirmed,
void(*)(void *)  clear_restart_iin,
void(*)(void *arg)  on_destroy,
void *  ctx 
)
static

Initialize a dnp3_outstation_information_t interface.

Parameters
process_request_from_idleCalled when a request is processed from the IDLE state
broadcast_receivedCalled when a broadcast request is received by the outstation
enter_solicited_confirm_waitOutstation has begun waiting for a solicited confirm
solicited_confirm_timeoutFailed to receive a solicited confirm before the timeout occurred
solicited_confirm_receivedReceived the expected confirm
solicited_confirm_wait_new_requestReceived a new request while waiting for a solicited confirm, aborting the response series
wrong_solicited_confirm_seqReceived a solicited confirm with the wrong sequence number
unexpected_confirmReceived a confirm when not expecting one
enter_unsolicited_confirm_waitOutstation has begun waiting for an unsolicited confirm
unsolicited_confirm_timeoutFailed to receive an unsolicited confirm before the timeout occurred
unsolicited_confirmedMaster confirmed an unsolicited message
clear_restart_iinMaster cleared the restart IIN bit
on_destroyCallback when the underlying owner doesn't need the interface anymore
ctxContext data

◆ dnp3_outstation_set_decode_level()

dnp3_param_error_t dnp3_outstation_set_decode_level ( dnp3_outstation_t outstation,
dnp3_decode_level_t  level 
)

Set decoding log level.

Parameters
outstationdnp3_outstation_t on which to set the decoding level
levelDecode log
Returns
Error code

◆ dnp3_outstation_transaction()

void dnp3_outstation_transaction ( dnp3_outstation_t outstation,
dnp3_outstation_transaction_t  callback 
)

Execute transaction to modify the internal database of the outstation.

Parameters
outstationOutstation
callbackMethod to execute as a transaction

◆ dnp3_outstation_transaction_init()

static dnp3_outstation_transaction_t dnp3_outstation_transaction_init ( void(*)(dnp3_database_t *, void *)  execute,
void(*)(void *arg)  on_destroy,
void *  ctx 
)
static

Initialize a dnp3_outstation_transaction_t interface.

Parameters
executeExecute the transaction with the provided database
on_destroyCallback when the underlying owner doesn't need the interface anymore
ctxContext data

◆ dnp3_param_error_to_string()

static const char* dnp3_param_error_to_string ( dnp3_param_error_t  value)
static

Converts a dnp3_param_error_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_parity_to_string()

static const char* dnp3_parity_to_string ( dnp3_parity_t  value)
static

Converts a dnp3_parity_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_phys_decode_level_to_string()

static const char* dnp3_phys_decode_level_to_string ( dnp3_phys_decode_level_t  value)
static

Converts a dnp3_phys_decode_level_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_port_state_listener_init()

static dnp3_port_state_listener_t dnp3_port_state_listener_init ( void(*)(dnp3_port_state_t, void *)  on_change,
void(*)(void *arg)  on_destroy,
void *  ctx 
)
static

Initialize a dnp3_port_state_listener_t interface.

Parameters
on_changeInvoked when the serial port changes state
on_destroyCallback when the underlying owner doesn't need the interface anymore
ctxContext data

◆ dnp3_port_state_to_string()

static const char* dnp3_port_state_to_string ( dnp3_port_state_t  value)
static

Converts a dnp3_port_state_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_qualifier_code_to_string()

static const char* dnp3_qualifier_code_to_string ( dnp3_qualifier_code_t  value)
static

Converts a dnp3_qualifier_code_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_read_handler_init()

static dnp3_read_handler_t dnp3_read_handler_init ( void(*)(dnp3_read_type_t, dnp3_response_header_t, void *)  begin_fragment,
void(*)(dnp3_read_type_t, dnp3_response_header_t, void *)  end_fragment,
void(*)(dnp3_header_info_t, dnp3_binary_iterator_t *, void *)  handle_binary,
void(*)(dnp3_header_info_t, dnp3_double_bit_binary_iterator_t *, void *)  handle_double_bit_binary,
void(*)(dnp3_header_info_t, dnp3_binary_output_status_iterator_t *, void *)  handle_binary_output_status,
void(*)(dnp3_header_info_t, dnp3_counter_iterator_t *, void *)  handle_counter,
void(*)(dnp3_header_info_t, dnp3_frozen_counter_iterator_t *, void *)  handle_frozen_counter,
void(*)(dnp3_header_info_t, dnp3_analog_iterator_t *, void *)  handle_analog,
void(*)(dnp3_header_info_t, dnp3_analog_output_status_iterator_t *, void *)  handle_analog_output_status,
void(*)(dnp3_header_info_t, dnp3_octet_string_iterator_t *, void *)  handle_octet_string,
void(*)(void *arg)  on_destroy,
void *  ctx 
)
static

Initialize a dnp3_read_handler_t interface.

Parameters
begin_fragmentMarks the beginning of a fragment
end_fragmentMarks the end of a fragment
handle_binaryHandle binary input data
handle_double_bit_binaryHandle double-bit binary input data
handle_binary_output_statusHandle binary output status data
handle_counterHandle counter data
handle_frozen_counterHandle frozen counter input data
handle_analogHandle analog input data
handle_analog_output_statusHandle analog output status data
handle_octet_stringHandle octet string data
on_destroyCallback when the underlying owner doesn't need the interface anymore
ctxContext data

◆ dnp3_read_result_to_string()

static const char* dnp3_read_result_to_string ( dnp3_read_result_t  value)
static

Converts a dnp3_read_result_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_read_task_callback_init()

static dnp3_read_task_callback_t dnp3_read_task_callback_init ( void(*)(dnp3_read_result_t, void *)  on_complete,
void(*)(void *arg)  on_destroy,
void *  ctx 
)
static

Initialize a dnp3_read_task_callback_t interface.

Parameters
on_completeCalled when the read task reached completion or failed
on_destroyCallback when the underlying owner doesn't need the interface anymore
ctxContext data

◆ dnp3_read_type_to_string()

static const char* dnp3_read_type_to_string ( dnp3_read_type_t  value)
static

Converts a dnp3_read_type_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_request_add_all_objects_header()

void dnp3_request_add_all_objects_header ( dnp3_request_t request,
dnp3_variation_t  variation 
)

Add an all objects variation interrogation.

Parameters
requestRequest to modify
variationVariation to ask for

◆ dnp3_request_add_one_byte_header()

void dnp3_request_add_one_byte_header ( dnp3_request_t request,
dnp3_variation_t  variation,
uint8_t  start,
uint8_t  stop 
)

Add a one-byte start/stop variation interrogation.

Parameters
requestRequest to modify
variationVariation to ask for
startStart index to ask
stopStop index to ask (inclusive)

◆ dnp3_request_add_two_byte_header()

void dnp3_request_add_two_byte_header ( dnp3_request_t request,
dnp3_variation_t  variation,
uint16_t  start,
uint16_t  stop 
)

Add a two-byte start/stop variation interrogation.

Parameters
requestRequest to modify
variationVariation to ask for
startStart index to ask
stopStop index to ask (inclusive)

◆ dnp3_request_destroy()

void dnp3_request_destroy ( dnp3_request_t request)

Destroy a request created with dnp3_request_new or dnp3_request_new_class.

Parameters
requestRequest to destroy

◆ dnp3_request_header_init()

static dnp3_request_header_t dnp3_request_header_init ( dnp3_control_t  control,
dnp3_function_code_t  function 
)
static

Initialize dnp3_request_header_t to default values.

Parameters
controlControl field
functionFunction code
Returns
New instance of dnp3_request_header_t

◆ dnp3_request_new()

dnp3_request_t* dnp3_request_new ( )

Create a new request.

Returns
Handle to the created request

◆ dnp3_request_new_class()

dnp3_request_t* dnp3_request_new_class ( bool  class0,
bool  class1,
bool  class2,
bool  class3 
)

Create a new request asking for classes.

An identical request can be created manually with dnp3_request_add_all_objects_header and variations DNP3_VARIATION_GROUP60_VAR1, DNP3_VARIATION_GROUP60_VAR2, DNP3_VARIATION_GROUP60_VAR3 and DNP3_VARIATION_GROUP60_VAR4.

Parameters
class0Ask for class 0 (static data)
class1Ask for class 1 events
class2Ask for class 2 events
class3Ask for class 3 events
Returns
Handle to the created request

◆ dnp3_response_function_to_string()

static const char* dnp3_response_function_to_string ( dnp3_response_function_t  value)
static

Converts a dnp3_response_function_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_response_header_init()

static dnp3_response_header_t dnp3_response_header_init ( dnp3_control_t  control,
dnp3_response_function_t  func,
dnp3_iin_t  iin 
)
static

Initialize dnp3_response_header_t to default values.

Parameters
controlApplication control field
funcResponse type
iinIIN bytes
Returns
New instance of dnp3_response_header_t

◆ dnp3_restart_delay_init()

static dnp3_restart_delay_t dnp3_restart_delay_init ( dnp3_restart_delay_type_t  restart_type,
uint16_t  value 
)
static

Initialize dnp3_restart_delay_t to default values.

Parameters
restart_typeIndicates what dnp3_restart_delay_t::value is.
valueExpected delay before the outstation comes back online.
Returns
New instance of dnp3_restart_delay_t

◆ dnp3_restart_delay_millis()

dnp3_restart_delay_t dnp3_restart_delay_millis ( uint16_t  value)

Creates a restart delay with a value specified in milliseconds.

Parameters
valueExpected restart delay (in milliseconds)
Returns
Valid restart delay

◆ dnp3_restart_delay_not_supported()

dnp3_restart_delay_t dnp3_restart_delay_not_supported ( )

Creates a restart delay that indicates that this operation is not supported.

Returns
Unsupported restart delay

◆ dnp3_restart_delay_seconds()

dnp3_restart_delay_t dnp3_restart_delay_seconds ( uint16_t  value)

Creates a restart delay with a value specified in seconds.

Parameters
valueExpected restart delay (in seconds)
Returns
Valid restart delay

◆ dnp3_restart_delay_type_to_string()

static const char* dnp3_restart_delay_type_to_string ( dnp3_restart_delay_type_t  value)
static

Converts a dnp3_restart_delay_type_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_restart_error_to_string()

static const char* dnp3_restart_error_to_string ( dnp3_restart_error_t  value)
static

Converts a dnp3_restart_error_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_restart_result_init()

static dnp3_restart_result_t dnp3_restart_result_init ( dnp3_restart_error_t  error,
uint64_t  delay 
)
static

Initialize dnp3_restart_result_t to default values.

Parameters
errorSuccess/failure of the restart task
delayDelay value returned by the outstation. Valid only if dnp3_restart_result_t::error is DNP3_RESTART_ERROR_OK.
Returns
New instance of dnp3_restart_result_t

◆ dnp3_restart_task_callback_init()

static dnp3_restart_task_callback_t dnp3_restart_task_callback_init ( void(*)(dnp3_restart_result_t, void *)  on_complete,
void(*)(void *arg)  on_destroy,
void *  ctx 
)
static

Initialize a dnp3_restart_task_callback_t interface.

Parameters
on_completeCalled when the restart task reached completion or failed
on_destroyCallback when the underlying owner doesn't need the interface anymore
ctxContext data

◆ dnp3_retry_strategy_init()

static dnp3_retry_strategy_t dnp3_retry_strategy_init ( )
static

Initialize dnp3_retry_strategy_t to default values.

Returns
New instance of dnp3_retry_strategy_t

◆ dnp3_runtime_config_init()

static dnp3_runtime_config_t dnp3_runtime_config_init ( )
static

Initialize dnp3_runtime_config_t to default values.

Returns
New instance of dnp3_runtime_config_t

◆ dnp3_runtime_destroy()

void dnp3_runtime_destroy ( dnp3_runtime_t runtime)

Destroy a runtime.

This method will gracefully wait for all asynchronous operation to end before returning

Parameters
runtimeRuntime to destroy

◆ dnp3_runtime_new()

dnp3_param_error_t dnp3_runtime_new ( dnp3_runtime_config_t  config,
dnp3_runtime_t **  out 
)

Creates a new runtime for running the protocol stack.

Warning
The runtime should be kept alive for as long as it's needed and it should be released with dnp3_runtime_destroy
Parameters
configRuntime configuration
outHandle to the created runtime, NULL if an error occurred
Returns
Error code

◆ dnp3_serial_port_settings_init()

static dnp3_serial_port_settings_t dnp3_serial_port_settings_init ( )
static

Initialize dnp3_serial_port_settings_t to default values.

Returns
New instance of dnp3_serial_port_settings_t

◆ dnp3_static_analog_output_status_variation_to_string()

static const char* dnp3_static_analog_output_status_variation_to_string ( dnp3_static_analog_output_status_variation_t  value)
static

Converts a dnp3_static_analog_output_status_variation_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_static_analog_variation_to_string()

static const char* dnp3_static_analog_variation_to_string ( dnp3_static_analog_variation_t  value)
static

Converts a dnp3_static_analog_variation_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_static_binary_output_status_variation_to_string()

static const char* dnp3_static_binary_output_status_variation_to_string ( dnp3_static_binary_output_status_variation_t  value)
static

Converts a dnp3_static_binary_output_status_variation_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_static_binary_variation_to_string()

static const char* dnp3_static_binary_variation_to_string ( dnp3_static_binary_variation_t  value)
static

Converts a dnp3_static_binary_variation_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_static_counter_variation_to_string()

static const char* dnp3_static_counter_variation_to_string ( dnp3_static_counter_variation_t  value)
static

Converts a dnp3_static_counter_variation_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_static_double_bit_binary_variation_to_string()

static const char* dnp3_static_double_bit_binary_variation_to_string ( dnp3_static_double_bit_binary_variation_t  value)
static

Converts a dnp3_static_double_bit_binary_variation_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_static_frozen_counter_variation_to_string()

static const char* dnp3_static_frozen_counter_variation_to_string ( dnp3_static_frozen_counter_variation_t  value)
static

Converts a dnp3_static_frozen_counter_variation_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_stop_bits_to_string()

static const char* dnp3_stop_bits_to_string ( dnp3_stop_bits_t  value)
static

Converts a dnp3_stop_bits_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_tcpserver_add_outstation()

dnp3_param_error_t dnp3_tcpserver_add_outstation ( dnp3_tcp_server_t server,
dnp3_outstation_config_t  config,
dnp3_event_buffer_config_t  event_config,
dnp3_outstation_application_t  application,
dnp3_outstation_information_t  information,
dnp3_control_handler_t  control_handler,
dnp3_connection_state_listener_t  listener,
dnp3_address_filter_t filter,
dnp3_outstation_t **  out 
)

Add an outstation to the server.

The returned dnp3_outstation_t can be used to modify points of the outstation.

In order for the outstation to run, the TCP server must be running. Use dnp3_tcpserver_bind to run it.

Parameters
serverTCP server to add the outstation to
configOutstation configuration
event_configEvent buffer configuration
applicationOutstation application callbacks
informationOutstation information callbacks
control_handlerOutstation control handler
listenerListener for the connection state
filterAddress filter
outOutstation handle
Returns
Error code

◆ dnp3_tcpserver_bind()

dnp3_param_error_t dnp3_tcpserver_bind ( dnp3_tcp_server_t server)

Bind the server to the port and starts listening. Also starts all the outstations associated to it.

Parameters
serverServer to bind
Returns
Error code

◆ dnp3_tcpserver_destroy()

void dnp3_tcpserver_destroy ( dnp3_tcp_server_t server)

Gracefully shutdown all the outstations associated to this server, stops the server and release resources.

Parameters
serverServer to shutdown

◆ dnp3_tcpserver_new()

dnp3_param_error_t dnp3_tcpserver_new ( dnp3_runtime_t runtime,
dnp3_link_error_mode_t  link_error_mode,
const char *  address,
dnp3_tcp_server_t **  out 
)

Create a new TCP server.

To start it, use dnp3_tcpserver_bind.

Parameters
runtimeRuntime to execute the server on
link_error_modeControls how link errors are handled with respect to the TCP session
addressAddress to bind the server to e.g. 127.0.0.1:20000
outNew TCP server instance
Returns
Error code

◆ dnp3_time_format_to_string()

static const char* dnp3_time_format_to_string ( dnp3_time_format_t  value)
static

Converts a dnp3_time_format_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_time_quality_to_string()

static const char* dnp3_time_quality_to_string ( dnp3_time_quality_t  value)
static

Converts a dnp3_time_quality_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_time_sync_mode_to_string()

static const char* dnp3_time_sync_mode_to_string ( dnp3_time_sync_mode_t  value)
static

Converts a dnp3_time_sync_mode_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_time_sync_result_to_string()

static const char* dnp3_time_sync_result_to_string ( dnp3_time_sync_result_t  value)
static

Converts a dnp3_time_sync_result_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_time_sync_task_callback_init()

static dnp3_time_sync_task_callback_t dnp3_time_sync_task_callback_init ( void(*)(dnp3_time_sync_result_t, void *)  on_complete,
void(*)(void *arg)  on_destroy,
void *  ctx 
)
static

Initialize a dnp3_time_sync_task_callback_t interface.

Parameters
on_completeCalled when the timesync task reached completion or failed
on_destroyCallback when the underlying owner doesn't need the interface anymore
ctxContext data

◆ dnp3_timestamp_init()

static dnp3_timestamp_t dnp3_timestamp_init ( uint64_t  value,
dnp3_time_quality_t  quality 
)
static

Initialize dnp3_timestamp_t to default values.

Parameters
valueTimestamp value
qualityTimestamp quality
Returns
New instance of dnp3_timestamp_t

◆ dnp3_timestamp_invalid()

dnp3_timestamp_t dnp3_timestamp_invalid ( )

Creates an invalid timestamp struct.

Returns
Invalid timestamp

◆ dnp3_timestamp_not_synchronized()

dnp3_timestamp_t dnp3_timestamp_not_synchronized ( uint64_t  value)

Creates a not synchronized timestamp struct.

Parameters
valueTimestamp value in milliseconds since EPOCH
Returns
Not synchronized timestamp

◆ dnp3_timestamp_synchronized()

dnp3_timestamp_t dnp3_timestamp_synchronized ( uint64_t  value)

Creates a synchronized timestamp struct.

Parameters
valueTimestamp value in milliseconds since EPOCH
Returns
Synchronized timestamp

◆ dnp3_timestamp_utc_init()

static dnp3_timestamp_utc_t dnp3_timestamp_utc_init ( uint64_t  value,
bool  is_valid 
)
static

Initialize dnp3_timestamp_utc_t to default values.

Parameters
valueValue of the timestamp (in milliseconds from UNIX Epoch).
is_validTrue if the timestamp is valid, false otherwise.
Returns
New instance of dnp3_timestamp_utc_t

◆ dnp3_timestamp_utc_invalid()

dnp3_timestamp_utc_t dnp3_timestamp_utc_invalid ( )

Create an invalid timestamp value.

Returns
Timestamp

◆ dnp3_timestamp_utc_valid()

dnp3_timestamp_utc_t dnp3_timestamp_utc_valid ( uint64_t  value)

Create a valid timestamp value.

Parameters
valueTimestamp value in milliseconds from UNIX Epoch
Returns
Timestamp

◆ dnp3_transport_decode_level_to_string()

static const char* dnp3_transport_decode_level_to_string ( dnp3_transport_decode_level_t  value)
static

Converts a dnp3_transport_decode_level_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_trip_close_code_to_string()

static const char* dnp3_trip_close_code_to_string ( dnp3_trip_close_code_t  value)
static

Converts a dnp3_trip_close_code_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_update_options_init()

static dnp3_update_options_t dnp3_update_options_init ( )
static

Initialize dnp3_update_options_t to default values.

Returns
New instance of dnp3_update_options_t

◆ dnp3_variation_to_string()

static const char* dnp3_variation_to_string ( dnp3_variation_t  value)
static

Converts a dnp3_variation_t to a string.

Parameters
valueEnum to convert
Returns
String representation

◆ dnp3_write_time_result_to_string()

static const char* dnp3_write_time_result_to_string ( dnp3_write_time_result_t  value)
static

Converts a dnp3_write_time_result_t to a string.

Parameters
valueEnum to convert
Returns
String representation