16#define DNP3_VERSION_MAJOR 1
17#define DNP3_VERSION_MINOR 1
18#define DNP3_VERSION_PATCH 0
19#define DNP3_VERSION_STRING "1.1.0"
125 default:
return "unknown param_error value";
131#define DNP3_FLAG_ONLINE 0x01
133#define DNP3_FLAG_RESTART 0x02
135#define DNP3_FLAG_COMM_LOST 0x04
137#define DNP3_FLAG_REMOTE_FORCED 0x08
139#define DNP3_FLAG_LOCAL_FORCED 0x10
141#define DNP3_FLAG_CHATTER_FILTER 0x20
143#define DNP3_FLAG_OVER_RANGE 0x20
145#define DNP3_FLAG_DISCONTINUITY 0x40
147#define DNP3_FLAG_REFERENCE_ERR 0x40
178 default:
return "unknown log_level value";
202 default:
return "unknown log_output_format value";
227 default:
return "unknown time_format value";
265 return _return_value;
291 void (*on_destroy)(
void* arg),
300 return _return_value;
338 default:
return "unknown app_decode_level value";
363 default:
return "unknown transport_decode_level value";
388 default:
return "unknown link_decode_level value";
413 default:
return "unknown phys_decode_level value";
449 return _return_value;
469 return _return_value;
498 return _return_value;
559 default:
return "unknown trip_close_code value";
590 default:
return "unknown op_type value";
626 return _return_value;
646 return _return_value;
666 return _return_value;
699 return _return_value;
719 return _return_value;
740 return _return_value;
765 default:
return "unknown time_quality value";
793 return _return_value;
809 return _return_value;
825 return _return_value;
853 default:
return "unknown double_bit value";
886 return _return_value;
928 return _return_value;
970 return _return_value;
1012 return _return_value;
1054 return _return_value;
1096 return _return_value;
1138 return _return_value;
1205 default:
return "unknown port_state value";
1230 void (*on_destroy)(
void* arg),
1239 return _return_value;
1533 default:
return "unknown variation value";
1565 return _return_value;
1593 default:
return "unknown data_bits value";
1618 default:
return "unknown flow_control value";
1643 default:
return "unknown parity value";
1665 default:
return "unknown stop_bits value";
1705 return _return_value;
1727 default:
return "unknown link_error_mode value";
1749 default:
return "unknown min_tls_version value";
1779 default:
return "unknown certificate_mode value";
1894 default:
return "unknown function_code value";
1916 default:
return "unknown response_function value";
2030 default:
return "unknown qualifier_code value";
2074 default:
return "unknown read_type value";
2172 void (*on_destroy)(
void* arg),
2179 handle_binary_input,
2180 handle_double_bit_binary_input,
2181 handle_binary_output_status,
2183 handle_frozen_counter,
2184 handle_analog_input,
2185 handle_analog_output_status,
2186 handle_octet_string,
2190 return _return_value;
2253 return _return_value;
2289 default:
return "unknown client_state value";
2314 void (*on_destroy)(
void* arg),
2323 return _return_value;
2381 return _return_value;
2416 return _return_value;
2435 default:
return "unknown nothing value";
2538 return _return_value;
2556 return _return_value;
2574 return _return_value;
2607 return _return_value;
2627 return _return_value;
2647 return _return_value;
2672 default:
return "unknown auto_time_sync value";
2728 disable_unsol_classes,
2729 enable_unsol_classes,
2730 startup_integrity_classes,
2735 event_scan_on_events_available,
2738 return _return_value;
2770 return _return_value;
2786 return _return_value;
2815 void (*on_destroy)(
void* arg),
2824 return _return_value;
2869 default:
return "unknown task_type value";
2906 default:
return "unknown task_error value";
2957 void (*unsolicited_response)(
bool, uint8_t,
void*),
2958 void (*on_destroy)(
void* arg),
2966 unsolicited_response,
2970 return _return_value;
3163 default:
return "unknown read_error value";
3196 void (*on_destroy)(
void* arg),
3206 return _return_value;
3324 default:
return "unknown command_mode value";
3370 default:
return "unknown command_error value";
3403 void (*on_destroy)(
void* arg),
3413 return _return_value;
3443 default:
return "unknown time_sync_mode value";
3504 default:
return "unknown time_sync_error value";
3537 void (*on_destroy)(
void* arg),
3547 return _return_value;
3594 default:
return "unknown restart_error value";
3625 void (*on_complete)(uint64_t,
void*),
3627 void (*on_destroy)(
void* arg),
3637 return _return_value;
3693 default:
return "unknown link_status_error value";
3726 void (*on_destroy)(
void* arg),
3736 return _return_value;
3776 default:
return "unknown event_class value";
3803 default:
return "unknown event_mode value";
3833 return _return_value;
3849 return _return_value;
3871 default:
return "unknown static_binary_input_variation value";
3896 default:
return "unknown event_binary_input_variation value";
3924 return _return_value;
3974 default:
return "unknown static_double_bit_binary_input_variation value";
3999 default:
return "unknown event_double_bit_binary_input_variation value";
4027 return _return_value;
4077 default:
return "unknown static_binary_output_status_variation value";
4099 default:
return "unknown event_binary_output_status_variation value";
4127 return _return_value;
4183 default:
return "unknown static_counter_variation value";
4211 default:
return "unknown event_counter_variation value";
4243 return _return_value;
4305 default:
return "unknown static_frozen_counter_variation value";
4333 default:
return "unknown event_frozen_counter_variation value";
4365 return _return_value;
4427 default:
return "unknown static_analog_input_variation value";
4467 default:
return "unknown event_analog_input_variation value";
4499 return _return_value;
4555 default:
return "unknown static_analog_output_status_variation value";
4595 default:
return "unknown event_analog_output_status_variation value";
4627 return _return_value;
4719 void (*on_destroy)(
void* arg),
4728 return _return_value;
4779 max_double_bit_binary,
4780 max_binary_output_status,
4784 max_analog_output_status,
4787 return _return_value;
4815 return _return_value;
4869 return _return_value;
4901 return _return_value;
4984 event_buffer_config,
4999 return _return_value;
5024 default:
return "unknown restart_delay_type value";
5054 return _return_value;
5070 return _return_value;
5086 return _return_value;
5111 default:
return "unknown write_time_result value";
5133 default:
return "unknown freeze_type value";
5158 default:
return "unknown freeze_result value";
5194 return _return_value;
5271 uint16_t (*get_processing_delay_ms)(
void*),
5278 void (*on_destroy)(
void* arg),
5283 get_processing_delay_ms,
5284 write_absolute_time,
5285 get_application_iin,
5288 freeze_counters_all,
5289 freeze_counters_range,
5293 return _return_value;
5332 default:
return "unknown broadcast_action value";
5428 void (*enter_solicited_confirm_wait)(uint8_t,
void*),
5429 void (*solicited_confirm_timeout)(uint8_t,
void*),
5430 void (*solicited_confirm_received)(uint8_t,
void*),
5431 void (*solicited_confirm_wait_new_request)(
void*),
5432 void (*wrong_solicited_confirm_seq)(uint8_t, uint8_t,
void*),
5433 void (*unexpected_confirm)(
bool, uint8_t,
void*),
5434 void (*enter_unsolicited_confirm_wait)(uint8_t,
void*),
5435 void (*unsolicited_confirm_timeout)(uint8_t,
bool,
void*),
5436 void (*unsolicited_confirmed)(uint8_t,
void*),
5437 void (*clear_restart_iin)(
void*),
5438 void (*on_destroy)(
void* arg),
5443 process_request_from_idle,
5445 enter_solicited_confirm_wait,
5446 solicited_confirm_timeout,
5447 solicited_confirm_received,
5448 solicited_confirm_wait_new_request,
5449 wrong_solicited_confirm_seq,
5451 enter_unsolicited_confirm_wait,
5452 unsolicited_confirm_timeout,
5453 unsolicited_confirmed,
5458 return _return_value;
5536 default:
return "unknown command_status value";
5561 default:
return "unknown operate_type value";
5705 void (*begin_fragment)(
void*),
5717 void (*on_destroy)(
void* arg),
5737 return _return_value;
5758 default:
return "unknown connection_state value";
5783 void (*on_destroy)(
void* arg),
5792 return _return_value;
5923 return _return_value;
dnp3_param_error_t dnp3_database_get_counter(dnp3_database_t *instance, uint16_t index, dnp3_counter_t *out)
Get a Counter point.
struct dnp3_counter_iterator_t dnp3_counter_iterator_t
Iterator of counter.
Definition: dnp3.h:1017
dnp3_double_bit_t
Double-bit binary input value.
Definition: dnp3.h:831
@ DNP3_DOUBLE_BIT_DETERMINED_OFF
Determined to be OFF.
Definition: dnp3.h:835
@ DNP3_DOUBLE_BIT_DETERMINED_ON
Determined to be ON.
Definition: dnp3.h:837
@ DNP3_DOUBLE_BIT_INTERMEDIATE
Transition between conditions.
Definition: dnp3.h:833
@ DNP3_DOUBLE_BIT_INDETERMINATE
Abnormal or custom condition.
Definition: dnp3.h:839
void dnp3_request_add_one_byte_range_header(dnp3_request_t *instance, dnp3_variation_t variation, uint8_t start, uint8_t stop)
Add a one-byte start/stop variation interrogation.
static const char * dnp3_static_binary_output_status_variation_to_string(dnp3_static_binary_output_status_variation_t value)
Converts the enum to a string.
Definition: dnp3.h:4071
static const char * dnp3_link_status_error_to_string(dnp3_link_status_error_t value)
Converts the enum to a string.
Definition: dnp3.h:3680
dnp3_param_error_t dnp3_outstation_server_add_outstation(dnp3_outstation_server_t *instance, dnp3_outstation_config_t 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.
dnp3_link_status_error_t
Errors that can occur during a manually initiated link status check. See dnp3_master_channel_check_li...
Definition: dnp3.h:3656
@ DNP3_LINK_STATUS_ERROR_TOO_MANY_REQUESTS
too many user requests queued
Definition: dnp3.h:3662
@ DNP3_LINK_STATUS_ERROR_SHUTDOWN
master was shutdown
Definition: dnp3.h:3672
@ DNP3_LINK_STATUS_ERROR_RESPONSE_TIMEOUT
timeout occurred before receiving a response
Definition: dnp3.h:3666
@ DNP3_LINK_STATUS_ERROR_BAD_RESPONSE
response was malformed or contained object headers
Definition: dnp3.h:3664
@ DNP3_LINK_STATUS_ERROR_ASSOCIATION_REMOVED
association was removed mid-task
Definition: dnp3.h:3674
@ DNP3_LINK_STATUS_ERROR_NO_CONNECTION
no connection
Definition: dnp3.h:3670
@ DNP3_LINK_STATUS_ERROR_UNEXPECTED_RESPONSE
There was activity on the link, but it wasn't a LINK_STATUS.
Definition: dnp3.h:3660
@ DNP3_LINK_STATUS_ERROR_OK
Success, i.e. no error occurred.
Definition: dnp3.h:3658
@ DNP3_LINK_STATUS_ERROR_WRITE_ERROR
insufficient buffer space to serialize the request
Definition: dnp3.h:3668
dnp3_param_error_t dnp3_runtime_create(dnp3_runtime_config_t config, dnp3_runtime_t **out)
Creates a new runtime for running the protocol stack.
struct dnp3_request_t dnp3_request_t
Custom request.
Definition: dnp3.h:2976
static const char * dnp3_op_type_to_string(dnp3_op_type_t value)
Converts the enum to a string.
Definition: dnp3.h:581
static const char * dnp3_function_code_to_string(dnp3_function_code_t value)
Converts the enum to a string.
Definition: dnp3.h:1857
dnp3_restart_error_t
Errors that can occur during a cold/warm restart operation.
Definition: dnp3.h:3560
@ DNP3_RESTART_ERROR_OK
Success, i.e. no error occurred.
Definition: dnp3.h:3562
@ DNP3_RESTART_ERROR_NO_CONNECTION
no connection
Definition: dnp3.h:3572
@ DNP3_RESTART_ERROR_RESPONSE_TIMEOUT
timeout occurred before receiving a response
Definition: dnp3.h:3568
@ DNP3_RESTART_ERROR_WRITE_ERROR
insufficient buffer space to serialize the request
Definition: dnp3.h:3570
@ DNP3_RESTART_ERROR_SHUTDOWN
master was shutdown
Definition: dnp3.h:3574
@ DNP3_RESTART_ERROR_BAD_RESPONSE
response was malformed or contained object headers
Definition: dnp3.h:3566
@ DNP3_RESTART_ERROR_ASSOCIATION_REMOVED
association was removed mid-task
Definition: dnp3.h:3576
@ DNP3_RESTART_ERROR_TOO_MANY_REQUESTS
too many user requests queued
Definition: dnp3.h:3564
bool dnp3_database_update_binary_output_status(dnp3_database_t *instance, dnp3_binary_output_status_t value, dnp3_update_options_t options)
Update a Binary Output Status point.
static dnp3_control_code_t dnp3_control_code_from_tcc_and_op_type(dnp3_trip_close_code_t tcc, dnp3_op_type_t op_type)
Initialize a dnp3_control_code_t instance from a dnp3_trip_close_code_t and a dnp3_op_type_t.
Definition: dnp3.h:658
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)
Fully construct dnp3_event_buffer_config_t specifying the value of each field.
Definition: dnp3.h:4775
void dnp3_command_set_add_g41_v2_u8(dnp3_command_set_t *instance, uint8_t idx, int16_t value)
Add a Analog Output command (signed 16-bit integer) with 1-byte prefix index.
struct dnp3_master_channel_t dnp3_master_channel_t
Represents a communication channel for a master station.
Definition: dnp3.h:2331
static dnp3_link_status_callback_t dnp3_link_status_callback_init(void(*on_complete)(dnp3_nothing_t, void *), void(*on_failure)(dnp3_link_status_error_t, void *), void(*on_destroy)(void *arg), void *ctx)
Initialize an instance of the interface.
Definition: dnp3.h:3723
static const char * dnp3_static_analog_input_variation_to_string(dnp3_static_analog_input_variation_t value)
Converts the enum to a string.
Definition: dnp3.h:4417
static const char * dnp3_double_bit_to_string(dnp3_double_bit_t value)
Converts the enum to a string.
Definition: dnp3.h:845
dnp3_analog_output_status_t * dnp3_analog_output_status_iterator_next(dnp3_analog_output_status_iterator_t *iter)
returns a pointer to the next value or NULL
static const char * dnp3_event_class_to_string(dnp3_event_class_t value)
Converts the enum to a string.
Definition: dnp3.h:3768
static dnp3_outstation_features_t dnp3_outstation_features_init()
Initialize to default values.
Definition: dnp3.h:4894
static const char * dnp3_time_sync_error_to_string(dnp3_time_sync_error_t value)
Converts the enum to a string.
Definition: dnp3.h:3485
struct dnp3_outstation_t dnp3_outstation_t
Outstation handle.
Definition: dnp3.h:5798
bool dnp3_database_add_octet_string(dnp3_database_t *instance, uint16_t index, dnp3_event_class_t point_class)
Add a new Octet String point.
static const char * dnp3_flow_control_to_string(dnp3_flow_control_t value)
Converts the enum to a string.
Definition: dnp3.h:1611
dnp3_variation_t
Group/Variation.
Definition: dnp3.h:1244
@ DNP3_VARIATION_GROUP30_VAR6
Analog Input - Double-precision floating point with flags.
Definition: dnp3.h:1346
@ DNP3_VARIATION_GROUP42_VAR4
Analog Output Event - 16-bit with time.
Definition: dnp3.h:1394
@ DNP3_VARIATION_GROUP11_VAR2
Binary Output Event - With time.
Definition: dnp3.h:1284
@ DNP3_VARIATION_GROUP1_VAR1
Binary Input - Packed format.
Definition: dnp3.h:1248
@ DNP3_VARIATION_GROUP20_VAR6
Counter - 16-bit without flag.
Definition: dnp3.h:1298
@ DNP3_VARIATION_GROUP40_VAR3
Analog Output Status - Single-precision floating point with flags.
Definition: dnp3.h:1372
@ DNP3_VARIATION_GROUP23_VAR0
Frozen Counter Event - Default variation.
Definition: dnp3.h:1324
@ DNP3_VARIATION_GROUP1_VAR2
Binary Input - With flags.
Definition: dnp3.h:1250
@ DNP3_VARIATION_GROUP41_VAR4
Analog Output - Double-precision floating point.
Definition: dnp3.h:1384
@ DNP3_VARIATION_GROUP22_VAR1
Counter Event - 32-bit with flags.
Definition: dnp3.h:1316
@ DNP3_VARIATION_GROUP32_VAR0
Analog Input Event - Default variation.
Definition: dnp3.h:1348
@ DNP3_VARIATION_GROUP3_VAR2
Double-bit Binary Input - With flags.
Definition: dnp3.h:1264
@ DNP3_VARIATION_GROUP111
Octet String Event.
Definition: dnp3.h:1430
@ DNP3_VARIATION_GROUP21_VAR1
Frozen Counter - 32-bit with flags.
Definition: dnp3.h:1302
@ DNP3_VARIATION_GROUP60_VAR2
Class objects - Class 1 data.
Definition: dnp3.h:1420
@ DNP3_VARIATION_GROUP11_VAR1
Binary Output Event - Without time.
Definition: dnp3.h:1282
@ DNP3_VARIATION_GROUP2_VAR1
Binary Input Event - Without time.
Definition: dnp3.h:1254
@ DNP3_VARIATION_GROUP30_VAR1
Analog Input - 32-bit with flags.
Definition: dnp3.h:1336
@ DNP3_VARIATION_GROUP40_VAR4
Analog Output Status - Double-precision floating point with flags.
Definition: dnp3.h:1374
@ DNP3_VARIATION_GROUP32_VAR8
Analog Input Event - Double-precision floating point with time.
Definition: dnp3.h:1364
@ DNP3_VARIATION_GROUP23_VAR1
Frozen Counter Event - 32-bit with flags.
Definition: dnp3.h:1326
@ DNP3_VARIATION_GROUP11_VAR0
Binary Output Event - Default variation.
Definition: dnp3.h:1280
@ DNP3_VARIATION_GROUP42_VAR6
Analog Output Event - Double-precision floating point without time.
Definition: dnp3.h:1398
@ DNP3_VARIATION_GROUP3_VAR1
Double-bit Binary Input - Packed format.
Definition: dnp3.h:1262
@ DNP3_VARIATION_GROUP60_VAR1
Class objects - Class 0 data.
Definition: dnp3.h:1418
@ DNP3_VARIATION_GROUP23_VAR2
Frozen Counter Event - 16-bit with flags.
Definition: dnp3.h:1328
@ DNP3_VARIATION_GROUP40_VAR0
Analog Output Status - Default variation.
Definition: dnp3.h:1366
@ DNP3_VARIATION_GROUP52_VAR2
Time delay - Fine.
Definition: dnp3.h:1416
@ DNP3_VARIATION_GROUP42_VAR8
Analog Output Event - Double-preicions floating point with time.
Definition: dnp3.h:1402
@ DNP3_VARIATION_GROUP30_VAR5
Analog Input - Single-precision floating point with flags.
Definition: dnp3.h:1344
@ DNP3_VARIATION_GROUP1_VAR0
Binary Input - Default variation.
Definition: dnp3.h:1246
@ DNP3_VARIATION_GROUP40_VAR1
Analog Output Status - 32-bit with flags.
Definition: dnp3.h:1368
@ DNP3_VARIATION_GROUP12_VAR0
Binary Output Command - Control Relay Output Block.
Definition: dnp3.h:1286
@ DNP3_VARIATION_GROUP21_VAR2
Frozen Counter - 16-bit with flags.
Definition: dnp3.h:1304
@ DNP3_VARIATION_GROUP40_VAR2
Analog Output Status - 16-bit with flags.
Definition: dnp3.h:1370
@ DNP3_VARIATION_GROUP20_VAR0
Counter - Default variation.
Definition: dnp3.h:1290
@ DNP3_VARIATION_GROUP4_VAR3
Double-bit Binary Input Event - With relative time.
Definition: dnp3.h:1272
@ DNP3_VARIATION_GROUP22_VAR2
Counter Event - 16-bit with flags.
Definition: dnp3.h:1318
@ DNP3_VARIATION_GROUP32_VAR6
Analog Input Event - Double-precision floating point without time.
Definition: dnp3.h:1360
@ DNP3_VARIATION_GROUP42_VAR0
Analog Output Event - Default variation.
Definition: dnp3.h:1386
@ DNP3_VARIATION_GROUP42_VAR2
Analog Output Event - 16-bit without time.
Definition: dnp3.h:1390
@ DNP3_VARIATION_GROUP30_VAR2
Analog Input - 16-bit with flags.
Definition: dnp3.h:1338
@ DNP3_VARIATION_GROUP22_VAR0
Counter Event - Default variation.
Definition: dnp3.h:1314
@ DNP3_VARIATION_GROUP30_VAR3
Analog Input - 32-bit without flag.
Definition: dnp3.h:1340
@ DNP3_VARIATION_GROUP41_VAR2
Analog Output - 16-bit.
Definition: dnp3.h:1380
@ DNP3_VARIATION_GROUP32_VAR5
Analog Input Event - Single-precision floating point without time.
Definition: dnp3.h:1358
@ DNP3_VARIATION_GROUP20_VAR2
Counter - 16-bit with flags.
Definition: dnp3.h:1294
@ DNP3_VARIATION_GROUP12_VAR1
Binary Output Command - Pattern Control Block.
Definition: dnp3.h:1288
@ DNP3_VARIATION_GROUP41_VAR1
Analog Output - 32-bit.
Definition: dnp3.h:1378
@ DNP3_VARIATION_GROUP50_VAR1
Time and Date - Absolute time.
Definition: dnp3.h:1404
@ DNP3_VARIATION_GROUP52_VAR1
Time delay - Coarse.
Definition: dnp3.h:1414
@ DNP3_VARIATION_GROUP32_VAR3
Analog Input Event - 32-bit with time.
Definition: dnp3.h:1354
@ DNP3_VARIATION_GROUP4_VAR2
Double-bit Binary Input Event - With absolute time.
Definition: dnp3.h:1270
@ DNP3_VARIATION_GROUP21_VAR0
Frozen Counter - Default variation.
Definition: dnp3.h:1300
@ DNP3_VARIATION_GROUP23_VAR6
Frozen Counter Event - 16-bit with flags and time.
Definition: dnp3.h:1332
@ DNP3_VARIATION_GROUP110
Octet String.
Definition: dnp3.h:1428
@ DNP3_VARIATION_GROUP42_VAR7
Analog Output Event - Single-preicions floating point with time.
Definition: dnp3.h:1400
@ DNP3_VARIATION_GROUP42_VAR5
Analog Output Event - Single-precision floating point without time.
Definition: dnp3.h:1396
@ DNP3_VARIATION_GROUP21_VAR5
Frozen Counter - 32-bit with flags and time.
Definition: dnp3.h:1306
@ DNP3_VARIATION_GROUP22_VAR6
Counter Event - 16-bit with flags and time.
Definition: dnp3.h:1322
@ DNP3_VARIATION_GROUP21_VAR6
Frozen Counter - 16-bit with flags and time.
Definition: dnp3.h:1308
@ DNP3_VARIATION_GROUP10_VAR1
Binary Output - Packed format.
Definition: dnp3.h:1276
@ DNP3_VARIATION_GROUP22_VAR5
Counter Event - 32-bit with flags and time.
Definition: dnp3.h:1320
@ DNP3_VARIATION_GROUP2_VAR3
Binary Input Event - With relative time.
Definition: dnp3.h:1258
@ DNP3_VARIATION_GROUP32_VAR1
Analog Input Event - 32-bit without time.
Definition: dnp3.h:1350
@ DNP3_VARIATION_GROUP32_VAR4
Analog Input Event - 16-bit with time.
Definition: dnp3.h:1356
@ DNP3_VARIATION_GROUP2_VAR0
Binary Input Event - Default variation.
Definition: dnp3.h:1252
@ DNP3_VARIATION_GROUP21_VAR10
Frozen Counter - 16-bit without flag.
Definition: dnp3.h:1312
@ DNP3_VARIATION_GROUP51_VAR1
Time and date CTO - Absolute time, synchronized.
Definition: dnp3.h:1410
@ DNP3_VARIATION_GROUP20_VAR5
Counter - 32-bit without flag.
Definition: dnp3.h:1296
@ DNP3_VARIATION_GROUP4_VAR0
Double-bit Binary Input Event - Default variation.
Definition: dnp3.h:1266
@ DNP3_VARIATION_GROUP32_VAR2
Analog Input Event - 16-bit without time.
Definition: dnp3.h:1352
@ DNP3_VARIATION_GROUP10_VAR0
Binary Output - Default variation.
Definition: dnp3.h:1274
@ DNP3_VARIATION_GROUP50_VAR4
Time and Date - Indexed absolute time and long interval.
Definition: dnp3.h:1408
@ DNP3_VARIATION_GROUP60_VAR3
Class objects - Class 2 data.
Definition: dnp3.h:1422
@ DNP3_VARIATION_GROUP80_VAR1
Internal Indications - Packed format.
Definition: dnp3.h:1426
@ DNP3_VARIATION_GROUP30_VAR4
Analog Input - 16-bit without flag.
Definition: dnp3.h:1342
@ DNP3_VARIATION_GROUP51_VAR2
Time and date CTO - Absolute time, unsynchronized.
Definition: dnp3.h:1412
@ DNP3_VARIATION_GROUP32_VAR7
Analog Input Event - Single-precision floating point with time.
Definition: dnp3.h:1362
@ DNP3_VARIATION_GROUP3_VAR0
Double-bit Binary Input - Default variation.
Definition: dnp3.h:1260
@ DNP3_VARIATION_GROUP42_VAR3
Analog Output Event - 32-bit with time.
Definition: dnp3.h:1392
@ DNP3_VARIATION_GROUP20_VAR1
Counter - 32-bit with flags.
Definition: dnp3.h:1292
@ DNP3_VARIATION_GROUP10_VAR2
Binary Output - With flags.
Definition: dnp3.h:1278
@ DNP3_VARIATION_GROUP41_VAR0
Analog Output - Default variation.
Definition: dnp3.h:1376
@ DNP3_VARIATION_GROUP2_VAR2
Binary Input Event - With absolute time.
Definition: dnp3.h:1256
@ DNP3_VARIATION_GROUP23_VAR5
Frozen Counter Event - 32-bit with flags and time.
Definition: dnp3.h:1330
@ DNP3_VARIATION_GROUP41_VAR3
Analog Output - Single-precision floating point.
Definition: dnp3.h:1382
@ DNP3_VARIATION_GROUP42_VAR1
Analog Output Event - 32-bit without time.
Definition: dnp3.h:1388
@ DNP3_VARIATION_GROUP21_VAR9
Frozen Counter - 32-bit without flag.
Definition: dnp3.h:1310
@ DNP3_VARIATION_GROUP50_VAR3
Time and Date - Absolute time at last recorded time.
Definition: dnp3.h:1406
@ DNP3_VARIATION_GROUP30_VAR0
Analog Input - Default variation.
Definition: dnp3.h:1334
@ DNP3_VARIATION_GROUP4_VAR1
Double-bit Binary Input Event - Without time.
Definition: dnp3.h:1268
@ DNP3_VARIATION_GROUP60_VAR4
Class objects - Class 3 data.
Definition: dnp3.h:1424
static dnp3_tls_server_config_t dnp3_tls_server_config_init(const char *dns_name, const char *peer_cert_path, const char *local_cert_path, const char *private_key_path, const char *password)
construct the configuration with defaults
Definition: dnp3.h:5912
void dnp3_request_add_two_byte_limited_count_header(dnp3_request_t *instance, dnp3_variation_t variation, uint16_t count)
Add a two-byte limited count variation interrogation.
static const char * dnp3_event_analog_output_status_variation_to_string(dnp3_event_analog_output_status_variation_t value)
Converts the enum to a string.
Definition: dnp3.h:4583
static const char * dnp3_phys_decode_level_to_string(dnp3_phys_decode_level_t value)
Converts the enum to a string.
Definition: dnp3.h:406
dnp3_param_error_t dnp3_database_get_frozen_counter(dnp3_database_t *instance, uint16_t index, dnp3_frozen_counter_t *out)
Get a Frozen Counter point.
static dnp3_event_classes_t dnp3_event_classes_all()
Initialize all classes to true.
Definition: dnp3.h:2549
static dnp3_timestamp_t dnp3_timestamp_synchronized_timestamp(uint64_t value)
Creates a synchronized timestamp struct.
Definition: dnp3.h:803
bool dnp3_database_update_analog_input(dnp3_database_t *instance, dnp3_analog_input_t value, dnp3_update_options_t options)
Update a AnalogInput point.
dnp3_restart_delay_type_t
Type of restart delay value. Used by dnp3_restart_delay_t.
Definition: dnp3.h:5005
@ DNP3_RESTART_DELAY_TYPE_NOT_SUPPORTED
Restart mode not supported.
Definition: dnp3.h:5007
@ DNP3_RESTART_DELAY_TYPE_MILLI_SECONDS
Value is in milliseconds (corresponds to g51v2)
Definition: dnp3.h:5011
@ DNP3_RESTART_DELAY_TYPE_SECONDS
Value is in seconds (corresponds to g51v1)
Definition: dnp3.h:5009
static dnp3_database_transaction_t dnp3_database_transaction_init(void(*execute)(dnp3_database_t *, void *), void(*on_destroy)(void *arg), void *ctx)
Initialize an instance of the interface.
Definition: dnp3.h:4717
static dnp3_restart_delay_t dnp3_restart_delay_not_supported()
RestartDelay indicating that the request is not supported.
Definition: dnp3.h:5048
static const char * dnp3_link_error_mode_to_string(dnp3_link_error_mode_t value)
Converts the enum to a string.
Definition: dnp3.h:1721
void dnp3_command_set_add_g41_v4_u16(dnp3_command_set_t *instance, uint16_t idx, double value)
Add a Analog Output command (double-precision float) with 2-byte prefix index.
static dnp3_association_information_t dnp3_association_information_init(void(*task_start)(dnp3_task_type_t, dnp3_function_code_t, uint8_t, void *), void(*task_success)(dnp3_task_type_t, dnp3_function_code_t, uint8_t, void *), void(*task_fail)(dnp3_task_type_t, dnp3_task_error_t, void *), void(*unsolicited_response)(bool, uint8_t, void *), void(*on_destroy)(void *arg), void *ctx)
Initialize an instance of the interface.
Definition: dnp3.h:2953
static const char * dnp3_event_analog_input_variation_to_string(dnp3_event_analog_input_variation_t value)
Converts the enum to a string.
Definition: dnp3.h:4455
struct dnp3_analog_output_status_iterator_t dnp3_analog_output_status_iterator_t
Iterator of analog_output_status.
Definition: dnp3.h:1143
dnp3_octet_string_value_t * dnp3_octet_string_value_create()
Creates an instance of the collection.
void dnp3_outstation_transaction(dnp3_outstation_t *instance, dnp3_database_transaction_t callback)
Acquire a mutex on the underlying database and apply a set of changes as a transaction.
static dnp3_analog_input_t dnp3_analog_input_init(uint16_t index, double value, dnp3_flags_t flags, dnp3_timestamp_t time)
Fully construct dnp3_analog_input_t specifying the value of each field.
Definition: dnp3.h:1088
dnp3_event_binary_output_status_variation_t
Event binary output status variation.
Definition: dnp3.h:4083
@ DNP3_EVENT_BINARY_OUTPUT_STATUS_VARIATION_GROUP11_VAR2
Binary output event - status with time.
Definition: dnp3.h:4087
@ DNP3_EVENT_BINARY_OUTPUT_STATUS_VARIATION_GROUP11_VAR1
Binary output event - status without time.
Definition: dnp3.h:4085
void dnp3_command_set_add_g41_v2_u16(dnp3_command_set_t *instance, uint16_t idx, int16_t value)
Add a Analog Output command (signed 16-bit integer) with 2-byte prefix index.
static dnp3_double_bit_binary_input_t dnp3_double_bit_binary_input_init(uint16_t index, dnp3_double_bit_t value, dnp3_flags_t flags, dnp3_timestamp_t time)
Fully construct dnp3_double_bit_binary_input_t specifying the value of each field.
Definition: dnp3.h:920
dnp3_event_binary_input_variation_t
Event binary input variation.
Definition: dnp3.h:3877
@ DNP3_EVENT_BINARY_INPUT_VARIATION_GROUP2_VAR2
Binary input event - with absolute time.
Definition: dnp3.h:3881
@ DNP3_EVENT_BINARY_INPUT_VARIATION_GROUP2_VAR3
Binary input event - with relative time.
Definition: dnp3.h:3883
@ DNP3_EVENT_BINARY_INPUT_VARIATION_GROUP2_VAR1
Binary input event - without time.
Definition: dnp3.h:3879
const char * dnp3_version()
Get the version of the library as a string.
dnp3_read_type_t
Describes the source of a read event.
Definition: dnp3.h:2052
@ DNP3_READ_TYPE_UNSOLICITED
Unsolicited message.
Definition: dnp3.h:2056
@ DNP3_READ_TYPE_STARTUP_INTEGRITY
Startup integrity poll.
Definition: dnp3.h:2054
@ DNP3_READ_TYPE_SINGLE_POLL
Single poll requested by the user.
Definition: dnp3.h:2058
@ DNP3_READ_TYPE_PERIODIC_POLL
Periodic poll configured by the user.
Definition: dnp3.h:2060
dnp3_param_error_t dnp3_master_channel_add_poll(dnp3_master_channel_t *instance, dnp3_association_id_t id, dnp3_request_t *request, uint64_t period, dnp3_poll_id_t *out)
Add a periodic poll to an association.
static const char * dnp3_min_tls_version_to_string(dnp3_min_tls_version_t value)
Converts the enum to a string.
Definition: dnp3.h:1743
static const char * dnp3_event_double_bit_binary_input_variation_to_string(dnp3_event_double_bit_binary_input_variation_t value)
Converts the enum to a string.
Definition: dnp3.h:3992
uint8_t * dnp3_byte_iterator_next(dnp3_byte_iterator_t *iter)
returns a pointer to the next value or NULL
static dnp3_application_iin_t dnp3_application_iin_init()
Initialize all fields in dnp3_application_iin_t to false.
Definition: dnp3.h:5186
dnp3_param_error_t dnp3_database_get_analog_output_status(dnp3_database_t *instance, uint16_t index, dnp3_analog_output_status_t *out)
Get a Analog Output Status point.
static dnp3_connect_strategy_t dnp3_connect_strategy_init()
Initialize to default values.
Definition: dnp3.h:2409
dnp3_param_error_t dnp3_outstation_server_create_tls_server(dnp3_runtime_t *runtime, dnp3_link_error_mode_t link_error_mode, const char *address, dnp3_tls_server_config_t tls_config, dnp3_outstation_server_t **out)
Create a new TLS server.
dnp3_min_tls_version_t
Minimum TLS version to allow.
Definition: dnp3.h:1733
@ DNP3_MIN_TLS_VERSION_V12
Allow TLS 1.2 and 1.3.
Definition: dnp3.h:1735
@ DNP3_MIN_TLS_VERSION_V13
Only allow TLS 1.3.
Definition: dnp3.h:1737
dnp3_certificate_mode_t
Determines how the certificate(s) presented by the peer are validated.
Definition: dnp3.h:1757
@ DNP3_CERTIFICATE_MODE_SELF_SIGNED
Validates that the peer presents a single certificate which is a byte-for-byte match against the conf...
Definition: dnp3.h:1767
@ DNP3_CERTIFICATE_MODE_AUTHORITY_BASED
Validates the peer certificate against one or more configured trust anchors.
Definition: dnp3.h:1763
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 the configuration with the specified values.
Definition: dnp3.h:2724
static const char * dnp3_command_error_to_string(dnp3_command_error_t value)
Converts the enum to a string.
Definition: dnp3.h:3356
static const char * dnp3_command_mode_to_string(dnp3_command_mode_t value)
Converts the enum to a string.
Definition: dnp3.h:3318
void dnp3_command_set_add_g41_v1_u8(dnp3_command_set_t *instance, uint8_t idx, int32_t value)
Add a Analog Output command (signed 32-bit integer) with 1-byte prefix index.
void dnp3_request_add_all_objects_header(dnp3_request_t *instance, dnp3_variation_t variation)
Add an all objects variation interrogation.
static dnp3_frozen_counter_t dnp3_frozen_counter_init(uint16_t index, uint32_t value, dnp3_flags_t flags, dnp3_timestamp_t time)
Fully construct dnp3_frozen_counter_t specifying the value of each field.
Definition: dnp3.h:1046
dnp3_operate_type_t
Enumeration describing how the master requested the control operation.
Definition: dnp3.h:5542
@ DNP3_OPERATE_TYPE_SELECT_BEFORE_OPERATE
control point was properly selected before the operate request
Definition: dnp3.h:5544
@ DNP3_OPERATE_TYPE_DIRECT_OPERATE
operate the control via a DirectOperate request
Definition: dnp3.h:5546
@ DNP3_OPERATE_TYPE_DIRECT_OPERATE_NO_ACK
operate the control via a DirectOperateNoAck request
Definition: dnp3.h:5548
struct dnp3_octet_string_value_t dnp3_octet_string_value_t
Collection of octet_string_value.
Definition: dnp3.h:4660
dnp3_write_time_result_t
Write time result used by dnp3_outstation_application_t::write_absolute_time.
Definition: dnp3.h:5092
@ DNP3_WRITE_TIME_RESULT_OK
The write time operation succeeded.
Definition: dnp3.h:5094
@ DNP3_WRITE_TIME_RESULT_NOT_SUPPORTED
Writing time is not supported by this outstation (translated to NO_FUNC_CODE_SUPPORT).
Definition: dnp3.h:5098
@ DNP3_WRITE_TIME_RESULT_PARAMETER_ERROR
The request parameters are nonsensical.
Definition: dnp3.h:5096
void dnp3_octet_string_value_add(dnp3_octet_string_value_t *instance, uint8_t value)
Add a value to the collection.
void dnp3_request_add_one_byte_limited_count_header(dnp3_request_t *instance, dnp3_variation_t variation, uint8_t count)
Add a one-byte limited count variation interrogation.
dnp3_param_error_t dnp3_master_channel_read_with_handler(dnp3_master_channel_t *instance, dnp3_association_id_t association, dnp3_request_t *request, dnp3_read_handler_t handler, dnp3_read_task_callback_t callback)
Perform a read on the association.
dnp3_static_binary_output_status_variation_t
Static binary output status variation.
Definition: dnp3.h:4061
@ DNP3_STATIC_BINARY_OUTPUT_STATUS_VARIATION_GROUP10_VAR2
Binary output - output status with flags.
Definition: dnp3.h:4065
@ DNP3_STATIC_BINARY_OUTPUT_STATUS_VARIATION_GROUP10_VAR1
Binary output - packed format.
Definition: dnp3.h:4063
static dnp3_command_task_callback_t dnp3_command_task_callback_init(void(*on_complete)(dnp3_nothing_t, void *), void(*on_failure)(dnp3_command_error_t, void *), void(*on_destroy)(void *arg), void *ctx)
Initialize an instance of the interface.
Definition: dnp3.h:3400
static dnp3_utc_timestamp_t dnp3_utc_timestamp_invalid()
Construct an invalid dnp3_utc_timestamp_t.
Definition: dnp3.h:2780
dnp3_param_error_t dnp3_master_channel_demand_poll(dnp3_master_channel_t *instance, dnp3_poll_id_t poll_id)
Demand the immediate execution of a poll previously created with dnp3_master_channel_add_poll.
bool dnp3_database_remove_frozen_counter(dnp3_database_t *instance, uint16_t index)
Remove a Frozen Counter point.
void dnp3_command_set_add_g41_v1_u16(dnp3_command_set_t *instance, uint16_t idx, int32_t value)
Add a Analog Output command (signed 32-bit integer) with 2-byte prefix index.
void dnp3_address_filter_destroy(dnp3_address_filter_t *instance)
Destroy an address filter.
static dnp3_classes_t dnp3_classes_init(bool class0, bool class1, bool class2, bool class3)
Fully construct dnp3_classes_t specifying the value of each field.
Definition: dnp3.h:2599
dnp3_param_error_t dnp3_master_channel_read(dnp3_master_channel_t *instance, dnp3_association_id_t association, dnp3_request_t *request, dnp3_read_task_callback_t callback)
Perform a read on the association.
dnp3_param_error_t dnp3_outstation_create_serial_session_fault_tolerant(dnp3_runtime_t *runtime, const char *serial_path, dnp3_serial_settings_t settings, uint64_t open_retry_delay, dnp3_outstation_config_t 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 which is tolerant to the serial port being add...
void dnp3_endpoint_list_add(dnp3_endpoint_list_t *instance, const char *endpoint)
Add an IP endpoint to the list.
dnp3_event_mode_t
Controls how events are processed when updating values in the database.
Definition: dnp3.h:3782
@ DNP3_EVENT_MODE_SUPPRESS
Never produce an event regardless of change.
Definition: dnp3.h:3790
@ DNP3_EVENT_MODE_DETECT
Detect events in a type dependent fashion.
Definition: dnp3.h:3786
@ DNP3_EVENT_MODE_FORCE
Produce an event whether the value has changed or not.
Definition: dnp3.h:3788
bool dnp3_database_add_frozen_counter(dnp3_database_t *instance, uint16_t index, dnp3_event_class_t point_class, dnp3_frozen_counter_config_t config)
Add a new Frozen Counter point.
static const char * dnp3_connection_state_to_string(dnp3_connection_state_t value)
Converts the enum to a string.
Definition: dnp3.h:5752
dnp3_param_error_t
Error type used throughout the library.
Definition: dnp3.h:46
@ DNP3_PARAM_ERROR_OK
Success, i.e. no error occurred.
Definition: dnp3.h:48
@ DNP3_PARAM_ERROR_OTHER_TLS_ERROR
Other TLS error.
Definition: dnp3.h:92
@ DNP3_PARAM_ERROR_INVALID_PEER_CERTIFICATE
Invalid peer certificate file.
Definition: dnp3.h:84
@ DNP3_PARAM_ERROR_SERVER_ALREADY_STARTED
Server already started.
Definition: dnp3.h:68
@ DNP3_PARAM_ERROR_INVALID_PRIVATE_KEY
Invalid private key file.
Definition: dnp3.h:88
@ DNP3_PARAM_ERROR_INVALID_TIMEOUT
The supplied timeout value is too small or too large.
Definition: dnp3.h:50
@ DNP3_PARAM_ERROR_ADDRESS_FILTER_CONFLICT
Conflict in the address filter specification.
Definition: dnp3.h:66
@ DNP3_PARAM_ERROR_LOGGING_ALREADY_CONFIGURED
Logging can only be configured once.
Definition: dnp3.h:80
@ DNP3_PARAM_ERROR_INVALID_BUFFER_SIZE
Invalid buffer size.
Definition: dnp3.h:64
@ DNP3_PARAM_ERROR_ASSOCIATION_DOES_NOT_EXIST
The specified association does not exist.
Definition: dnp3.h:56
@ DNP3_PARAM_ERROR_POINT_DOES_NOT_EXIST
Point does not exist.
Definition: dnp3.h:82
@ DNP3_PARAM_ERROR_SERVER_BIND_ERROR
Server failed to bind to the specified port.
Definition: dnp3.h:70
@ DNP3_PARAM_ERROR_RUNTIME_CANNOT_BLOCK_WITHIN_ASYNC
Runtime cannot execute blocking call within asynchronous context.
Definition: dnp3.h:78
@ DNP3_PARAM_ERROR_INVALID_SOCKET_ADDRESS
Invalid socket address.
Definition: dnp3.h:60
@ DNP3_PARAM_ERROR_NO_SUPPORT
Native library was compiled without support for this feature.
Definition: dnp3.h:54
@ DNP3_PARAM_ERROR_ASSOCIATION_DUPLICATE_ADDRESS
Duplicate association address.
Definition: dnp3.h:58
@ DNP3_PARAM_ERROR_RUNTIME_CREATION_FAILURE
Failed to create Tokio runtime.
Definition: dnp3.h:74
@ DNP3_PARAM_ERROR_INVALID_DNP3_ADDRESS
Invalid link-layer DNP3 address.
Definition: dnp3.h:62
@ DNP3_PARAM_ERROR_MASTER_ALREADY_SHUTDOWN
Master was already shutdown.
Definition: dnp3.h:72
@ DNP3_PARAM_ERROR_NULL_PARAMETER
Null parameter.
Definition: dnp3.h:52
@ DNP3_PARAM_ERROR_RUNTIME_DESTROYED
Runtime has already been disposed.
Definition: dnp3.h:76
@ DNP3_PARAM_ERROR_INVALID_LOCAL_CERTIFICATE
Invalid local certificate file.
Definition: dnp3.h:86
@ DNP3_PARAM_ERROR_INVALID_DNS_NAME
Invalid DNS name.
Definition: dnp3.h:90
dnp3_freeze_result_t
Result of a freeze operation.
Definition: dnp3.h:5139
@ DNP3_FREEZE_RESULT_OK
Freeze operation was successful.
Definition: dnp3.h:5141
@ DNP3_FREEZE_RESULT_PARAMETER_ERROR
The request parameters are nonsensical.
Definition: dnp3.h:5143
@ DNP3_FREEZE_RESULT_NOT_SUPPORTED
The demanded freeze operation is not supported by this device.
Definition: dnp3.h:5145
dnp3_port_state_t
State of the serial port.
Definition: dnp3.h:1183
@ DNP3_PORT_STATE_SHUTDOWN
Task has been shut down.
Definition: dnp3.h:1191
@ DNP3_PORT_STATE_WAIT
Waiting to perform an open retry.
Definition: dnp3.h:1187
@ DNP3_PORT_STATE_DISABLED
Disabled until enabled.
Definition: dnp3.h:1185
@ DNP3_PORT_STATE_OPEN
Port is open.
Definition: dnp3.h:1189
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)
dnp3_nothing_t
A single value enum which is used as a placeholder for futures that don't return a value.
Definition: dnp3.h:2422
@ DNP3_NOTHING_NOTHING
the only value this enum has
Definition: dnp3.h:2424
dnp3_param_error_t dnp3_master_channel_get_decode_level(dnp3_master_channel_t *instance, dnp3_decode_level_t *out)
Get the decoding level for the channel.
dnp3_phys_decode_level_t
Controls how data transmitted at the physical layer (TCP, serial, etc) is logged.
Definition: dnp3.h:394
@ DNP3_PHYS_DECODE_LEVEL_LENGTH
Log only the length of data that is sent and received.
Definition: dnp3.h:398
@ DNP3_PHYS_DECODE_LEVEL_NOTHING
Log nothing.
Definition: dnp3.h:396
@ DNP3_PHYS_DECODE_LEVEL_DATA
Log the length and the actual data that is sent and received.
Definition: dnp3.h:400
static const char * dnp3_static_frozen_counter_variation_to_string(dnp3_static_frozen_counter_variation_t value)
Converts the enum to a string.
Definition: dnp3.h:4295
dnp3_time_format_t
Describes if and how the time will be formatted in log messages.
Definition: dnp3.h:208
@ DNP3_TIME_FORMAT_NONE
Don't format the timestamp as part of the message.
Definition: dnp3.h:210
@ DNP3_TIME_FORMAT_SYSTEM
Format the time in a human readable format e.g. 'Jun 25 14:27:12.955'.
Definition: dnp3.h:214
@ DNP3_TIME_FORMAT_RFC_3339
Format the time using RFC 3339.
Definition: dnp3.h:212
dnp3_param_error_t dnp3_master_channel_create_serial(dnp3_runtime_t *runtime, dnp3_master_channel_config_t config, const char *path, dnp3_serial_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.
bool dnp3_database_remove_binary_input(dnp3_database_t *instance, uint16_t index)
Remove a BinaryInput point.
static dnp3_control_handler_t dnp3_control_handler_init(void(*begin_fragment)(void *), void(*end_fragment)(dnp3_database_handle_t *, void *), dnp3_command_status_t(*select_g12v1)(dnp3_group12_var1_t, uint16_t, dnp3_database_handle_t *, void *), dnp3_command_status_t(*operate_g12v1)(dnp3_group12_var1_t, uint16_t, dnp3_operate_type_t, dnp3_database_handle_t *, void *), dnp3_command_status_t(*select_g41v1)(int32_t, uint16_t, dnp3_database_handle_t *, void *), dnp3_command_status_t(*operate_g41v1)(int32_t, uint16_t, dnp3_operate_type_t, dnp3_database_handle_t *, void *), dnp3_command_status_t(*select_g41v2)(int16_t, uint16_t, dnp3_database_handle_t *, void *), dnp3_command_status_t(*operate_g41v2)(int16_t, uint16_t, dnp3_operate_type_t, dnp3_database_handle_t *, void *), dnp3_command_status_t(*select_g41v3)(float, uint16_t, dnp3_database_handle_t *, void *), dnp3_command_status_t(*operate_g41v3)(float, uint16_t, dnp3_operate_type_t, dnp3_database_handle_t *, void *), dnp3_command_status_t(*select_g41v4)(double, uint16_t, dnp3_database_handle_t *, void *), dnp3_command_status_t(*operate_g41v4)(double, uint16_t, dnp3_operate_type_t, dnp3_database_handle_t *, void *), void(*on_destroy)(void *arg), void *ctx)
Initialize an instance of the interface.
Definition: dnp3.h:5704
static dnp3_decode_level_t dnp3_decode_level_nothing()
Initialize log levels to nothing.
Definition: dnp3.h:461
static dnp3_restart_delay_t dnp3_restart_delay_milliseconds(uint16_t value)
RestartDelay with a count of milliseconds.
Definition: dnp3.h:5080
dnp3_time_quality_t
Timestamp quality.
Definition: dnp3.h:746
@ DNP3_TIME_QUALITY_SYNCHRONIZED_TIME
The timestamp is UTC synchronized at the remote device.
Definition: dnp3.h:748
@ DNP3_TIME_QUALITY_INVALID_TIME
Timestamp is not valid, ignore the value and use a local timestamp.
Definition: dnp3.h:752
@ DNP3_TIME_QUALITY_UNSYNCHRONIZED_TIME
The device indicates the timestamp may be not be synchronized.
Definition: dnp3.h:750
dnp3_double_bit_binary_input_t * dnp3_double_bit_binary_input_iterator_next(dnp3_double_bit_binary_input_iterator_t *iter)
returns a pointer to the next value or NULL
dnp3_parity_t
Parity checking modes.
Definition: dnp3.h:1624
@ DNP3_PARITY_EVEN
Parity bit sets even number of 1 bits.
Definition: dnp3.h:1630
@ DNP3_PARITY_ODD
Parity bit sets odd number of 1 bits.
Definition: dnp3.h:1628
@ DNP3_PARITY_NONE
No parity bit.
Definition: dnp3.h:1626
dnp3_transport_decode_level_t
Controls how transmitted and received transport segments are decoded at the INFO log level.
Definition: dnp3.h:344
@ DNP3_TRANSPORT_DECODE_LEVEL_HEADER
Decode the header.
Definition: dnp3.h:348
@ DNP3_TRANSPORT_DECODE_LEVEL_NOTHING
Decode nothing.
Definition: dnp3.h:346
@ DNP3_TRANSPORT_DECODE_LEVEL_PAYLOAD
Decode the header and the raw payload as hexadecimal.
Definition: dnp3.h:350
static dnp3_counter_config_t dnp3_counter_config_init()
Initialize to defaults.
Definition: dnp3.h:4236
dnp3_param_error_t dnp3_outstation_create_serial_session(dnp3_runtime_t *runtime, const char *serial_path, dnp3_serial_settings_t settings, dnp3_outstation_config_t 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.
dnp3_command_error_t
Result of a command.
Definition: dnp3.h:3330
@ DNP3_COMMAND_ERROR_ASSOCIATION_REMOVED
association was removed mid-task
Definition: dnp3.h:3350
@ DNP3_COMMAND_ERROR_HEADER_MISMATCH
Number of headers or objects in the response didn't match the number in the request.
Definition: dnp3.h:3336
@ DNP3_COMMAND_ERROR_WRITE_ERROR
insufficient buffer space to serialize the request
Definition: dnp3.h:3344
@ DNP3_COMMAND_ERROR_TOO_MANY_REQUESTS
too many user requests queued
Definition: dnp3.h:3338
@ DNP3_COMMAND_ERROR_BAD_STATUS
Outstation indicated that a command was not SUCCESS.
Definition: dnp3.h:3334
@ DNP3_COMMAND_ERROR_NO_CONNECTION
no connection
Definition: dnp3.h:3346
@ DNP3_COMMAND_ERROR_SHUTDOWN
master was shutdown
Definition: dnp3.h:3348
@ DNP3_COMMAND_ERROR_RESPONSE_TIMEOUT
timeout occurred before receiving a response
Definition: dnp3.h:3342
@ DNP3_COMMAND_ERROR_BAD_RESPONSE
response was malformed or contained object headers
Definition: dnp3.h:3340
@ DNP3_COMMAND_ERROR_OK
Success, i.e. no error occurred.
Definition: dnp3.h:3332
static const char * dnp3_freeze_type_to_string(dnp3_freeze_type_t value)
Converts the enum to a string.
Definition: dnp3.h:5127
static dnp3_binary_input_config_t dnp3_binary_input_config_init()
Initialize to defaults.
Definition: dnp3.h:3918
dnp3_broadcast_action_t
Enumeration describing how the outstation processed a broadcast request.
Definition: dnp3.h:5310
@ DNP3_BROADCAST_ACTION_PROCESSED
Outstation processed the broadcast.
Definition: dnp3.h:5312
@ DNP3_BROADCAST_ACTION_UNSUPPORTED_FUNCTION
Outstation ignore the broadcast message b/c the function is not supported via Broadcast.
Definition: dnp3.h:5318
@ DNP3_BROADCAST_ACTION_IGNORED_BY_CONFIGURATION
Outstation ignored the broadcast message b/c it is disabled by configuration.
Definition: dnp3.h:5314
@ DNP3_BROADCAST_ACTION_BAD_OBJECT_HEADERS
Outstation was unable to parse the object headers and ignored the request.
Definition: dnp3.h:5316
static const char * dnp3_log_level_to_string(dnp3_log_level_t value)
Converts the enum to a string.
Definition: dnp3.h:169
dnp3_read_error_t
Errors that can occur during a read operation.
Definition: dnp3.h:3129
@ DNP3_READ_ERROR_ASSOCIATION_REMOVED
association was removed mid-task
Definition: dnp3.h:3145
@ DNP3_READ_ERROR_NO_CONNECTION
no connection
Definition: dnp3.h:3141
@ DNP3_READ_ERROR_RESPONSE_TIMEOUT
timeout occurred before receiving a response
Definition: dnp3.h:3137
@ DNP3_READ_ERROR_WRITE_ERROR
insufficient buffer space to serialize the request
Definition: dnp3.h:3139
@ DNP3_READ_ERROR_OK
Success, i.e. no error occurred.
Definition: dnp3.h:3131
@ DNP3_READ_ERROR_TOO_MANY_REQUESTS
too many user requests queued
Definition: dnp3.h:3133
@ DNP3_READ_ERROR_SHUTDOWN
master was shutdown
Definition: dnp3.h:3143
@ DNP3_READ_ERROR_BAD_RESPONSE
response was malformed or contained object headers
Definition: dnp3.h:3135
bool dnp3_database_add_double_bit_binary_input(dnp3_database_t *instance, uint16_t index, dnp3_event_class_t point_class, dnp3_double_bit_binary_input_config_t config)
Add a new Double-Bit Binary Input point.
static dnp3_class_zero_config_t dnp3_class_zero_config_init()
Initialize to default values.
Definition: dnp3.h:4857
static const char * dnp3_command_status_to_string(dnp3_command_status_t value)
Converts the enum to a string.
Definition: dnp3.h:5511
dnp3_param_error_t dnp3_master_channel_set_decode_level(dnp3_master_channel_t *instance, dnp3_decode_level_t decode_level)
Set the decoding level for the channel.
static const char * dnp3_read_error_to_string(dnp3_read_error_t value)
Converts the enum to a string.
Definition: dnp3.h:3151
static const char * dnp3_broadcast_action_to_string(dnp3_broadcast_action_t value)
Converts the enum to a string.
Definition: dnp3.h:5324
struct dnp3_binary_input_iterator_t dnp3_binary_input_iterator_t
Iterator of binary_input.
Definition: dnp3.h:891
static const char * dnp3_task_type_to_string(dnp3_task_type_t value)
Converts the enum to a string.
Definition: dnp3.h:2855
static dnp3_analog_input_config_t dnp3_analog_input_config_init()
Initialize to defaults.
Definition: dnp3.h:4492
struct dnp3_address_filter_t dnp3_address_filter_t
Outstation address filter.
Definition: dnp3.h:5848
void dnp3_command_set_destroy(dnp3_command_set_t *instance)
Destroy a set of commands.
dnp3_auto_time_sync_t
Automatic time synchronization configuration.
Definition: dnp3.h:2653
@ DNP3_AUTO_TIME_SYNC_LAN
Perform automatic time sync with Record Current Time (0x18) function code.
Definition: dnp3.h:2657
@ DNP3_AUTO_TIME_SYNC_NONE
Do not perform automatic time sync.
Definition: dnp3.h:2655
@ DNP3_AUTO_TIME_SYNC_NON_LAN
Perform automatic time sync with Delay Measurement (0x17) function code.
Definition: dnp3.h:2659
static const char * dnp3_time_sync_mode_to_string(dnp3_time_sync_mode_t value)
Converts the enum to a string.
Definition: dnp3.h:3437
dnp3_command_status_t
Enumeration received from an outstation in response to command request.
Definition: dnp3.h:5463
@ DNP3_COMMAND_STATUS_ALREADY_ACTIVE
command is all ready in progress or its all ready in that mode (value == 5)
Definition: dnp3.h:5475
@ DNP3_COMMAND_STATUS_DOWNSTREAM_FAIL
command not accepted because the outstation is forwarding the request to another downstream device wh...
Definition: dnp3.h:5501
@ DNP3_COMMAND_STATUS_TOO_MANY_OPS
the command has been done too often and has been throttled (value == 8)
Definition: dnp3.h:5481
@ DNP3_COMMAND_STATUS_SUCCESS
command was accepted, initiated, or queued (value == 0)
Definition: dnp3.h:5465
@ DNP3_COMMAND_STATUS_CANCELED
command not accepted because the operation was cancelled (value == 16)
Definition: dnp3.h:5497
@ DNP3_COMMAND_STATUS_NO_SELECT
command requires being selected before operate, configuration issue (value == 2)
Definition: dnp3.h:5469
@ DNP3_COMMAND_STATUS_NON_PARTICIPATING
(deprecated) indicates the outstation shall not issue or perform the control operation (value == 126)
Definition: dnp3.h:5503
@ DNP3_COMMAND_STATUS_LOCAL
the function governed by the control is in local only control (value == 7)
Definition: dnp3.h:5479
@ DNP3_COMMAND_STATUS_AUTOMATION_INHIBIT
command not accepted because it was prevented or inhibited by a local automation process,...
Definition: dnp3.h:5485
@ DNP3_COMMAND_STATUS_DOWNSTREAM_LOCAL
command not accepted because the outstation is forwarding the request to another downstream device wh...
Definition: dnp3.h:5491
@ DNP3_COMMAND_STATUS_PROCESSING_LIMITED
command not accepted because the device cannot process any more activities than are presently in prog...
Definition: dnp3.h:5487
@ DNP3_COMMAND_STATUS_TIMEOUT
command timed out before completing (value == 1)
Definition: dnp3.h:5467
@ DNP3_COMMAND_STATUS_OUT_OF_RANGE
command not accepted because the value is outside the acceptable range permitted for this point (valu...
Definition: dnp3.h:5489
@ DNP3_COMMAND_STATUS_NOT_AUTHORIZED
the command was rejected because the device denied it or an RTU intercepted it (value == 9)
Definition: dnp3.h:5483
@ DNP3_COMMAND_STATUS_UNKNOWN
captures any value not defined in the enumeration
Definition: dnp3.h:5505
@ DNP3_COMMAND_STATUS_FORMAT_ERROR
bad control code or timing values (value == 3)
Definition: dnp3.h:5471
@ DNP3_COMMAND_STATUS_NOT_SUPPORTED
command is not implemented (value == 4)
Definition: dnp3.h:5473
@ DNP3_COMMAND_STATUS_BLOCKED
command not accepted because the requested function is specifically blocked at the outstation (value ...
Definition: dnp3.h:5495
@ DNP3_COMMAND_STATUS_HARDWARE_ERROR
something is stopping the command, often a local/remote interlock (value == 6)
Definition: dnp3.h:5477
@ DNP3_COMMAND_STATUS_ALREADY_COMPLETE
command not accepted because the outstation has already completed the requested operation (value == 1...
Definition: dnp3.h:5493
@ DNP3_COMMAND_STATUS_BLOCKED_OTHER_MASTER
command not accepted because another master is communicating with the outstation and has exclusive ri...
Definition: dnp3.h:5499
static dnp3_classes_t dnp3_classes_all()
Initialize all classes to true.
Definition: dnp3.h:2619
static dnp3_restart_delay_t dnp3_restart_delay_seconds(uint16_t value)
RestartDelay with a count of seconds.
Definition: dnp3.h:5064
static dnp3_timestamp_t dnp3_timestamp_unsynchronized_timestamp(uint64_t value)
Creates an unsynchronized timestamp struct.
Definition: dnp3.h:819
static dnp3_control_code_t dnp3_control_code_init(dnp3_trip_close_code_t tcc, bool clear, dnp3_op_type_t op_type)
Initialize a dnp3_control_code_t instance.
Definition: dnp3.h:618
dnp3_static_analog_input_variation_t
Static analog variation.
Definition: dnp3.h:4399
@ DNP3_STATIC_ANALOG_INPUT_VARIATION_GROUP30_VAR1
Analog input - 32-bit with flag.
Definition: dnp3.h:4401
@ DNP3_STATIC_ANALOG_INPUT_VARIATION_GROUP30_VAR5
Analog input - single-precision, floating-point with flag.
Definition: dnp3.h:4409
@ DNP3_STATIC_ANALOG_INPUT_VARIATION_GROUP30_VAR2
Analog input - 16-bit with flag.
Definition: dnp3.h:4403
@ DNP3_STATIC_ANALOG_INPUT_VARIATION_GROUP30_VAR4
Analog input - 16-bit without flag.
Definition: dnp3.h:4407
@ DNP3_STATIC_ANALOG_INPUT_VARIATION_GROUP30_VAR6
Analog input - double-precision, floating-point with flag.
Definition: dnp3.h:4411
@ DNP3_STATIC_ANALOG_INPUT_VARIATION_GROUP30_VAR3
Analog input - 32-bit without flag.
Definition: dnp3.h:4405
dnp3_request_t * dnp3_request_new_one_byte_range(dnp3_variation_t variation, uint8_t start, uint8_t stop)
Create a new request asking for range of objects (using 8-bit start/stop).
static dnp3_master_channel_config_t dnp3_master_channel_config_init(uint16_t address)
Initialize dnp3_master_channel_config_t to default values.
Definition: dnp3.h:2245
static dnp3_binary_output_status_t dnp3_binary_output_status_init(uint16_t index, bool value, dnp3_flags_t flags, dnp3_timestamp_t time)
Fully construct dnp3_binary_output_status_t specifying the value of each field.
Definition: dnp3.h:962
dnp3_command_set_t * dnp3_command_set_create()
Create a new set of commands.
dnp3_command_mode_t
Command operation mode.
Definition: dnp3.h:3308
@ DNP3_COMMAND_MODE_SELECT_BEFORE_OPERATE
Perform a Select and Operate (0x03 then 0x04)
Definition: dnp3.h:3312
@ DNP3_COMMAND_MODE_DIRECT_OPERATE
Perform a Direct Operate (0x05)
Definition: dnp3.h:3310
void dnp3_request_destroy(dnp3_request_t *instance)
Destroy a request created with dnp3_request_create or dnp3_request_class_request.
static dnp3_event_buffer_config_t dnp3_event_buffer_config_no_events()
Create a configuration where no events are buffered.
Definition: dnp3.h:4803
dnp3_param_error_t dnp3_master_channel_remove_poll(dnp3_master_channel_t *instance, dnp3_poll_id_t poll_id)
Add a periodic poll to an association.
bool dnp3_database_update_counter(dnp3_database_t *instance, dnp3_counter_t value, dnp3_update_options_t options)
Update a Counter point.
static const char * dnp3_operate_type_to_string(dnp3_operate_type_t value)
Converts the enum to a string.
Definition: dnp3.h:5554
dnp3_param_error_t dnp3_database_get_analog_input(dnp3_database_t *instance, uint16_t index, dnp3_analog_input_t *out)
Get a AnalogInput point.
dnp3_address_filter_t * dnp3_address_filter_any()
Create an address filter that accepts any IP address.
dnp3_param_error_t dnp3_address_filter_create(const char *address, dnp3_address_filter_t **out)
Create an address filter that matches a specific address or wildcards.
static const char * dnp3_static_binary_input_variation_to_string(dnp3_static_binary_input_variation_t value)
Converts the enum to a string.
Definition: dnp3.h:3865
dnp3_time_sync_mode_t
Time synchronization mode.
Definition: dnp3.h:3427
@ DNP3_TIME_SYNC_MODE_NON_LAN
Perform a non-LAN time sync with Delay Measurement (0x17) function code.
Definition: dnp3.h:3431
@ DNP3_TIME_SYNC_MODE_LAN
Perform a LAN time sync with Record Current Time (0x18) function code.
Definition: dnp3.h:3429
dnp3_param_error_t dnp3_address_filter_add(dnp3_address_filter_t *instance, const char *address)
Add an accepted IP address to the filter.
dnp3_param_error_t dnp3_outstation_server_create_tcp_server(dnp3_runtime_t *runtime, dnp3_link_error_mode_t link_error_mode, const char *address, dnp3_outstation_server_t **out)
Create a new TCP server.
static const char * dnp3_task_error_to_string(dnp3_task_error_t value)
Converts the enum to a string.
Definition: dnp3.h:2895
dnp3_param_error_t dnp3_master_channel_synchronize_time(dnp3_master_channel_t *instance, 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.
dnp3_static_double_bit_binary_input_variation_t
Static double-bit binary input variation.
Definition: dnp3.h:3958
@ DNP3_STATIC_DOUBLE_BIT_BINARY_INPUT_VARIATION_GROUP3_VAR1
Double-bit binary input - packed format.
Definition: dnp3.h:3960
@ DNP3_STATIC_DOUBLE_BIT_BINARY_INPUT_VARIATION_GROUP3_VAR2
Double-bit binary input - with flags.
Definition: dnp3.h:3962
dnp3_static_binary_input_variation_t
Static binary input variation.
Definition: dnp3.h:3855
@ DNP3_STATIC_BINARY_INPUT_VARIATION_GROUP1_VAR2
Binary input - with flags.
Definition: dnp3.h:3859
@ DNP3_STATIC_BINARY_INPUT_VARIATION_GROUP1_VAR1
Binary input - packed format.
Definition: dnp3.h:3857
static const char * dnp3_event_mode_to_string(dnp3_event_mode_t value)
Converts the enum to a string.
Definition: dnp3.h:3796
dnp3_event_analog_input_variation_t
Event analog variation.
Definition: dnp3.h:4433
@ DNP3_EVENT_ANALOG_INPUT_VARIATION_GROUP32_VAR4
Analog input event - 16-bit with time.
Definition: dnp3.h:4441
@ DNP3_EVENT_ANALOG_INPUT_VARIATION_GROUP32_VAR8
Analog input event - double-precision, floating-point with time.
Definition: dnp3.h:4449
@ DNP3_EVENT_ANALOG_INPUT_VARIATION_GROUP32_VAR1
Analog input event - 32-bit without time.
Definition: dnp3.h:4435
@ DNP3_EVENT_ANALOG_INPUT_VARIATION_GROUP32_VAR3
Analog input event - 32-bit with time.
Definition: dnp3.h:4439
@ DNP3_EVENT_ANALOG_INPUT_VARIATION_GROUP32_VAR2
Analog input event - 16-bit without time.
Definition: dnp3.h:4437
@ DNP3_EVENT_ANALOG_INPUT_VARIATION_GROUP32_VAR5
Analog input event - single-precision, floating-point without time.
Definition: dnp3.h:4443
@ DNP3_EVENT_ANALOG_INPUT_VARIATION_GROUP32_VAR7
Analog input event - single-precision, floating-point with time.
Definition: dnp3.h:4447
@ DNP3_EVENT_ANALOG_INPUT_VARIATION_GROUP32_VAR6
Analog input event - double-precision, floating-point without time.
Definition: dnp3.h:4445
dnp3_param_error_t dnp3_master_channel_disable(dnp3_master_channel_t *instance)
stop communications
bool dnp3_database_update_binary_input(dnp3_database_t *instance, dnp3_binary_input_t value, dnp3_update_options_t options)
Update a BinaryInput point.
struct dnp3_outstation_server_t dnp3_outstation_server_t
TCP server that listens for connections and routes the messages to outstations.
Definition: dnp3.h:5932
void dnp3_command_set_add_g41_v4_u8(dnp3_command_set_t *instance, uint8_t idx, double value)
Add a Analog Output command (double-precision float) with 1-byte prefix index.
void dnp3_command_set_add_g41_v3_u8(dnp3_command_set_t *instance, uint8_t idx, float value)
Add a Analog Output command (single-precision float) with 1-byte prefix index.
dnp3_trip_close_code_t
Trip-Close Code field, used in conjunction with dnp3_op_type_t to specify a control operation.
Definition: dnp3.h:537
@ DNP3_TRIP_CLOSE_CODE_RESERVED
RESERVED (3)
Definition: dnp3.h:545
@ DNP3_TRIP_CLOSE_CODE_CLOSE
CLOSE (1)
Definition: dnp3.h:541
@ DNP3_TRIP_CLOSE_CODE_TRIP
TRIP (2)
Definition: dnp3.h:543
@ DNP3_TRIP_CLOSE_CODE_NUL
NUL (0)
Definition: dnp3.h:539
dnp3_param_error_t dnp3_database_get_binary_input(dnp3_database_t *instance, uint16_t index, dnp3_binary_input_t *out)
Get a BinaryInput point.
struct dnp3_database_handle_t dnp3_database_handle_t
handle used to perform transactions on the database
Definition: dnp3.h:4732
void dnp3_runtime_destroy(dnp3_runtime_t *instance)
Destroy a runtime.
void dnp3_command_set_finish_header(dnp3_command_set_t *instance)
Finish any partially completed header. This allows for the construction of two headers with the same ...
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 an instance of the interface.
Definition: dnp3.h:5425
static dnp3_restart_task_callback_t dnp3_restart_task_callback_init(void(*on_complete)(uint64_t, void *), void(*on_failure)(dnp3_restart_error_t, void *), void(*on_destroy)(void *arg), void *ctx)
Initialize an instance of the interface.
Definition: dnp3.h:3624
dnp3_request_t * dnp3_request_new_one_byte_limited_count(dnp3_variation_t variation, uint8_t count)
Create a new request asking for a limited count of objects (using 8-bit start/stop).
void dnp3_outstation_server_destroy(dnp3_outstation_server_t *instance)
Gracefully shutdown all the outstations associated to this server, stops the server and release resou...
dnp3_static_counter_variation_t
Static counter variation.
Definition: dnp3.h:4161
@ DNP3_STATIC_COUNTER_VARIATION_GROUP20_VAR6
Counter - 16-bit without flag.
Definition: dnp3.h:4169
@ DNP3_STATIC_COUNTER_VARIATION_GROUP20_VAR2
Counter - 16-bit with flag.
Definition: dnp3.h:4165
@ DNP3_STATIC_COUNTER_VARIATION_GROUP20_VAR5
Counter - 32-bit without flag.
Definition: dnp3.h:4167
@ DNP3_STATIC_COUNTER_VARIATION_GROUP20_VAR1
Counter - 32-bit with flag.
Definition: dnp3.h:4163
dnp3_function_code_t
Application layer function code.
Definition: dnp3.h:1785
@ DNP3_FUNCTION_CODE_RESPONSE
Master shall interpret this fragment as an Application Layer response to an ApplicationLayer request ...
Definition: dnp3.h:1849
@ DNP3_FUNCTION_CODE_FREEZE_CLEAR_NO_RESPONSE
Same as FreezeClear but outstation shall not send a response (value == 10)
Definition: dnp3.h:1807
@ DNP3_FUNCTION_CODE_UNSOLICITED_RESPONSE
Master shall interpret this fragment as an unsolicited response that was not prompted by an explicit ...
Definition: dnp3.h:1851
@ DNP3_FUNCTION_CODE_FREEZE_CLEAR
Outstation shall copy the point data values specified by the objects in the request into a separate f...
Definition: dnp3.h:1805
@ DNP3_FUNCTION_CODE_FREEZE_AT_TIME_NO_RESPONSE
Same as FreezeAtTime but outstation shall not send a response (value == 12)
Definition: dnp3.h:1811
@ DNP3_FUNCTION_CODE_IMMEDIATE_FREEZE
Outstation shall copy the point data values specified by the objects in the request to a separate fre...
Definition: dnp3.h:1801
@ DNP3_FUNCTION_CODE_STOP_APPLICATION
Outstation shall stop running the applications specified by the objects in the request (value == 18)
Definition: dnp3.h:1823
@ DNP3_FUNCTION_CODE_ENABLE_UNSOLICITED
Enables outstation to initiate unsolicited responses from points specified by the objects in the requ...
Definition: dnp3.h:1827
@ DNP3_FUNCTION_CODE_RECORD_CURRENT_TIME
Outstation shall save the time when the last octet of this message is received (value == 24)
Definition: dnp3.h:1835
@ DNP3_FUNCTION_CODE_SAVE_CONFIGURATION
This code is deprecated-Do not use for new designs (value == 19)
Definition: dnp3.h:1825
@ DNP3_FUNCTION_CODE_INITIALIZE_DATA
Obsolete-Do not use for new designs (value == 15)
Definition: dnp3.h:1817
@ DNP3_FUNCTION_CODE_CLOSE_FILE
Outstation shall close a file (value == 26)
Definition: dnp3.h:1839
@ DNP3_FUNCTION_CODE_START_APPLICATION
Outstation shall start running the applications specified by the objects in the request (value == 17)
Definition: dnp3.h:1821
@ DNP3_FUNCTION_CODE_FREEZE_AT_TIME
Outstation shall copy the point data values specified by the objects in the request to a separate fre...
Definition: dnp3.h:1809
@ DNP3_FUNCTION_CODE_INITIALIZE_APPLICATION
Outstation shall place the applications specified by the objects in the request into the ready to run...
Definition: dnp3.h:1819
@ DNP3_FUNCTION_CODE_WRITE
Outstation shall store the data specified by the objects in the request (value == 2)
Definition: dnp3.h:1791
@ DNP3_FUNCTION_CODE_OPERATE
Outstation shall activate the output points selected (or armed) by a previous select function code co...
Definition: dnp3.h:1795
@ DNP3_FUNCTION_CODE_WARM_RESTART
Outstation shall reset only portions of the device (value == 14)
Definition: dnp3.h:1815
@ DNP3_FUNCTION_CODE_DELAY_MEASURE
Outstation shall report the time it takes to process and initiate the transmission of its response (v...
Definition: dnp3.h:1833
@ DNP3_FUNCTION_CODE_DELETE_FILE
Outstation shall delete a file (value == 27)
Definition: dnp3.h:1841
@ DNP3_FUNCTION_CODE_ABORT_FILE
Outstation shall abort a file transfer operation (value == 30)
Definition: dnp3.h:1847
@ DNP3_FUNCTION_CODE_SELECT
Outstation shall select (or arm) the output points specified by the objects in the request in prepara...
Definition: dnp3.h:1793
@ DNP3_FUNCTION_CODE_COLD_RESTART
Outstation shall perform a complete reset of all hardware and software in the device (value == 13)
Definition: dnp3.h:1813
@ DNP3_FUNCTION_CODE_ASSIGN_CLASS
Outstation shall assign the events generated by the points specified by the objects in the request to...
Definition: dnp3.h:1831
@ DNP3_FUNCTION_CODE_IMMEDIATE_FREEZE_NO_RESPONSE
Same as ImmediateFreeze but outstation shall not send a response (value == 8)
Definition: dnp3.h:1803
@ DNP3_FUNCTION_CODE_GET_FILE_INFO
Outstation shall retrieve information about a file (value == 28)
Definition: dnp3.h:1843
@ DNP3_FUNCTION_CODE_DIRECT_OPERATE_NO_RESPONSE
Same as DirectOperate but outstation shall not send a response (value == 6)
Definition: dnp3.h:1799
@ DNP3_FUNCTION_CODE_READ
Outstation shall return the data specified by the objects in the request (value == 1)
Definition: dnp3.h:1789
@ DNP3_FUNCTION_CODE_AUTHENTICATE_FILE
Outstation shall return a file authentication key (value == 29)
Definition: dnp3.h:1845
@ DNP3_FUNCTION_CODE_DIRECT_OPERATE
Outstation shall immediately actuate the output points specified by the objects in the request (value...
Definition: dnp3.h:1797
@ DNP3_FUNCTION_CODE_OPEN_FILE
Outstation shall open a file (value == 25)
Definition: dnp3.h:1837
@ DNP3_FUNCTION_CODE_CONFIRM
Master sends this to an outstation to confirm the receipt of an Application Layer fragment (value == ...
Definition: dnp3.h:1787
@ DNP3_FUNCTION_CODE_DISABLE_UNSOLICITED
Prevents outstation from initiating unsolicited responses from points specified by the objects in the...
Definition: dnp3.h:1829
dnp3_client_state_t
State of the client connection.
Definition: dnp3.h:2261
@ DNP3_CLIENT_STATE_CONNECTING
Client is trying to establish a connection to the remote device.
Definition: dnp3.h:2265
@ DNP3_CLIENT_STATE_DISABLED
Client is disabled and idle until enabled.
Definition: dnp3.h:2263
@ DNP3_CLIENT_STATE_CONNECTED
Client is connected to the remote device.
Definition: dnp3.h:2267
@ DNP3_CLIENT_STATE_WAIT_AFTER_DISCONNECT
Client was disconnected, waiting before retrying.
Definition: dnp3.h:2271
@ DNP3_CLIENT_STATE_SHUTDOWN
Client is shutting down.
Definition: dnp3.h:2273
@ DNP3_CLIENT_STATE_WAIT_AFTER_FAILED_CONNECT
Failed to establish a connection, waiting before retrying.
Definition: dnp3.h:2269
static const char * dnp3_restart_error_to_string(dnp3_restart_error_t value)
Converts the enum to a string.
Definition: dnp3.h:3582
static dnp3_retry_strategy_t dnp3_retry_strategy_init()
Initialize to defaults.
Definition: dnp3.h:1559
dnp3_op_type_t
Operation Type field, used in conjunction with dnp3_trip_close_code_t to specify a control operation.
Definition: dnp3.h:565
@ DNP3_OP_TYPE_PULSE_OFF
PULSE_OFF (2)
Definition: dnp3.h:571
@ DNP3_OP_TYPE_LATCH_ON
LATCH_ON (3)
Definition: dnp3.h:573
@ DNP3_OP_TYPE_NUL
NUL (0)
Definition: dnp3.h:567
@ DNP3_OP_TYPE_PULSE_ON
PULSE_ON (1)
Definition: dnp3.h:569
@ DNP3_OP_TYPE_LATCH_OFF
LATCH_OFF(4)
Definition: dnp3.h:575
static dnp3_serial_settings_t dnp3_serial_settings_init()
Initialize to default values.
Definition: dnp3.h:1696
dnp3_param_error_t dnp3_master_channel_create_tls(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_tls_client_config_t tls_config, dnp3_master_channel_t **out)
Create a master channel that connects to the specified TCP endpoint(s) and establish a TLS session wi...
dnp3_request_t * dnp3_request_new_all_objects(dnp3_variation_t variation)
Create a new request asking for all objects of a particular variation.
dnp3_param_error_t dnp3_master_channel_remove_association(dnp3_master_channel_t *instance, dnp3_association_id_t id)
Remove an association from the channel.
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 an instance of the interface.
Definition: dnp3.h:5781
static const char * dnp3_event_binary_input_variation_to_string(dnp3_event_binary_input_variation_t value)
Converts the enum to a string.
Definition: dnp3.h:3889
bool dnp3_database_update_double_bit_binary_input(dnp3_database_t *instance, dnp3_double_bit_binary_input_t value, dnp3_update_options_t options)
Update a Double-Bit Binary Input point.
static const char * dnp3_log_output_format_to_string(dnp3_log_output_format_t value)
Converts the enum to a string.
Definition: dnp3.h:196
dnp3_param_error_t dnp3_master_channel_check_link_status(dnp3_master_channel_t *instance, dnp3_association_id_t association, dnp3_link_status_callback_t callback)
Asynchronously perform a link status check.
void dnp3_master_channel_destroy(dnp3_master_channel_t *instance)
Shutdown a dnp3_master_channel_t and release all resources.
dnp3_task_error_t
Task error used in dnp3_association_information_t.
Definition: dnp3.h:2875
@ DNP3_TASK_ERROR_RESPONSE_TIMEOUT
timeout occurred before receiving a response
Definition: dnp3.h:2881
@ DNP3_TASK_ERROR_ASSOCIATION_REMOVED
association was removed mid-task
Definition: dnp3.h:2889
@ DNP3_TASK_ERROR_TOO_MANY_REQUESTS
too many user requests queued
Definition: dnp3.h:2877
@ DNP3_TASK_ERROR_SHUTDOWN
master was shutdown
Definition: dnp3.h:2887
@ DNP3_TASK_ERROR_WRITE_ERROR
insufficient buffer space to serialize the request
Definition: dnp3.h:2883
@ DNP3_TASK_ERROR_NO_CONNECTION
no connection
Definition: dnp3.h:2885
@ DNP3_TASK_ERROR_BAD_RESPONSE
response was malformed or contained object headers
Definition: dnp3.h:2879
dnp3_link_decode_level_t
Controls how transmitted and received link frames are decoded at the INFO log level.
Definition: dnp3.h:369
@ DNP3_LINK_DECODE_LEVEL_HEADER
Decode the header.
Definition: dnp3.h:373
@ DNP3_LINK_DECODE_LEVEL_PAYLOAD
Decode the header and the raw payload as hexadecimal.
Definition: dnp3.h:375
@ DNP3_LINK_DECODE_LEVEL_NOTHING
Decode nothing.
Definition: dnp3.h:371
static dnp3_event_classes_t dnp3_event_classes_init(bool class1, bool class2, bool class3)
Fully construct dnp3_event_classes_t specifying the value of each field.
Definition: dnp3.h:2531
dnp3_event_class_t
Event class.
Definition: dnp3.h:3754
@ DNP3_EVENT_CLASS_CLASS1
Class 1 event.
Definition: dnp3.h:3758
@ DNP3_EVENT_CLASS_CLASS2
Class 2 event.
Definition: dnp3.h:3760
@ DNP3_EVENT_CLASS_CLASS3
Class 3 event.
Definition: dnp3.h:3762
@ DNP3_EVENT_CLASS_NONE
Does not generate events.
Definition: dnp3.h:3756
static const char * dnp3_static_double_bit_binary_input_variation_to_string(dnp3_static_double_bit_binary_input_variation_t value)
Converts the enum to a string.
Definition: dnp3.h:3968
static const char * dnp3_read_type_to_string(dnp3_read_type_t value)
Converts the enum to a string.
Definition: dnp3.h:2066
static const char * dnp3_static_analog_output_status_variation_to_string(dnp3_static_analog_output_status_variation_t value)
Converts the enum to a string.
Definition: dnp3.h:4547
static const char * dnp3_time_quality_to_string(dnp3_time_quality_t value)
Converts the enum to a string.
Definition: dnp3.h:758
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 an instance of the interface.
Definition: dnp3.h:1228
static const char * dnp3_nothing_to_string(dnp3_nothing_t value)
Converts the enum to a string.
Definition: dnp3.h:2430
dnp3_param_error_t dnp3_database_get_binary_output_status(dnp3_database_t *instance, uint16_t index, dnp3_binary_output_status_t *out)
Get a Binary Output Status point.
struct dnp3_runtime_t dnp3_runtime_t
Handle to the underlying runtime.
Definition: dnp3.h:474
static dnp3_logging_config_t dnp3_logging_config_init()
Initialize the configuration to default values.
Definition: dnp3.h:256
static const char * dnp3_link_decode_level_to_string(dnp3_link_decode_level_t value)
Converts the enum to a string.
Definition: dnp3.h:381
static const char * dnp3_param_error_to_string(dnp3_param_error_t value)
Converts the enum to a string.
Definition: dnp3.h:98
struct dnp3_double_bit_binary_input_iterator_t dnp3_double_bit_binary_input_iterator_t
Iterator of double_bit_binary_input.
Definition: dnp3.h:933
dnp3_param_error_t dnp3_outstation_set_decode_level(dnp3_outstation_t *instance, dnp3_decode_level_t level)
Set decoding log level.
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.
static dnp3_control_code_t dnp3_control_code_from_op_type(dnp3_op_type_t op_type)
Initialize a dnp3_control_code_t instance from a dnp3_op_type_t.
Definition: dnp3.h:638
dnp3_endpoint_list_t * dnp3_endpoint_list_create(const char *main_endpoint)
Create a new list of IP endpoints.
static dnp3_classes_t dnp3_classes_none()
Initialize all classes to false.
Definition: dnp3.h:2639
static const char * dnp3_transport_decode_level_to_string(dnp3_transport_decode_level_t value)
Converts the enum to a string.
Definition: dnp3.h:356
bool dnp3_database_add_analog_output_status(dnp3_database_t *instance, uint16_t index, dnp3_event_class_t point_class, dnp3_analog_output_status_config_t config)
Add a new Analog Output Status point.
void dnp3_request_add_two_byte_range_header(dnp3_request_t *instance, dnp3_variation_t variation, uint16_t start, uint16_t stop)
Add a two-byte start/stop variation interrogation.
dnp3_event_counter_variation_t
Event counter variation.
Definition: dnp3.h:4189
@ DNP3_EVENT_COUNTER_VARIATION_GROUP22_VAR5
Counter event - 32-bit with flag and time.
Definition: dnp3.h:4195
@ DNP3_EVENT_COUNTER_VARIATION_GROUP22_VAR2
Counter event - 16-bit with flag.
Definition: dnp3.h:4193
@ DNP3_EVENT_COUNTER_VARIATION_GROUP22_VAR1
Counter event - 32-bit with flag.
Definition: dnp3.h:4191
@ DNP3_EVENT_COUNTER_VARIATION_GROUP22_VAR6
Counter event - 16-bit with flag and time.
Definition: dnp3.h:4197
dnp3_param_error_t dnp3_database_get_double_bit_binary_input(dnp3_database_t *instance, uint16_t index, dnp3_double_bit_binary_input_t *out)
Get a Double-Bit Binary Input point.
void dnp3_endpoint_list_destroy(dnp3_endpoint_list_t *instance)
Destroy a previously allocated endpoint list.
dnp3_static_frozen_counter_variation_t
Static frozen counter variation.
Definition: dnp3.h:4277
@ DNP3_STATIC_FROZEN_COUNTER_VARIATION_GROUP21_VAR9
Frozen Counter - 32-bit without flag.
Definition: dnp3.h:4287
@ DNP3_STATIC_FROZEN_COUNTER_VARIATION_GROUP21_VAR6
Frozen Counter - 16-bit with flag and time.
Definition: dnp3.h:4285
@ DNP3_STATIC_FROZEN_COUNTER_VARIATION_GROUP21_VAR2
Frozen Counter - 16-bit with flag.
Definition: dnp3.h:4281
@ DNP3_STATIC_FROZEN_COUNTER_VARIATION_GROUP21_VAR1
Frozen Counter - 32-bit with flag.
Definition: dnp3.h:4279
@ DNP3_STATIC_FROZEN_COUNTER_VARIATION_GROUP21_VAR10
Frozen Counter - 16-bit without flag.
Definition: dnp3.h:4289
@ DNP3_STATIC_FROZEN_COUNTER_VARIATION_GROUP21_VAR5
Frozen Counter - 32-bit with flag and time.
Definition: dnp3.h:4283
static dnp3_binary_output_status_config_t dnp3_binary_output_status_config_init()
Initialize to defaults.
Definition: dnp3.h:4121
dnp3_param_error_t dnp3_master_channel_enable(dnp3_master_channel_t *instance)
start communications
dnp3_binary_input_t * dnp3_binary_input_iterator_next(dnp3_binary_input_iterator_t *iter)
returns a pointer to the next value or NULL
dnp3_event_double_bit_binary_input_variation_t
Event double-bit binary input variation.
Definition: dnp3.h:3980
@ DNP3_EVENT_DOUBLE_BIT_BINARY_INPUT_VARIATION_GROUP4_VAR3
Double-bit binary input event - with relative time.
Definition: dnp3.h:3986
@ DNP3_EVENT_DOUBLE_BIT_BINARY_INPUT_VARIATION_GROUP4_VAR1
Double-bit binary input event - without time.
Definition: dnp3.h:3982
@ DNP3_EVENT_DOUBLE_BIT_BINARY_INPUT_VARIATION_GROUP4_VAR2
Double-bit binary input event - with absolute time.
Definition: dnp3.h:3984
dnp3_response_function_t
Type of response.
Definition: dnp3.h:1900
@ DNP3_RESPONSE_FUNCTION_UNSOLICITED_RESPONSE
Unsolicited response.
Definition: dnp3.h:1904
@ DNP3_RESPONSE_FUNCTION_RESPONSE
Solicited response.
Definition: dnp3.h:1902
dnp3_counter_t * dnp3_counter_iterator_next(dnp3_counter_iterator_t *iter)
returns a pointer to the next value or NULL
bool dnp3_database_remove_counter(dnp3_database_t *instance, uint16_t index)
Remove a Counter point.
struct dnp3_endpoint_list_t dnp3_endpoint_list_t
List of IP endpoints.
Definition: dnp3.h:2196
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 an instance of the interface.
Definition: dnp3.h:2312
void dnp3_database_handle_transaction(dnp3_database_handle_t *instance, dnp3_database_transaction_t callback)
Acquire a mutex on the underlying database and apply a set of changes as a transaction.
dnp3_request_t * dnp3_request_create()
Create a new request.
dnp3_event_analog_output_status_variation_t
Event analog output status variation.
Definition: dnp3.h:4561
@ DNP3_EVENT_ANALOG_OUTPUT_STATUS_VARIATION_GROUP42_VAR2
Analog output event - 16-bit without time.
Definition: dnp3.h:4565
@ DNP3_EVENT_ANALOG_OUTPUT_STATUS_VARIATION_GROUP42_VAR5
Analog output event - single-precision, floating-point without time.
Definition: dnp3.h:4571
@ DNP3_EVENT_ANALOG_OUTPUT_STATUS_VARIATION_GROUP42_VAR8
Analog output event - double-precision, floating-point with time.
Definition: dnp3.h:4577
@ DNP3_EVENT_ANALOG_OUTPUT_STATUS_VARIATION_GROUP42_VAR7
Analog output event - single-precision, floating-point with time.
Definition: dnp3.h:4575
@ DNP3_EVENT_ANALOG_OUTPUT_STATUS_VARIATION_GROUP42_VAR3
Analog output event - 32-bit with time.
Definition: dnp3.h:4567
@ DNP3_EVENT_ANALOG_OUTPUT_STATUS_VARIATION_GROUP42_VAR4
Analog output event - 16-bit with time.
Definition: dnp3.h:4569
@ DNP3_EVENT_ANALOG_OUTPUT_STATUS_VARIATION_GROUP42_VAR6
Analog output event - double-precision, floating-point without time.
Definition: dnp3.h:4573
@ DNP3_EVENT_ANALOG_OUTPUT_STATUS_VARIATION_GROUP42_VAR1
Analog output event - 32-bit without time.
Definition: dnp3.h:4563
static const char * dnp3_restart_delay_type_to_string(dnp3_restart_delay_type_t value)
Converts the enum to a string.
Definition: dnp3.h:5017
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_handle_t *, void *), dnp3_freeze_result_t(*freeze_counters_range)(uint16_t, uint16_t, dnp3_freeze_type_t, dnp3_database_handle_t *, void *), void(*on_destroy)(void *arg), void *ctx)
Initialize an instance of the interface.
Definition: dnp3.h:5270
dnp3_request_t * dnp3_request_new_class(bool class0, bool class1, bool class2, bool class3)
Create a new request asking for classes.
dnp3_time_sync_error_t
Possible errors that can occur during a time synchronization procedure.
Definition: dnp3.h:3449
@ DNP3_TIME_SYNC_ERROR_WRITE_ERROR
insufficient buffer space to serialize the request
Definition: dnp3.h:3473
@ DNP3_TIME_SYNC_ERROR_IIN_ERROR
Outstation indicated an error.
Definition: dnp3.h:3465
@ DNP3_TIME_SYNC_ERROR_OVERFLOW
Overflow in calculation.
Definition: dnp3.h:3459
@ DNP3_TIME_SYNC_ERROR_TOO_MANY_REQUESTS
too many user requests queued
Definition: dnp3.h:3467
@ DNP3_TIME_SYNC_ERROR_STILL_NEEDS_TIME
Outstation did not clear the NEED_TIME IIN bit.
Definition: dnp3.h:3461
@ DNP3_TIME_SYNC_ERROR_OK
Success, i.e. no error occurred.
Definition: dnp3.h:3451
@ DNP3_TIME_SYNC_ERROR_SYSTEM_TIME_NOT_UNIX
The system time cannot be converted to a Unix timestamp.
Definition: dnp3.h:3455
@ DNP3_TIME_SYNC_ERROR_BAD_RESPONSE
response was malformed or contained object headers
Definition: dnp3.h:3469
@ DNP3_TIME_SYNC_ERROR_RESPONSE_TIMEOUT
timeout occurred before receiving a response
Definition: dnp3.h:3471
@ DNP3_TIME_SYNC_ERROR_NO_CONNECTION
no connection
Definition: dnp3.h:3475
@ DNP3_TIME_SYNC_ERROR_BAD_OUTSTATION_TIME_DELAY
Outstation time delay exceeded the response delay.
Definition: dnp3.h:3457
@ DNP3_TIME_SYNC_ERROR_SHUTDOWN
master was shutdown
Definition: dnp3.h:3477
@ DNP3_TIME_SYNC_ERROR_ASSOCIATION_REMOVED
association was removed mid-task
Definition: dnp3.h:3479
@ DNP3_TIME_SYNC_ERROR_CLOCK_ROLLBACK
Detected a clock rollback.
Definition: dnp3.h:3453
@ DNP3_TIME_SYNC_ERROR_SYSTEM_TIME_NOT_AVAILABLE
System time not available.
Definition: dnp3.h:3463
static dnp3_binary_input_t dnp3_binary_input_init(uint16_t index, bool value, dnp3_flags_t flags, dnp3_timestamp_t time)
Fully construct dnp3_binary_input_t specifying the value of each field.
Definition: dnp3.h:878
static dnp3_analog_output_status_config_t dnp3_analog_output_status_config_init()
Initialize to defaults.
Definition: dnp3.h:4620
static dnp3_read_task_callback_t dnp3_read_task_callback_init(void(*on_complete)(dnp3_nothing_t, void *), void(*on_failure)(dnp3_read_error_t, void *), void(*on_destroy)(void *arg), void *ctx)
Initialize an instance of the interface.
Definition: dnp3.h:3193
dnp3_app_decode_level_t
Controls how transmitted and received application-layer fragments are decoded at the INFO log level.
Definition: dnp3.h:316
@ DNP3_APP_DECODE_LEVEL_NOTHING
Decode nothing.
Definition: dnp3.h:318
@ DNP3_APP_DECODE_LEVEL_OBJECT_VALUES
Decode the header, the object headers, and the object values.
Definition: dnp3.h:324
@ DNP3_APP_DECODE_LEVEL_OBJECT_HEADERS
Decode the header and the object headers.
Definition: dnp3.h:322
@ DNP3_APP_DECODE_LEVEL_HEADER
Decode the header-only.
Definition: dnp3.h:320
static const char * dnp3_client_state_to_string(dnp3_client_state_t value)
Converts the enum to a string.
Definition: dnp3.h:2279
bool dnp3_database_add_counter(dnp3_database_t *instance, uint16_t index, dnp3_event_class_t point_class, dnp3_counter_config_t config)
Add a new Counter point.
static const char * dnp3_data_bits_to_string(dnp3_data_bits_t value)
Converts the enum to a string.
Definition: dnp3.h:1585
dnp3_request_t * dnp3_request_new_two_byte_range(dnp3_variation_t variation, uint16_t start, uint16_t stop)
Create a new request asking for range of objects (using 16-bit start/stop).
dnp3_binary_output_status_t * dnp3_binary_output_status_iterator_next(dnp3_binary_output_status_iterator_t *iter)
returns a pointer to the next value or NULL
static dnp3_utc_timestamp_t dnp3_utc_timestamp_valid(uint64_t value)
Construct a valid dnp3_utc_timestamp_t.
Definition: dnp3.h:2764
dnp3_request_t * dnp3_request_new_two_byte_limited_count(dnp3_variation_t variation, uint16_t count)
Create a new request asking for a limited count of objects (using 16-bit start/stop).
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 an instance of the interface.
Definition: dnp3.h:289
static dnp3_counter_t dnp3_counter_init(uint16_t index, uint32_t value, dnp3_flags_t flags, dnp3_timestamp_t time)
Fully construct dnp3_counter_t specifying the value of each field.
Definition: dnp3.h:1004
static const char * dnp3_static_counter_variation_to_string(dnp3_static_counter_variation_t value)
Converts the enum to a string.
Definition: dnp3.h:4175
dnp3_octet_string_t * dnp3_octet_string_iterator_next(dnp3_octet_string_iterator_t *iter)
returns a pointer to the next value or NULL
bool dnp3_database_remove_octet_string(dnp3_database_t *instance, uint16_t index)
Remove an Octet String point.
void dnp3_outstation_destroy(dnp3_outstation_t *instance)
Free resources of the outstation.
struct dnp3_analog_input_iterator_t dnp3_analog_input_iterator_t
Iterator of analog_input.
Definition: dnp3.h:1101
static const char * dnp3_trip_close_code_to_string(dnp3_trip_close_code_t value)
Converts the enum to a string.
Definition: dnp3.h:551
static dnp3_association_handler_t dnp3_association_handler_init(dnp3_utc_timestamp_t(*get_current_time)(void *), void(*on_destroy)(void *arg), void *ctx)
Initialize an instance of the interface.
Definition: dnp3.h:2813
dnp3_static_analog_output_status_variation_t
Static analog output status variation.
Definition: dnp3.h:4533
@ DNP3_STATIC_ANALOG_OUTPUT_STATUS_VARIATION_GROUP40_VAR2
Analog output status - 16-bit with flag.
Definition: dnp3.h:4537
@ DNP3_STATIC_ANALOG_OUTPUT_STATUS_VARIATION_GROUP40_VAR1
Analog output status - 32-bit with flag.
Definition: dnp3.h:4535
@ DNP3_STATIC_ANALOG_OUTPUT_STATUS_VARIATION_GROUP40_VAR3
Analog output status - single-precision, floating-point with flag.
Definition: dnp3.h:4539
@ DNP3_STATIC_ANALOG_OUTPUT_STATUS_VARIATION_GROUP40_VAR4
Analog output status - double-precision, floating-point with flag.
Definition: dnp3.h:4541
dnp3_link_error_mode_t
Controls how errors in parsed link-layer frames are handled. This behavior is configurable for physic...
Definition: dnp3.h:1711
@ DNP3_LINK_ERROR_MODE_DISCARD
Framing errors are discarded. The link-layer parser is reset on any error, and the parser begins scan...
Definition: dnp3.h:1713
@ DNP3_LINK_ERROR_MODE_CLOSE
Framing errors are bubbled up to calling code, closing the session. Suitable for physical layers that...
Definition: dnp3.h:1715
dnp3_stop_bits_t
Number of stop bits.
Definition: dnp3.h:1649
@ DNP3_STOP_BITS_TWO
Two stop bits.
Definition: dnp3.h:1653
@ DNP3_STOP_BITS_ONE
One stop bit.
Definition: dnp3.h:1651
bool dnp3_database_add_analog_input(dnp3_database_t *instance, uint16_t index, dnp3_event_class_t point_class, dnp3_analog_input_config_t config)
Add a new AnalogInput point.
dnp3_event_frozen_counter_variation_t
Event frozen counter variation.
Definition: dnp3.h:4311
@ DNP3_EVENT_FROZEN_COUNTER_VARIATION_GROUP23_VAR5
Frozen Counter event - 32-bit with flag and time.
Definition: dnp3.h:4317
@ DNP3_EVENT_FROZEN_COUNTER_VARIATION_GROUP23_VAR2
Frozen Counter event - 16-bit with flag.
Definition: dnp3.h:4315
@ DNP3_EVENT_FROZEN_COUNTER_VARIATION_GROUP23_VAR6
Frozen Counter event - 16-bit with flag and time.
Definition: dnp3.h:4319
@ DNP3_EVENT_FROZEN_COUNTER_VARIATION_GROUP23_VAR1
Frozen Counter event - 32-bit with flag.
Definition: dnp3.h:4313
dnp3_param_error_t dnp3_outstation_server_bind(dnp3_outstation_server_t *instance)
Bind the server to the port and starts listening. Also starts all the outstations associated to it.
static const char * dnp3_write_time_result_to_string(dnp3_write_time_result_t value)
Converts the enum to a string.
Definition: dnp3.h:5104
static const char * dnp3_stop_bits_to_string(dnp3_stop_bits_t value)
Converts the enum to a string.
Definition: dnp3.h:1659
static const char * dnp3_event_binary_output_status_variation_to_string(dnp3_event_binary_output_status_variation_t value)
Converts the enum to a string.
Definition: dnp3.h:4093
dnp3_frozen_counter_t * dnp3_frozen_counter_iterator_next(dnp3_frozen_counter_iterator_t *iter)
returns a pointer to the next value or NULL
void dnp3_octet_string_value_destroy(dnp3_octet_string_value_t *instance)
Destroys an instance of the collection.
void dnp3_command_set_add_g12_v1_u16(dnp3_command_set_t *instance, uint16_t idx, dnp3_group12_var1_t header)
Add a CROB with 2-byte prefix index.
bool dnp3_database_update_octet_string(dnp3_database_t *instance, uint16_t index, dnp3_octet_string_value_t *value, dnp3_update_options_t options)
Update an Octet String point.
static const char * dnp3_qualifier_code_to_string(dnp3_qualifier_code_t value)
Converts the enum to a string.
Definition: dnp3.h:2018
struct dnp3_database_t dnp3_database_t
Internal database access.
Definition: dnp3.h:3750
bool dnp3_database_update_frozen_counter(dnp3_database_t *instance, dnp3_frozen_counter_t value, dnp3_update_options_t options)
Update an Frozen Counter point.
static dnp3_tls_client_config_t dnp3_tls_client_config_init(const char *dns_name, const char *peer_cert_path, const char *local_cert_path, const char *private_key_path, const char *password)
construct the configuration with defaults
Definition: dnp3.h:2370
static const char * dnp3_time_format_to_string(dnp3_time_format_t value)
Converts the enum to a string.
Definition: dnp3.h:220
dnp3_freeze_type_t
Freeze operation type.
Definition: dnp3.h:5117
@ DNP3_FREEZE_TYPE_FREEZE_AND_CLEAR
Copy the current value of a counter to the associated point and clear the current value to 0.
Definition: dnp3.h:5121
@ DNP3_FREEZE_TYPE_IMMEDIATE_FREEZE
Copy the current value of a counter to the associated point.
Definition: dnp3.h:5119
static dnp3_runtime_config_t dnp3_runtime_config_init()
Initialize the configuration to default values.
Definition: dnp3.h:493
bool dnp3_database_update_analog_output_status(dnp3_database_t *instance, dnp3_analog_output_status_t value, dnp3_update_options_t options)
Update a Analog Output Status point.
static const char * dnp3_parity_to_string(dnp3_parity_t value)
Converts the enum to a string.
Definition: dnp3.h:1636
dnp3_data_bits_t
Number of bits per character.
Definition: dnp3.h:1571
@ DNP3_DATA_BITS_FIVE
5 bits per character
Definition: dnp3.h:1573
@ DNP3_DATA_BITS_SEVEN
7 bits per character
Definition: dnp3.h:1577
@ DNP3_DATA_BITS_EIGHT
8 bits per character
Definition: dnp3.h:1579
@ DNP3_DATA_BITS_SIX
6 bits per character
Definition: dnp3.h:1575
void dnp3_command_set_add_g12_v1_u8(dnp3_command_set_t *instance, uint8_t idx, dnp3_group12_var1_t header)
Add a CROB with 1-byte prefix index.
static const char * dnp3_port_state_to_string(dnp3_port_state_t value)
Converts the enum to a string.
Definition: dnp3.h:1197
static dnp3_event_classes_t dnp3_event_classes_none()
Initialize all classes to false.
Definition: dnp3.h:2567
static dnp3_double_bit_binary_input_config_t dnp3_double_bit_binary_input_config_init()
Initialize to defaults.
Definition: dnp3.h:4021
dnp3_connection_state_t
Outstation connection state for connection-oriented transports, e.g. TCP.
Definition: dnp3.h:5742
@ DNP3_CONNECTION_STATE_CONNECTED
Connected to the master.
Definition: dnp3.h:5744
@ DNP3_CONNECTION_STATE_DISCONNECTED
Disconnected from the master.
Definition: dnp3.h:5746
dnp3_param_error_t dnp3_master_channel_warm_restart(dnp3_master_channel_t *instance, dnp3_association_id_t association, dnp3_restart_task_callback_t callback)
Asynchronously perform a warm restart operation to the association.
static dnp3_update_options_t dnp3_update_options_detect_event()
Default event detection mode. Updates the static value and automatically detects event.
Definition: dnp3.h:3827
dnp3_analog_input_t * dnp3_analog_input_iterator_next(dnp3_analog_input_iterator_t *iter)
returns a pointer to the next value or NULL
bool dnp3_database_remove_binary_output_status(dnp3_database_t *instance, uint16_t index)
Remove a Binary Output Status point.
static dnp3_update_options_t dnp3_update_options_no_event()
Only update the static value. Usefull during initialization of the database.
Definition: dnp3.h:3843
dnp3_qualifier_code_t
Qualifier code used in the response.
Definition: dnp3.h:1996
@ DNP3_QUALIFIER_CODE_RANGE16
16-bit start stop (0x01)
Definition: dnp3.h:2000
@ DNP3_QUALIFIER_CODE_COUNT16
16-bit count (0x08)
Definition: dnp3.h:2006
@ DNP3_QUALIFIER_CODE_COUNT_AND_PREFIX_16
16-bit count and prefix (0x28)
Definition: dnp3.h:2010
@ DNP3_QUALIFIER_CODE_ALL_OBJECTS
All objects (0x06)
Definition: dnp3.h:2002
@ DNP3_QUALIFIER_CODE_RANGE8
8-bit start stop (0x00)
Definition: dnp3.h:1998
@ DNP3_QUALIFIER_CODE_COUNT_AND_PREFIX_8
8-bit count and prefix (0x17)
Definition: dnp3.h:2008
@ DNP3_QUALIFIER_CODE_FREE_FORMAT_16
16-bit free format (0x5B)
Definition: dnp3.h:2012
@ DNP3_QUALIFIER_CODE_COUNT8
8-bit count (0x07)
Definition: dnp3.h:2004
static dnp3_outstation_config_t dnp3_outstation_config_init(uint16_t outstation_address, uint16_t master_address, dnp3_event_buffer_config_t event_buffer_config)
Initialize to defaults.
Definition: dnp3.h:4979
static const char * dnp3_event_counter_variation_to_string(dnp3_event_counter_variation_t value)
Converts the enum to a string.
Definition: dnp3.h:4203
static const char * dnp3_certificate_mode_to_string(dnp3_certificate_mode_t value)
Converts the enum to a string.
Definition: dnp3.h:1773
struct dnp3_frozen_counter_iterator_t dnp3_frozen_counter_iterator_t
Iterator of frozen_counter.
Definition: dnp3.h:1059
static const char * dnp3_app_decode_level_to_string(dnp3_app_decode_level_t value)
Converts the enum to a string.
Definition: dnp3.h:330
struct dnp3_byte_iterator_t dnp3_byte_iterator_t
Iterator of uint8_t.
Definition: dnp3.h:1152
static dnp3_frozen_counter_config_t dnp3_frozen_counter_config_init()
Initialize to defaults.
Definition: dnp3.h:4358
dnp3_param_error_t dnp3_master_channel_cold_restart(dnp3_master_channel_t *instance, dnp3_association_id_t association, dnp3_restart_task_callback_t callback)
Asynchronously perform a cold restart operation to the association.
struct dnp3_binary_output_status_iterator_t dnp3_binary_output_status_iterator_t
Iterator of binary_output_status.
Definition: dnp3.h:975
dnp3_param_error_t dnp3_master_channel_add_association(dnp3_master_channel_t *instance, uint16_t address, dnp3_association_config_t config, dnp3_read_handler_t read_handler, dnp3_association_handler_t association_handler, dnp3_association_information_t association_information, dnp3_association_id_t *out)
Add an association to the channel.
static const char * dnp3_auto_time_sync_to_string(dnp3_auto_time_sync_t value)
Converts the enum to a string.
Definition: dnp3.h:2665
dnp3_task_type_t
Task type used in dnp3_association_information_t.
Definition: dnp3.h:2829
@ DNP3_TASK_TYPE_USER_READ
User-defined read request.
Definition: dnp3.h:2831
@ DNP3_TASK_TYPE_DISABLE_UNSOLICITED
Disable unsolicited startup request.
Definition: dnp3.h:2845
@ DNP3_TASK_TYPE_PERIODIC_POLL
Periodic poll task.
Definition: dnp3.h:2833
@ DNP3_TASK_TYPE_ENABLE_UNSOLICITED
Enable unsolicited startup request.
Definition: dnp3.h:2843
@ DNP3_TASK_TYPE_RESTART
Cold or warm restart task.
Definition: dnp3.h:2849
@ DNP3_TASK_TYPE_COMMAND
Command request.
Definition: dnp3.h:2839
@ DNP3_TASK_TYPE_CLEAR_RESTART_BIT
Clear RESTART IIN bit.
Definition: dnp3.h:2841
@ DNP3_TASK_TYPE_STARTUP_INTEGRITY
Startup integrity scan.
Definition: dnp3.h:2835
@ DNP3_TASK_TYPE_AUTO_EVENT_SCAN
Automatic event scan caused by RESTART IIN bit detection.
Definition: dnp3.h:2837
@ DNP3_TASK_TYPE_TIME_SYNC
Time synchronisation task.
Definition: dnp3.h:2847
dnp3_param_error_t dnp3_master_channel_operate(dnp3_master_channel_t *instance, dnp3_association_id_t association, dnp3_command_mode_t mode, dnp3_command_set_t *command, dnp3_command_task_callback_t callback)
Asynchronously perform a command operation on the association.
static dnp3_group12_var1_t dnp3_group12_var1_init(dnp3_control_code_t code, uint8_t count, uint32_t on_time, uint32_t off_time)
Fully construct dnp3_group12_var1_t specifying the value of each field.
Definition: dnp3.h:691
struct dnp3_octet_string_iterator_t dnp3_octet_string_iterator_t
Iterator of octet_string.
Definition: dnp3.h:1173
static const char * dnp3_response_function_to_string(dnp3_response_function_t value)
Converts the enum to a string.
Definition: dnp3.h:1910
dnp3_log_output_format_t
Describes how each log event is formatted.
Definition: dnp3.h:186
@ DNP3_LOG_OUTPUT_FORMAT_JSON
Output formatted as JSON.
Definition: dnp3.h:190
@ DNP3_LOG_OUTPUT_FORMAT_TEXT
A simple text-based format.
Definition: dnp3.h:188
static const char * dnp3_variation_to_string(dnp3_variation_t value)
Converts the enum to a string.
Definition: dnp3.h:1436
dnp3_log_level_t
Log level.
Definition: dnp3.h:153
@ DNP3_LOG_LEVEL_DEBUG
Debugging log level.
Definition: dnp3.h:161
@ DNP3_LOG_LEVEL_TRACE
Trace log level.
Definition: dnp3.h:163
@ DNP3_LOG_LEVEL_WARN
Warning log level.
Definition: dnp3.h:157
@ DNP3_LOG_LEVEL_ERROR
Error log level.
Definition: dnp3.h:155
@ DNP3_LOG_LEVEL_INFO
Information log level.
Definition: dnp3.h:159
static dnp3_analog_output_status_t dnp3_analog_output_status_init(uint16_t index, double value, dnp3_flags_t flags, dnp3_timestamp_t time)
Fully construct dnp3_analog_output_status_t specifying the value of each field.
Definition: dnp3.h:1130
static const char * dnp3_freeze_result_to_string(dnp3_freeze_result_t value)
Converts the enum to a string.
Definition: dnp3.h:5151
static dnp3_time_sync_task_callback_t dnp3_time_sync_task_callback_init(void(*on_complete)(dnp3_nothing_t, void *), void(*on_failure)(dnp3_time_sync_error_t, void *), void(*on_destroy)(void *arg), void *ctx)
Initialize an instance of the interface.
Definition: dnp3.h:3534
bool dnp3_database_add_binary_input(dnp3_database_t *instance, uint16_t index, dnp3_event_class_t point_class, dnp3_binary_input_config_t config)
Add a new BinaryInput point.
void dnp3_command_set_add_g41_v3_u16(dnp3_command_set_t *instance, uint16_t idx, float value)
Add a Analog Output command (single-precision float) with 2-byte prefix index.
bool dnp3_database_add_binary_output_status(dnp3_database_t *instance, uint16_t index, dnp3_event_class_t point_class, dnp3_binary_output_status_config_t config)
Add a new Binary Output Status point.
static dnp3_timestamp_t dnp3_timestamp_invalid_timestamp()
Creates an invalid timestamp struct.
Definition: dnp3.h:787
struct dnp3_command_set_t dnp3_command_set_t
Builder type used to construct command requests.
Definition: dnp3.h:3231
dnp3_flow_control_t
Flow control modes.
Definition: dnp3.h:1599
@ DNP3_FLOW_CONTROL_HARDWARE
Flow control using RTS/CTS signals.
Definition: dnp3.h:1605
@ DNP3_FLOW_CONTROL_SOFTWARE
Flow control using XON/XOFF bytes.
Definition: dnp3.h:1603
@ DNP3_FLOW_CONTROL_NONE
No flow control.
Definition: dnp3.h:1601
static const char * dnp3_event_frozen_counter_variation_to_string(dnp3_event_frozen_counter_variation_t value)
Converts the enum to a string.
Definition: dnp3.h:4325
static dnp3_flags_t dnp3_flags_init(uint8_t value)
Fully construct dnp3_flags_t specifying the value of each field.
Definition: dnp3.h:735
bool dnp3_database_remove_analog_input(dnp3_database_t *instance, uint16_t index)
Remove an AnalogInput point.
bool dnp3_database_remove_analog_output_status(dnp3_database_t *instance, uint16_t index)
Remove an Analog Output Status point.
static dnp3_decode_level_t dnp3_decode_level_init()
Initialize log levels to defaults.
Definition: dnp3.h:441
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_input)(dnp3_header_info_t, dnp3_binary_input_iterator_t *, void *), void(*handle_double_bit_binary_input)(dnp3_header_info_t, dnp3_double_bit_binary_input_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_input)(dnp3_header_info_t, dnp3_analog_input_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 an instance of the interface.
Definition: dnp3.h:2161
static dnp3_group12_var1_t dnp3_group12_var1_from_code(dnp3_control_code_t code)
Construct a dnp3_group12_var1_t from a dnp3_control_code_t.
Definition: dnp3.h:711
bool dnp3_database_remove_double_bit_binary_input(dnp3_database_t *instance, uint16_t index)
Remove a Double-Bit Binary Input point.
Analog Output Status configuration.
Definition: dnp3.h:4603
double deadband
Deadband value.
Definition: dnp3.h:4609
dnp3_static_analog_output_status_variation_t static_variation
Default static variation.
Definition: dnp3.h:4605
dnp3_event_analog_output_status_variation_t event_variation
Default event variation.
Definition: dnp3.h:4607
analog_output_status point
Definition: dnp3.h:1113
dnp3_timestamp_t time
Point timestamp.
Definition: dnp3.h:1121
uint16_t index
Point index.
Definition: dnp3.h:1115
double value
Point value.
Definition: dnp3.h:1117
dnp3_flags_t flags
Point flags.
Definition: dnp3.h:1119
Application-controlled IIN bits.
Definition: dnp3.h:5166
bool local_control
IIN1.5 - Some output points are in local mode.
Definition: dnp3.h:5170
bool device_trouble
IIN1.6 - Device trouble.
Definition: dnp3.h:5172
bool config_corrupt
IIN2.5 - Configuration corrupt.
Definition: dnp3.h:5174
bool need_time
IIN1.4 - Time synchronization is required.
Definition: dnp3.h:5168
Association configuration.
Definition: dnp3.h:2680
dnp3_event_classes_t disable_unsol_classes
Classes to disable unsolicited responses at startup.
Definition: dnp3.h:2685
bool auto_integrity_scan_on_buffer_overflow
Automatic integrity scan when an EVENT_BUFFER_OVERFLOW is detected.
Definition: dnp3.h:2702
uint64_t response_timeout
Timeout for receiving a response on this association.
Definition: dnp3.h:2683
dnp3_auto_time_sync_t auto_time_sync
Automatic time synchronization configuration.
Definition: dnp3.h:2693
uint64_t keep_alive_timeout
Delay of inactivity before sending a REQUEST_LINK_STATUS to the outstation.
Definition: dnp3.h:2700
dnp3_event_classes_t enable_unsol_classes
Classes to enable unsolicited responses at startup.
Definition: dnp3.h:2687
dnp3_event_classes_t event_scan_on_events_available
Classes to automatically send reads when the IIN bit is asserted.
Definition: dnp3.h:2704
dnp3_retry_strategy_t auto_tasks_retry_strategy
Automatic tasks retry strategy.
Definition: dnp3.h:2695
uint16_t max_queued_user_requests
maximum number of user requests (e.g. commands, adhoc reads, etc) that will be queued before back-pre...
Definition: dnp3.h:2706
dnp3_classes_t startup_integrity_classes
Startup integrity classes to ask on master startup and when an outstation restart is detected.
Definition: dnp3.h:2691
Callbacks for a particular outstation association.
Definition: dnp3.h:2792
void(* on_destroy)(void *arg)
Callback when the underlying owner doesn't need the interface anymore.
Definition: dnp3.h:2804
dnp3_utc_timestamp_t(* get_current_time)(void *)
Returns the current time or an invalid time if none is available.
Definition: dnp3.h:2801
void * ctx
Context data.
Definition: dnp3.h:2806
Association identifier.
Definition: dnp3.h:2495
uint16_t address
Outstation address of the association.
Definition: dnp3.h:2497
Binary Output Status configuration.
Definition: dnp3.h:4107
dnp3_event_binary_output_status_variation_t event_variation
Default event variation.
Definition: dnp3.h:4111
dnp3_static_binary_output_status_variation_t static_variation
Default static variation.
Definition: dnp3.h:4109
binary_output_status point
Definition: dnp3.h:945
bool value
Point value.
Definition: dnp3.h:949
dnp3_flags_t flags
Point flags.
Definition: dnp3.h:951
dnp3_timestamp_t time
Point timestamp.
Definition: dnp3.h:953
uint16_t index
Point index.
Definition: dnp3.h:947
Controls which types are reported during a Class 0 read.
Definition: dnp3.h:4823
bool frozen_counter
Include Frozen Counters in Class 0 reads.
Definition: dnp3.h:4833
bool analog_output_status
Include Analog Output Status in Class 0 reads.
Definition: dnp3.h:4837
bool counter
Include Counters in Class 0 reads.
Definition: dnp3.h:4831
bool analog
Include Analog Inputs in Class 0 reads.
Definition: dnp3.h:4835
bool octet_string
Include Binary Inputs in Class 0 reads.
Definition: dnp3.h:4841
bool binary_output_status
Include Binary Output Status in Class 0 reads.
Definition: dnp3.h:4829
bool binary
Include Binary Inputs in Class 0 reads.
Definition: dnp3.h:4825
bool double_bit_binary
Include Double-Bit Binary Inputs in Class 0 reads.
Definition: dnp3.h:4827
Class 0, 1, 2 and 3 config.
Definition: dnp3.h:2582
bool class3
Class 3 events.
Definition: dnp3.h:2590
bool class1
Class 1 events.
Definition: dnp3.h:2586
bool class2
Class 2 events.
Definition: dnp3.h:2588
bool class0
Class 0 (static data)
Definition: dnp3.h:2584
Callback for monitoring the client TCP connection state.
Definition: dnp3.h:2295
void(* on_destroy)(void *arg)
Callback when the underlying owner doesn't need the interface anymore.
Definition: dnp3.h:2303
void(* on_change)(dnp3_client_state_t, void *)
Called when the client state changed.
Definition: dnp3.h:2300
void * ctx
Context data.
Definition: dnp3.h:2305
Handler for command tasks.
Definition: dnp3.h:3377
void(* on_failure)(dnp3_command_error_t, void *)
Invoked when the asynchronous operation fails.
Definition: dnp3.h:3387
void * ctx
Context data.
Definition: dnp3.h:3392
void(* on_destroy)(void *arg)
Callback when the underlying owner doesn't need the interface anymore.
Definition: dnp3.h:3390
void(* on_complete)(dnp3_nothing_t, void *)
Invoked when the asynchronous operation completes successfully.
Definition: dnp3.h:3382
Timing parameters for connection attempts.
Definition: dnp3.h:2389
uint64_t max_connect_delay
Maximum delay between two connection attempts.
Definition: dnp3.h:2395
uint64_t min_connect_delay
Minimum delay between two connection attempts, doubles up to the maximum delay.
Definition: dnp3.h:2392
uint64_t reconnect_delay
Delay before attempting a connection after a disconnect.
Definition: dnp3.h:2398
Callback interface for connection state events.
Definition: dnp3.h:5764
void(* on_change)(dnp3_connection_state_t, void *)
Called when the connection state changes.
Definition: dnp3.h:5769
void * ctx
Context data.
Definition: dnp3.h:5774
void(* on_destroy)(void *arg)
Callback when the underlying owner doesn't need the interface anymore.
Definition: dnp3.h:5772
CROB (dnp3_group12_var1_t) control code.
Definition: dnp3.h:598
dnp3_op_type_t op_type
This field is used in conjunction with the dnp3_control_code_t::tcc field to specify a control operat...
Definition: dnp3.h:606
bool queue
This field is obsolete and should always be 0.
Definition: dnp3.h:604
dnp3_trip_close_code_t tcc
This field is used in conjunction with dnp3_control_code_t::op_type to specify a control operation.
Definition: dnp3.h:600
bool clear
Support for this field is optional. When the clear bit is set, the device shall remove pending contro...
Definition: dnp3.h:602
APDU Control field.
Definition: dnp3.h:521
bool fin
Final fragment of the message.
Definition: dnp3.h:525
bool uns
Unsolicited response.
Definition: dnp3.h:529
uint8_t seq
Sequence number.
Definition: dnp3.h:531
bool fir
First fragment in the message.
Definition: dnp3.h:523
bool con
Requires confirmation.
Definition: dnp3.h:527
Callbacks for handling controls.
Definition: dnp3.h:5567
dnp3_command_status_t(* operate_g41v2)(int16_t, uint16_t, dnp3_operate_type_t, dnp3_database_handle_t *, void *)
Operate a control point.
Definition: dnp3.h:5639
dnp3_command_status_t(* select_g41v3)(float, uint16_t, dnp3_database_handle_t *, void *)
Select an analog output, but do not operate.
Definition: dnp3.h:5651
void * ctx
Context data.
Definition: dnp3.h:5686
dnp3_command_status_t(* operate_g12v1)(dnp3_group12_var1_t, uint16_t, dnp3_operate_type_t, dnp3_database_handle_t *, void *)
Operate a control point.
Definition: dnp3.h:5597
dnp3_command_status_t(* select_g41v1)(int32_t, uint16_t, dnp3_database_handle_t *, void *)
Select an analog output, but do not operate.
Definition: dnp3.h:5609
void(* on_destroy)(void *arg)
Callback when the underlying owner doesn't need the interface anymore.
Definition: dnp3.h:5684
dnp3_command_status_t(* select_g41v4)(double, uint16_t, dnp3_database_handle_t *, void *)
Select an analog output, but do not operate.
Definition: dnp3.h:5672
void(* end_fragment)(dnp3_database_handle_t *, void *)
Notifies the end of a command fragment.
Definition: dnp3.h:5576
dnp3_command_status_t(* operate_g41v4)(double, uint16_t, dnp3_operate_type_t, dnp3_database_handle_t *, void *)
Operate a control point.
Definition: dnp3.h:5681
void(* begin_fragment)(void *)
Notifies the start of a command fragment.
Definition: dnp3.h:5571
dnp3_command_status_t(* operate_g41v3)(float, uint16_t, dnp3_operate_type_t, dnp3_database_handle_t *, void *)
Operate a control point.
Definition: dnp3.h:5660
dnp3_command_status_t(* select_g41v2)(int16_t, uint16_t, dnp3_database_handle_t *, void *)
Select an analog output, but do not operate.
Definition: dnp3.h:5630
dnp3_command_status_t(* select_g12v1)(dnp3_group12_var1_t, uint16_t, dnp3_database_handle_t *, void *)
Select a CROB, but do not operate.
Definition: dnp3.h:5588
dnp3_command_status_t(* operate_g41v1)(int32_t, uint16_t, dnp3_operate_type_t, dnp3_database_handle_t *, void *)
Operate a control point.
Definition: dnp3.h:5618
Counter configuration.
Definition: dnp3.h:4219
dnp3_static_counter_variation_t static_variation
Default static variation.
Definition: dnp3.h:4221
dnp3_event_counter_variation_t event_variation
Default event variation.
Definition: dnp3.h:4223
uint32_t deadband
Deadband value.
Definition: dnp3.h:4225
counter point
Definition: dnp3.h:987
uint16_t index
Point index.
Definition: dnp3.h:989
uint32_t value
Point value.
Definition: dnp3.h:991
dnp3_flags_t flags
Point flags.
Definition: dnp3.h:993
dnp3_timestamp_t time
Point timestamp.
Definition: dnp3.h:995
Database transaction interface.
Definition: dnp3.h:4700
void(* execute)(dnp3_database_t *, void *)
Execute a transaction on the provided database.
Definition: dnp3.h:4705
void(* on_destroy)(void *arg)
Callback when the underlying owner doesn't need the interface anymore.
Definition: dnp3.h:4708
void * ctx
Context data.
Definition: dnp3.h:4710
Controls the decoding of transmitted and received data at the application, transport,...
Definition: dnp3.h:421
dnp3_transport_decode_level_t transport
Controls transport segment layer decoding.
Definition: dnp3.h:425
dnp3_phys_decode_level_t physical
Controls the logging of physical layer read/write.
Definition: dnp3.h:429
dnp3_link_decode_level_t link
Controls link frame decoding.
Definition: dnp3.h:427
dnp3_app_decode_level_t application
Controls application fragment decoding.
Definition: dnp3.h:423
Maximum number of events for each type.
Definition: dnp3.h:4746
uint16_t max_counter
Maximum number of Counter events (g22)
Definition: dnp3.h:4754
uint16_t max_analog
Maximum number of Analog Input events (g32)
Definition: dnp3.h:4758
uint16_t max_binary
Maximum number of Binary Input events (g2)
Definition: dnp3.h:4748
uint16_t max_binary_output_status
Maximum number of Binary Output Status events (g11)
Definition: dnp3.h:4752
uint16_t max_octet_string
Maximum number of Octet String events (g111)
Definition: dnp3.h:4762
uint16_t max_analog_output_status
Maximum number of Analog Output Status events (g42)
Definition: dnp3.h:4760
uint16_t max_double_bit_binary
Maximum number of Double-Bit Binary Input events (g4)
Definition: dnp3.h:4750
uint16_t max_frozen_counter
Maximum number of Frozen Counter events (g23)
Definition: dnp3.h:4756
Event classes.
Definition: dnp3.h:2517
bool class3
Class 3 events.
Definition: dnp3.h:2523
bool class1
Class 1 events.
Definition: dnp3.h:2519
bool class2
Class 2 events.
Definition: dnp3.h:2521
Collection of individual flag bits represented by an underlying mask value.
Definition: dnp3.h:727
uint8_t value
bit-mask representing a set of individual flag bits
Definition: dnp3.h:729
Frozen Counter configuration.
Definition: dnp3.h:4341
uint32_t deadband
Deadband value.
Definition: dnp3.h:4347
dnp3_event_frozen_counter_variation_t event_variation
Default event variation.
Definition: dnp3.h:4345
dnp3_static_frozen_counter_variation_t static_variation
Default static variation.
Definition: dnp3.h:4343
frozen_counter point
Definition: dnp3.h:1029
dnp3_timestamp_t time
Point timestamp.
Definition: dnp3.h:1037
dnp3_flags_t flags
Point flags.
Definition: dnp3.h:1035
uint16_t index
Point index.
Definition: dnp3.h:1031
uint32_t value
Point value.
Definition: dnp3.h:1033
Control Relay Output Block.
Definition: dnp3.h:674
uint32_t on_time
Duration the output drive remains active (in milliseconds)
Definition: dnp3.h:680
uint32_t off_time
Duration the output drive remains non-active (in milliseconds)
Definition: dnp3.h:682
uint8_t count
Count.
Definition: dnp3.h:678
dnp3_control_code_t code
Control code.
Definition: dnp3.h:676
First IIN byte.
Definition: dnp3.h:1924
bool class_2_events
Outstation has unreported Class 2 events.
Definition: dnp3.h:1930
bool class_1_events
Outstation has unreported Class 1 events.
Definition: dnp3.h:1928
bool class_3_events
Outstation has unreported Class 3 events.
Definition: dnp3.h:1932
bool broadcast
Broadcast message was received.
Definition: dnp3.h:1926
bool local_control
One or more of the outstation’s points are in local control mode.
Definition: dnp3.h:1936
bool need_time
Outstation requires time synchronization.
Definition: dnp3.h:1934
bool device_trouble
An abnormal, device-specific condition exists in the outstation.
Definition: dnp3.h:1938
bool device_restart
Outstation restarted.
Definition: dnp3.h:1940
Second IIN byte.
Definition: dnp3.h:1948
bool parameter_error
Outstation does not support requested operation for objects in the request.
Definition: dnp3.h:1954
bool object_unknown
Outstation does not support requested operation for objects in the request.
Definition: dnp3.h:1952
bool config_corrupt
The outstation detected corrupt configuration (optional support)
Definition: dnp3.h:1960
bool reserved_1
Reserved for future use - should always be set to 0.
Definition: dnp3.h:1964
bool already_executing
The operation requested is already executing (optional support)
Definition: dnp3.h:1958
bool no_func_code_support
Outstation does not support this function code.
Definition: dnp3.h:1950
bool reserved_2
Reserved for future use - should always be set to 0.
Definition: dnp3.h:1962
bool event_buffer_overflow
An event buffer overflow condition exists in the outstation, and at least one unconfirmed event was l...
Definition: dnp3.h:1956
Pair of IIN bytes.
Definition: dnp3.h:1972
dnp3_iin2_t iin2
Second IIN byte.
Definition: dnp3.h:1976
dnp3_iin1_t iin1
First IIN byte.
Definition: dnp3.h:1974
Handler for link status check.
Definition: dnp3.h:3700
void(* on_destroy)(void *arg)
Callback when the underlying owner doesn't need the interface anymore.
Definition: dnp3.h:3713
void * ctx
Context data.
Definition: dnp3.h:3715
void(* on_failure)(dnp3_link_status_error_t, void *)
Invoked when the asynchronous operation fails.
Definition: dnp3.h:3710
void(* on_complete)(dnp3_nothing_t, void *)
Invoked when the asynchronous operation completes successfully.
Definition: dnp3.h:3705
Logging interface that receives the log messages and writes them somewhere.
Definition: dnp3.h:271
void * ctx
Context data.
Definition: dnp3.h:282
void(* on_message)(dnp3_log_level_t, const char *, void *)
Called when a log message was received and should be logged.
Definition: dnp3.h:277
void(* on_destroy)(void *arg)
Callback when the underlying owner doesn't need the interface anymore.
Definition: dnp3.h:280
Logging configuration options.
Definition: dnp3.h:233
dnp3_time_format_t time_format
optional time format
Definition: dnp3.h:239
bool print_module_info
optionally print the underlying Rust module information to the message string
Definition: dnp3.h:243
dnp3_log_output_format_t output_format
output formatting options
Definition: dnp3.h:237
bool print_level
optionally print the log level as part to the message string
Definition: dnp3.h:241
dnp3_log_level_t level
logging level
Definition: dnp3.h:235
Generic configuration for a MasterChannel.
Definition: dnp3.h:2221
dnp3_decode_level_t decode_level
Decoding level for this master. You can modify this later on with dnp3_master_channel_set_decode_leve...
Definition: dnp3.h:2225
uint16_t address
Local DNP3 data-link address.
Definition: dnp3.h:2223
uint16_t rx_buffer_size
RX buffer size.
Definition: dnp3.h:2233
uint16_t tx_buffer_size
TX buffer size.
Definition: dnp3.h:2229
Octet String point.
Definition: dnp3.h:1164
uint16_t index
Point index.
Definition: dnp3.h:1166
dnp3_byte_iterator_t * value
Point value.
Definition: dnp3.h:1168
Dynamic information required by the outstation from the user application.
Definition: dnp3.h:5200
uint16_t(* get_processing_delay_ms)(void *)
Returns the DELAY_MEASUREMENT delay.
Definition: dnp3.h:5211
dnp3_restart_delay_t(* cold_restart)(void *)
Request that the outstation perform a cold restart (IEEE-1815 2012, p. 58)
Definition: dnp3.h:5229
void * ctx
Context data.
Definition: dnp3.h:5257
dnp3_restart_delay_t(* warm_restart)(void *)
Request that the outstation perform a warm restart (IEEE-1815 2012, p. 58)
Definition: dnp3.h:5236
dnp3_write_time_result_t(* write_absolute_time)(uint64_t, void *)
Handle a write of the absolute time during time synchronization procedures.
Definition: dnp3.h:5217
void(* on_destroy)(void *arg)
Callback when the underlying owner doesn't need the interface anymore.
Definition: dnp3.h:5255
dnp3_application_iin_t(* get_application_iin)(void *)
Returns the application-controlled IIN bits.
Definition: dnp3.h:5222
dnp3_freeze_result_t(* freeze_counters_all)(dnp3_freeze_type_t, dnp3_database_handle_t *, void *)
Freeze all the counters.
Definition: dnp3.h:5243
dnp3_freeze_result_t(* freeze_counters_range)(uint16_t, uint16_t, dnp3_freeze_type_t, dnp3_database_handle_t *, void *)
Freeze a range of counters.
Definition: dnp3.h:5252
Outstation configuration.
Definition: dnp3.h:4909
dnp3_decode_level_t decode_level
Decoding level.
Definition: dnp3.h:4929
uint16_t max_controls_per_request
Maximum number of controls in a single request.
Definition: dnp3.h:4953
uint16_t rx_buffer_size
Receive buffer size.
Definition: dnp3.h:4927
uint32_t max_unsolicited_retries
Maximum number of unsolicited retries.
Definition: dnp3.h:4939
uint16_t master_address
Link-layer master address.
Definition: dnp3.h:4913
uint16_t solicited_buffer_size
Solicited response buffer size.
Definition: dnp3.h:4919
uint16_t outstation_address
Link-layer outstation address.
Definition: dnp3.h:4911
dnp3_outstation_features_t features
Optional features.
Definition: dnp3.h:4937
uint64_t confirm_timeout
Confirmation timeout.
Definition: dnp3.h:4932
uint64_t keep_alive_timeout
Delay of inactivity before sending a REQUEST_LINK_STATUS to the master.
Definition: dnp3.h:4947
uint64_t unsolicited_retry_delay
Delay to wait before retrying an unsolicited response.
Definition: dnp3.h:4942
dnp3_class_zero_config_t class_zero
Controls responses to Class 0 reads.
Definition: dnp3.h:4955
uint16_t unsolicited_buffer_size
Unsolicited response buffer size.
Definition: dnp3.h:4923
dnp3_event_buffer_config_t event_buffer_config
Event buffer sizes configuration.
Definition: dnp3.h:4915
uint64_t select_timeout
Select timeout.
Definition: dnp3.h:4935
uint16_t max_read_request_headers
Maximum number of headers that will be processed in a READ request.
Definition: dnp3.h:4951
Optional outstation features that can be enabled or disabled.
Definition: dnp3.h:4877
bool self_address
Respond to the self address.
Definition: dnp3.h:4879
bool unsolicited
Respond to enable/disable unsolicited response and produce unsolicited responses.
Definition: dnp3.h:4883
bool broadcast
Process valid broadcast messages.
Definition: dnp3.h:4881
Poll identifier.
Definition: dnp3.h:2506
uint64_t id
Unique poll id assigned by the association.
Definition: dnp3.h:2510
uint16_t association_id
Outstation address of the association.
Definition: dnp3.h:2508
Callback interface for receiving updates about the state of a serial port.
Definition: dnp3.h:1211
void(* on_change)(dnp3_port_state_t, void *)
Invoked when the serial port changes state.
Definition: dnp3.h:1216
void(* on_destroy)(void *arg)
Callback when the underlying owner doesn't need the interface anymore.
Definition: dnp3.h:1219
void * ctx
Context data.
Definition: dnp3.h:1221
General handler that will receive all values read from the outstation.
Definition: dnp3.h:2080
void(* handle_counter)(dnp3_header_info_t, dnp3_counter_iterator_t *, void *)
Handle counter data.
Definition: dnp3.h:2116
void(* handle_analog_input)(dnp3_header_info_t, dnp3_analog_input_iterator_t *, void *)
Handle analog input data.
Definition: dnp3.h:2128
void * ctx
Context data.
Definition: dnp3.h:2145
void(* handle_analog_output_status)(dnp3_header_info_t, dnp3_analog_output_status_iterator_t *, void *)
Handle analog output status data.
Definition: dnp3.h:2134
void(* handle_frozen_counter)(dnp3_header_info_t, dnp3_frozen_counter_iterator_t *, void *)
Handle frozen counter input data.
Definition: dnp3.h:2122
void(* handle_binary_output_status)(dnp3_header_info_t, dnp3_binary_output_status_iterator_t *, void *)
Handle binary output status data.
Definition: dnp3.h:2110
void(* begin_fragment)(dnp3_read_type_t, dnp3_response_header_t, void *)
Marks the beginning of a fragment.
Definition: dnp3.h:2086
void(* on_destroy)(void *arg)
Callback when the underlying owner doesn't need the interface anymore.
Definition: dnp3.h:2143
void(* handle_binary_input)(dnp3_header_info_t, dnp3_binary_input_iterator_t *, void *)
Handle binary input data.
Definition: dnp3.h:2098
void(* handle_double_bit_binary_input)(dnp3_header_info_t, dnp3_double_bit_binary_input_iterator_t *, void *)
Handle double-bit binary input data.
Definition: dnp3.h:2104
void(* handle_octet_string)(dnp3_header_info_t, dnp3_octet_string_iterator_t *, void *)
Handle octet string data.
Definition: dnp3.h:2140
void(* end_fragment)(dnp3_read_type_t, dnp3_response_header_t, void *)
Marks the end of a fragment.
Definition: dnp3.h:2092
Handler for read tasks.
Definition: dnp3.h:3170
void(* on_complete)(dnp3_nothing_t, void *)
Invoked when the asynchronous operation completes successfully.
Definition: dnp3.h:3175
void * ctx
Context data.
Definition: dnp3.h:3185
void(* on_failure)(dnp3_read_error_t, void *)
Invoked when the asynchronous operation fails.
Definition: dnp3.h:3180
void(* on_destroy)(void *arg)
Callback when the underlying owner doesn't need the interface anymore.
Definition: dnp3.h:3183
Restart delay used by dnp3_outstation_application_t::cold_restart and dnp3_outstation_application_t::...
Definition: dnp3.h:5034
uint16_t value
Expected delay before the outstation comes back online.
Definition: dnp3.h:5038
dnp3_restart_delay_type_t restart_type
Indicates what dnp3_restart_delay_t::value is.
Definition: dnp3.h:5036
Handler for restart tasks.
Definition: dnp3.h:3601
void(* on_failure)(dnp3_restart_error_t, void *)
Invoked when the asynchronous operation fails.
Definition: dnp3.h:3611
void * ctx
Context data.
Definition: dnp3.h:3616
void(* on_complete)(uint64_t, void *)
Invoked when the asynchronous operation completes successfully.
Definition: dnp3.h:3606
void(* on_destroy)(void *arg)
Callback when the underlying owner doesn't need the interface anymore.
Definition: dnp3.h:3614
Retry strategy configuration.
Definition: dnp3.h:1543
uint64_t max_delay
Maximum delay between two retries.
Definition: dnp3.h:1549
uint64_t min_delay
Minimum delay between two retries.
Definition: dnp3.h:1546
Runtime configuration.
Definition: dnp3.h:480
uint16_t num_core_threads
Number of runtime threads to spawn. For a guess of the number of CPU cores, use 0.
Definition: dnp3.h:484
Serial port settings.
Definition: dnp3.h:1673
dnp3_flow_control_t flow_control
Type of signalling to use for controlling data transfer.
Definition: dnp3.h:1679
dnp3_stop_bits_t stop_bits
Number of bits to use to signal the end of a character.
Definition: dnp3.h:1683
uint32_t baud_rate
Baud rate (in symbols-per-second)
Definition: dnp3.h:1675
dnp3_data_bits_t data_bits
Number of bits used to represent a character sent on the line.
Definition: dnp3.h:1677
dnp3_parity_t parity
Type of parity to use for error checking.
Definition: dnp3.h:1681
Handler for time synchronization tasks.
Definition: dnp3.h:3511
void(* on_destroy)(void *arg)
Callback when the underlying owner doesn't need the interface anymore.
Definition: dnp3.h:3524
void(* on_complete)(dnp3_nothing_t, void *)
Invoked when the asynchronous operation completes successfully.
Definition: dnp3.h:3516
void(* on_failure)(dnp3_time_sync_error_t, void *)
Invoked when the asynchronous operation fails.
Definition: dnp3.h:3521
void * ctx
Context data.
Definition: dnp3.h:3526
Timestamp value.
Definition: dnp3.h:773
uint64_t value
Timestamp value.
Definition: dnp3.h:775
dnp3_time_quality_t quality
Timestamp quality.
Definition: dnp3.h:777
TLS client configuration.
Definition: dnp3.h:2337
const char * private_key_path
Path to the the PEM-encoded private key.
Definition: dnp3.h:2345
const char * dns_name
Expected name to validate in the presented certificate (only in DNP3_CERTIFICATE_MODE_AUTHORITY_BASED...
Definition: dnp3.h:2339
const char * password
Optional password if the private key file is encrypted.
Definition: dnp3.h:2351
dnp3_certificate_mode_t certificate_mode
Certificate validation mode.
Definition: dnp3.h:2355
const char * local_cert_path
Path to the PEM-encoded local certificate.
Definition: dnp3.h:2343
dnp3_min_tls_version_t min_tls_version
Minimum TLS version allowed.
Definition: dnp3.h:2353
const char * peer_cert_path
Path to the PEM-encoded certificate of the peer.
Definition: dnp3.h:2341
TLS server configuration.
Definition: dnp3.h:5879
dnp3_min_tls_version_t min_tls_version
Minimum TLS version allowed.
Definition: dnp3.h:5895
const char * private_key_path
Path to the the PEM-encoded private key.
Definition: dnp3.h:5887
const char * local_cert_path
Path to the PEM-encoded local certificate.
Definition: dnp3.h:5885
const char * dns_name
Expected name to validate in the presented certificate (only in DNP3_CERTIFICATE_MODE_AUTHORITY_BASED...
Definition: dnp3.h:5881
const char * password
Optional password if the private key file is encrypted.
Definition: dnp3.h:5893
dnp3_certificate_mode_t certificate_mode
Certificate validation mode.
Definition: dnp3.h:5897
const char * peer_cert_path
Path to the PEM-encoded certificate of the peer.
Definition: dnp3.h:5883
Options that control how the update is performed.
Definition: dnp3.h:3813
dnp3_event_mode_t event_mode
Determines how/if an event is produced.
Definition: dnp3.h:3817
bool update_static
Optionally bypass updating the static database (the current value)
Definition: dnp3.h:3815
Timestamp value returned by dnp3_association_handler_t::get_current_time.
Definition: dnp3.h:2748
bool is_valid
True if the timestamp is valid, false otherwise.
Definition: dnp3.h:2754
uint64_t value
Value of the timestamp (in milliseconds from UNIX Epoch).
Definition: dnp3.h:2752