286 friend class CppDecodeLevelFriend;
339 friend class CppRuntimeConfigFriend;
366 friend class CppRuntimeFriend;
370 Runtime(
void* self): self(self) {}
410 friend class CppControlFieldFriend;
477 friend class CppControlCodeFriend;
545 friend class CppGroup12Var1Friend;
586 friend class CppFlagsFriend;
625 friend class CppTimestampFriend;
696 friend class CppBinaryInputFriend;
734 friend class CppBinaryInputIteratorFriend;
768 friend class CppDoubleBitBinaryInputFriend;
806 friend class CppDoubleBitBinaryInputIteratorFriend;
840 friend class CppBinaryOutputStatusFriend;
878 friend class CppBinaryOutputStatusIteratorFriend;
912 friend class CppCounterFriend;
950 friend class CppCounterIteratorFriend;
984 friend class CppFrozenCounterFriend;
1022 friend class CppFrozenCounterIteratorFriend;
1056 friend class CppAnalogInputFriend;
1094 friend class CppAnalogInputIteratorFriend;
1128 friend class CppFrozenAnalogInputFriend;
1166 friend class CppFrozenAnalogInputIteratorFriend;
1200 friend class CppAnalogOutputStatusFriend;
1238 friend class CppAnalogOutputStatusIteratorFriend;
1276 friend class CppBinaryOutputCommandEventFriend;
1316 friend class CppBinaryOutputCommandEventIteratorFriend;
1371 friend class CppAnalogOutputCommandEventFriend;
1414 friend class CppAnalogOutputCommandEventIteratorFriend;
1450 friend class CppUnsignedIntegerFriend;
1482 friend class CppUnsignedIntegerIteratorFriend;
1516 friend class CppAnalogInputDeadBandFriend;
1550 friend class CppAnalogInputDeadBandIteratorFriend;
1595 friend class CppByteIteratorFriend;
1603 ByteIterator(
void* iter) : iter(iter), current(
nullptr) {}
1629 friend class CppOctetStringFriend;
1661 friend class CppOctetStringIteratorFriend;
1695 friend class CppConnectOptionsFriend;
1739 friend class CppEndpointListFriend;
1771 void add(
const std::string& endpoint);
1778 friend class CppConnectStrategyFriend;
1847 friend class CppTlsClientConfigFriend;
1906namespace attribute_variations {
2248 friend class CppAttrPropFriend;
2267 friend class CppAttrItemFriend;
2300 friend class CppAttrItemIterFriend;
2308 AttrItemIter(
void* iter) : iter(iter), current(
nullptr) {}
2373namespace functional {
2380 static_assert(std::is_copy_constructible<T>::value,
"Lambda expression must be copy constructible. Does it contain something that is move-only?");
2403 return std::make_unique<PortStateListenerLambda<T>>(lambda); ;
2445namespace functional {
2452 static_assert(std::is_copy_constructible<T>::value,
"Lambda expression must be copy constructible. Does it contain something that is move-only?");
2475 return std::make_unique<ClientStateListenerLambda<T>>(lambda); ;
2763 friend class CppEventClassesFriend;
2826 friend class CppClassCountFriend;
2855 friend class CppRetryStrategyFriend;
2946 friend class CppSerialSettingsFriend;
3092 friend class CppPermissionSetFriend;
3126 friend class CppPermissionsFriend;
3161 friend class CppOpenFileFriend;
3246 friend class CppFileInfoFriend;
3432 friend class CppLoggingConfigFriend;
3486namespace functional {
3493 static_assert(std::is_copy_constructible<T>::value,
"Lambda expression must be copy constructible. Does it contain something that is move-only?");
3505 lambda(level, message);
3514std::unique_ptr<Logger>
logger(
const T& lambda)
3516 return std::make_unique<LoggerLambda<T>>(lambda); ;
3554 friend class CppIin1Friend;
3594 friend class CppIin2Friend;
3634 friend class CppIinFriend;
3656 friend class CppResponseHeaderFriend;
3706 friend class CppHeaderInfoFriend;
3988struct MasterChannelConfig;
3992 friend class CppMasterChannelConfigFriend;
4038 friend class CppWriteDeadBandRequestFriend;
4184 friend class CppAssociationIdFriend;
4203 friend class CppPollIdFriend;
4211 PollId(uint16_t association_id, uint64_t
id);
4216 uint16_t association_id;
4225 friend class CppClassesFriend;
4293 friend class CppAssociationConfigFriend;
4363 friend class CppUtcTimestampFriend;
4421namespace functional {
4428 static_assert(std::is_copy_constructible<T>::value,
"Lambda expression must be copy constructible. Does it contain something that is move-only?");
4451 return std::make_unique<AssociationHandlerLambda<T>>(lambda); ;
4581 friend class CppRequestFriend;
4585 Request(
void* self): self(self) {}
4787 friend class CppCommandSetFriend;
5094 virtual void on_complete(std::chrono::steady_clock::duration result) = 0;
5163 friend class CppFileReadConfigFriend;
5195 friend class CppDirReadConfigFriend;
5238 friend class CppFileInfoIteratorFriend;
5356 friend class CppMasterChannelFriend;
5395 AssociationId add_association(uint16_t address,
const AssociationConfig& config, std::unique_ptr<ReadHandler> read_handler, std::unique_ptr<AssociationHandler> association_handler, std::unique_ptr<AssociationInformation> association_information);
5407 AssociationId add_udp_association(uint16_t address,
const std::string& destination,
const AssociationConfig& config, std::unique_ptr<ReadHandler> read_handler, std::unique_ptr<AssociationHandler> association_handler, std::unique_ptr<AssociationInformation> association_information);
5687 void open_file(
const AssociationId& association,
const std::string& file_name, uint32_t auth_key,
const Permissions& permissions, uint32_t file_size,
FileMode file_mode, uint16_t max_block_size, std::unique_ptr<FileOpenCallback> callback);
5699 void write_file_block(
const AssociationId& association, uint32_t handle, uint32_t block_number,
bool final_block,
const std::vector<uint8_t>& block_data, std::unique_ptr<FileOperationCallback> callback);
5750 friend class CppAcceptHandlerFriend;
5786 friend class CppIdentifiedLinkHandlerFriend;
5858 friend class CppLinkIdConfigFriend;
5891 friend class CppMasterServerFriend;
5947 friend class CppUpdateInfoFriend;
5991 friend class CppUpdateOptionsFriend;
6088 friend class CppBinaryInputConfigFriend;
6150 friend class CppDoubleBitBinaryInputConfigFriend;
6208 friend class CppBinaryOutputStatusConfigFriend;
6276 friend class CppCounterConfigFriend;
6352 friend class CppFrozenCounterConfigFriend;
6440 friend class CppAnalogInputConfigFriend;
6526 friend class CppAnalogOutputStatusConfigFriend;
6583 friend class CppDatabaseFriend;
6587 Database(
void* self): self(self) {}
6980namespace functional {
6987 static_assert(std::is_copy_constructible<T>::value,
"Lambda expression must be copy constructible. Does it contain something that is move-only?");
7015class DatabaseHandle;
7021 friend class CppDatabaseHandleFriend;
7050 friend class CppEventBufferConfigFriend;
7105 friend class CppClassZeroConfigFriend;
7162 friend class CppOutstationFeaturesFriend;
7203 friend class CppOutstationConfigFriend;
7224 OutstationConfig(uint16_t
outstation_address, uint16_t
master_address,
const EventBufferConfig&
event_buffer_config, uint16_t
solicited_buffer_size, uint16_t
unsolicited_buffer_size, uint16_t
rx_buffer_size,
const DecodeLevel&
decode_level, std::chrono::steady_clock::duration
confirm_timeout, std::chrono::steady_clock::duration
select_timeout,
const OutstationFeatures&
features, uint32_t
max_unsolicited_retries, std::chrono::steady_clock::duration
unsolicited_retry_delay, std::chrono::steady_clock::duration
keep_alive_timeout, uint16_t
max_read_request_headers, uint16_t
max_controls_per_request,
const ClassZeroConfig&
class_zero);
7324 friend class CppRestartDelayFriend;
7444 friend class CppApplicationIinFriend;
7483 friend class CppTypeCountFriend;
7523 friend class CppBufferStateFriend;
7858struct RequestHeader;
7862 friend class CppRequestHeaderFriend;
8139namespace functional {
8146 static_assert(std::is_copy_constructible<T>::value,
"Lambda expression must be copy constructible. Does it contain something that is move-only?");
8169 return std::make_unique<ConnectionStateListenerLambda<T>>(lambda); ;
8174class ConnectionInfo;
8184 friend class CppConnectionInfoFriend;
8260 friend class CppNextEndpointActionFriend;
8302 virtual std::chrono::steady_clock::duration
disconnected(
const char* addr,
const char* hostname) = 0;
8308 virtual void connecting(
const char* addr,
const char* hostname) = 0;
8320 virtual void connected(
const char* addr,
const char* hostname) = 0;
8340 friend class CppOutstationUdpConfigFriend;
8384 friend class CppOutstationFriend;
8471 static Outstation create_serial_session_2(
Runtime& runtime,
const std::string& serial_path,
const SerialSettings& settings, std::chrono::steady_clock::duration open_retry_delay,
const OutstationConfig& config, std::unique_ptr<OutstationApplication> application, std::unique_ptr<OutstationInformation> information, std::unique_ptr<ControlHandler> control_handler, std::unique_ptr<PortStateListener> port_listener);
8504 static Outstation create_tcp_client_with_handler(
Runtime& runtime,
LinkErrorMode link_error_mode,
const std::string& span_name,
const OutstationConfig& config, std::unique_ptr<OutstationApplication> application, std::unique_ptr<OutstationInformation> information, std::unique_ptr<ControlHandler> control_handler, std::unique_ptr<ClientStateListener> listener, std::unique_ptr<ClientConnectionHandler> connection_handler);
8521 static Outstation create_tls_client(
Runtime& runtime,
LinkErrorMode link_error_mode,
EndpointList& endpoints,
const ConnectStrategy& connect_strategy,
ConnectOptions& connect_options,
const OutstationConfig& config, std::unique_ptr<OutstationApplication> application, std::unique_ptr<OutstationInformation> information, std::unique_ptr<ControlHandler> control_handler, std::unique_ptr<ClientStateListener> listener,
const TlsClientConfig& tls_config);
8562 friend class CppAddressFilterFriend;
8596 void add(
const std::string& address);
8608 friend class CppTlsServerConfigFriend;
8674 friend class CppOutstationServerFriend;
8708 Outstation add_outstation(
const OutstationConfig& config, std::unique_ptr<OutstationApplication> application, std::unique_ptr<OutstationInformation> information, std::unique_ptr<ControlHandler> control_handler, std::unique_ptr<ConnectionStateListener> listener,
AddressFilter& filter);
Class used to accept a connection, reject it, or defer it to link identification.
Definition: dnp3.hpp:5749
AcceptHandler(AcceptHandler &&other) noexcept
Transfer ownership of the underlying C-type to this instance and invalidate the other instance.
Definition: dnp3.hpp:5765
ParamError accept(LinkErrorMode error_mode, const MasterChannelConfig &config)
Accept the connection and create a master channel.
ParamError get_link_identity()
Request that server attempt to identify the outstation by reading a link-layer header from the physic...
Filters connecting client by their IP address to associate a connecting master with an outstation on ...
Definition: dnp3.hpp:8561
static AddressFilter any()
Create an address filter that accepts any IP address.
AddressFilter(const std::string &address)
Create an address filter that matches a specific address or wildcards.
AddressFilter(AddressFilter &&other) noexcept
Transfer ownership of the underlying C-type to this instance and invalidate the other instance.
Definition: dnp3.hpp:8577
~AddressFilter()
Destroy an address filter.
void add(const std::string &address)
Add an accepted IP address to the filter.
Iterator over AnalogOutputCommandEvent instances.
Definition: dnp3.hpp:1412
AnalogOutputCommandEventIterator(AnalogOutputCommandEventIterator &&)=default
move constructor for the iterator
AnalogOutputCommandEvent get()
retrieve the current value
bool next()
move the iterator to the next value
Iterator over AnalogOutputStatus instances.
Definition: dnp3.hpp:1236
AnalogOutputStatus get()
retrieve the current value
bool next()
move the iterator to the next value
AnalogOutputStatusIterator(AnalogOutputStatusIterator &&)=default
move constructor for the iterator
Global application layer configuration settings.
Definition: dnp3.hpp:64
static void parse_zero_length_strings(bool enabled)
Enable or disable the parsing of zero-length strings, e.g., Group 110/111 Variation 0.
Callbacks for a particular outstation association.
Definition: dnp3.hpp:4406
virtual UtcTimestamp get_current_time()=0
Returns the current time or an invalid time if none is available.
Iterator over AttrItem instances.
Definition: dnp3.hpp:2298
AttrItem get()
retrieve the current value
AttrItemIter(AttrItemIter &&)=default
move constructor for the iterator
bool next()
move the iterator to the next value
Iterator over BinaryOutputCommandEvent instances.
Definition: dnp3.hpp:1314
bool next()
move the iterator to the next value
BinaryOutputCommandEvent get()
retrieve the current value
BinaryOutputCommandEventIterator(BinaryOutputCommandEventIterator &&)=default
move constructor for the iterator
Iterator over BinaryOutputStatus instances.
Definition: dnp3.hpp:876
bool next()
move the iterator to the next value
BinaryOutputStatus get()
retrieve the current value
BinaryOutputStatusIterator(BinaryOutputStatusIterator &&)=default
move constructor for the iterator
Iterator over uint8_t instances.
Definition: dnp3.hpp:1593
ByteIterator(ByteIterator &&)=default
move constructor for the iterator
uint8_t get()
retrieve the current value
bool next()
move the iterator to the next value
Provides fine-grained control over how TCP and TLS clients connect to endpoints.
Definition: dnp3.hpp:8293
virtual void connecting(const char *addr, const char *hostname)=0
Notification that a connection attempt is being made.
virtual void resolution_failed(const char *hostname)=0
Notification that DNS resolution failed.
virtual void next(NextEndpointAction &action)=0
Called to get the next endpoint to connect to or to sleep for a duration. Use the provided action obj...
virtual void connected(const char *addr, const char *hostname)=0
Notification that a connection attempt succeeded.
virtual std::chrono::steady_clock::duration disconnected(const char *addr, const char *hostname)=0
Notification that a previously successful connection failed. The task will sleep for the specified du...
virtual void connect_failed(const char *addr, const char *hostname)=0
Notification that connection operation failed.
Callback for monitoring the client TCP connection state.
Definition: dnp3.hpp:2434
virtual void on_change(ClientState state)=0
Called when the client state changed.
Exception type corresponding to the underlying error enum CommandError.
Definition: dnp3.hpp:4927
CommandException(CommandError error)
construct the exception with an instance of the enum
Definition: dnp3.hpp:4932
CommandError error
underlying error enum
Definition: dnp3.hpp:4930
Builder type used to construct command requests.
Definition: dnp3.hpp:4786
~CommandSet()
Destroy a set of commands.
void add_g41_v1_u16(uint16_t idx, int32_t value)
Add a Analog Output command (signed 32-bit integer) with 2-byte prefix index.
void add_g12_v1_u16(uint16_t idx, const Group12Var1 &header)
Add a CROB with 2-byte prefix index.
void add_g41_v3_u8(uint8_t idx, float value)
Add a Analog Output command (single-precision float) with 1-byte prefix index.
CommandSet(CommandSet &&other) noexcept
Transfer ownership of the underlying C-type to this instance and invalidate the other instance.
Definition: dnp3.hpp:4802
void add_g41_v4_u16(uint16_t idx, double value)
Add a Analog Output command (double-precision float) with 2-byte prefix index.
void add_g12_v1_u8(uint8_t idx, const Group12Var1 &header)
Add a CROB with 1-byte prefix index.
CommandSet()
Create a new set of commands.
void add_g41_v1_u8(uint8_t idx, int32_t value)
Add a Analog Output command (signed 32-bit integer) with 1-byte prefix index.
void add_g41_v3_u16(uint16_t idx, float value)
Add a Analog Output command (single-precision float) with 2-byte prefix index.
void add_g41_v2_u8(uint8_t idx, int16_t value)
Add a Analog Output command (signed 16-bit integer) with 1-byte prefix index.
void finish_header()
Finish any partially completed header. This allows for the construction of two headers with the same ...
void add_g41_v4_u8(uint8_t idx, double value)
Add a Analog Output command (double-precision float) with 1-byte prefix index.
void add_g41_v2_u16(uint16_t idx, int16_t value)
Add a Analog Output command (signed 16-bit integer) with 2-byte prefix index.
Handler for command tasks.
Definition: dnp3.hpp:4938
virtual void on_failure(CommandError error)=0
Invoked when the asynchronous operation fails.
virtual void on_complete(Nothing result)=0
Invoked when the asynchronous operation completes successfully.
Options that control how TCP connections are established.
Definition: dnp3.hpp:1694
void set_timeout(std::chrono::steady_clock::duration timeout)
Set a timeout for the TCP connection that might be less than the default for the OS.
void set_local_endpoint(const std::string &endpoint)
Set the local address to which the socket is bound.
ConnectOptions(ConnectOptions &&other) noexcept
Transfer ownership of the underlying C-type to this instance and invalidate the other instance.
Definition: dnp3.hpp:1710
~ConnectOptions()
Destroy an instance.
ConnectOptions()
Initialize to the defaults.
Callbacks to user code that determine how the server processes connections.
Definition: dnp3.hpp:5814
virtual void start(const char *remote_addr, MasterChannel &channel)=0
Start a communication session that was previously accepted using only the socket address.
virtual void accept(const char *remote_addr, AcceptHandler &acceptor)=0
Filter the connection solely based on the remote address.
virtual void accept_with_link_id(const char *remote_addr, uint16_t source, uint16_t destination, IdentifiedLinkHandler &acceptor)=0
Filter the connection based on the source and destination of the first link-layer frame.
virtual void start_with_link_id(const char *remote_addr, uint16_t source, uint16_t destination, MasterChannel &channel)=0
Start a communication session that was previously accepted using link identity information.
Builder for configuring connection parameters.
Definition: dnp3.hpp:8183
~ConnectionInfo()
Destroy a ConnectionInfo instance.
ParamError set_endpoint(const std::string &endpoint)
Set the endpoint to connect to.
ParamError set_local_endpoint(const std::string &local_endpoint)
Set the local endpoint to bind to.
ConnectionInfo()
Create a new ConnectionInfo. You must call set_endpoint() before using it.
void set_timeout(std::chrono::steady_clock::duration timeout_ms)
Set the connection timeout.
void clear_timeout()
Clear any previously configured timeout so the OS default is used.
ConnectionInfo(ConnectionInfo &&other) noexcept
Transfer ownership of the underlying C-type to this instance and invalidate the other instance.
Definition: dnp3.hpp:8199
ParamError set_master_address(uint16_t address)
Change the master address for this and all subsequent connections.
void clear_local_endpoint()
Clear any previously configured local endpoint so the OS chooses the interface and port.
Callback interface for connection state events.
Definition: dnp3.hpp:8128
virtual void on_change(ConnectionState state)=0
Called when the connection state changes.
Callbacks for handling controls.
Definition: dnp3.hpp:7992
virtual CommandStatus select_g41v4(double value, uint16_t index, DatabaseHandle &database_handle)=0
Select an analog output, but do not operate.
virtual void end_fragment(DatabaseHandle &database)=0
Notifies the end of a command fragment.
virtual CommandStatus operate_g41v1(int32_t value, uint16_t index, OperateType op_type, DatabaseHandle &database_handle)=0
Operate a control point.
virtual CommandStatus operate_g12v1(const Group12Var1 &value, uint16_t index, OperateType op_type, DatabaseHandle &database_handle)=0
Operate a control point.
virtual CommandStatus operate_g41v2(int16_t value, uint16_t index, OperateType op_type, DatabaseHandle &database_handle)=0
Operate a control point.
virtual CommandStatus select_g41v2(int16_t value, uint16_t index, DatabaseHandle &database_handle)=0
Select an analog output, but do not operate.
virtual CommandStatus select_g41v3(float value, uint16_t index, DatabaseHandle &database_handle)=0
Select an analog output, but do not operate.
virtual CommandStatus operate_g41v3(float value, uint16_t index, OperateType op_type, DatabaseHandle &database_handle)=0
Operate a control point.
virtual CommandStatus operate_g41v4(double value, uint16_t index, OperateType op_type, DatabaseHandle &database_handle)=0
Operate a control point.
virtual CommandStatus select_g12v1(const Group12Var1 &value, uint16_t index, DatabaseHandle &database_handle)=0
Select a CROB, but do not operate.
virtual void begin_fragment()=0
Notifies the start of a command fragment.
virtual CommandStatus select_g41v1(int32_t value, uint16_t index, DatabaseHandle &database_handle)=0
Select an analog output, but do not operate.
Iterator over Counter instances.
Definition: dnp3.hpp:948
CounterIterator(CounterIterator &&)=default
move constructor for the iterator
Counter get()
retrieve the current value
bool next()
move the iterator to the next value
Handle typed used to perform transactions on the database inside of control and freeze callbacks.
Definition: dnp3.hpp:7020
void transaction(DatabaseTransaction &callback)
Acquire a mutex on the underlying database and apply a set of changes as a transaction.
DatabaseHandle(DatabaseHandle &&other) noexcept
Transfer ownership of the underlying C-type to this instance and invalidate the other instance.
Definition: dnp3.hpp:7036
Database transaction interface.
Definition: dnp3.hpp:6969
virtual void execute(Database &database)=0
Execute a transaction on the provided database.
Internal database access.
Definition: dnp3.hpp:6582
bool remove_frozen_counter(uint16_t index)
Remove a Frozen Counter point.
bool add_analog_output_status(uint16_t index, EventClass point_class, const AnalogOutputStatusConfig &config)
Add a new Analog Output Status point.
Counter get_counter(uint16_t index)
Get a Counter point.
UpdateInfo update_binary_input_2(const BinaryInput &value, const UpdateOptions &options)
Update a BinaryInput point.
bool remove_binary_output_status(uint16_t index)
Remove a Binary Output Status point.
AttrDefError define_time_attr(uint8_t set, bool writable, uint8_t variation, uint64_t value)
Define a DNP3 time attribute.
UpdateInfo update_frozen_counter_2(const FrozenCounter &value, const UpdateOptions &options)
Update an Frozen Counter point.
BinaryOutputStatus get_binary_output_status(uint16_t index)
Get a Binary Output Status point.
DoubleBitBinaryInput get_double_bit_binary_input(uint16_t index)
Get a Double-Bit Binary Input point.
UpdateInfo update_analog_output_status_2(const AnalogOutputStatus &value, const UpdateOptions &options)
Update a Analog Output Status point.
bool update_binary_output_status(const BinaryOutputStatus &value, const UpdateOptions &options)
Update a Binary Output Status point.
AttrDefError define_bool_attr(uint8_t set, bool writable, uint8_t variation, bool value)
Define a boolean attribute which is mapped to an unsigned integer internally.
bool remove_octet_string(uint16_t index)
Remove an Octet String point.
bool update_double_bit_binary_input(const DoubleBitBinaryInput &value, const UpdateOptions &options)
Update a Double-Bit Binary Input point.
bool update_frozen_counter(const FrozenCounter &value, const UpdateOptions &options)
Update an Frozen Counter point.
bool add_double_bit_binary_input(uint16_t index, EventClass point_class, const DoubleBitBinaryInputConfig &config)
Add a new Double-Bit Binary Input point.
UpdateInfo update_counter_2(const Counter &value, const UpdateOptions &options)
Update a Counter point.
AttrDefError define_int_attr(uint8_t set, bool writable, uint8_t variation, int32_t value)
Define a signed integer attribute.
AttrDefError define_string_attr(uint8_t set, bool writable, uint8_t variation, const std::string &value)
Define a string attribute.
bool update_analog_input(const AnalogInput &value, const UpdateOptions &options)
Update a AnalogInput point.
bool add_analog_input(uint16_t index, EventClass point_class, const AnalogInputConfig &config)
Add a new AnalogInput point.
bool add_binary_input(uint16_t index, EventClass point_class, const BinaryInputConfig &config)
Add a new BinaryInput point.
bool add_counter(uint16_t index, EventClass point_class, const CounterConfig &config)
Add a new Counter point.
UpdateInfo update_analog_input_2(const AnalogInput &value, const UpdateOptions &options)
Update a AnalogInput point.
bool add_binary_output_status(uint16_t index, EventClass point_class, const BinaryOutputStatusConfig &config)
Add a new Binary Output Status point.
bool update_binary_input(const BinaryInput &value, const UpdateOptions &options)
Update a BinaryInput point.
bool remove_analog_input(uint16_t index)
Remove an AnalogInput point.
AttrDefError define_double_attr(uint8_t set, bool writable, uint8_t variation, double value)
Define a 64-bit floating point attribute.
AttrDefError define_float_attr(uint8_t set, bool writable, uint8_t variation, float value)
Define a 32-bit floating point attribute.
UpdateInfo update_flags(uint16_t index, UpdateFlagsType flags_type, const Flags &flags, const Timestamp &time, const UpdateOptions &options)
Update the flags for the specified point without changing the value.
UpdateInfo update_binary_output_status_2(const BinaryOutputStatus &value, const UpdateOptions &options)
Update a Binary Output Status point.
bool add_octet_string(uint16_t index, EventClass point_class)
Add a new Octet String point.
UpdateInfo update_octet_string_2(uint16_t index, const std::vector< uint8_t > &value, const UpdateOptions &options)
Update an Octet String point.
AnalogOutputStatus get_analog_output_status(uint16_t index)
Get a Analog Output Status point.
FrozenCounter get_frozen_counter(uint16_t index)
Get a Frozen Counter point.
bool update_counter(const Counter &value, const UpdateOptions &options)
Update a Counter point.
bool remove_counter(uint16_t index)
Remove a Counter point.
Database(Database &&other) noexcept
Transfer ownership of the underlying C-type to this instance and invalidate the other instance.
Definition: dnp3.hpp:6598
bool update_octet_string(uint16_t index, const std::vector< uint8_t > &value, const UpdateOptions &options)
Update an Octet String point.
bool remove_double_bit_binary_input(uint16_t index)
Remove a Double-Bit Binary Input point.
UpdateInfo update_double_bit_binary_input_2(const DoubleBitBinaryInput &value, const UpdateOptions &options)
Update a Double-Bit Binary Input point.
ClassCount discard_unselected_events(const EventClasses &classes)
Discard undelivered events of the given classes from the event buffer.
AttrDefError define_uint_attr(uint8_t set, bool writable, uint8_t variation, uint32_t value)
Define an unsigned integer attribute.
BinaryInput get_binary_input(uint16_t index)
Get a BinaryInput point.
AnalogInput get_analog_input(uint16_t index)
Get a AnalogInput point.
bool update_analog_output_status(const AnalogOutputStatus &value, const UpdateOptions &options)
Update a Analog Output Status point.
bool remove_analog_output_status(uint16_t index)
Remove an Analog Output Status point.
bool remove_binary_input(uint16_t index)
Remove a BinaryInput point.
bool add_frozen_counter(uint16_t index, EventClass point_class, const FrozenCounterConfig &config)
Add a new Frozen Counter point.
Callback interface for any task that expects an empty response.
Definition: dnp3.hpp:4164
virtual void on_failure(EmptyResponseError error)=0
Invoked when the asynchronous operation fails.
virtual void on_complete(Nothing result)=0
Invoked when the asynchronous operation completes successfully.
Exception type corresponding to the underlying error enum EmptyResponseError.
Definition: dnp3.hpp:4153
EmptyResponseException(EmptyResponseError error)
construct the exception with an instance of the enum
Definition: dnp3.hpp:4158
EmptyResponseError error
underlying error enum
Definition: dnp3.hpp:4156
List of IP endpoints.
Definition: dnp3.hpp:1738
EndpointList(EndpointList &&other) noexcept
Transfer ownership of the underlying C-type to this instance and invalidate the other instance.
Definition: dnp3.hpp:1754
~EndpointList()
Destroy a previously allocated endpoint list.
void add(const std::string &endpoint)
Add an IP endpoint to the list.
EndpointList(const std::string &main_endpoint)
Create a new list of IP endpoints.
Callback interface used when obtaining an authentication key.
Definition: dnp3.hpp:3318
virtual void on_complete(uint32_t result)=0
Invoked when the asynchronous operation completes successfully.
virtual void on_failure(FileError error)=0
Invoked when the asynchronous operation fails.
Exception type corresponding to the underlying error enum FileError.
Definition: dnp3.hpp:3232
FileException(FileError error)
construct the exception with an instance of the enum
Definition: dnp3.hpp:3237
FileError error
underlying error enum
Definition: dnp3.hpp:3235
Callback interface for retrieving file info asynchronously.
Definition: dnp3.hpp:5106
virtual void on_failure(FileError error)=0
Invoked when the asynchronous operation fails.
virtual void on_complete(const FileInfo &result)=0
Invoked when the asynchronous operation completes successfully.
Iterator over FileInfo instances.
Definition: dnp3.hpp:5236
FileInfo get()
retrieve the current value
FileInfoIterator(FileInfoIterator &&)=default
move constructor for the iterator
bool next()
move the iterator to the next value
Callback interface used when opening a file.
Definition: dnp3.hpp:3280
virtual void on_complete(const OpenFile &result)=0
Invoked when the asynchronous operation completes successfully.
virtual void on_failure(FileError error)=0
Invoked when the asynchronous operation fails.
Callback interface used when closing a file or writing a block of file data.
Definition: dnp3.hpp:3299
virtual void on_complete(Nothing result)=0
Invoked when the asynchronous operation completes successfully.
virtual void on_failure(FileError error)=0
Invoked when the asynchronous operation fails.
Callbacks for reading a file from the outstation asynchronously.
Definition: dnp3.hpp:5127
virtual bool opened(uint32_t size)=0
Called when the file is successfully opened.
virtual bool block_received(uint32_t block_num, ByteIterator &data)=0
Called when the next block is received.
virtual void completed()=0
Called when the transfer completes successfully.
virtual void aborted(FileError error)=0
Called when the transfer is aborted before completion due to an error or user request.
Iterator over FrozenCounter instances.
Definition: dnp3.hpp:1020
FrozenCounter get()
retrieve the current value
bool next()
move the iterator to the next value
FrozenCounterIterator(FrozenCounterIterator &&)=default
move constructor for the iterator
Class used to accept a connection, reject it, or defer it to link identification.
Definition: dnp3.hpp:5785
ParamError accept(LinkErrorMode error_mode, const MasterChannelConfig &config)
Accept the connection and create a master channel.
IdentifiedLinkHandler(IdentifiedLinkHandler &&other) noexcept
Transfer ownership of the underlying C-type to this instance and invalidate the other instance.
Definition: dnp3.hpp:5801
Handler for link status check.
Definition: dnp3.hpp:5334
virtual void on_complete(Nothing result)=0
Invoked when the asynchronous operation completes successfully.
virtual void on_failure(LinkStatusError error)=0
Invoked when the asynchronous operation fails.
Exception type corresponding to the underlying error enum LinkStatusError.
Definition: dnp3.hpp:5323
LinkStatusError error
underlying error enum
Definition: dnp3.hpp:5326
LinkStatusException(LinkStatusError error)
construct the exception with an instance of the enum
Definition: dnp3.hpp:5328
Logging interface that receives the log messages and writes them somewhere.
Definition: dnp3.hpp:3474
virtual void on_message(LogLevel level, const char *message)=0
Called when a log message was received and should be logged.
Provides a static method for configuring logging.
Definition: dnp3.hpp:3522
static void configure(const LoggingConfig &config, std::unique_ptr< Logger > logger)
Set the callback that will receive all the log messages.
Represents a communication channel for a master station.
Definition: dnp3.hpp:5355
void get_file_info(const AssociationId &association, const std::string &file_name, std::unique_ptr< FileInfoCallback > callback)
Asynchronously retrieve information on a particular file.
void read_file_with_auth(const AssociationId &association, const std::string &remote_file_path, const FileReadConfig &config, std::unique_ptr< FileReader > reader, const std::string &user_name, const std::string &password)
Start an operation to READ a file from the outstation using a FileReader to receive data.
void read_file(const AssociationId &association, const std::string &remote_file_path, const FileReadConfig &config, std::unique_ptr< FileReader > reader)
Start an operation to READ a file from the outstation using a FileReader to receive data.
void read(const AssociationId &association, Request &request, std::unique_ptr< ReadTaskCallback > callback)
Perform a read on the association.
void warm_restart(const AssociationId &association, std::unique_ptr< RestartTaskCallback > callback)
Asynchronously perform a warm restart operation to the association.
void cold_restart(const AssociationId &association, std::unique_ptr< RestartTaskCallback > callback)
Asynchronously perform a cold restart operation to the association.
void send_and_expect_empty_response(const AssociationId &association, FunctionCode function, Request &headers, std::unique_ptr< EmptyResponseCallback > callback)
Send the specified request to the association using the supplied function and collection of request h...
void get_file_auth_key(const AssociationId &association, const std::string &username, const std::string &password, std::unique_ptr< FileAuthCallback > callback)
Obtain a file authentication key.
void remove_poll(const PollId &poll_id)
Add a periodic poll to an association.
void enable()
start communications
void demand_poll(const PollId &poll_id)
Demand the immediate execution of a poll previously created with MasterChannel::add_poll().
void synchronize_time(const AssociationId &association, TimeSyncMode mode, std::unique_ptr< TimeSyncTaskCallback > callback)
Asynchronously perform a time sync operation to the association.
void open_file(const AssociationId &association, const std::string &file_name, uint32_t auth_key, const Permissions &permissions, uint32_t file_size, FileMode file_mode, uint16_t max_block_size, std::unique_ptr< FileOpenCallback > callback)
Asynchronously open a file.
void disable()
stop communications
PollId add_poll(const AssociationId &id, Request &request, std::chrono::steady_clock::duration period)
Add a periodic poll to an association.
void write_dead_bands(const AssociationId &association, WriteDeadBandRequest &request, std::unique_ptr< EmptyResponseCallback > callback)
Perform a WRITE on the association using the supplied collection of dead-band headers.
DecodeLevel get_decode_level()
Get the decoding level for the channel.
static MasterChannel create_tls_channel(Runtime &runtime, LinkErrorMode link_error_mode, const MasterChannelConfig &config, EndpointList &endpoints, const ConnectStrategy &connect_strategy, std::unique_ptr< ClientStateListener > listener, const TlsClientConfig &tls_config)
Create a master channel that connects to the specified TCP endpoint(s) and establish a TLS session wi...
void write_file_block(const AssociationId &association, uint32_t handle, uint32_t block_number, bool final_block, const std::vector< uint8_t > &block_data, std::unique_ptr< FileOperationCallback > callback)
Asynchronously write a block of file data to the outstation.
void read_with_handler(const AssociationId &association, Request &request, std::unique_ptr< ReadHandler > handler, std::unique_ptr< ReadTaskCallback > callback)
Perform a read on the association.
static MasterChannel create_tcp_channel_2(Runtime &runtime, LinkErrorMode link_error_mode, const MasterChannelConfig &config, EndpointList &endpoints, const ConnectStrategy &connect_strategy, ConnectOptions &connect_options, std::unique_ptr< ClientStateListener > listener)
Create a master channel that connects to the specified TCP endpoint(s)
AssociationId add_association(uint16_t address, const AssociationConfig &config, std::unique_ptr< ReadHandler > read_handler, std::unique_ptr< AssociationHandler > association_handler, std::unique_ptr< AssociationInformation > association_information)
Add an association to the channel.
void read_directory_with_auth(const AssociationId &association, const std::string &dir_path, const DirReadConfig &config, const std::string &user_name, const std::string &password, std::unique_ptr< ReadDirectoryCallback > callback)
Asynchronously retrieve a directory listing by first obtaining an authentication key.
void close_file(const AssociationId &association, uint32_t handle, std::unique_ptr< FileOperationCallback > callback)
Asynchronously close a file.
void operate_no_ack(const AssociationId &association, CommandSet &command, std::unique_ptr< CommandTaskCallback > callback)
Asynchronously perform a DIRECT_OPERATE_NO_ACK (0x06) command operation on the association.
void operate(const AssociationId &association, CommandMode mode, CommandSet &command, std::unique_ptr< CommandTaskCallback > callback)
Asynchronously perform a command operation on the association.
~MasterChannel()
Shutdown a MasterChannel and release all resources.
static MasterChannel create_tcp_channel(Runtime &runtime, LinkErrorMode link_error_mode, const MasterChannelConfig &config, EndpointList &endpoints, const ConnectStrategy &connect_strategy, std::unique_ptr< ClientStateListener > listener)
Create a master channel that connects to the specified TCP endpoint(s)
void remove_association(const AssociationId &id)
Remove an association from the channel.
MasterChannel(MasterChannel &&other) noexcept
Transfer ownership of the underlying C-type to this instance and invalidate the other instance.
Definition: dnp3.hpp:5371
static MasterChannel create_udp_channel(Runtime &runtime, const MasterChannelConfig &config, const std::string &local_endpoint, LinkReadMode link_read_mode, std::chrono::steady_clock::duration retry_delay)
Create a UDP master channel on the local endpoint.
static MasterChannel create_tls_channel_2(Runtime &runtime, LinkErrorMode link_error_mode, const MasterChannelConfig &config, EndpointList &endpoints, const ConnectStrategy &connect_strategy, ConnectOptions &connect_options, std::unique_ptr< ClientStateListener > listener, const TlsClientConfig &tls_config)
Create a master channel that connects to the specified TCP endpoint(s) and establish a TLS session wi...
void check_link_status(const AssociationId &association, std::unique_ptr< LinkStatusCallback > callback)
Asynchronously perform a link status check.
void set_decode_level(const DecodeLevel &decode_level)
Set the decoding level for the channel.
AssociationId add_udp_association(uint16_t address, const std::string &destination, const AssociationConfig &config, std::unique_ptr< ReadHandler > read_handler, std::unique_ptr< AssociationHandler > association_handler, std::unique_ptr< AssociationInformation > association_information)
Add a UDP association to the channel.
void read_directory(const AssociationId &association, const std::string &dir_path, const DirReadConfig &config, std::unique_ptr< ReadDirectoryCallback > callback)
Asynchronously retrieve a directory listing.
static MasterChannel create_serial_channel(Runtime &runtime, const MasterChannelConfig &config, const std::string &path, const SerialSettings &serial_params, std::chrono::steady_clock::duration open_retry_delay, std::unique_ptr< PortStateListener > listener)
Create a master channel on the specified serial port.
Class with methods used to spawn servers.
Definition: dnp3.hpp:5890
MasterServer(MasterServer &&other) noexcept
Transfer ownership of the underlying C-type to this instance and invalidate the other instance.
Definition: dnp3.hpp:5906
static MasterServer create_tcp_server(Runtime &runtime, const std::string &local_addr, const LinkIdConfig &link_id_config, std::unique_ptr< ConnectionHandler > connection_handler)
Spawn a TCP server that accepts connections from outstations.
~MasterServer()
Shutdown down the server.
Action object used by ClientConnectionHandler.next() to specify the next connection attempt or sleep ...
Definition: dnp3.hpp:8259
NextEndpointAction(NextEndpointAction &&other) noexcept
Transfer ownership of the underlying C-type to this instance and invalidate the other instance.
Definition: dnp3.hpp:8275
ParamError sleep_for(std::chrono::steady_clock::duration duration)
Indicate that the connection task should sleep for the specified duration.
ParamError connect_to(ConnectionInfo &info)
Specify the next endpoint to attempt connection to.
Iterator over OctetString instances.
Definition: dnp3.hpp:1659
OctetString get()
retrieve the current value
OctetStringIterator(OctetStringIterator &&)=default
move constructor for the iterator
bool next()
move the iterator to the next value
Dynamic information required by the outstation from the user application.
Definition: dnp3.hpp:7544
virtual void assign_class_all(PointType point_type, EventClass point_class)
Called for a point header of an accepted ASSIGN_CLASS request that names every point of a type.
Definition: dnp3.hpp:7710
virtual FreezeResult freeze_counters_range(uint16_t start, uint16_t stop, FreezeType freeze_type, DatabaseHandle &database_handle)
Freeze a range of counters.
Definition: dnp3.hpp:7616
virtual void begin_assign_class()
Called before the point headers of an accepted ASSIGN_CLASS request are reported.
Definition: dnp3.hpp:7700
virtual RestartDelay warm_restart()=0
Request that the outstation perform a warm restart.
virtual void event_cleared(uint64_t id)
Called when an event is cleared from the buffer due to master acknowledgement.
Definition: dnp3.hpp:7847
virtual void end_confirm(const BufferState &state)
Called when all relevant events have been cleared.
Definition: dnp3.hpp:7854
virtual bool write_octet_string_attr(uint8_t set, uint8_t variation, OctetStringAttr attr_type, ByteIterator &value)
Write an octet-string attribute. This method is only called if the corresponding attribute has been c...
Definition: dnp3.hpp:7806
virtual bool write_uint_attr(uint8_t set, uint8_t variation, UintAttr attr_type, uint32_t value)
Write an unsigned integer attribute. This method is only called if the corresponding attribute has be...
Definition: dnp3.hpp:7780
virtual bool write_string_attr(uint8_t set, uint8_t variation, StringAttr attr_type, const char *value)
Write a string attribute. This method is only called if the corresponding attribute has been configur...
Definition: dnp3.hpp:7741
virtual FreezeResult freeze_counters_all(FreezeType freeze_type, DatabaseHandle &database_handle)
Freeze all the counters.
Definition: dnp3.hpp:7589
virtual void write_analog_dead_band(uint16_t index, double dead_band)
Called when the outstation writes the dead-band of an analog input.
Definition: dnp3.hpp:7673
virtual FreezeResult freeze_counters_all_at_time(DatabaseHandle &database_handle, uint64_t time, uint32_t interval)
Freeze all the counters at a requested time and interval.
Definition: dnp3.hpp:7603
virtual bool write_float_attr(uint8_t set, uint8_t variation, FloatAttr attr_type, float value)
Write a 32-bit floating point attribute. This method is only called if the corresponding attribute ha...
Definition: dnp3.hpp:7754
virtual RestartDelay cold_restart()=0
Request that the outstation perform a cold restart.
virtual ApplicationIin get_application_iin()=0
Returns the application-controlled IIN bits.
virtual bool support_assign_class()
Controls outstation support for ASSIGN_CLASS requests, which change the class of the events that poin...
Definition: dnp3.hpp:7692
virtual void assign_class_range(PointType point_type, uint16_t start, uint16_t stop, EventClass point_class)
Called for a point header of an accepted ASSIGN_CLASS request that names a range of points of a type.
Definition: dnp3.hpp:7722
virtual uint16_t get_processing_delay_ms()=0
Returns the DELAY_MEASUREMENT delay.
virtual bool write_int_attr(uint8_t set, uint8_t variation, IntAttr attr_type, int32_t value)
Write a signed integer attribute. This method is only called if the corresponding attribute has been ...
Definition: dnp3.hpp:7793
virtual FreezeResult freeze_counters_range_at_time(uint16_t start, uint16_t stop, DatabaseHandle &database_handle, uint64_t time, uint32_t interval)
Freeze a range of counters at a requested time and interval.
Definition: dnp3.hpp:7632
virtual void end_write_analog_dead_bands()
Called when the outstation completes processing a header to write analog dead-bands.
Definition: dnp3.hpp:7681
virtual bool support_write_analog_dead_bands()
Controls outstation support for writing group 34, analog input dead-bands.
Definition: dnp3.hpp:7651
virtual void begin_confirm()
Called when a CONFIRM is received to a response or unsolicited response, but before any previously tr...
Definition: dnp3.hpp:7840
virtual void begin_write_analog_dead_bands()
Called when the outstation begins processing a header to write analog dead-bands.
Definition: dnp3.hpp:7659
virtual WriteTimeResult write_absolute_time(uint64_t time)=0
Handle a write of the absolute time during time synchronization procedures.
virtual bool write_double_attr(uint8_t set, uint8_t variation, FloatAttr attr_type, double value)
Write a 64-bit floating point attribute. This method is only called if the corresponding attribute ha...
Definition: dnp3.hpp:7767
virtual bool write_time_attr(uint8_t set, uint8_t variation, TimeAttr attr_type, uint64_t value)
Write a DNP3 time attribute. This method is only called if the corresponding attribute has been confi...
Definition: dnp3.hpp:7832
virtual void end_assign_class()
Called after the point headers of an accepted ASSIGN_CLASS request are reported.
Definition: dnp3.hpp:7730
virtual bool write_bit_string_attr(uint8_t set, uint8_t variation, BitStringAttr attr_type, ByteIterator &value)
Write a bit-string attribute. This method is only called if the corresponding attribute has been conf...
Definition: dnp3.hpp:7819
TCP server that listens for connections and routes the messages to outstations.
Definition: dnp3.hpp:8673
Outstation add_outstation(const OutstationConfig &config, std::unique_ptr< OutstationApplication > application, std::unique_ptr< OutstationInformation > information, std::unique_ptr< ControlHandler > control_handler, std::unique_ptr< ConnectionStateListener > listener, AddressFilter &filter)
Add an outstation to the server.
~OutstationServer()
Gracefully shutdown all the outstations associated to this server, stops the server and release resou...
void bind()
Bind the server to the port and starts listening. Also starts all the outstations associated to it.
OutstationServer(OutstationServer &&other) noexcept
Transfer ownership of the underlying C-type to this instance and invalidate the other instance.
Definition: dnp3.hpp:8689
static OutstationServer create_tls_server(Runtime &runtime, LinkErrorMode link_error_mode, const std::string &address, const TlsServerConfig &tls_config)
Create a new TLS server.
static OutstationServer create_tcp_server(Runtime &runtime, LinkErrorMode link_error_mode, const std::string &address)
Create a new TCP server.
Outstation handle.
Definition: dnp3.hpp:8383
void set_decode_level(const DecodeLevel &level)
Set decoding log level.
static Outstation create_tcp_client(Runtime &runtime, LinkErrorMode link_error_mode, EndpointList &endpoints, const ConnectStrategy &connect_strategy, ConnectOptions &connect_options, const OutstationConfig &config, std::unique_ptr< OutstationApplication > application, std::unique_ptr< OutstationInformation > information, std::unique_ptr< ControlHandler > control_handler, std::unique_ptr< ClientStateListener > listener)
Create an outstation instance running as a TCP client.
static Outstation create_serial_session_2(Runtime &runtime, const std::string &serial_path, const SerialSettings &settings, std::chrono::steady_clock::duration open_retry_delay, const OutstationConfig &config, std::unique_ptr< OutstationApplication > application, std::unique_ptr< OutstationInformation > information, std::unique_ptr< ControlHandler > control_handler, std::unique_ptr< PortStateListener > port_listener)
Create an outstation instance running on a serial port which is tolerant to the serial port being add...
~Outstation()
Free resources of the outstation.
static Outstation create_serial_session(Runtime &runtime, const std::string &serial_path, const SerialSettings &settings, const OutstationConfig &config, std::unique_ptr< OutstationApplication > application, std::unique_ptr< OutstationInformation > information, std::unique_ptr< ControlHandler > control_handler)
Create an outstation instance running on a serial port.
static Outstation create_serial_session_fault_tolerant(Runtime &runtime, const std::string &serial_path, const SerialSettings &settings, std::chrono::steady_clock::duration open_retry_delay, const OutstationConfig &config, std::unique_ptr< OutstationApplication > application, std::unique_ptr< OutstationInformation > information, std::unique_ptr< ControlHandler > control_handler)
This method is implemented in terms of Outstation::create_serial_session_2() but without a port liste...
void disable()
disable communications
static Outstation create_udp(Runtime &runtime, const OutstationUdpConfig &udp_config, const OutstationConfig &config, std::unique_ptr< OutstationApplication > application, std::unique_ptr< OutstationInformation > information, std::unique_ptr< ControlHandler > control_handler)
Create an outstation instance that communicates over UDP.
void enable()
enable communications
void transaction(DatabaseTransaction &callback)
Acquire a mutex on the underlying database and apply a set of changes as a transaction.
Outstation(Outstation &&other) noexcept
Transfer ownership of the underlying C-type to this instance and invalidate the other instance.
Definition: dnp3.hpp:8399
static Outstation create_tls_client_with_handler(Runtime &runtime, LinkErrorMode link_error_mode, const std::string &span_name, const OutstationConfig &config, std::unique_ptr< OutstationApplication > application, std::unique_ptr< OutstationInformation > information, std::unique_ptr< ControlHandler > control_handler, std::unique_ptr< ClientStateListener > listener, std::unique_ptr< ClientConnectionHandler > connection_handler, const TlsClientConfig &tls_config)
Create an outstation instance running as a TLS client with fine-grained connection management.
static Outstation create_tls_client(Runtime &runtime, LinkErrorMode link_error_mode, EndpointList &endpoints, const ConnectStrategy &connect_strategy, ConnectOptions &connect_options, const OutstationConfig &config, std::unique_ptr< OutstationApplication > application, std::unique_ptr< OutstationInformation > information, std::unique_ptr< ControlHandler > control_handler, std::unique_ptr< ClientStateListener > listener, const TlsClientConfig &tls_config)
Create an outstation instance running as a TLS client.
static Outstation create_tcp_client_with_handler(Runtime &runtime, LinkErrorMode link_error_mode, const std::string &span_name, const OutstationConfig &config, std::unique_ptr< OutstationApplication > application, std::unique_ptr< OutstationInformation > information, std::unique_ptr< ControlHandler > control_handler, std::unique_ptr< ClientStateListener > listener, std::unique_ptr< ClientConnectionHandler > connection_handler)
Create an outstation instance running as a TCP client with fine-grained connection management.
Exception type corresponding to the underlying error enum ParamError.
Definition: dnp3.hpp:139
ParamError error
underlying error enum
Definition: dnp3.hpp:142
ParamException(ParamError error)
construct the exception with an instance of the enum
Definition: dnp3.hpp:144
Callback interface for receiving updates about the state of a serial port.
Definition: dnp3.hpp:2361
virtual void on_change(PortState state)=0
Invoked when the serial port changes state.
Callback interface for retrieving a directory list.
Definition: dnp3.hpp:5271
virtual void on_failure(FileError error)=0
Invoked when the asynchronous operation fails.
virtual void on_complete(FileInfoIterator &result)=0
Invoked when the asynchronous operation completes successfully.
Exception type corresponding to the underlying error enum ReadError.
Definition: dnp3.hpp:4756
ReadException(ReadError error)
construct the exception with an instance of the enum
Definition: dnp3.hpp:4761
ReadError error
underlying error enum
Definition: dnp3.hpp:4759
Callback interface used to received measurement values received from the outstation.
Definition: dnp3.hpp:3751
virtual void handle_abs_time(const HeaderInfo &info, const Timestamp &time)
Handle an absolute time value (g50v1)
Definition: dnp3.hpp:3881
virtual void handle_binary_input(const HeaderInfo &info, BinaryInputIterator &values)
Handle binary input data.
Definition: dnp3.hpp:3777
virtual void handle_bool_attr(const HeaderInfo &info, BoolAttr attr, uint8_t set, uint8_t variation, bool value)
Handle a boolean device attribute.
Definition: dnp3.hpp:3927
virtual void handle_analog_output_status(const HeaderInfo &info, AnalogOutputStatusIterator &values)
Handle analog output status data.
Definition: dnp3.hpp:3833
virtual void handle_octet_string_attr(const HeaderInfo &info, OctetStringAttr attr, uint8_t set, uint8_t variation, ByteIterator &value)
Handle an octet string device attribute.
Definition: dnp3.hpp:3973
virtual void handle_binary_output_command_event(const HeaderInfo &info, BinaryOutputCommandEventIterator &values)
Handle binary output command events.
Definition: dnp3.hpp:3841
virtual void handle_double_bit_binary_input(const HeaderInfo &info, DoubleBitBinaryInputIterator &values)
Handle double-bit binary input data.
Definition: dnp3.hpp:3785
virtual void handle_frozen_counter(const HeaderInfo &info, FrozenCounterIterator &values)
Handle frozen counter input data.
Definition: dnp3.hpp:3809
virtual void handle_int_attr(const HeaderInfo &info, IntAttr attr, uint8_t set, uint8_t variation, int32_t value)
Handle a signed integer device attribute.
Definition: dnp3.hpp:3940
virtual void end_fragment(ReadType read_type, const ResponseHeader &header)
Called when all the data from a response fragment has been processed.
Definition: dnp3.hpp:3769
virtual void handle_analog_output_command_event(const HeaderInfo &info, AnalogOutputCommandEventIterator &values)
Handle analog output command events.
Definition: dnp3.hpp:3849
virtual void handle_octet_string(const HeaderInfo &info, OctetStringIterator &values)
Handle octet string data.
Definition: dnp3.hpp:3873
virtual void handle_float_attr(const HeaderInfo &info, FloatAttr attr, uint8_t set, uint8_t variation, double value)
Handle a floating point device attribute.
Definition: dnp3.hpp:3962
virtual void begin_fragment(ReadType read_type, const ResponseHeader &header)
Called when a valid response fragment is received, but before any measurements are processed.
Definition: dnp3.hpp:3761
virtual void handle_binary_output_status(const HeaderInfo &info, BinaryOutputStatusIterator &values)
Handle binary output status data.
Definition: dnp3.hpp:3793
virtual void handle_analog_input_dead_band(const HeaderInfo &info, AnalogInputDeadBandIterator &values)
Handle analog input deadbands (g34)
Definition: dnp3.hpp:3865
virtual void handle_uint_attr(const HeaderInfo &info, UintAttr attr, uint8_t set, uint8_t variation, uint32_t value)
Handle an unsigned integer device attribute.
Definition: dnp3.hpp:3914
virtual void handle_variation_list_attr(const HeaderInfo &info, VariationListAttr attr, uint8_t set, uint8_t variation, AttrItemIter &value)
Handle a known or unknown list of attribute variations.
Definition: dnp3.hpp:3903
virtual void handle_string_attr(const HeaderInfo &info, StringAttr attr, uint8_t set, uint8_t variation, const char *value)
Handle a known or unknown visible string device attribute.
Definition: dnp3.hpp:3892
virtual void handle_counter(const HeaderInfo &info, CounterIterator &values)
Handle counter data.
Definition: dnp3.hpp:3801
virtual void handle_analog_input(const HeaderInfo &info, AnalogInputIterator &values)
Handle analog input data.
Definition: dnp3.hpp:3817
virtual void handle_time_attr(const HeaderInfo &info, TimeAttr attr, uint8_t set, uint8_t variation, uint64_t value)
Handle a DNP3 time device attribute.
Definition: dnp3.hpp:3951
virtual void handle_frozen_analog_input(const HeaderInfo &info, FrozenAnalogInputIterator &values)
Handle frozen analog input data.
Definition: dnp3.hpp:3825
virtual void handle_bit_string_attr(const HeaderInfo &info, BitStringAttr attr, uint8_t set, uint8_t variation, ByteIterator &value)
Handle a bit string device attribute.
Definition: dnp3.hpp:3984
virtual void handle_unsigned_integer(const HeaderInfo &info, UnsignedIntegerIterator &values)
Handle unsigned integer values (g102)
Definition: dnp3.hpp:3857
Handler for read tasks.
Definition: dnp3.hpp:4767
virtual void on_complete(Nothing result)=0
Invoked when the asynchronous operation completes successfully.
virtual void on_failure(ReadError error)=0
Invoked when the asynchronous operation fails.
Custom request.
Definition: dnp3.hpp:4580
void add_two_byte_range_header(Variation variation, uint16_t start, uint16_t stop)
Add a two-byte start/stop header for use with a READ request.
static Request one_byte_range(Variation variation, uint8_t start, uint8_t stop)
Create a new request asking for range of objects (using 8-bit start/stop).
~Request()
Destroy a request created with Request::Request() or Request::class_request().
Request(Request &&other) noexcept
Transfer ownership of the underlying C-type to this instance and invalidate the other instance.
Definition: dnp3.hpp:4596
static Request two_byte_range(Variation variation, uint16_t start, uint16_t stop)
Create a new request asking for range of objects (using 16-bit start/stop).
static Request two_byte_limited_count(Variation variation, uint16_t count)
Create a new request asking for a limited count of objects (using 16-bit start/stop).
void add_one_byte_limited_count_header(Variation variation, uint8_t count)
Add a one-byte limited count variation header for use with a READ request.
void add_time_and_interval(uint64_t time, uint32_t interval_ms)
Add a single g51v1 time-and-interval.
static Request class_request(bool class0, bool class1, bool class2, bool class3)
Create a new request asking for classes.
static Request one_byte_limited_count(Variation variation, uint8_t count)
Create a new request asking for a limited count of objects (using 8-bit start/stop).
void add_specific_attribute(uint8_t variation, uint8_t set)
Add a header that reads a specific device attribute (group 0) for use with a READ request.
Request()
Create a new request.
void add_uint_attribute(uint8_t variation, uint8_t set, uint32_t value)
Add a header that writes an unsigned integer device attribute (group 0) for use with a WRITE request.
void add_all_objects_header(Variation variation)
Add an all objects variation request.
static Request all_objects(Variation variation)
Create a new request asking for all objects of a particular variation.
void add_two_byte_limited_count_header(Variation variation, uint16_t count)
Add a two-byte limited count variation header for use with a READ request.
void add_string_attribute(uint8_t variation, uint8_t set, const std::string &value)
Add a header that writes a visible string device attribute (group 0) for use with a WRITE request.
void add_one_byte_range_header(Variation variation, uint8_t start, uint8_t stop)
Add a one-byte start/stop header for use with a READ request.
Exception type corresponding to the underlying error enum RestartError.
Definition: dnp3.hpp:5076
RestartException(RestartError error)
construct the exception with an instance of the enum
Definition: dnp3.hpp:5081
RestartError error
underlying error enum
Definition: dnp3.hpp:5079
Handler for restart tasks.
Definition: dnp3.hpp:5087
virtual void on_complete(std::chrono::steady_clock::duration result)=0
Invoked when the asynchronous operation completes successfully.
virtual void on_failure(RestartError error)=0
Invoked when the asynchronous operation fails.
Handle to the underlying runtime.
Definition: dnp3.hpp:365
void set_shutdown_timeout(std::chrono::steady_clock::duration timeout)
By default, when the runtime shuts down, it does so without a timeout and waits indefinitely for all ...
Runtime(const RuntimeConfig &config)
Creates a new runtime for running the protocol stack.
~Runtime()
Destroy a runtime.
Runtime(Runtime &&other) noexcept
Transfer ownership of the underlying C-type to this instance and invalidate the other instance.
Definition: dnp3.hpp:381
Global TCP/TLS configuration settings.
Definition: dnp3.hpp:44
static void disable_server_tcp_no_delay()
By default, TCP_NODELAY is set to true for all server TCP/TLS connections. This disables Nagle's algo...
static void disable_client_tcp_no_delay()
By default, TCP_NODELAY is set to true for all client TCP/TLS connections. This disables Nagle's algo...
Exception type corresponding to the underlying error enum TimeSyncError.
Definition: dnp3.hpp:5015
TimeSyncError error
underlying error enum
Definition: dnp3.hpp:5018
TimeSyncException(TimeSyncError error)
construct the exception with an instance of the enum
Definition: dnp3.hpp:5020
Handler for time synchronization tasks.
Definition: dnp3.hpp:5026
virtual void on_failure(TimeSyncError error)=0
Invoked when the asynchronous operation fails.
virtual void on_complete(Nothing result)=0
Invoked when the asynchronous operation completes successfully.
Iterator over UnsignedInteger instances.
Definition: dnp3.hpp:1480
UnsignedIntegerIterator(UnsignedIntegerIterator &&)=default
move constructor for the iterator
bool next()
move the iterator to the next value
UnsignedInteger get()
retrieve the current value
Define a custom request to WRITE analog input dead-bands.
Definition: dnp3.hpp:4037
void add_g34v2_u16(uint16_t index, uint32_t dead_band)
Add a g34v2 (unsigned 32-bit) dead-band with 16-bit indexing to the request.
void add_g34v2_u8(uint8_t index, uint32_t dead_band)
Add a g34v2 (unsigned 32-bit) dead-band with 8-bit indexing to the request.
~WriteDeadBandRequest()
Destroy a request created with WriteDeadBandRequest::WriteDeadBandRequest()
void finish_header()
If a header is currently being written, then this will complete the header so that no new objects may...
WriteDeadBandRequest()
A builder class to create one or more headers of analog input dead-bands.
void add_g34v1_u16(uint16_t index, uint16_t dead_band)
Add a g34v1 (unsigned 16-bit) dead-band with 16-bit indexing to the request.
WriteDeadBandRequest(WriteDeadBandRequest &&other) noexcept
Transfer ownership of the underlying C-type to this instance and invalidate the other instance.
Definition: dnp3.hpp:4053
void add_g34v1_u8(uint8_t index, uint16_t dead_band)
Add a g34v1 (unsigned 16-bit) dead-band with 8-bit indexing to the request.
void add_g34v3_u8(uint8_t index, float dead_band)
Add a g34v3 (single-precision floating point) dead-band with 8-bit indexing to the request.
void add_g34v3_u16(uint16_t index, float dead_band)
Add a g34v3 (single-precision floating point) dead-band with 16-bit indexing to the request.
class that implements AssociationHandler in terms of a lambda expression
Definition: dnp3.hpp:4427
AssociationHandlerLambda(const T &lambda)
constructor
Definition: dnp3.hpp:4435
UtcTimestamp get_current_time() override
implement virtual method from base class
Definition: dnp3.hpp:4438
class that implements ClientStateListener in terms of a lambda expression
Definition: dnp3.hpp:2451
ClientStateListenerLambda(const T &lambda)
constructor
Definition: dnp3.hpp:2459
void on_change(ClientState state) override
implement virtual method from base class
Definition: dnp3.hpp:2462
class that implements ConnectionStateListener in terms of a lambda expression
Definition: dnp3.hpp:8145
ConnectionStateListenerLambda(const T &lambda)
constructor
Definition: dnp3.hpp:8153
void on_change(ConnectionState state) override
implement virtual method from base class
Definition: dnp3.hpp:8156
class that implements DatabaseTransaction in terms of a lambda expression
Definition: dnp3.hpp:6986
DatabaseTransactionLambda(const T &lambda)
constructor
Definition: dnp3.hpp:6994
void execute(Database &database) override
implement virtual method from base class
Definition: dnp3.hpp:6997
class that implements Logger in terms of a lambda expression
Definition: dnp3.hpp:3492
LoggerLambda(const T &lambda)
constructor
Definition: dnp3.hpp:3500
void on_message(LogLevel level, const char *message) override
implement virtual method from base class
Definition: dnp3.hpp:3503
class that implements PortStateListener in terms of a lambda expression
Definition: dnp3.hpp:2379
void on_change(PortState state) override
implement virtual method from base class
Definition: dnp3.hpp:2390
PortStateListenerLambda(const T &lambda)
constructor
Definition: dnp3.hpp:2387
constexpr uint8_t max_binary_input_index
Maximum binary input point index.
Definition: dnp3.hpp:1992
constexpr uint8_t user_assigned_id
User assigned ID code/number.
Definition: dnp3.hpp:2008
constexpr uint8_t supports_frozen_analog_inputs
Supports frozen analog input events.
Definition: dnp3.hpp:1976
constexpr uint8_t device_manufacturers_name
Device manufacturer's name.
Definition: dnp3.hpp:2018
constexpr uint8_t user_specific_attributes
Identification of user-specific attributes.
Definition: dnp3.hpp:1938
constexpr uint8_t device_location_longitude
Longitude of the device from reference meridian (-180.0 to 180.0 deg)
Definition: dnp3.hpp:1924
constexpr uint8_t num_counter
Number of counter points.
Definition: dnp3.hpp:1974
constexpr uint8_t num_master_defined_data_sets
Number of master defined data-sets.
Definition: dnp3.hpp:1944
constexpr uint8_t duration_of_time_accuracy
Duration of time accuracy (seconds)
Definition: dnp3.hpp:1952
constexpr uint8_t num_analog_input
Number of analog input points.
Definition: dnp3.hpp:1982
constexpr uint8_t device_subset_and_conformance
DNP3 subset and conformance.
Definition: dnp3.hpp:2014
constexpr uint8_t num_binary_input
Number of binary input points.
Definition: dnp3.hpp:1994
constexpr uint8_t max_analog_input_index
Maximum analog input point index.
Definition: dnp3.hpp:1980
constexpr uint8_t config_build_date
Time and date that the outstation's current configuration was built defined.
Definition: dnp3.hpp:1912
constexpr uint8_t supports_binary_input_events
Support binary input events.
Definition: dnp3.hpp:1990
constexpr uint8_t num_outstation_defined_data_sets
Number of outstation defined data-sets.
Definition: dnp3.hpp:1946
constexpr uint8_t user_assigned_primary_operator_name
User-assigned primary operator name.
Definition: dnp3.hpp:1930
constexpr uint8_t supports_counter_events
Supports counter events.
Definition: dnp3.hpp:1970
constexpr uint8_t device_manufacturer_software_version
Device manufacturer software version.
Definition: dnp3.hpp:2000
constexpr uint8_t num_binary_outputs
Number of binary outputs.
Definition: dnp3.hpp:1964
constexpr uint8_t supports_frozen_counter_events
Supports frozen counter events.
Definition: dnp3.hpp:1966
constexpr uint8_t config_version
Configuration version.
Definition: dnp3.hpp:1910
constexpr uint8_t device_serial_number
Device serial number.
Definition: dnp3.hpp:2012
constexpr uint8_t supports_double_bit_binary_input_events
Supports double-bit binary input events.
Definition: dnp3.hpp:1984
constexpr uint8_t user_assigned_owner_name
User-assigned owner name.
Definition: dnp3.hpp:2004
constexpr uint8_t num_analog_outputs
Number of analog outputs.
Definition: dnp3.hpp:1958
constexpr uint8_t max_double_bit_binary_input_index
Maximum double-bit binary input point index.
Definition: dnp3.hpp:1986
constexpr uint8_t max_analog_output_index
Maximum analog output index.
Definition: dnp3.hpp:1956
constexpr uint8_t config_id
Configuration id.
Definition: dnp3.hpp:1908
constexpr uint8_t supports_analog_output_events
Supports analog output events.
Definition: dnp3.hpp:1954
constexpr uint8_t all_attributes_request
Non-specific all attributes request.
Definition: dnp3.hpp:2020
constexpr uint8_t list_of_variations
List of attribute variations.
Definition: dnp3.hpp:2022
constexpr uint8_t user_assigned_system_name
User-assigned system name.
Definition: dnp3.hpp:1932
constexpr uint8_t config_last_change_date
Time and date that the outstation's configuration was last modified.
Definition: dnp3.hpp:1914
constexpr uint8_t num_security_stats_per_assoc
Number of security statistics per association.
Definition: dnp3.hpp:1936
constexpr uint8_t num_master_defined_data_set_proto
Number of master defined data-set prototypes.
Definition: dnp3.hpp:1940
constexpr uint8_t product_name_and_model
Device manufacturer's product name and model.
Definition: dnp3.hpp:2016
constexpr uint8_t supports_frozen_counters
Supports frozen counters.
Definition: dnp3.hpp:1968
constexpr uint8_t max_binary_output_index
Maximum binary output index.
Definition: dnp3.hpp:1962
constexpr uint8_t config_digest
Digest (aka fingerprint) of the configuration using a CRC, HASH, MAC, or public key signature.
Definition: dnp3.hpp:1916
constexpr uint8_t supports_analog_input_events
Supports analog input events.
Definition: dnp3.hpp:1978
constexpr uint8_t user_assigned_device_name
User assigned device name.
Definition: dnp3.hpp:2010
constexpr uint8_t device_manufacturer_hardware_version
Device manufacturer hardware version.
Definition: dnp3.hpp:2002
constexpr uint8_t supports_binary_output_events
Supports binary output events.
Definition: dnp3.hpp:1960
constexpr uint8_t max_counter_index
Maximum counter point index.
Definition: dnp3.hpp:1972
constexpr uint8_t max_rx_fragment_size
Maximum receive fragment size.
Definition: dnp3.hpp:1998
constexpr uint8_t local_timing_accuracy
Local timing accuracy (microseconds)
Definition: dnp3.hpp:1950
constexpr uint8_t device_location_latitude
Latitude of the device from the equator (90.0 to -90.0 deg)
Definition: dnp3.hpp:1926
constexpr uint8_t config_digest_algorithm
Configuration digest algorithm.
Definition: dnp3.hpp:1918
constexpr uint8_t max_tx_fragment_size
Maximum transmit fragment size.
Definition: dnp3.hpp:1996
constexpr uint8_t num_outstation_defined_data_set_proto
Number of outstation defined data-set prototypes.
Definition: dnp3.hpp:1942
constexpr uint8_t user_assigned_secondary_operator_name
User-assigned secondary operator name.
Definition: dnp3.hpp:1928
constexpr uint8_t master_resource_id
Master resource id (mRID)
Definition: dnp3.hpp:1920
constexpr uint8_t num_double_bit_binary_input
Number of double-bit binary input points.
Definition: dnp3.hpp:1988
constexpr uint8_t max_binary_output_per_request
Maximum number of binary outputs per request.
Definition: dnp3.hpp:1948
constexpr uint8_t device_location_altitude
Altitude of the device.
Definition: dnp3.hpp:1922
constexpr uint8_t user_assigned_location
User assigned location name.
Definition: dnp3.hpp:2006
constexpr uint8_t secure_auth_version
Secure authentication version.
Definition: dnp3.hpp:1934
constexpr uint8_t restart
Object value has not been updated since device restart.
Definition: dnp3.hpp:203
constexpr uint8_t discontinuity
Reported counter value cannot be compared against a prior value to obtain the correct count differenc...
Definition: dnp3.hpp:215
constexpr uint8_t chatter_filter
Object value is changing state rapidly (device dependent meaning)
Definition: dnp3.hpp:211
constexpr uint8_t reference_err
Object's value might not have the expected level of accuracy.
Definition: dnp3.hpp:217
constexpr uint8_t over_range
Object's true exceeds the measurement range of the reported variation.
Definition: dnp3.hpp:213
constexpr uint8_t remote_forced
Object value is overridden in a downstream reporting device.
Definition: dnp3.hpp:207
constexpr uint8_t local_forced
Object value is overridden by the device reporting this flag.
Definition: dnp3.hpp:209
constexpr uint8_t online
Object value is 'good' / 'valid' / 'nominal'.
Definition: dnp3.hpp:201
constexpr uint8_t comm_lost
Object value represents the last value available before a communication failure occurred....
Definition: dnp3.hpp:205
std::unique_ptr< ConnectionStateListener > connection_state_listener(const T &lambda)
construct an implementation of ConnectionStateListener based on a lambda expression
Definition: dnp3.hpp:8167
std::unique_ptr< Logger > logger(const T &lambda)
construct an implementation of Logger based on a lambda expression
Definition: dnp3.hpp:3514
std::unique_ptr< PortStateListener > port_state_listener(const T &lambda)
construct an implementation of PortStateListener based on a lambda expression
Definition: dnp3.hpp:2401
std::unique_ptr< ClientStateListener > client_state_listener(const T &lambda)
construct an implementation of ClientStateListener based on a lambda expression
Definition: dnp3.hpp:2473
DatabaseTransactionLambda< T > database_transaction(const T &lambda)
construct an implementation of DatabaseTransaction based on a lambda expression
Definition: dnp3.hpp:7008
std::unique_ptr< AssociationHandler > association_handler(const T &lambda)
construct an implementation of AssociationHandler based on a lambda expression
Definition: dnp3.hpp:4449
main namespace for the dnp3 library
Definition: dnp3.hpp:31
AutoTimeSync
Automatic time synchronization configuration.
Definition: dnp3.hpp:4273
@ non_lan
Perform automatic time sync with Delay Measurement (0x17) function code.
@ direct_write_abs_time
Directly write absolute time (g50v1) without delay measurement. WARNING: This is a non-conformant wor...
@ lan
Perform automatic time sync with Record Current Time (0x18) function code.
EventBinaryOutputStatusVariation
Event binary output status variation.
Definition: dnp3.hpp:6190
ResponseFunction
Type of response.
Definition: dnp3.hpp:3538
FileType
File type enumeration used in Group 70 objects.
Definition: dnp3.hpp:3074
@ directory
File is a directory.
@ other
Some other unspecified value.
@ simple
File is a simple file type suitable for sequential file transfer.
TimeAttr
Enumeration of all the known DNP3 Time attributes.
Definition: dnp3.hpp:2187
@ config_last_change_date
Variation 199 - Time and date that the outstation's configuration was last modified.
@ config_build_date
Variation 198 - Time and date that the outstation's current configuration was built defined.
PointType
A type of static point whose events an ASSIGN_CLASS request assigns to a class.
Definition: dnp3.hpp:7373
@ octet_string
Octet strings (group 110), whose events are group 111.
TimeFormat
Describes if and how the time will be formatted in log messages.
Definition: dnp3.hpp:3416
@ system
Format the time in a human readable format e.g. 'Jun 25 14:27:12.955'.
@ rfc_3339
Format the time using RFC 3339.
CommandMode
Command operation mode.
Definition: dnp3.hpp:4877
@ select_before_operate
Perform a Select and Operate (0x03 then 0x04)
StringAttr
Enumeration of all the default string attributes.
Definition: dnp3.hpp:2039
@ user_assigned_system_name
Variation 208 - User-assigned system name.
@ user_assigned_location
Variation 245 - User assigned location name.
@ device_serial_number
Variation 248 - Device serial number.
@ device_manufacturer_software_version
Variation 242 - Device manufacturer software version.
@ user_assigned_device_name
Variation 247 - User assigned device name.
@ device_subset_and_conformance
Variation 249 - DNP3 subset and conformance.
@ user_assigned_secondary_operator_name
Variation 206 - User-assigned secondary operator name.
@ device_manufacturers_name
Variation 252 - Device manufacturer's name.
@ master_resource_id
Variation 202 - Master resource id (mRID)
@ device_manufacturer_hardware_version
Variation 243 - Device manufacturer hardware version.
@ config_id
Variation 196 - Configuration id.
@ config_version
Variation 197 - Configuration version.
@ config_digest_algorithm
Variation 201 - Configuration digest algorithm.
@ product_name_and_model
Variation 250 - Device manufacturer's product name and model.
@ user_assigned_owner_name
Variation 244 - User-assigned owner name.
@ user_assigned_id
Variation 246 - User assigned ID code/number.
@ user_specific_attributes
Variation 211 - Identification of user-specific attributes.
@ user_assigned_primary_operator_name
Variation 207 - User-assigned primary operator name.
DataBits
Number of bits per character.
Definition: dnp3.hpp:2883
@ eight
8 bits per character
@ five
5 bits per character
@ seven
7 bits per character
@ six
6 bits per character
ReadType
Describes the source of a read event.
Definition: dnp3.hpp:3730
@ single_poll
Single poll requested by the user.
@ startup_integrity
Startup integrity poll.
@ unsolicited
Unsolicited message.
@ periodic_poll
Periodic poll configured by the user.
EventMode
Controls how events are processed when updating values in the database.
Definition: dnp3.hpp:5969
@ detect
Detect events in a type dependent fashion.
@ suppress
Never produce an event regardless of change.
@ force
Produce an event whether the value has changed or not.
EventAnalogOutputStatusVariation
Event analog output status variation.
Definition: dnp3.hpp:6490
BoolAttr
Enumeration of all the known boolean attributes.
Definition: dnp3.hpp:2158
@ supports_analog_input_events
Variation 231 - Supports analog input events.
@ supports_frozen_counters
Variation 226 - Supports frozen counters.
@ supports_binary_input_events
Variation 237 - Support binary input events.
@ supports_analog_output_events
Variation 219 - Supports analog output events.
@ supports_double_bit_binary_input_events
Variation 234 - Supports double-bit binary input events.
@ supports_counter_events
Variation 227 - Supports counter events.
@ supports_binary_output_events
Variation 222 - Supports binary output events.
@ supports_frozen_analog_inputs
Variation 230 - Supports frozen analog input events.
@ supports_frozen_counter_events
Variation 225 - Supports frozen counter events.
LogLevel
Log level.
Definition: dnp3.hpp:3382
@ debug
Debugging log level.
@ info
Information log level.
AttrDefError
Errors that can occur when defining attributes.
Definition: dnp3.hpp:6559
@ reserved_variation
Variation is reserved and cannot be defined.
@ bad_value
The value cannot be encoded, e.g. a string longer than 255 bytes.
@ already_defined
Attribute has already been defined.
@ bad_type
The type does not match the required type in set 0.
@ not_writable
This attribute cannot be configured as writable.
FlowControl
Flow control modes.
Definition: dnp3.hpp:2900
@ hardware
Flow control using RTS/CTS signals.
@ software
Flow control using XON/XOFF bytes.
EventAnalogInputVariation
Event analog input variation.
Definition: dnp3.hpp:6404
WriteTimeResult
Write time result used by OutstationApplication::write_absolute_time()
Definition: dnp3.hpp:7398
@ parameter_error
The request parameters are nonsensical.
StaticBinaryOutputStatusVariation
Static binary output status variation.
Definition: dnp3.hpp:6177
TransportDecodeLevel
Controls how transmitted and received transport segments are decoded at the INFO log level.
Definition: dnp3.hpp:238
@ payload
Decode the header and the raw payload as hexadecimal.
FloatAttr
Enumeration of all known float attributes.
Definition: dnp3.hpp:2226
@ device_location_longitude
Variation 204 - Longitude of the device from reference meridian (-180.0 to 180.0 deg)
@ device_location_latitude
Variation 205 - Latitude of the device from the equator (90.0 to -90.0 deg)
@ device_location_altitude
Variation 203 - Altitude of the device.
AnalogCommandType
Describes the encoding of the commanded value.
Definition: dnp3.hpp:1347
@ f32
single-precision floating point
@ f64
double-precision floating point
TimeSyncError
Possible errors that can occur during a time synchronization procedure.
Definition: dnp3.hpp:4970
@ overflow
Overflow in calculation.
@ system_time_not_unix
The system time cannot be converted to a Unix timestamp.
@ bad_outstation_time_delay
Outstation time delay exceeded the response delay.
@ clock_rollback
Detected a clock rollback.
@ still_needs_time
Outstation did not clear the NEED_TIME IIN bit.
TaskType
Task type used in AssociationInformation.
Definition: dnp3.hpp:4457
@ file_read
Read a file or directory from the outstation.
@ command
Command request.
@ user_read
User-defined read request.
@ auto_event_scan
Automatic event scan caused by the event class IIN bits (IIN1.1 - IIN1.3) indicating that events are ...
@ time_sync
Time synchronisation task.
@ file_close
Close a file on the outstation.
@ generic_empty_response
Generic request that expects an empty response.
@ write_dead_bands
Write analog input dead-bands.
@ restart
Cold or warm restart task.
@ clear_restart_bit
Clear RESTART IIN bit.
@ file_write_block
Write a file block to the outstation.
@ file_open
Open a file on the outstation.
@ file_auth
Send username and password and get back an auth key from the outstation.
Variation
Group/Variation.
Definition: dnp3.hpp:2481
@ group41_var4
Analog Output - Double-precision floating point.
@ group42_var1
Analog Output Event - 32-bit without time.
@ group23_var2
Frozen Counter Event - 16-bit without time.
@ group31_var7
Frozen Analog Input - Single-precision floating point with flags.
@ group13_var2
Binary Output Command Event - With time.
@ group40_var3
Analog Output Status - Single-precision floating point with flags.
@ group60_var4
Class Data - Class 3.
@ group21_var9
Frozen Counter - 32-bit without flags.
@ group33_var8
Frozen Analog Input Event - Double-precision floating point with time of freeze.
@ group31_var0
Frozen Analog Input - Any variation.
@ group31_var5
Frozen Analog Input - 32-bit without flags.
@ group21_var2
Frozen Counter - 16-bit with flags.
@ group13_var1
Binary Output Command Event - Without time.
@ group40_var1
Analog Output Status - 32-bit with flags.
@ group30_var3
Analog Input - 32-bit without flags.
@ group34_var1
Analog Input Reporting Deadband - 16-bit.
@ group11_var1
Binary Output Event - Without time.
@ group70_var2
File Control - Authentication.
@ group42_var5
Analog Output Event - Single-precision floating point without time.
@ group22_var2
Counter Event - 16-bit without time.
@ group102_var1
Unsigned Integer - 8-bit.
@ group12_var1
Binary Output Command - Control relay output block.
@ group42_var3
Analog Output Event - 32-bit with time.
@ group33_var0
Frozen Analog Input Event - Any variation.
@ group34_var2
Analog Input Reporting Deadband - 32-bit.
@ group70_var7
File Control - File descriptor.
@ group11_var2
Binary Output Event - With time.
@ group22_var5
Counter Event - 32-bit with time.
@ group42_var8
Analog Output Event - Double-precision floating point with time.
@ group30_var6
Analog Input - Double-precision floating point with flags.
@ group50_var1
Time and Date - Absolute time.
@ group60_var2
Class Data - Class 1.
@ group20_var2
Counter - 16-bit with flags.
@ group70_var6
File Control - File transport status.
@ group2_var0
Binary Input Event - Any variation.
@ group21_var5
Frozen Counter - 32-bit with flags and time.
@ group70_var8
File Control - File specification string.
@ group0
Device Attributes - Specific attribute (variations 1 to 253 and 255). Only reported in HeaderInfo: it...
@ group2_var3
Binary Input Event - With relative time.
@ group42_var6
Analog Output Event - Double-precision floating point without time.
@ group32_var0
Analog Input Event - Any variation.
@ group33_var7
Frozen Analog Input Event - Single-precision floating point with time of freeze.
@ group22_var6
Counter Event - 16-bit with time.
@ group20_var1
Counter - 32-bit with flags.
@ group33_var4
Frozen Analog Input Event - 16-bit with time of freeze.
@ group43_var7
Analog Output Command Event - Single-precision floating point with time.
@ group31_var1
Frozen Analog Input - 32-bit with flags.
@ group32_var1
Analog Input Event - 32-bit without time.
@ group40_var4
Analog Output Status - Double-precision floating point with flags.
@ group1_var2
Binary Input - With flags.
@ group34_var3
Analog Input Reporting Deadband - Single-precision floating point.
@ group23_var5
Frozen Counter Event - 32-bit with time.
@ group0_var254
Device Attributes - All attributes request.
@ group60_var1
Class Data - Class 0.
@ group42_var4
Analog Output Event - 16-bit with time.
@ group32_var4
Analog Input Event - 16-bit with time.
@ group3_var1
Double-bit Binary Input - Packed format.
@ group31_var3
Frozen Analog Input - 32-bit with flags and time of freeze.
@ group42_var7
Analog Output Event - Single-precision floating point with time.
@ group110
Octet String - Sized by variation.
@ group10_var1
Binary Output - Packed format.
@ group43_var3
Analog Output Command Event - 32-bit with time.
@ group33_var6
Frozen Analog Input Event - Double-precision floating point without time.
@ group10_var2
Binary Output - With flags.
@ group4_var1
Double-bit Binary Input Event - Without time.
@ group31_var4
Frozen Analog Input - 16-bit with flags and time of freeze.
@ group30_var0
Analog Input - Any variation.
@ group21_var0
Frozen Counter - Any variation.
@ group70_var5
File Control - File transport.
@ group33_var5
Frozen Analog Input Event - Single-precision floating point without time.
@ group51_var2
Time and Date CTO - Unsynchronized absolute time.
@ group40_var0
Analog Output Status - Any variation.
@ group33_var2
Frozen Analog Input Event - 16-bit without time.
@ group43_var4
Analog Output Command Event - 16-bit with time.
@ group50_var4
Time and Date - Indexed time and long interval.
@ group52_var1
Time Delay - Coarse (seconds)
@ group51_var1
Time and Date CTO - Synchronized absolute time.
@ group52_var2
Time Delay - Fine (milliseconds)
@ group50_var2
Time and Date - Absolute time and interval.
@ group34_var0
Analog Input Reporting Deadband - Any variation.
@ group20_var0
Counter - Any variation.
@ group32_var7
Analog Input Event - Single-precision floating point with time.
@ group3_var0
Double-bit Binary Input - Any variation.
@ group31_var2
Frozen Analog Input - 16-bit with flags.
@ group30_var1
Analog Input - 32-bit with flags.
@ group32_var8
Analog Input Event - Double-precision floating point with time.
@ group32_var6
Analog Input Event - Double-precision floating point without time.
@ group22_var1
Counter Event - 32-bit without time.
@ group70_var3
File Control - File command.
@ group42_var0
Analog Output Event - Any variation.
@ group33_var3
Frozen Analog Input Event - 32-bit with time of freeze.
@ group23_var0
Frozen Counter Event - Any variation.
@ group31_var6
Frozen Analog Input - 16-bit without flags.
@ group50_var3
Time and Date - Last recorded time.
@ group22_var0
Counter Event - Any variation.
@ group30_var2
Analog Input - 16-bit with flags.
@ group20_var5
Counter - 32-bit without flags.
@ group31_var8
Frozen Analog Input - Double-precision floating point with flags.
@ group3_var2
Double-bit Binary Input - With flags.
@ group32_var3
Analog Input Event - 32-bit with time.
@ group41_var3
Analog Output - Single-precision floating point.
@ group10_var0
Binary Output - Any variation.
@ group43_var5
Analog Output Command Event - Single-precision floating point without time.
@ group42_var2
Analog Output Event - 16-bit without time.
@ group33_var1
Frozen Analog Input Event - 32-bit without time.
@ group40_var2
Analog Output Status - 16-bit with flags.
@ group1_var0
Binary Input - Any variation.
@ group60_var3
Class Data - Class 2.
@ group102_var0
Unsigned Integer - Any variation.
@ group32_var5
Analog Input Event - Single-precision floating point without time.
@ group21_var10
Frozen Counter - 16-bit without flags.
@ group2_var1
Binary Input Event - Without time.
@ group70_var4
File Control - File command status.
@ group43_var1
Analog Output Command Event - 32-bit without time.
@ group41_var2
Analog Output - 16-bit.
@ group43_var6
Analog Output Command Event - Double-precision floating point without time.
@ group30_var4
Analog Input - 16-bit without flags.
@ group41_var1
Analog Output - 32-bit.
@ group20_var6
Counter - 16-bit without flags.
@ group43_var8
Analog Output Command Event - Double-precision floating point with time.
@ group43_var2
Analog Output Command Event - 16-bit without time.
@ group32_var2
Analog Input Event - 16-bit without time.
@ group1_var1
Binary Input - Packed format.
@ group30_var5
Analog Input - Single-precision floating point with flags.
@ group21_var6
Frozen Counter - 16-bit with flags and time.
@ group80_var1
Internal Indications - Packed format.
@ group21_var1
Frozen Counter - 32-bit with flags.
@ group4_var2
Double-bit Binary Input Event - With absolute time.
@ group11_var0
Binary Output Event - Any variation.
@ group23_var1
Frozen Counter Event - 32-bit without time.
@ group111
Octet String Event - Sized by variation.
@ group2_var2
Binary Input Event - With absolute time.
@ group23_var6
Frozen Counter Event - 16-bit with time.
@ group4_var3
Double-bit Binary Input Event - With relative time.
@ group4_var0
Double-bit Binary Input Event - Any variation.
OpType
Operation Type field, used in conjunction with TripCloseCode to specify a control operation.
Definition: dnp3.hpp:455
BitStringAttr
Enumeration of all known bit-string attributes.
Definition: dnp3.hpp:2215
EventCounterVariation
Event counter variation.
Definition: dnp3.hpp:6252
OperateType
Enumeration describing how the master requested the control operation.
Definition: dnp3.hpp:7971
@ direct_operate_no_ack
operate the control via a DirectOperateNoAck request
EventDoubleBitBinaryInputVariation
Event double-bit binary input variation.
Definition: dnp3.hpp:6128
UdpSocketMode
Describes how the UDP socket reads and writes datagrams from remote endpoint(s)
Definition: dnp3.hpp:3350
@ one_to_many
The UDP endpoint will accept packets any remote endpoint.
@ one_to_one
The UDP endpoint will only communicate with the specified remote endpoint.
StaticAnalogOutputStatusVariation
Static analog output status variation.
Definition: dnp3.hpp:6473
CommandStatus
Enumeration received from an outstation in response to command request.
Definition: dnp3.hpp:148
@ format_error
bad control code or timing values (value == 3)
@ automation_inhibit
command not accepted because it was prevented or inhibited by a local automation process,...
@ success
command was accepted, initiated, or queued (value == 0)
@ too_many_ops
the command has been done too often and has been throttled (value == 8)
@ no_select
command requires being selected before operate, configuration issue (value == 2)
@ already_active
command is all ready in progress or its all ready in that mode (value == 5)
@ out_of_range
command not accepted because the value is outside the acceptable range permitted for this point (valu...
@ non_participating
(deprecated) indicates the outstation shall not issue or perform the control operation (value == 126)
@ blocked
command not accepted because the requested function is specifically blocked at the outstation (value ...
@ already_complete
command not accepted because the outstation has already completed the requested operation (value == 1...
@ not_authorized
the command was rejected because the device denied it or an RTU intercepted it (value == 9)
@ timeout
command timed out before completing (value == 1)
@ not_supported
command is not implemented (value == 4)
@ unknown
captures any value not defined in the enumeration
@ canceled
command not accepted because the operation was cancelled (value == 16)
@ hardware_error
something is stopping the command, often a local/remote interlock (value == 6)
@ blocked_other_master
command not accepted because another master is communicating with the outstation and has exclusive ri...
@ processing_limited
command not accepted because the device cannot process any more activities than are presently in prog...
@ local
the function governed by the control is in local only control (value == 7)
@ downstream_local
command not accepted because the outstation is forwarding the request to another downstream device wh...
@ downstream_fail
command not accepted because the outstation is forwarding the request to another downstream device wh...
FileMode
Different modes in which files may be opened.
Definition: dnp3.hpp:3335
@ append
Specifies that the file is to be opened for writing, appending to the end of the file.
TimeQuality
Timestamp quality.
Definition: dnp3.hpp:601
@ invalid_time
Timestamp is not valid, ignore the value and use a local timestamp.
@ synchronized_time
The timestamp is UTC synchronized at the remote device.
@ unsynchronized_time
The device indicates the timestamp may be not be synchronized.
constexpr uint64_t dnp3_version_major
major version number
Definition: dnp3.hpp:34
StaticDoubleBitBinaryInputVariation
Static double-bit binary input variation.
Definition: dnp3.hpp:6115
UpdateResult
Defines what occurred during an update operation and which fields of UpdateInfo are valid.
Definition: dnp3.hpp:5927
@ no_event
The point exists, but the update did not create an event.
@ no_point
No point exists for this type and index.
@ created
An event was created with the specified id.
StaticAnalogInputVariation
Static analog input variation.
Definition: dnp3.hpp:6383
LinkReadMode
Controls how the link-layer parser treats frames that span multiple calls to read of the physical lay...
Definition: dnp3.hpp:3367
@ datagram
Reading datagrams (UDP) where link-layer frames MAY NOT span separate calls to read.
@ stream
Reading from a stream (TCP, serial, etc.) where link-layer frames MAY span separate calls to read.
FunctionCode
Application layer function code.
Definition: dnp3.hpp:2999
@ cold_restart
Outstation shall perform a complete reset of all hardware and software in the device (value == 13)
@ operate
Outstation shall activate the output points selected (or armed) by a previous select function code co...
@ get_file_info
Outstation shall retrieve information about a file (value == 28)
@ stop_application
Outstation shall stop running the applications specified by the objects in the request (value == 18)
@ immediate_freeze
Outstation shall copy the point data values specified by the objects in the request to a separate fre...
@ initialize_data
Obsolete-Do not use for new designs (value == 15)
@ delay_measure
Outstation shall report the time it takes to process and initiate the transmission of its response (v...
@ abort_file
Outstation shall abort a file transfer operation (value == 30)
@ disable_unsolicited
Prevents outstation from initiating unsolicited responses from points specified by the objects in the...
@ immediate_freeze_no_response
Same as ImmediateFreeze but outstation shall not send a response (value == 8)
@ unsolicited_response
Master shall interpret this fragment as an unsolicited response that was not prompted by an explicit ...
@ enable_unsolicited
Enables outstation to initiate unsolicited responses from points specified by the objects in the requ...
@ close_file
Outstation shall close a file (value == 26)
@ freeze_clear_no_response
Same as FreezeClear but outstation shall not send a response (value == 10)
@ save_configuration
This code is deprecated-Do not use for new designs (value == 19)
@ record_current_time
Outstation shall save the time when the last octet of this message is received (value == 24)
@ assign_class
Outstation shall assign the events generated by the points specified by the objects in the request to...
@ select
Outstation shall select (or arm) the output points specified by the objects in the request in prepara...
@ delete_file
Outstation shall delete a file (value == 27)
@ start_application
Outstation shall start running the applications specified by the objects in the request (value == 17)
@ freeze_clear
Outstation shall copy the point data values specified by the objects in the request into a separate f...
@ freeze_at_time_no_response
Same as FreezeAtTime but outstation shall not send a response (value == 12)
@ direct_operate_no_response
Same as DirectOperate but outstation shall not send a response (value == 6)
@ confirm
Master sends this to an outstation to confirm the receipt of an Application Layer fragment (value == ...
@ response
Master shall interpret this fragment as an Application Layer response to an ApplicationLayer request ...
@ initialize_application
Outstation shall place the applications specified by the objects in the request into the ready to run...
@ direct_operate
Outstation shall immediately actuate the output points specified by the objects in the request (value...
@ authenticate_file
Outstation shall return a file authentication key (value == 29)
@ read
Outstation shall return the data specified by the objects in the request (value == 1)
@ write
Outstation shall store the data specified by the objects in the request (value == 2)
@ open_file
Outstation shall open a file (value == 25)
@ freeze_at_time
Outstation shall copy the point data values specified by the objects in the request to a separate fre...
@ warm_restart
Outstation shall reset only portions of the device (value == 14)
Nothing
A single value enum which is used as a placeholder for futures that don't return a value.
Definition: dnp3.hpp:2331
StaticBinaryInputVariation
Static binary input variation.
Definition: dnp3.hpp:6053
RestartDelayType
Type of restart delay value. Used by RestartDelay.
Definition: dnp3.hpp:7304
@ seconds
Value is in seconds (corresponds to g51v1)
@ milli_seconds
Value is in milliseconds (corresponds to g51v2)
LinkDecodeLevel
Controls how transmitted and received link frames are decoded at the INFO log level.
Definition: dnp3.hpp:253
CertificateMode
Determines how the certificate(s) presented by the peer are validated.
Definition: dnp3.hpp:1825
@ authority_based
Validates the peer certificate against one or more configured trust anchors.
@ self_signed
Validates that the peer presents a single certificate which is a byte-for-byte match against the conf...
VariationListAttr
Enumeration of all the variation list attributes.
Definition: dnp3.hpp:2026
@ list_of_variations
Variation 255 - List of attribute variations.
UintAttr
Enumeration of all the default uint attributes.
Definition: dnp3.hpp:2086
@ max_tx_fragment_size
Variation 240 - Maximum transmit fragment size.
@ num_counter
Variation 229 - Number of counter points.
@ max_double_bit_binary_input_index
Variation 235 - Maximum double-bit binary input point index.
@ num_binary_input
Variation 239 - Number of binary input points.
@ num_outstation_defined_data_set_proto
Variation 213 - Number of outstation defined data-set prototypes.
@ max_analog_output_index
Variation 220 - Maximum analog output index.
@ num_analog_outputs
Variation 221 - Number of analog outputs.
@ num_master_defined_data_sets
Variation 214 - Number of master defined data-sets.
@ duration_of_time_accuracy
Variation 218 - Duration of time accuracy (seconds)
@ local_timing_accuracy
Variation 217 - Local timing accuracy (microseconds)
@ num_analog_input
Variation 233 - Number of analog input points.
@ max_counter_index
Variation 228 - Maximum counter point index.
@ max_analog_input_index
Variation 232 - Maximum analog input point index.
@ secure_auth_version
Variation 209 - Secure authentication version.
@ num_master_defined_data_set_proto
Variation 212 - Number of master defined data-set prototypes.
@ num_double_bit_binary_input
Variation 236 - Number of double-bit binary input points.
@ max_rx_fragment_size
Variation 241 - Maximum receive fragment size.
@ num_outstation_defined_data_sets
Variation 215 - Number of outstation defined data-sets.
@ num_binary_outputs
Variation 224 - Number of binary outputs.
@ max_binary_output_index
Variation 223 - Maximum binary output index.
@ max_binary_output_per_request
Variation 216 - Maximum number of binary outputs per request.
@ num_security_stats_per_assoc
Variation 210 - Number of security statistics per association.
@ max_binary_input_index
Variation 238 - Maximum binary input point index.
CommandError
Result of a command.
Definition: dnp3.hpp:4890
@ header_mismatch
Number of headers or objects in the response didn't match the number in the request.
EventBinaryInputVariation
Event binary input variation.
Definition: dnp3.hpp:6066
const char * to_string(ParamError value)
convert an instance of enum ParamError into a C-style string
DoubleBit
Double-bit binary input value.
Definition: dnp3.hpp:676
@ determined_off
Determined to be OFF.
@ intermediate
Transition between conditions.
@ indeterminate
Abnormal or custom condition.
@ determined_on
Determined to be ON.
StaticFrozenCounterVariation
Static frozen counter variation.
Definition: dnp3.hpp:6307
StopBits
Number of stop bits.
Definition: dnp3.hpp:2930
ReadError
Errors that can occur during a read operation.
Definition: dnp3.hpp:4723
FreezeType
Freeze operation type.
Definition: dnp3.hpp:7413
@ freeze_and_clear
Copy the current value of a counter to the associated point and clear the current value to 0.
constexpr uint64_t dnp3_version_patch
patch version number
Definition: dnp3.hpp:38
AppDecodeLevel
Controls how transmitted and received application-layer fragments are decoded at the INFO log level.
Definition: dnp3.hpp:221
@ header
Decode the header-only.
@ object_values
Decode the header, the object headers, and the object values.
@ object_headers
Decode the header and the object headers.
EventFrozenCounterVariation
Event frozen counter variation.
Definition: dnp3.hpp:6328
FreezeResult
Result of a freeze operation.
Definition: dnp3.hpp:7426
@ not_supported
The demanded freeze operation is not supported by this device (translated to IIN2....
OctetStringAttr
Enumeration of all known octet-string attributes.
Definition: dnp3.hpp:2202
@ config_digest
Variation 200 - Digest (aka fingerprint) of the configuration using a CRC, HASH, MAC,...
constexpr uint64_t dnp3_version_minor
minor version number
Definition: dnp3.hpp:36
FileError
Errors that can occur during file transfer.
Definition: dnp3.hpp:3187
@ no_connection
no connection
@ bad_encoding
request data could not be encoded
@ abort_by_user
File transfer aborted by user.
@ response_timeout
timeout occurred before receiving a response
@ unsupported_response
response contained objects that the library doesn't support, which may be valid DNP3 (e....
@ no_permission
Outstation indicated no permission to access file.
@ bad_status
Outstation returned an error status code.
@ too_many_requests
too many user requests queued
@ max_length_exceeded
Exceeded the maximum length specified by the user.
@ bad_response
response was malformed or contained unexpected object headers
@ bad_block_num
Received an unexpected block number.
@ unsupported_or_bad_response
response contained objects that are either malformed or valid but not supported by the library (e....
@ wrong_handle
File handle returned by the outstation did not match the request.
@ iin_error
outstation returned an IIN.2 error bit
@ write_error
insufficient buffer space to serialize the request
@ association_removed
association was removed mid-task
QualifierCode
Qualifier code used in the response.
Definition: dnp3.hpp:3678
@ range8
8-bit start stop (0x00)
@ all_objects
All objects (0x06)
@ free_format_16
16-bit free format (0x5B)
@ range16
16-bit start stop (0x01)
@ count_and_prefix_16
16-bit count and prefix (0x28)
@ count_and_prefix_8
8-bit count and prefix (0x17)
@ count8
8-bit count (0x07)
@ count16
16-bit count (0x08)
LinkErrorMode
Controls how errors in parsed link-layer frames are handled. This behavior is configurable for physic...
Definition: dnp3.hpp:2986
@ discard
Framing errors are discarded. The link-layer parser is reset on any error, and the parser begins scan...
EmptyResponseError
Errors that may occur when performing a request that expects a response with zero object headers.
Definition: dnp3.hpp:4118
@ rejected_by_iin2
IIN2 indicates request was not completely successful.
constexpr char const * dnp3_version_string
version number as the string major.minor.patch
Definition: dnp3.hpp:40
TaskError
Task error used in AssociationInformation.
Definition: dnp3.hpp:4506
@ system_time_not_available
the master had no system time to synchronize the outstation with, because AssociationHandler::get_cur...
RestartError
Errors that can occur during a cold/warm restart operation.
Definition: dnp3.hpp:5043
ParamError
Error type used throughout the library.
Definition: dnp3.hpp:78
@ wrong_channel_type
This operation cannot be performed on this channel type.
@ invalid_local_certificate
Invalid local certificate file.
@ invalid_timeout
The supplied timeout value is too small or too large.
@ no_support
Native library was compiled without support for this feature.
@ server_bind_error
Server failed to bind to the specified port.
@ ok
Success, i.e. no error occurred.
@ consumed
This object is consumed and cannot be used again.
@ server_already_started
Server already started.
@ invalid_dns_name
Invalid DNS name.
@ other_tls_error
Other TLS error.
@ master_already_shutdown
Master was already shutdown.
@ association_does_not_exist
The specified association does not exist.
@ null_parameter
Null parameter.
@ invalid_peer_certificate
Invalid peer certificate file.
@ string_not_utf8
Provided string argument is not UTF-8.
@ invalid_private_key
Invalid private key file.
@ runtime_cannot_block_within_async
Runtime cannot execute blocking call within asynchronous context.
@ association_duplicate_address
Duplicate association address.
@ runtime_creation_failure
Failed to create Tokio runtime.
@ point_does_not_exist
Point does not exist.
@ invalid_socket_address
Invalid socket address.
@ invalid_dnp3_address
Invalid link-layer DNP3 address.
@ runtime_destroyed
Runtime has already been disposed.
@ address_filter_conflict
Conflict in the address filter specification.
@ logging_already_configured
Logging can only be configured once.
@ invalid_buffer_size
Invalid buffer size.
UpdateFlagsType
Point type on which to update the flags.
Definition: dnp3.hpp:6030
@ binary_input
Binary input.
@ binary_output_status
Binary output status.
@ analog_input
Analog input.
@ double_bit_binary_input
Doubl-bit binary input.
@ frozen_counter
Frozen counter.
@ analog_output_status
Analog output status.
EventClass
Event class.
Definition: dnp3.hpp:2806
@ none
Does not generate events.
TimeSyncMode
Time synchronization mode.
Definition: dnp3.hpp:4955
LinkStatusError
Errors that can occur during a manually initiated link status check. See MasterChannel::check_link_st...
Definition: dnp3.hpp:5288
@ unexpected_response
There was activity on the link, but it wasn't a LINK_STATUS.
StaticCounterVariation
Static counter variation.
Definition: dnp3.hpp:6235
BroadcastAction
Enumeration describing how the outstation processed a broadcast request.
Definition: dnp3.hpp:7881
@ bad_object_headers
Outstation was unable to parse the object headers and ignored the request.
@ ignored_by_configuration
Outstation ignored the broadcast message b/c it is disabled by configuration.
@ processed
Outstation processed the broadcast.
@ unsupported_function
Outstation ignore the broadcast message b/c the function is not supported via Broadcast.
ConnectionState
Outstation connection state for connection-oriented transports, e.g. TCP.
Definition: dnp3.hpp:8113
@ disconnected
Disconnected from the master.
TripCloseCode
Trip-Close Code field, used in conjunction with OpType to specify a control operation.
Definition: dnp3.hpp:438
MinTlsVersion
Minimum TLS version to allow.
Definition: dnp3.hpp:1810
@ v12
Allow TLS 1.2 and 1.3.
@ v13
Only allow TLS 1.3. A peer that does not support TLS 1.3 will fail to complete the handshake.
LogOutputFormat
Describes how each log event is formatted.
Definition: dnp3.hpp:3403
@ text
A simple text-based format.
@ json
Output formatted as JSON.
Parity
Parity checking modes.
Definition: dnp3.hpp:2915
@ odd
Parity bit sets odd number of 1 bits.
@ even
Parity bit sets even number of 1 bits.
PortState
State of the serial port.
Definition: dnp3.hpp:2342
@ disabled
Disabled until enabled.
@ wait
Waiting to perform an open retry.
@ shutdown
Task has been shut down.
ClientState
State of the client connection.
Definition: dnp3.hpp:2411
@ connected
Client is connected to the remote device.
@ wait_after_failed_connect
Failed to establish a connection, waiting before retrying.
@ connecting
Client is trying to establish a connection to the remote device.
@ wait_after_disconnect
Client was disconnected, waiting before retrying.
IntAttr
Enumeration of all the default integer attributes.
Definition: dnp3.hpp:2145
PhysDecodeLevel
Controls how data transmitted at the physical layer (TCP, serial, etc) is logged.
Definition: dnp3.hpp:268
@ length
Log only the length of data that is sent and received.
@ data
Log the length and the actual data that is sent and received.
Event transferred from master to outstation when the outstation receives a corresponding command.
Definition: dnp3.hpp:1370
double commanded_value
Commanded state of the binary output.
Definition: dnp3.hpp:1392
AnalogCommandType command_type
Describes how the value was encoded in the protocol.
Definition: dnp3.hpp:1394
AnalogOutputCommandEvent(uint16_t index, CommandStatus status, double commanded_value, AnalogCommandType command_type, const Timestamp &time)
Fully construct AnalogOutputCommandEvent specifying the value of each field.
CommandStatus status
Status from processing the command that triggered this event.
Definition: dnp3.hpp:1388
uint16_t index
Index of the command event.
Definition: dnp3.hpp:1386
Timestamp time
Associated timestamp.
Definition: dnp3.hpp:1396
Analog Output Status configuration.
Definition: dnp3.hpp:6525
AnalogOutputStatusConfig(StaticAnalogOutputStatusVariation static_variation, EventAnalogOutputStatusVariation event_variation, double deadband)
Fully construct AnalogOutputStatusConfig specifying the value of each field.
double deadband
Deadband value.
Definition: dnp3.hpp:6555
StaticAnalogOutputStatusVariation static_variation
Default static variation.
Definition: dnp3.hpp:6549
EventAnalogOutputStatusVariation event_variation
Default event variation.
Definition: dnp3.hpp:6551
AnalogOutputStatusConfig()
Initialize to defaults.
analog_output_status point
Definition: dnp3.hpp:1199
Timestamp time
Point timestamp.
Definition: dnp3.hpp:1220
AnalogOutputStatus(uint16_t index, double value, const Flags &flags, const Timestamp &time)
Fully construct AnalogOutputStatus specifying the value of each field.
uint16_t index
Point index.
Definition: dnp3.hpp:1214
Flags flags
Point flags.
Definition: dnp3.hpp:1218
double value
Point value.
Definition: dnp3.hpp:1216
Application-controlled IIN bits.
Definition: dnp3.hpp:7443
bool config_corrupt
IIN2.5 - Configuration corrupt.
Definition: dnp3.hpp:7476
bool need_time
IIN1.4 - Time synchronization is required.
Definition: dnp3.hpp:7470
bool local_control
IIN1.5 - Some output points are in local mode.
Definition: dnp3.hpp:7472
bool device_trouble
IIN1.6 - Device trouble.
Definition: dnp3.hpp:7474
ApplicationIin()
Initialize all fields in ApplicationIin to false.
Association configuration.
Definition: dnp3.hpp:4292
Classes startup_integrity_classes
Startup integrity classes to ask on master startup and when an outstation restart is detected.
Definition: dnp3.hpp:4340
std::chrono::steady_clock::duration keep_alive_timeout
Delay of inactivity before sending a REQUEST_LINK_STATUS to the outstation.
Definition: dnp3.hpp:4348
AssociationConfig(const EventClasses &disable_unsol_classes, const EventClasses &enable_unsol_classes, const Classes &startup_integrity_classes, const EventClasses &event_scan_on_events_available)
Initialize the configuration with the specified values.
AutoTimeSync auto_time_sync
Automatic time synchronization configuration.
Definition: dnp3.hpp:4342
EventClasses enable_unsol_classes
Classes to enable unsolicited responses at startup.
Definition: dnp3.hpp:4336
EventClasses event_scan_on_events_available
Classes to automatically send reads when the IIN bit is asserted.
Definition: dnp3.hpp:4352
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.hpp:4354
EventClasses disable_unsol_classes
Classes to disable unsolicited responses at startup.
Definition: dnp3.hpp:4334
bool auto_integrity_scan_on_buffer_overflow
Automatic integrity scan when an EVENT_BUFFER_OVERFLOW is detected.
Definition: dnp3.hpp:4350
RetryStrategy auto_tasks_retry_strategy
Automatic tasks retry strategy.
Definition: dnp3.hpp:4344
std::chrono::steady_clock::duration response_timeout
Timeout for receiving a response on this association.
Definition: dnp3.hpp:4332
Association identifier.
Definition: dnp3.hpp:4183
An attribute variation and properties pair returned in Group0Var255.
Definition: dnp3.hpp:2266
uint8_t variation
Variation of the attribute.
Definition: dnp3.hpp:2280
AttrProp properties
Properties of the attribute.
Definition: dnp3.hpp:2282
Attribute properties returned in Group0Var255.
Definition: dnp3.hpp:2247
bool is_writable
Indicate if the property can be used in a WRITE operation.
Definition: dnp3.hpp:2260
Event transferred from master to outstation when the outstation receives a corresponding command.
Definition: dnp3.hpp:1275
BinaryOutputCommandEvent(uint16_t index, CommandStatus status, bool commanded_state, const Timestamp &time)
Fully construct BinaryOutputCommandEvent specifying the value of each field.
bool commanded_state
Commanded state of the binary output.
Definition: dnp3.hpp:1296
uint16_t index
Index of the binary command event.
Definition: dnp3.hpp:1290
Timestamp time
Associated timestamp.
Definition: dnp3.hpp:1298
CommandStatus status
Status from processing the command that triggered this event.
Definition: dnp3.hpp:1292
Binary Output Status configuration.
Definition: dnp3.hpp:6207
EventBinaryOutputStatusVariation event_variation
Default event variation.
Definition: dnp3.hpp:6231
StaticBinaryOutputStatusVariation static_variation
Default static variation.
Definition: dnp3.hpp:6229
BinaryOutputStatusConfig()
Initialize to defaults.
BinaryOutputStatusConfig(StaticBinaryOutputStatusVariation static_variation, EventBinaryOutputStatusVariation event_variation)
Fully construct BinaryOutputStatusConfig specifying the value of each field.
binary_output_status point
Definition: dnp3.hpp:839
uint16_t index
Point index.
Definition: dnp3.hpp:854
BinaryOutputStatus(uint16_t index, bool value, const Flags &flags, const Timestamp &time)
Fully construct BinaryOutputStatus specifying the value of each field.
bool value
Point value.
Definition: dnp3.hpp:856
Flags flags
Point flags.
Definition: dnp3.hpp:858
Timestamp time
Point timestamp.
Definition: dnp3.hpp:860
Information about the state of buffer after a CONFIRM has been processed.
Definition: dnp3.hpp:7522
ClassCount classes
Remaining number of events in the buffer on a per-class basis.
Definition: dnp3.hpp:7536
TypeCount types
Remaining number of events in the buffer on a per-type basis.
Definition: dnp3.hpp:7538
A count of events on a per-class basis.
Definition: dnp3.hpp:2825
uint32_t num_class_1
Number of class 1 events.
Definition: dnp3.hpp:2840
uint32_t num_class_2
Number of class 2 events.
Definition: dnp3.hpp:2842
uint32_t num_class_3
Number of class 3 events.
Definition: dnp3.hpp:2844
Controls which types are reported during a Class 0 read.
Definition: dnp3.hpp:7104
ClassZeroConfig()
Initialize to default values.
bool analog_output_status
Include Analog Output Status in Class 0 reads.
Definition: dnp3.hpp:7151
bool binary
Include Binary Inputs in Class 0 reads.
Definition: dnp3.hpp:7139
bool frozen_counter
Include Frozen Counters in Class 0 reads.
Definition: dnp3.hpp:7147
bool analog
Include Analog Inputs in Class 0 reads.
Definition: dnp3.hpp:7149
bool octet_string
Include Octet Strings in Class 0 reads.
Definition: dnp3.hpp:7155
bool binary_output_status
Include Binary Output Status in Class 0 reads.
Definition: dnp3.hpp:7143
bool double_bit_binary
Include Double-Bit Binary Inputs in Class 0 reads.
Definition: dnp3.hpp:7141
bool counter
Include Counters in Class 0 reads.
Definition: dnp3.hpp:7145
Class 0, 1, 2 and 3 config.
Definition: dnp3.hpp:4224
bool class3
Class 3 events.
Definition: dnp3.hpp:4269
bool class0
Class 0 (static data)
Definition: dnp3.hpp:4263
static Classes all()
Initialize all classes to true.
static Classes none()
Initialize all classes to false.
Classes(bool class0, bool class1, bool class2, bool class3)
Fully construct Classes specifying the value of each field.
bool class1
Class 1 events.
Definition: dnp3.hpp:4265
bool class2
Class 2 events.
Definition: dnp3.hpp:4267
Timing parameters for connection attempts.
Definition: dnp3.hpp:1777
std::chrono::steady_clock::duration reconnect_delay
Delay before attempting a connection after a disconnect.
Definition: dnp3.hpp:1806
std::chrono::steady_clock::duration min_connect_delay
Minimum delay between two connection attempts, doubles up to the maximum delay.
Definition: dnp3.hpp:1802
std::chrono::steady_clock::duration max_connect_delay
Maximum delay between two connection attempts.
Definition: dnp3.hpp:1804
ConnectStrategy()
Initialize to default values.
CROB (Group12Var1) control code.
Definition: dnp3.hpp:476
bool clear
Support for this field is optional. When the clear bit is set, the device shall remove pending contro...
Definition: dnp3.hpp:534
OpType op_type
This field is used in conjunction with the ControlCode::tcc field to specify a control operation.
Definition: dnp3.hpp:538
ControlCode(TripCloseCode tcc, bool clear, OpType op_type)
Initialize a ControlCode instance.
bool queue
This field is obsolete and should always be 0.
Definition: dnp3.hpp:536
static ControlCode from_op_type(OpType op_type)
Initialize a ControlCode instance from a OpType
TripCloseCode tcc
This field is used in conjunction with ControlCode::op_type to specify a control operation.
Definition: dnp3.hpp:532
static ControlCode from_tcc_and_op_type(TripCloseCode tcc, OpType op_type)
Initialize a ControlCode instance from a TripCloseCode and a OpType.
APDU Control field.
Definition: dnp3.hpp:409
bool fir
First fragment in the message.
Definition: dnp3.hpp:426
bool uns
Unsolicited response.
Definition: dnp3.hpp:432
bool fin
Final fragment of the message.
Definition: dnp3.hpp:428
bool con
Requires confirmation.
Definition: dnp3.hpp:430
uint8_t seq
Sequence number.
Definition: dnp3.hpp:434
Counter configuration.
Definition: dnp3.hpp:6275
StaticCounterVariation static_variation
Default static variation.
Definition: dnp3.hpp:6299
uint32_t deadband
Deadband value.
Definition: dnp3.hpp:6303
CounterConfig(StaticCounterVariation static_variation, EventCounterVariation event_variation, uint32_t deadband)
Fully construct CounterConfig specifying the value of each field.
CounterConfig()
Initialize to defaults.
EventCounterVariation event_variation
Default event variation.
Definition: dnp3.hpp:6301
counter point
Definition: dnp3.hpp:911
uint16_t index
Point index.
Definition: dnp3.hpp:926
Timestamp time
Point timestamp.
Definition: dnp3.hpp:932
Flags flags
Point flags.
Definition: dnp3.hpp:930
uint32_t value
Point value.
Definition: dnp3.hpp:928
Counter(uint16_t index, uint32_t value, const Flags &flags, const Timestamp &time)
Fully construct Counter specifying the value of each field.
Controls the decoding of transmitted and received data at the application, transport,...
Definition: dnp3.hpp:285
TransportDecodeLevel transport
Controls transport segment layer decoding.
Definition: dnp3.hpp:326
DecodeLevel()
Initialize log levels to defaults.
AppDecodeLevel application
Controls application fragment decoding.
Definition: dnp3.hpp:324
LinkDecodeLevel link
Controls link frame decoding.
Definition: dnp3.hpp:328
static DecodeLevel nothing()
Initialize log levels to nothing.
PhysDecodeLevel physical
Controls the logging of physical layer read/write.
Definition: dnp3.hpp:330
Configuration related to reading a file.
Definition: dnp3.hpp:5194
uint16_t max_block_size
Maximum block size requested by the master during the file open.
Definition: dnp3.hpp:5218
uint32_t max_file_size
Maximum number of bytes that may be accumulated while reading directory information.
Definition: dnp3.hpp:5220
static DirReadConfig defaults()
Initialize the configuration to default values.
Maximum number of events for each type.
Definition: dnp3.hpp:7049
uint16_t max_counter
Maximum number of Counter events (g22)
Definition: dnp3.hpp:7090
uint16_t max_frozen_counter
Maximum number of Frozen Counter events (g23)
Definition: dnp3.hpp:7092
uint16_t max_binary
Maximum number of Binary Input events (g2)
Definition: dnp3.hpp:7084
uint16_t max_analog_output_status
Maximum number of Analog Output Status events (g42)
Definition: dnp3.hpp:7096
EventBufferConfig(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 EventBufferConfig specifying the value of each field.
uint16_t max_octet_string
Maximum number of Octet String events (g111)
Definition: dnp3.hpp:7098
uint16_t max_analog
Maximum number of Analog Input events (g32)
Definition: dnp3.hpp:7094
static EventBufferConfig no_events()
Create a configuration where no events are buffered.
uint16_t max_binary_output_status
Maximum number of Binary Output Status events (g11)
Definition: dnp3.hpp:7088
uint16_t max_double_bit_binary
Maximum number of Double-Bit Binary Input events (g4)
Definition: dnp3.hpp:7086
Event classes.
Definition: dnp3.hpp:2762
bool class2
Class 2 events.
Definition: dnp3.hpp:2800
static EventClasses none()
Initialize all classes to false.
bool class1
Class 1 events.
Definition: dnp3.hpp:2798
EventClasses(bool class1, bool class2, bool class3)
Fully construct EventClasses specifying the value of each field.
static EventClasses all()
Initialize all classes to true.
bool class3
Class 3 events.
Definition: dnp3.hpp:2802
Information about a file or directory returned from the outstation.
Definition: dnp3.hpp:3245
uint64_t time_created
DNP3 timestamp.
Definition: dnp3.hpp:3272
Permissions permissions
Outstation permissions for the file.
Definition: dnp3.hpp:3274
uint32_t size
Size of the file in bytes.
Definition: dnp3.hpp:3268
FileType file_type
Simple file or directory.
Definition: dnp3.hpp:3264
std::string file_name
Name of the file or directory.
Definition: dnp3.hpp:3262
Configuration related to reading a file.
Definition: dnp3.hpp:5162
static FileReadConfig defaults()
Initialize the configuration to default values.
uint16_t max_block_size
Maximum block size requested by the master during the file open.
Definition: dnp3.hpp:5186
uint32_t max_file_size
Maximum file size accepted by the master.
Definition: dnp3.hpp:5188
Collection of individual flag bits represented by an underlying mask value.
Definition: dnp3.hpp:585
Flags(uint8_t value)
Fully construct Flags specifying the value of each field.
uint8_t value
bit-mask representing a set of individual flag bits
Definition: dnp3.hpp:597
Frozen Counter configuration.
Definition: dnp3.hpp:6351
FrozenCounterConfig()
Initialize to defaults.
uint32_t deadband
Deadband value.
Definition: dnp3.hpp:6379
StaticFrozenCounterVariation static_variation
Default static variation.
Definition: dnp3.hpp:6375
FrozenCounterConfig(StaticFrozenCounterVariation static_variation, EventFrozenCounterVariation event_variation, uint32_t deadband)
Fully construct FrozenCounterConfig specifying the value of each field.
EventFrozenCounterVariation event_variation
Default event variation.
Definition: dnp3.hpp:6377
frozen_counter point
Definition: dnp3.hpp:983
Flags flags
Point flags.
Definition: dnp3.hpp:1002
Timestamp time
Point timestamp.
Definition: dnp3.hpp:1004
uint16_t index
Point index.
Definition: dnp3.hpp:998
FrozenCounter(uint16_t index, uint32_t value, const Flags &flags, const Timestamp &time)
Fully construct FrozenCounter specifying the value of each field.
uint32_t value
Point value.
Definition: dnp3.hpp:1000
Control Relay Output Block.
Definition: dnp3.hpp:544
static Group12Var1 from_code(const ControlCode &code)
Construct a Group12Var1 from a ControlCode.
uint32_t off_time
Duration the output drive remains non-active (in milliseconds)
Definition: dnp3.hpp:579
uint32_t on_time
Duration the output drive remains active (in milliseconds)
Definition: dnp3.hpp:577
uint8_t count
Count.
Definition: dnp3.hpp:575
ControlCode code
Control code.
Definition: dnp3.hpp:573
Group12Var1(const ControlCode &code, uint8_t count, uint32_t on_time, uint32_t off_time)
Fully construct Group12Var1 specifying the value of each field.
First IIN byte.
Definition: dnp3.hpp:3553
bool need_time
Outstation requires time synchronization.
Definition: dnp3.hpp:3581
bool class_2_events
Outstation has unreported Class 2 events.
Definition: dnp3.hpp:3577
bool device_trouble
An abnormal, device-specific condition exists in the outstation.
Definition: dnp3.hpp:3585
bool local_control
One or more of the outstation’s points are in local control mode.
Definition: dnp3.hpp:3583
bool class_1_events
Outstation has unreported Class 1 events.
Definition: dnp3.hpp:3575
bool class_3_events
Outstation has unreported Class 3 events.
Definition: dnp3.hpp:3579
bool broadcast
Broadcast message was received.
Definition: dnp3.hpp:3573
bool device_restart
Outstation restarted.
Definition: dnp3.hpp:3587
Second IIN byte.
Definition: dnp3.hpp:3593
bool object_unknown
Outstation does not support requested operation for objects in the request.
Definition: dnp3.hpp:3615
bool config_corrupt
The outstation detected corrupt configuration (optional support)
Definition: dnp3.hpp:3623
bool reserved_2
Reserved for future use - should always be set to 0.
Definition: dnp3.hpp:3625
bool event_buffer_overflow
An event buffer overflow condition exists in the outstation, and at least one unconfirmed event was l...
Definition: dnp3.hpp:3619
bool no_func_code_support
Outstation does not support this function code.
Definition: dnp3.hpp:3613
bool reserved_1
Reserved for future use - should always be set to 0.
Definition: dnp3.hpp:3627
bool already_executing
The operation requested is already executing (optional support)
Definition: dnp3.hpp:3621
bool parameter_error
A parameter in the request was invalid, e.g. malformed object data or an unsupported qualifier or ran...
Definition: dnp3.hpp:3617
Pair of IIN bytes.
Definition: dnp3.hpp:3633
Iin2 iin2
Second IIN byte.
Definition: dnp3.hpp:3649
Iin1 iin1
First IIN byte.
Definition: dnp3.hpp:3647
Configuration that controls how the server performs remote link identification.
Definition: dnp3.hpp:5857
std::chrono::steady_clock::duration timeout
Maximum time period to wait before receiving a link frame from the outstation.
Definition: dnp3.hpp:5884
PhysDecodeLevel decode_level
Set the decode level to use when reading the link header used for identification.
Definition: dnp3.hpp:5886
LinkIdConfig()
Initialize to default values.
uint16_t max_tasks
Set the maximum number of simultaneous tasks used to perform link identification.
Definition: dnp3.hpp:5882
Logging configuration options.
Definition: dnp3.hpp:3431
LogOutputFormat output_format
output formatting options
Definition: dnp3.hpp:3462
bool print_level
optionally print the log level as part to the message string
Definition: dnp3.hpp:3466
LoggingConfig()
Initialize the configuration to default values.
TimeFormat time_format
optional time format
Definition: dnp3.hpp:3464
bool print_module_info
optionally print the underlying Rust module information to the message string
Definition: dnp3.hpp:3468
LogLevel level
logging level
Definition: dnp3.hpp:3460
Configuration for a MasterChannel that is independent of the physical layer.
Definition: dnp3.hpp:3991
DecodeLevel decode_level
Decoding level for this master. You can modify this later on with MasterChannel::set_decode_level().
Definition: dnp3.hpp:4021
uint16_t address
Local DNP3 data-link address.
Definition: dnp3.hpp:4019
MasterChannelConfig(uint16_t address)
Initialize MasterChannelConfig to default values.
uint16_t tx_buffer_size
TX buffer size.
Definition: dnp3.hpp:4025
uint16_t rx_buffer_size
RX buffer size.
Definition: dnp3.hpp:4029
Octet String point.
Definition: dnp3.hpp:1628
OctetString(uint16_t index, ByteIterator value)
Fully construct OctetString specifying the value of each field.
uint16_t index
Point index.
Definition: dnp3.hpp:1641
ByteIterator value
Point value.
Definition: dnp3.hpp:1643
The result of opening a file on the outstation.
Definition: dnp3.hpp:3160
uint16_t max_block_size
Maximum block size returned by the outstation.
Definition: dnp3.hpp:3183
uint32_t file_handle
The handle assigned to the file by the outstation.
Definition: dnp3.hpp:3177
uint32_t file_size
Size of the file returned by the outstation.
Definition: dnp3.hpp:3179
Outstation configuration.
Definition: dnp3.hpp:7202
uint32_t max_unsolicited_retries
Maximum number of unsolicited retries.
Definition: dnp3.hpp:7280
uint16_t max_controls_per_request
Maximum number of controls in a single request.
Definition: dnp3.hpp:7298
DecodeLevel decode_level
Decoding level.
Definition: dnp3.hpp:7272
uint16_t unsolicited_buffer_size
Unsolicited response buffer size.
Definition: dnp3.hpp:7266
OutstationFeatures features
Optional features.
Definition: dnp3.hpp:7278
OutstationConfig(uint16_t outstation_address, uint16_t master_address, const EventBufferConfig &event_buffer_config)
Initialize to defaults.
std::chrono::steady_clock::duration select_timeout
Select timeout.
Definition: dnp3.hpp:7276
std::chrono::steady_clock::duration unsolicited_retry_delay
Delay to wait before retrying an unsolicited response.
Definition: dnp3.hpp:7282
std::chrono::steady_clock::duration keep_alive_timeout
Delay of inactivity before sending a REQUEST_LINK_STATUS to the master.
Definition: dnp3.hpp:7286
std::chrono::steady_clock::duration confirm_timeout
Confirmation timeout.
Definition: dnp3.hpp:7274
ClassZeroConfig class_zero
Controls responses to Class 0 reads.
Definition: dnp3.hpp:7300
uint16_t max_read_request_headers
Limits the selections or headers processed in a READ request.
Definition: dnp3.hpp:7296
uint16_t master_address
Link-layer master address.
Definition: dnp3.hpp:7256
EventBufferConfig event_buffer_config
Event buffer sizes configuration.
Definition: dnp3.hpp:7258
uint16_t outstation_address
Link-layer outstation address.
Definition: dnp3.hpp:7254
uint16_t solicited_buffer_size
Solicited response buffer size.
Definition: dnp3.hpp:7262
uint16_t rx_buffer_size
Receive buffer size.
Definition: dnp3.hpp:7270
Optional outstation features that can be enabled or disabled.
Definition: dnp3.hpp:7161
bool broadcast
Process valid broadcast messages.
Definition: dnp3.hpp:7190
OutstationFeatures()
Initialize to default values.
bool self_address
Respond to the self address.
Definition: dnp3.hpp:7188
bool unsolicited
Respond to enable/disable unsolicited response and produce unsolicited responses.
Definition: dnp3.hpp:7192
bool respond_to_any_master
Outstation will process every request as if it came from the configured master address.
Definition: dnp3.hpp:7196
UDP outstation configuration.
Definition: dnp3.hpp:8339
std::string remote_endpoint
Remote endpoint where outbound requests are sent. Must be a socket address (ip:port)
Definition: dnp3.hpp:8371
std::chrono::steady_clock::duration retry_delay
Period to wait before retrying after a failure to bind or connect the UDP socket.
Definition: dnp3.hpp:8377
OutstationUdpConfig(const std::string &local_endpoint, const std::string &remote_endpoint)
Initialize the configuration with default settings for unspecified parameter.
UdpSocketMode socket_mode
UDP socket mode to use.
Definition: dnp3.hpp:8373
std::string local_endpoint
Local endpoint to which the UDP socket is bound. Must be a socket address (ip:port)
Definition: dnp3.hpp:8369
LinkReadMode link_read_mode
Read mode to use, this should typically be set to LinkReadMode::datagram
Definition: dnp3.hpp:8375
Defines read, write, execute permissions for particular group or user.
Definition: dnp3.hpp:3091
bool execute
Permission to execute.
Definition: dnp3.hpp:3115
bool read
Permission to read.
Definition: dnp3.hpp:3119
PermissionSet(bool execute, bool write, bool read)
Fully construct PermissionSet specifying the value of each field.
PermissionSet()
Permission set with nothing enabled.
bool write
Permission to write.
Definition: dnp3.hpp:3117
Permissions for world, group, and owner.
Definition: dnp3.hpp:3125
PermissionSet owner
Owner permissions.
Definition: dnp3.hpp:3154
PermissionSet group
Group permissions.
Definition: dnp3.hpp:3152
Permissions(const PermissionSet &world, const PermissionSet &group, const PermissionSet &owner)
Fully construct Permissions specifying the value of each field.
static Permissions none()
Permissions with nothing enabled.
PermissionSet world
World permissions.
Definition: dnp3.hpp:3150
Poll identifier.
Definition: dnp3.hpp:4202
Restart delay used by OutstationApplication::cold_restart() and OutstationApplication::warm_restart()
Definition: dnp3.hpp:7323
static RestartDelay not_supported()
RestartDelay indicating that the request is not supported.
static RestartDelay milliseconds(uint16_t value)
RestartDelay with a count of milliseconds.
uint16_t value
Expected delay before the outstation comes back online.
Definition: dnp3.hpp:7369
static RestartDelay seconds(uint16_t value)
RestartDelay with a count of seconds.
RestartDelayType restart_type
Indicates what RestartDelay::value is.
Definition: dnp3.hpp:7367
Retry strategy configuration.
Definition: dnp3.hpp:2854
RetryStrategy()
Initialize to defaults.
std::chrono::steady_clock::duration max_delay
Maximum delay between two retries.
Definition: dnp3.hpp:2879
std::chrono::steady_clock::duration min_delay
Minimum delay between two retries.
Definition: dnp3.hpp:2877
Runtime configuration.
Definition: dnp3.hpp:338
uint16_t num_core_threads
Number of runtime threads to spawn. For a guess of the number of CPU cores, use 0.
Definition: dnp3.hpp:361
RuntimeConfig()
Initialize the configuration to default values.
Serial port settings.
Definition: dnp3.hpp:2945
StopBits stop_bits
Number of bits to use to signal the end of a character.
Definition: dnp3.hpp:2982
FlowControl flow_control
Type of signalling to use for controlling data transfer.
Definition: dnp3.hpp:2978
Parity parity
Type of parity to use for error checking.
Definition: dnp3.hpp:2980
SerialSettings()
Initialize to default values.
uint32_t baud_rate
Baud rate (in symbols-per-second)
Definition: dnp3.hpp:2974
DataBits data_bits
Number of bits used to represent a character sent on the line.
Definition: dnp3.hpp:2976
Timestamp associated with particular measurement from the outstation. The validity of the value depen...
Definition: dnp3.hpp:624
static Timestamp synchronized_timestamp(uint64_t value)
Creates a synchronized timestamp struct.
static Timestamp invalid_timestamp()
Creates an invalid timestamp struct.
TimeQuality quality
Enumeration that indicates the timestamp's validity.
Definition: dnp3.hpp:672
static Timestamp unsynchronized_timestamp(uint64_t value)
Creates an unsynchronized timestamp struct.
uint64_t value
Count of milliseconds since UNIX epoch.
Definition: dnp3.hpp:670
TLS client configuration.
Definition: dnp3.hpp:1846
MinTlsVersion min_tls_version
Minimum TLS version allowed.
Definition: dnp3.hpp:1898
CertificateMode certificate_mode
Certificate validation mode.
Definition: dnp3.hpp:1900
bool allow_server_name_wildcard
If set to true, a '*' may be used for TlsClientConfig::dns_name to bypass server name validation.
Definition: dnp3.hpp:1902
TlsClientConfig(const std::string &dns_name, const std::string &peer_cert_path, const std::string &local_cert_path, const std::string &private_key_path, const std::string &password)
construct the configuration with defaults
std::string peer_cert_path
Path to the PEM-encoded certificate of the peer.
Definition: dnp3.hpp:1886
std::string local_cert_path
Path to the PEM-encoded local certificate.
Definition: dnp3.hpp:1888
std::string private_key_path
Path to the the PEM-encoded private key.
Definition: dnp3.hpp:1890
std::string password
Optional password if the private key file is encrypted.
Definition: dnp3.hpp:1896
std::string dns_name
Subject name which is verified in the presented server certificate, from the SAN extension or in the ...
Definition: dnp3.hpp:1884
TLS server configuration.
Definition: dnp3.hpp:8607
std::string dns_name
Subject name which is verified in the presented client certificate, from the SAN extension or in the ...
Definition: dnp3.hpp:8645
CertificateMode certificate_mode
Certificate validation mode.
Definition: dnp3.hpp:8661
std::string local_cert_path
Path to the PEM-encoded local certificate.
Definition: dnp3.hpp:8649
MinTlsVersion min_tls_version
Minimum TLS version allowed.
Definition: dnp3.hpp:8659
std::string password
Optional password if the private key file is encrypted.
Definition: dnp3.hpp:8657
std::string peer_cert_path
Path to the PEM-encoded certificate of the peer.
Definition: dnp3.hpp:8647
bool allow_client_name_wildcard
If set to true, a '*' may be used for TlsServerConfig::dns_name to allow any authenticated client to ...
Definition: dnp3.hpp:8663
std::string private_key_path
Path to the PEM-encoded private key.
Definition: dnp3.hpp:8651
TlsServerConfig(const std::string &dns_name, const std::string &peer_cert_path, const std::string &local_cert_path, const std::string &private_key_path, const std::string &password)
construct the configuration with defaults
Remaining number of events in the buffer after a confirm on a per-type basis.
Definition: dnp3.hpp:7482
uint32_t num_counter
Number of counter events remaining in the buffer.
Definition: dnp3.hpp:7508
uint32_t num_frozen_counter
Number of frozen counter events remaining in the buffer.
Definition: dnp3.hpp:7510
uint32_t num_double_bit_binary_input
Number of double-bit binary input events remaining in the buffer.
Definition: dnp3.hpp:7504
uint32_t num_binary_output_status
Number of binary output status events remaining in the buffer.
Definition: dnp3.hpp:7506
uint32_t num_binary_input
Number of binary input events remaining in the buffer.
Definition: dnp3.hpp:7502
uint32_t num_analog_output_status
Number of analog output status events remaining in the buffer.
Definition: dnp3.hpp:7514
uint32_t num_analog
Number of analog events remaining in the buffer.
Definition: dnp3.hpp:7512
uint32_t num_octet_string
Number octet string events remaining in the buffer.
Definition: dnp3.hpp:7516
Unsigned byte corresponding to group 102 variation 1.
Definition: dnp3.hpp:1449
UnsignedInteger(uint16_t index, uint8_t value)
Fully construct UnsignedInteger specifying the value of each field.
uint8_t value
Value of the object.
Definition: dnp3.hpp:1464
uint16_t index
Index of the object.
Definition: dnp3.hpp:1462
Defines what occurred during an update operation. Only certain id fields are valid depending on the v...
Definition: dnp3.hpp:5946
UpdateResult result
Defines what happened and which id fields are valid.
Definition: dnp3.hpp:5961
uint64_t discarded
The id of the discarded event if the result is UpdateResult::overflow
Definition: dnp3.hpp:5965
uint64_t created
The id of the created event if the result is UpdateResult::created or UpdateResult::overflow
Definition: dnp3.hpp:5963
Options that control how the update is performed.
Definition: dnp3.hpp:5990
static UpdateOptions detect_event()
Default event detection mode. Updates the static value and automatically detects event.
EventMode event_mode
Determines how/if an event is produced.
Definition: dnp3.hpp:6026
bool update_static
Optionally bypass updating the static database (the current value)
Definition: dnp3.hpp:6024
static UpdateOptions no_event()
Only update the static value. Usefull during initialization of the database.
Timestamp value returned by AssociationHandler::get_current_time().
Definition: dnp3.hpp:4362
static UtcTimestamp invalid()
Construct an invalid UtcTimestamp.
uint64_t value
Count of milliseconds since UNIX epoch.
Definition: dnp3.hpp:4398
static UtcTimestamp valid(uint64_t value)
Construct a valid UtcTimestamp.
bool is_valid
True if the timestamp is valid, false otherwise.
Definition: dnp3.hpp:4400