190 friend class CppLoggingConfigFriend;
243namespace functional {
250 static_assert(std::is_copy_constructible<T>::value,
"Lambda expression must be copy constructible. Does it contain something that is move-only?");
262 lambda(level, message);
271std::unique_ptr<Logger>
logger(
const T& lambda)
273 return std::make_unique<LoggerLambda<T>>(lambda); ;
360 friend class CppDecodeLevelFriend;
413 friend class CppRuntimeConfigFriend;
440 friend class CppRuntimeFriend;
444 Runtime(
void* self): self(self) {}
475 friend class CppControlFieldFriend;
542 friend class CppControlCodeFriend;
610 friend class CppGroup12Var1Friend;
651 friend class CppFlagsFriend;
684 friend class CppTimestampFriend;
753 friend class CppBinaryInputFriend;
791 friend class CppBinaryInputIteratorFriend;
825 friend class CppDoubleBitBinaryInputFriend;
863 friend class CppDoubleBitBinaryInputIteratorFriend;
897 friend class CppBinaryOutputStatusFriend;
935 friend class CppBinaryOutputStatusIteratorFriend;
969 friend class CppCounterFriend;
1007 friend class CppCounterIteratorFriend;
1041 friend class CppFrozenCounterFriend;
1079 friend class CppFrozenCounterIteratorFriend;
1113 friend class CppAnalogInputFriend;
1151 friend class CppAnalogInputIteratorFriend;
1185 friend class CppAnalogOutputStatusFriend;
1223 friend class CppAnalogOutputStatusIteratorFriend;
1268 friend class CppByteIteratorFriend;
1276 ByteIterator(
void* iter) : iter(iter), current(
nullptr) {}
1302 friend class CppOctetStringFriend;
1335 friend class CppOctetStringIteratorFriend;
1394namespace functional {
1401 static_assert(std::is_copy_constructible<T>::value,
"Lambda expression must be copy constructible. Does it contain something that is move-only?");
1424 return std::make_unique<PortStateListenerLambda<T>>(lambda); ;
1630 friend class CppRetryStrategyFriend;
1721 friend class CppSerialSettingsFriend;
1899 friend class CppIin1Friend;
1939 friend class CppIin2Friend;
1979 friend class CppIinFriend;
2001 friend class CppResponseHeaderFriend;
2051 friend class CppHeaderInfoFriend;
2156 friend class CppEndpointListFriend;
2188 void add(
const std::string& endpoint);
2195 friend class CppMasterChannelConfigFriend;
2270namespace functional {
2277 static_assert(std::is_copy_constructible<T>::value,
"Lambda expression must be copy constructible. Does it contain something that is move-only?");
2300 return std::make_unique<ClientStateListenerLambda<T>>(lambda); ;
2307struct TlsClientConfig;
2311 friend class CppTlsClientConfigFriend;
2367 friend class CppConnectStrategyFriend;
2413 friend class CppAssociationIdFriend;
2432 friend class CppPollIdFriend;
2440 PollId(uint16_t association_id, uint64_t
id);
2445 uint16_t association_id;
2454 friend class CppEventClassesFriend;
2500 friend class CppClassesFriend;
2566 friend class CppAssociationConfigFriend;
2636 friend class CppUtcTimestampFriend;
2692namespace functional {
2699 static_assert(std::is_copy_constructible<T>::value,
"Lambda expression must be copy constructible. Does it contain something that is move-only?");
2722 return std::make_unique<AssociationHandlerLambda<T>>(lambda); ;
2815 friend class CppRequestFriend;
2819 Request(
void* self): self(self) {}
2982 friend class CppCommandSetFriend;
3258 virtual void on_complete(std::chrono::steady_clock::duration result) = 0;
3323 friend class CppMasterChannelFriend;
3559 friend class CppUpdateOptionsFriend;
3629 friend class CppBinaryInputConfigFriend;
3688 friend class CppDoubleBitBinaryInputConfigFriend;
3745 friend class CppBinaryOutputStatusConfigFriend;
3810 friend class CppCounterConfigFriend;
3883 friend class CppFrozenCounterConfigFriend;
3964 friend class CppAnalogInputConfigFriend;
4041 friend class CppAnalogOutputStatusConfigFriend;
4076 friend class CppDatabaseFriend;
4080 Database(
void* self): self(self) {}
4323namespace functional {
4330 static_assert(std::is_copy_constructible<T>::value,
"Lambda expression must be copy constructible. Does it contain something that is move-only?");
4358class DatabaseHandle;
4362 friend class CppDatabaseHandleFriend;
4391 friend class CppEventBufferConfigFriend;
4446 friend class CppClassZeroConfigFriend;
4503 friend class CppOutstationFeaturesFriend;
4538 friend class CppOutstationConfigFriend;
4559 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);
4653 friend class CppRestartDelayFriend;
4748 friend class CppApplicationIinFriend;
4840 friend class CppRequestHeaderFriend;
5136namespace functional {
5143 static_assert(std::is_copy_constructible<T>::value,
"Lambda expression must be copy constructible. Does it contain something that is move-only?");
5166 return std::make_unique<ConnectionStateListenerLambda<T>>(lambda); ;
5177 friend class CppOutstationFriend;
5246 friend class CppAddressFilterFriend;
5280 void add(
const std::string& address);
5292 friend class CppTlsServerConfigFriend;
5352 friend class CppOutstationServerFriend;
5386 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);
Outstation address filter.
Definition: dnp3.hpp:5245
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:5261
~AddressFilter()
Destroy an address filter.
void add(const std::string &address)
Add an accepted IP address to the filter.
Iterator over AnalogOutputStatus instances.
Definition: dnp3.hpp:1221
AnalogOutputStatus get()
retrieve the current value
bool next()
move the iterator to the next value
AnalogOutputStatusIterator(AnalogOutputStatusIterator &&)=default
move constructor for the iterator
Callbacks for a particular outstation association.
Definition: dnp3.hpp:2678
virtual UtcTimestamp get_current_time()=0
Returns the current time or an invalid time if none is available.
Iterator over BinaryOutputStatus instances.
Definition: dnp3.hpp:933
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:1266
ByteIterator(ByteIterator &&)=default
move constructor for the iterator
uint8_t get()
retrieve the current value
bool next()
move the iterator to the next value
Callback for monitoring the client TCP connection state.
Definition: dnp3.hpp:2260
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:3114
CommandException(CommandError error)
construct the exception with an instance of the enum
Definition: dnp3.hpp:3119
CommandError error
underlying error enum
Definition: dnp3.hpp:3117
Builder type used to construct command requests.
Definition: dnp3.hpp:2981
~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:2997
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:3124
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.
Callback interface for connection state events.
Definition: dnp3.hpp:5126
virtual void on_change(ConnectionState state)=0
Called when the connection state changes.
Callbacks for handling controls.
Definition: dnp3.hpp:5003
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:1005
CounterIterator(CounterIterator &&)=default
move constructor for the iterator
Counter get()
retrieve the current value
bool next()
move the iterator to the next value
handle used to perform transactions on the database
Definition: dnp3.hpp:4361
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:4377
Database transaction interface.
Definition: dnp3.hpp:4313
virtual void execute(Database &database)=0
Execute a transaction on the provided database.
Internal database access.
Definition: dnp3.hpp:4075
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.
bool remove_binary_output_status(uint16_t index)
Remove a Binary Output Status 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.
bool update_binary_output_status(const BinaryOutputStatus &value, const UpdateOptions &options)
Update a Binary Output Status point.
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.
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.
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.
bool add_octet_string(uint16_t index, EventClass point_class)
Add a new 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:4091
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.
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.
List of IP endpoints.
Definition: dnp3.hpp:2155
EndpointList(EndpointList &&other) noexcept
Transfer ownership of the underlying C-type to this instance and invalidate the other instance.
Definition: dnp3.hpp:2171
~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.
Iterator over FrozenCounter instances.
Definition: dnp3.hpp:1077
FrozenCounter get()
retrieve the current value
bool next()
move the iterator to the next value
FrozenCounterIterator(FrozenCounterIterator &&)=default
move constructor for the iterator
Handler for link status check.
Definition: dnp3.hpp:3303
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:3293
LinkStatusError error
underlying error enum
Definition: dnp3.hpp:3296
LinkStatusException(LinkStatusError error)
construct the exception with an instance of the enum
Definition: dnp3.hpp:3298
Logging interface that receives the log messages and writes them somewhere.
Definition: dnp3.hpp:231
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:279
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:3322
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 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 disable()
stop communications
PollId add_poll(const AssociationId &id, Request &request, std::chrono::steady_clock::duration period)
Add a periodic poll to an association.
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 read_with_handler(const AssociationId &association, Request &request, std::unique_ptr< ReadHandler > handler, std::unique_ptr< ReadTaskCallback > callback)
Perform a read on the association.
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 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:3338
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.
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.
Iterator over OctetString instances.
Definition: dnp3.hpp:1333
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:4785
virtual RestartDelay warm_restart()=0
Request that the outstation perform a warm restart (IEEE-1815 2012, p. 58)
virtual FreezeResult freeze_counters_range(uint16_t start, uint16_t stop, FreezeType freeze_type, DatabaseHandle &database_handle)=0
Freeze a range of counters.
virtual RestartDelay cold_restart()=0
Request that the outstation perform a cold restart (IEEE-1815 2012, p. 58)
virtual FreezeResult freeze_counters_all(FreezeType freeze_type, DatabaseHandle &database_handle)=0
Freeze all the counters.
virtual ApplicationIin get_application_iin()=0
Returns the application-controlled IIN bits.
virtual uint16_t get_processing_delay_ms()=0
Returns the DELAY_MEASUREMENT delay.
virtual WriteTimeResult write_absolute_time(uint64_t time)=0
Handle a write of the absolute time during time synchronization procedures.
TCP server that listens for connections and routes the messages to outstations.
Definition: dnp3.hpp:5351
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:5367
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:5176
void set_decode_level(const DecodeLevel &level)
Set decoding log level.
~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)
Create an outstation instance running on a serial port which is tolerant to the serial port being add...
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:5192
Exception type corresponding to the underlying error enum ParamError.
Definition: dnp3.hpp:107
ParamError error
underlying error enum
Definition: dnp3.hpp:110
ParamException(ParamError error)
construct the exception with an instance of the enum
Definition: dnp3.hpp:112
Callback interface for receiving updates about the state of a serial port.
Definition: dnp3.hpp:1384
virtual void on_change(PortState state)=0
Invoked when the serial port changes state.
Exception type corresponding to the underlying error enum ReadError.
Definition: dnp3.hpp:2954
ReadException(ReadError error)
construct the exception with an instance of the enum
Definition: dnp3.hpp:2959
ReadError error
underlying error enum
Definition: dnp3.hpp:2957
General handler that will receive all values read from the outstation.
Definition: dnp3.hpp:2094
virtual void handle_analog_input(const HeaderInfo &info, AnalogInputIterator &it)=0
Handle analog input data.
virtual void end_fragment(ReadType read_type, const ResponseHeader &header)=0
Marks the end of a fragment.
virtual void handle_frozen_counter(const HeaderInfo &info, FrozenCounterIterator &it)=0
Handle frozen counter input data.
virtual void handle_analog_output_status(const HeaderInfo &info, AnalogOutputStatusIterator &it)=0
Handle analog output status data.
virtual void handle_binary_input(const HeaderInfo &info, BinaryInputIterator &it)=0
Handle binary input data.
virtual void begin_fragment(ReadType read_type, const ResponseHeader &header)=0
Marks the beginning of a fragment.
virtual void handle_double_bit_binary_input(const HeaderInfo &info, DoubleBitBinaryInputIterator &it)=0
Handle double-bit binary input data.
virtual void handle_octet_string(const HeaderInfo &info, OctetStringIterator &it)=0
Handle octet string data.
virtual void handle_binary_output_status(const HeaderInfo &info, BinaryOutputStatusIterator &it)=0
Handle binary output status data.
virtual void handle_counter(const HeaderInfo &info, CounterIterator &it)=0
Handle counter data.
Handler for read tasks.
Definition: dnp3.hpp:2964
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:2814
void add_two_byte_range_header(Variation variation, uint16_t start, uint16_t stop)
Add a two-byte start/stop variation interrogation.
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:2830
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 interrogation.
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).
Request()
Create a new request.
void add_all_objects_header(Variation variation)
Add an all objects variation interrogation.
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 interrogation.
void add_one_byte_range_header(Variation variation, uint8_t start, uint8_t stop)
Add a one-byte start/stop variation interrogation.
Exception type corresponding to the underlying error enum RestartError.
Definition: dnp3.hpp:3241
RestartException(RestartError error)
construct the exception with an instance of the enum
Definition: dnp3.hpp:3246
RestartError error
underlying error enum
Definition: dnp3.hpp:3244
Handler for restart tasks.
Definition: dnp3.hpp:3251
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:439
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:455
Exception type corresponding to the underlying error enum TimeSyncError.
Definition: dnp3.hpp:3191
TimeSyncError error
underlying error enum
Definition: dnp3.hpp:3194
TimeSyncException(TimeSyncError error)
construct the exception with an instance of the enum
Definition: dnp3.hpp:3196
Handler for time synchronization tasks.
Definition: dnp3.hpp:3201
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.
class that implements AssociationHandler in terms of a lambda expression
Definition: dnp3.hpp:2698
AssociationHandlerLambda(const T &lambda)
constructor
Definition: dnp3.hpp:2706
UtcTimestamp get_current_time() override
implement virtual method from base class
Definition: dnp3.hpp:2709
class that implements ClientStateListener in terms of a lambda expression
Definition: dnp3.hpp:2276
ClientStateListenerLambda(const T &lambda)
constructor
Definition: dnp3.hpp:2284
void on_change(ClientState state) override
implement virtual method from base class
Definition: dnp3.hpp:2287
class that implements ConnectionStateListener in terms of a lambda expression
Definition: dnp3.hpp:5142
ConnectionStateListenerLambda(const T &lambda)
constructor
Definition: dnp3.hpp:5150
void on_change(ConnectionState state) override
implement virtual method from base class
Definition: dnp3.hpp:5153
class that implements DatabaseTransaction in terms of a lambda expression
Definition: dnp3.hpp:4329
DatabaseTransactionLambda(const T &lambda)
constructor
Definition: dnp3.hpp:4337
void execute(Database &database) override
implement virtual method from base class
Definition: dnp3.hpp:4340
class that implements Logger in terms of a lambda expression
Definition: dnp3.hpp:249
LoggerLambda(const T &lambda)
constructor
Definition: dnp3.hpp:257
void on_message(LogLevel level, const char *message) override
implement virtual method from base class
Definition: dnp3.hpp:260
class that implements PortStateListener in terms of a lambda expression
Definition: dnp3.hpp:1400
void on_change(PortState state) override
implement virtual method from base class
Definition: dnp3.hpp:1411
PortStateListenerLambda(const T &lambda)
constructor
Definition: dnp3.hpp:1408
constexpr uint8_t restart
Object value has not been updated since device restart.
Definition: dnp3.hpp:120
constexpr uint8_t discontinuity
Reported counter value cannot be compared against a prior value to obtain the correct count differenc...
Definition: dnp3.hpp:132
constexpr uint8_t chatter_filter
Object value is changing state rapidly (device dependent meaning)
Definition: dnp3.hpp:128
constexpr uint8_t reference_err
Object's value might not have the expected level of accuracy.
Definition: dnp3.hpp:134
constexpr uint8_t over_range
Object's true exceeds the measurement range of the reported variation.
Definition: dnp3.hpp:130
constexpr uint8_t remote_forced
Object value is overridden in a downstream reporting device.
Definition: dnp3.hpp:124
constexpr uint8_t local_forced
Object value is overridden by the device reporting this flag.
Definition: dnp3.hpp:126
constexpr uint8_t online
Object value is 'good' / 'valid' / 'nominal'.
Definition: dnp3.hpp:118
constexpr uint8_t comm_lost
Object value represents the last value available before a communication failure occurred....
Definition: dnp3.hpp:122
std::unique_ptr< ConnectionStateListener > connection_state_listener(const T &lambda)
construct an implementation of ConnectionStateListener based on a lambda expression
Definition: dnp3.hpp:5164
std::unique_ptr< Logger > logger(const T &lambda)
construct an implementation of Logger based on a lambda expression
Definition: dnp3.hpp:271
std::unique_ptr< PortStateListener > port_state_listener(const T &lambda)
construct an implementation of PortStateListener based on a lambda expression
Definition: dnp3.hpp:1422
std::unique_ptr< ClientStateListener > client_state_listener(const T &lambda)
construct an implementation of ClientStateListener based on a lambda expression
Definition: dnp3.hpp:2298
DatabaseTransactionLambda< T > database_transaction(const T &lambda)
construct an implementation of DatabaseTransaction based on a lambda expression
Definition: dnp3.hpp:4351
std::unique_ptr< AssociationHandler > association_handler(const T &lambda)
construct an implementation of AssociationHandler based on a lambda expression
Definition: dnp3.hpp:2720
main namespace for the dnp3 library
Definition: dnp3.hpp:39
AutoTimeSync
Automatic time synchronization configuration.
Definition: dnp3.hpp:2548
@ non_lan
Perform automatic time sync with Delay Measurement (0x17) function code.
@ lan
Perform automatic time sync with Record Current Time (0x18) function code.
EventBinaryOutputStatusVariation
Event binary output status variation.
Definition: dnp3.hpp:3729
ResponseFunction
Type of response.
Definition: dnp3.hpp:1883
TimeFormat
Describes if and how the time will be formatted in log messages.
Definition: dnp3.hpp:174
@ none
Don't format the timestamp as part of the message.
@ 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:3072
@ select_before_operate
Perform a Select and Operate (0x03 then 0x04)
DataBits
Number of bits per character.
Definition: dnp3.hpp:1658
@ 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:2076
@ 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:3537
@ 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:4013
LogLevel
Log level.
Definition: dnp3.hpp:140
@ debug
Debugging log level.
@ info
Information log level.
FlowControl
Flow control modes.
Definition: dnp3.hpp:1675
@ hardware
Flow control using RTS/CTS signals.
@ software
Flow control using XON/XOFF bytes.
EventAnalogInputVariation
Event analog variation.
Definition: dnp3.hpp:3936
WriteTimeResult
Write time result used by OutstationApplication::write_absolute_time()
Definition: dnp3.hpp:4702
@ parameter_error
The request parameters are nonsensical.
StaticBinaryOutputStatusVariation
Static binary output status variation.
Definition: dnp3.hpp:3716
TransportDecodeLevel
Controls how transmitted and received transport segments are decoded at the INFO log level.
Definition: dnp3.hpp:312
@ payload
Decode the header and the raw payload as hexadecimal.
TimeSyncError
Possible errors that can occur during a time synchronization procedure.
Definition: dnp3.hpp:3152
@ overflow
Overflow in calculation.
@ system_time_not_unix
The system time cannot be converted to a Unix timestamp.
@ system_time_not_available
System time not available.
@ bad_outstation_time_delay
Outstation time delay exceeded the response delay.
@ clock_rollback
Detected a clock rollback.
@ iin_error
Outstation indicated an error.
@ still_needs_time
Outstation did not clear the NEED_TIME IIN bit.
TaskType
Task type used in AssociationInformation.
Definition: dnp3.hpp:2728
@ command
Command request.
@ user_read
User-defined read request.
@ auto_event_scan
Automatic event scan caused by RESTART IIN bit detection.
@ time_sync
Time synchronisation task.
@ clear_restart_bit
Clear RESTART IIN bit.
Variation
Group/Variation.
Definition: dnp3.hpp:1430
@ group41_var4
Analog Output - Double-precision floating point.
@ group42_var1
Analog Output Event - 32-bit without time.
@ group23_var2
Frozen Counter Event - 16-bit with flags.
@ group40_var3
Analog Output Status - Single-precision floating point with flags.
@ group60_var4
Class objects - Class 3 data.
@ group21_var9
Frozen Counter - 32-bit without flag.
@ group21_var2
Frozen Counter - 16-bit with flags.
@ group40_var1
Analog Output Status - 32-bit with flags.
@ group30_var3
Analog Input - 32-bit without flag.
@ group11_var1
Binary Output Event - Without time.
@ group42_var5
Analog Output Event - Single-precision floating point without time.
@ group22_var2
Counter Event - 16-bit with flags.
@ group12_var1
Binary Output Command - Pattern Control Block.
@ group42_var3
Analog Output Event - 32-bit with time.
@ group11_var2
Binary Output Event - With time.
@ group22_var5
Counter Event - 32-bit with flags and time.
@ group42_var8
Analog Output Event - Double-preicions floating point with time.
@ group30_var6
Analog Input - Double-precision floating point with flags.
@ group50_var1
Time and Date - Absolute time.
@ group60_var2
Class objects - Class 1 data.
@ group20_var2
Counter - 16-bit with flags.
@ group2_var0
Binary Input Event - Default variation.
@ group41_var0
Analog Output - Default variation.
@ group21_var5
Frozen Counter - 32-bit with flags and time.
@ group2_var3
Binary Input Event - With relative time.
@ group42_var6
Analog Output Event - Double-precision floating point without time.
@ group32_var0
Analog Input Event - Default variation.
@ group22_var6
Counter Event - 16-bit with flags and time.
@ group20_var1
Counter - 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.
@ group23_var5
Frozen Counter Event - 32-bit with flags and time.
@ group60_var1
Class objects - Class 0 data.
@ 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.
@ group42_var7
Analog Output Event - Single-preicions floating point with time.
@ group10_var1
Binary Output - Packed format.
@ group10_var2
Binary Output - With flags.
@ group4_var1
Double-bit Binary Input Event - Without time.
@ group30_var0
Analog Input - Default variation.
@ group21_var0
Frozen Counter - Default variation.
@ group51_var2
Time and date CTO - Absolute time, unsynchronized.
@ group12_var0
Binary Output Command - Control Relay Output Block.
@ group40_var0
Analog Output Status - Default variation.
@ group50_var4
Time and Date - Indexed absolute time and long interval.
@ group52_var1
Time delay - Coarse.
@ group51_var1
Time and date CTO - Absolute time, synchronized.
@ group52_var2
Time delay - Fine.
@ group20_var0
Counter - Default variation.
@ group32_var7
Analog Input Event - Single-precision floating point with time.
@ group3_var0
Double-bit Binary Input - Default variation.
@ 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 with flags.
@ group42_var0
Analog Output Event - Default variation.
@ group23_var0
Frozen Counter Event - Default variation.
@ group50_var3
Time and Date - Absolute time at last recorded time.
@ group22_var0
Counter Event - Default variation.
@ group30_var2
Analog Input - 16-bit with flags.
@ group20_var5
Counter - 32-bit without flag.
@ 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 - Default variation.
@ group42_var2
Analog Output Event - 16-bit without time.
@ group40_var2
Analog Output Status - 16-bit with flags.
@ group1_var0
Binary Input - Default variation.
@ group60_var3
Class objects - Class 2 data.
@ group32_var5
Analog Input Event - Single-precision floating point without time.
@ group21_var10
Frozen Counter - 16-bit without flag.
@ group2_var1
Binary Input Event - Without time.
@ group41_var2
Analog Output - 16-bit.
@ group30_var4
Analog Input - 16-bit without flag.
@ group41_var1
Analog Output - 32-bit.
@ group20_var6
Counter - 16-bit without flag.
@ 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 - Default variation.
@ group23_var1
Frozen Counter Event - 32-bit with flags.
@ group111
Octet String Event.
@ group2_var2
Binary Input Event - With absolute time.
@ group23_var6
Frozen Counter Event - 16-bit with flags and time.
@ group4_var3
Double-bit Binary Input Event - With relative time.
@ group4_var0
Double-bit Binary Input Event - Default variation.
OpType
Operation Type field, used in conjunction with TripCloseCode to specify a control operation.
Definition: dnp3.hpp:520
EventCounterVariation
Event counter variation.
Definition: dnp3.hpp:3790
OperateType
Enumeration describing how the master requested the control operation.
Definition: dnp3.hpp:4987
@ direct_operate_no_ack
operate the control via a DirectOperateNoAck request
EventDoubleBitBinaryInputVariation
Event double-bit binary input variation.
Definition: dnp3.hpp:3670
StaticAnalogOutputStatusVariation
Static analog output status variation.
Definition: dnp3.hpp:3996
CommandStatus
Enumeration received from an outstation in response to command request.
Definition: dnp3.hpp:4936
@ 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)
@ 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...
TimeQuality
Timestamp quality.
Definition: dnp3.hpp:666
@ 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:42
StaticDoubleBitBinaryInputVariation
Static double-bit binary input variation.
Definition: dnp3.hpp:3657
StaticAnalogInputVariation
Static analog variation.
Definition: dnp3.hpp:3915
FunctionCode
Application layer function code.
Definition: dnp3.hpp:1808
@ 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:2399
StaticBinaryInputVariation
Static binary input variation.
Definition: dnp3.hpp:3598
RestartDelayType
Type of restart delay value. Used by RestartDelay.
Definition: dnp3.hpp:4633
@ seconds
Value is in seconds (corresponds to g51v1)
@ not_supported
Restart mode not supported.
@ 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:327
CertificateMode
Determines how the certificate(s) presented by the peer are validated.
Definition: dnp3.hpp:1789
@ 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...
CommandError
Result of a command.
Definition: dnp3.hpp:3085
@ header_mismatch
Number of headers or objects in the response didn't match the number in the request.
@ bad_status
Outstation indicated that a command was not SUCCESS.
EventBinaryInputVariation
Event binary input variation.
Definition: dnp3.hpp:3611
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:733
@ 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:3842
StopBits
Number of stop bits.
Definition: dnp3.hpp:1705
ReadError
Errors that can occur during a read operation.
Definition: dnp3.hpp:2929
FreezeType
Freeze operation type.
Definition: dnp3.hpp:4717
@ 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:46
AppDecodeLevel
Controls how transmitted and received application-layer fragments are decoded at the INFO log level.
Definition: dnp3.hpp:295
@ 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:3863
FreezeResult
Result of a freeze operation.
Definition: dnp3.hpp:4730
constexpr uint64_t dnp3_version_minor
minor version number
Definition: dnp3.hpp:44
QualifierCode
Qualifier code used in the response.
Definition: dnp3.hpp:2023
@ 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:1761
@ discard
Framing errors are discarded. The link-layer parser is reset on any error, and the parser begins scan...
constexpr char const * dnp3_version_string
version number as the string major.minor.patch
Definition: dnp3.hpp:48
TaskError
Task error used in AssociationInformation.
Definition: dnp3.hpp:2757
@ no_connection
no connection
@ response_timeout
timeout occurred before receiving a response
@ too_many_requests
too many user requests queued
@ bad_response
response was malformed or contained object headers
@ write_error
insufficient buffer space to serialize the request
@ association_removed
association was removed mid-task
RestartError
Errors that can occur during a cold/warm restart operation.
Definition: dnp3.hpp:3216
ParamError
Error type used throughout the library.
Definition: dnp3.hpp:52
@ 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.
@ 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.
@ 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.
EventClass
Event class.
Definition: dnp3.hpp:3520
TimeSyncMode
Time synchronization mode.
Definition: dnp3.hpp:3139
LinkStatusError
Errors that can occur during a manually initiated link status check. See MasterChannel::check_link_st...
Definition: dnp3.hpp:3266
@ unexpected_response
There was activity on the link, but it wasn't a LINK_STATUS.
StaticCounterVariation
Static counter variation.
Definition: dnp3.hpp:3773
BroadcastAction
Enumeration describing how the outstation processed a broadcast request.
Definition: dnp3.hpp:4859
@ 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:5112
@ disconnected
Disconnected from the master.
TripCloseCode
Trip-Close Code field, used in conjunction with OpType to specify a control operation.
Definition: dnp3.hpp:503
MinTlsVersion
Minimum TLS version to allow.
Definition: dnp3.hpp:1774
@ v12
Allow TLS 1.2 and 1.3.
LogOutputFormat
Describes how each log event is formatted.
Definition: dnp3.hpp:161
@ text
A simple text-based format.
@ json
Output formatted as JSON.
Parity
Parity checking modes.
Definition: dnp3.hpp:1690
@ 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:1366
@ 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:2238
@ 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.
PhysDecodeLevel
Controls how data transmitted at the physical layer (TCP, serial, etc) is logged.
Definition: dnp3.hpp:342
@ 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.
Analog Output Status configuration.
Definition: dnp3.hpp:4040
double deadband
Deadband value.
Definition: dnp3.hpp:4069
StaticAnalogOutputStatusVariation static_variation
Default static variation.
Definition: dnp3.hpp:4065
EventAnalogOutputStatusVariation event_variation
Default event variation.
Definition: dnp3.hpp:4067
AnalogOutputStatusConfig()
Initialize to defaults.
analog_output_status point
Definition: dnp3.hpp:1184
Timestamp time
Point timestamp.
Definition: dnp3.hpp:1205
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:1199
Flags flags
Point flags.
Definition: dnp3.hpp:1203
double value
Point value.
Definition: dnp3.hpp:1201
Application-controlled IIN bits.
Definition: dnp3.hpp:4747
bool config_corrupt
IIN2.5 - Configuration corrupt.
Definition: dnp3.hpp:4780
bool need_time
IIN1.4 - Time synchronization is required.
Definition: dnp3.hpp:4774
bool local_control
IIN1.5 - Some output points are in local mode.
Definition: dnp3.hpp:4776
bool device_trouble
IIN1.6 - Device trouble.
Definition: dnp3.hpp:4778
ApplicationIin()
Initialize all fields in ApplicationIin to false.
Association configuration.
Definition: dnp3.hpp:2565
Classes startup_integrity_classes
Startup integrity classes to ask on master startup and when an outstation restart is detected.
Definition: dnp3.hpp:2613
std::chrono::steady_clock::duration keep_alive_timeout
Delay of inactivity before sending a REQUEST_LINK_STATUS to the outstation.
Definition: dnp3.hpp:2621
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:2615
EventClasses enable_unsol_classes
Classes to enable unsolicited responses at startup.
Definition: dnp3.hpp:2609
EventClasses event_scan_on_events_available
Classes to automatically send reads when the IIN bit is asserted.
Definition: dnp3.hpp:2625
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:2627
EventClasses disable_unsol_classes
Classes to disable unsolicited responses at startup.
Definition: dnp3.hpp:2607
bool auto_integrity_scan_on_buffer_overflow
Automatic integrity scan when an EVENT_BUFFER_OVERFLOW is detected.
Definition: dnp3.hpp:2623
RetryStrategy auto_tasks_retry_strategy
Automatic tasks retry strategy.
Definition: dnp3.hpp:2617
std::chrono::steady_clock::duration response_timeout
Timeout for receiving a response on this association.
Definition: dnp3.hpp:2605
Association identifier.
Definition: dnp3.hpp:2412
Binary Output Status configuration.
Definition: dnp3.hpp:3744
EventBinaryOutputStatusVariation event_variation
Default event variation.
Definition: dnp3.hpp:3769
StaticBinaryOutputStatusVariation static_variation
Default static variation.
Definition: dnp3.hpp:3767
BinaryOutputStatusConfig()
Initialize to defaults.
binary_output_status point
Definition: dnp3.hpp:896
uint16_t index
Point index.
Definition: dnp3.hpp:911
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:913
Flags flags
Point flags.
Definition: dnp3.hpp:915
Timestamp time
Point timestamp.
Definition: dnp3.hpp:917
Controls which types are reported during a Class 0 read.
Definition: dnp3.hpp:4445
ClassZeroConfig()
Initialize to default values.
bool analog_output_status
Include Analog Output Status in Class 0 reads.
Definition: dnp3.hpp:4492
bool binary
Include Binary Inputs in Class 0 reads.
Definition: dnp3.hpp:4480
bool frozen_counter
Include Frozen Counters in Class 0 reads.
Definition: dnp3.hpp:4488
bool analog
Include Analog Inputs in Class 0 reads.
Definition: dnp3.hpp:4490
bool octet_string
Include Binary Inputs in Class 0 reads.
Definition: dnp3.hpp:4496
bool binary_output_status
Include Binary Output Status in Class 0 reads.
Definition: dnp3.hpp:4484
bool double_bit_binary
Include Double-Bit Binary Inputs in Class 0 reads.
Definition: dnp3.hpp:4482
bool counter
Include Counters in Class 0 reads.
Definition: dnp3.hpp:4486
Class 0, 1, 2 and 3 config.
Definition: dnp3.hpp:2499
bool class3
Class 3 events.
Definition: dnp3.hpp:2544
bool class0
Class 0 (static data)
Definition: dnp3.hpp:2538
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:2540
bool class2
Class 2 events.
Definition: dnp3.hpp:2542
Timing parameters for connection attempts.
Definition: dnp3.hpp:2366
std::chrono::steady_clock::duration reconnect_delay
Delay before attempting a connection after a disconnect.
Definition: dnp3.hpp:2395
std::chrono::steady_clock::duration min_connect_delay
Minimum delay between two connection attempts, doubles up to the maximum delay.
Definition: dnp3.hpp:2391
std::chrono::steady_clock::duration max_connect_delay
Maximum delay between two connection attempts.
Definition: dnp3.hpp:2393
ConnectStrategy()
Initialize to default values.
CROB (Group12Var1) control code.
Definition: dnp3.hpp:541
bool clear
Support for this field is optional. When the clear bit is set, the device shall remove pending contro...
Definition: dnp3.hpp:599
OpType op_type
This field is used in conjunction with the ControlCode::tcc field to specify a control operation.
Definition: dnp3.hpp:603
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:601
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:597
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:474
bool fir
First fragment in the message.
Definition: dnp3.hpp:491
bool uns
Unsolicited response.
Definition: dnp3.hpp:497
bool fin
Final fragment of the message.
Definition: dnp3.hpp:493
bool con
Requires confirmation.
Definition: dnp3.hpp:495
uint8_t seq
Sequence number.
Definition: dnp3.hpp:499
Counter configuration.
Definition: dnp3.hpp:3809
StaticCounterVariation static_variation
Default static variation.
Definition: dnp3.hpp:3834
uint32_t deadband
Deadband value.
Definition: dnp3.hpp:3838
CounterConfig()
Initialize to defaults.
EventCounterVariation event_variation
Default event variation.
Definition: dnp3.hpp:3836
counter point
Definition: dnp3.hpp:968
uint16_t index
Point index.
Definition: dnp3.hpp:983
Timestamp time
Point timestamp.
Definition: dnp3.hpp:989
Flags flags
Point flags.
Definition: dnp3.hpp:987
uint32_t value
Point value.
Definition: dnp3.hpp:985
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:359
TransportDecodeLevel transport
Controls transport segment layer decoding.
Definition: dnp3.hpp:400
DecodeLevel()
Initialize log levels to defaults.
AppDecodeLevel application
Controls application fragment decoding.
Definition: dnp3.hpp:398
LinkDecodeLevel link
Controls link frame decoding.
Definition: dnp3.hpp:402
static DecodeLevel nothing()
Initialize log levels to nothing.
PhysDecodeLevel physical
Controls the logging of physical layer read/write.
Definition: dnp3.hpp:404
Maximum number of events for each type.
Definition: dnp3.hpp:4390
uint16_t max_counter
Maximum number of Counter events (g22)
Definition: dnp3.hpp:4431
uint16_t max_frozen_counter
Maximum number of Frozen Counter events (g23)
Definition: dnp3.hpp:4433
uint16_t max_binary
Maximum number of Binary Input events (g2)
Definition: dnp3.hpp:4425
uint16_t max_analog_output_status
Maximum number of Analog Output Status events (g42)
Definition: dnp3.hpp:4437
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:4439
uint16_t max_analog
Maximum number of Analog Input events (g32)
Definition: dnp3.hpp:4435
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:4429
uint16_t max_double_bit_binary
Maximum number of Double-Bit Binary Input events (g4)
Definition: dnp3.hpp:4427
Event classes.
Definition: dnp3.hpp:2453
bool class2
Class 2 events.
Definition: dnp3.hpp:2491
static EventClasses none()
Initialize all classes to false.
bool class1
Class 1 events.
Definition: dnp3.hpp:2489
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:2493
Collection of individual flag bits represented by an underlying mask value.
Definition: dnp3.hpp:650
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:662
Frozen Counter configuration.
Definition: dnp3.hpp:3882
FrozenCounterConfig()
Initialize to defaults.
uint32_t deadband
Deadband value.
Definition: dnp3.hpp:3911
StaticFrozenCounterVariation static_variation
Default static variation.
Definition: dnp3.hpp:3907
EventFrozenCounterVariation event_variation
Default event variation.
Definition: dnp3.hpp:3909
frozen_counter point
Definition: dnp3.hpp:1040
Flags flags
Point flags.
Definition: dnp3.hpp:1059
Timestamp time
Point timestamp.
Definition: dnp3.hpp:1061
uint16_t index
Point index.
Definition: dnp3.hpp:1055
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:1057
Control Relay Output Block.
Definition: dnp3.hpp:609
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:644
uint32_t on_time
Duration the output drive remains active (in milliseconds)
Definition: dnp3.hpp:642
uint8_t count
Count.
Definition: dnp3.hpp:640
ControlCode code
Control code.
Definition: dnp3.hpp:638
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:1898
bool need_time
Outstation requires time synchronization.
Definition: dnp3.hpp:1926
bool class_2_events
Outstation has unreported Class 2 events.
Definition: dnp3.hpp:1922
bool device_trouble
An abnormal, device-specific condition exists in the outstation.
Definition: dnp3.hpp:1930
bool local_control
One or more of the outstation’s points are in local control mode.
Definition: dnp3.hpp:1928
bool class_1_events
Outstation has unreported Class 1 events.
Definition: dnp3.hpp:1920
bool class_3_events
Outstation has unreported Class 3 events.
Definition: dnp3.hpp:1924
bool broadcast
Broadcast message was received.
Definition: dnp3.hpp:1918
bool device_restart
Outstation restarted.
Definition: dnp3.hpp:1932
Second IIN byte.
Definition: dnp3.hpp:1938
bool object_unknown
Outstation does not support requested operation for objects in the request.
Definition: dnp3.hpp:1960
bool config_corrupt
The outstation detected corrupt configuration (optional support)
Definition: dnp3.hpp:1968
bool reserved_2
Reserved for future use - should always be set to 0.
Definition: dnp3.hpp:1970
bool event_buffer_overflow
An event buffer overflow condition exists in the outstation, and at least one unconfirmed event was l...
Definition: dnp3.hpp:1964
bool no_func_code_support
Outstation does not support this function code.
Definition: dnp3.hpp:1958
bool reserved_1
Reserved for future use - should always be set to 0.
Definition: dnp3.hpp:1972
bool already_executing
The operation requested is already executing (optional support)
Definition: dnp3.hpp:1966
bool parameter_error
Outstation does not support requested operation for objects in the request.
Definition: dnp3.hpp:1962
Pair of IIN bytes.
Definition: dnp3.hpp:1978
Iin2 iin2
Second IIN byte.
Definition: dnp3.hpp:1994
Iin1 iin1
First IIN byte.
Definition: dnp3.hpp:1992
Logging configuration options.
Definition: dnp3.hpp:189
LogOutputFormat output_format
output formatting options
Definition: dnp3.hpp:220
bool print_level
optionally print the log level as part to the message string
Definition: dnp3.hpp:224
LoggingConfig()
Initialize the configuration to default values.
TimeFormat time_format
optional time format
Definition: dnp3.hpp:222
bool print_module_info
optionally print the underlying Rust module information to the message string
Definition: dnp3.hpp:226
LogLevel level
logging level
Definition: dnp3.hpp:218
Generic configuration for a MasterChannel.
Definition: dnp3.hpp:2194
DecodeLevel decode_level
Decoding level for this master. You can modify this later on with MasterChannel::set_decode_level().
Definition: dnp3.hpp:2224
uint16_t address
Local DNP3 data-link address.
Definition: dnp3.hpp:2222
MasterChannelConfig(uint16_t address)
Initialize MasterChannelConfig to default values.
uint16_t tx_buffer_size
TX buffer size.
Definition: dnp3.hpp:2228
uint16_t rx_buffer_size
RX buffer size.
Definition: dnp3.hpp:2232
Octet String point.
Definition: dnp3.hpp:1301
uint16_t index
Point index.
Definition: dnp3.hpp:1315
ByteIterator value
Point value.
Definition: dnp3.hpp:1317
Outstation configuration.
Definition: dnp3.hpp:4537
uint32_t max_unsolicited_retries
Maximum number of unsolicited retries.
Definition: dnp3.hpp:4615
uint16_t max_controls_per_request
Maximum number of controls in a single request.
Definition: dnp3.hpp:4627
DecodeLevel decode_level
Decoding level.
Definition: dnp3.hpp:4607
uint16_t unsolicited_buffer_size
Unsolicited response buffer size.
Definition: dnp3.hpp:4601
OutstationFeatures features
Optional features.
Definition: dnp3.hpp:4613
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:4611
std::chrono::steady_clock::duration unsolicited_retry_delay
Delay to wait before retrying an unsolicited response.
Definition: dnp3.hpp:4617
std::chrono::steady_clock::duration keep_alive_timeout
Delay of inactivity before sending a REQUEST_LINK_STATUS to the master.
Definition: dnp3.hpp:4621
std::chrono::steady_clock::duration confirm_timeout
Confirmation timeout.
Definition: dnp3.hpp:4609
ClassZeroConfig class_zero
Controls responses to Class 0 reads.
Definition: dnp3.hpp:4629
uint16_t max_read_request_headers
Maximum number of headers that will be processed in a READ request.
Definition: dnp3.hpp:4625
uint16_t master_address
Link-layer master address.
Definition: dnp3.hpp:4591
EventBufferConfig event_buffer_config
Event buffer sizes configuration.
Definition: dnp3.hpp:4593
uint16_t outstation_address
Link-layer outstation address.
Definition: dnp3.hpp:4589
uint16_t solicited_buffer_size
Solicited response buffer size.
Definition: dnp3.hpp:4597
uint16_t rx_buffer_size
Receive buffer size.
Definition: dnp3.hpp:4605
Optional outstation features that can be enabled or disabled.
Definition: dnp3.hpp:4502
bool broadcast
Process valid broadcast messages.
Definition: dnp3.hpp:4529
OutstationFeatures()
Initialize to default values.
bool self_address
Respond to the self address.
Definition: dnp3.hpp:4527
bool unsolicited
Respond to enable/disable unsolicited response and produce unsolicited responses.
Definition: dnp3.hpp:4531
Poll identifier.
Definition: dnp3.hpp:2431
Restart delay used by OutstationApplication::cold_restart() and OutstationApplication::warm_restart()
Definition: dnp3.hpp:4652
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:4698
static RestartDelay seconds(uint16_t value)
RestartDelay with a count of seconds.
RestartDelayType restart_type
Indicates what RestartDelay::value is.
Definition: dnp3.hpp:4696
Retry strategy configuration.
Definition: dnp3.hpp:1629
RetryStrategy()
Initialize to defaults.
std::chrono::steady_clock::duration max_delay
Maximum delay between two retries.
Definition: dnp3.hpp:1654
std::chrono::steady_clock::duration min_delay
Minimum delay between two retries.
Definition: dnp3.hpp:1652
Runtime configuration.
Definition: dnp3.hpp:412
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:435
RuntimeConfig()
Initialize the configuration to default values.
Serial port settings.
Definition: dnp3.hpp:1720
StopBits stop_bits
Number of bits to use to signal the end of a character.
Definition: dnp3.hpp:1757
FlowControl flow_control
Type of signalling to use for controlling data transfer.
Definition: dnp3.hpp:1753
Parity parity
Type of parity to use for error checking.
Definition: dnp3.hpp:1755
SerialSettings()
Initialize to default values.
uint32_t baud_rate
Baud rate (in symbols-per-second)
Definition: dnp3.hpp:1749
DataBits data_bits
Number of bits used to represent a character sent on the line.
Definition: dnp3.hpp:1751
Timestamp value.
Definition: dnp3.hpp:683
static Timestamp synchronized_timestamp(uint64_t value)
Creates a synchronized timestamp struct.
static Timestamp invalid_timestamp()
Creates an invalid timestamp struct.
TimeQuality quality
Timestamp quality.
Definition: dnp3.hpp:729
static Timestamp unsynchronized_timestamp(uint64_t value)
Creates an unsynchronized timestamp struct.
uint64_t value
Timestamp value.
Definition: dnp3.hpp:727
TLS client configuration.
Definition: dnp3.hpp:2310
MinTlsVersion min_tls_version
Minimum TLS version allowed.
Definition: dnp3.hpp:2358
CertificateMode certificate_mode
Certificate validation mode.
Definition: dnp3.hpp:2360
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:2346
std::string local_cert_path
Path to the PEM-encoded local certificate.
Definition: dnp3.hpp:2348
std::string private_key_path
Path to the the PEM-encoded private key.
Definition: dnp3.hpp:2350
std::string password
Optional password if the private key file is encrypted.
Definition: dnp3.hpp:2356
std::string dns_name
Expected name to validate in the presented certificate (only in CertificateMode::authority_based mode...
Definition: dnp3.hpp:2344
TLS server configuration.
Definition: dnp3.hpp:5291
std::string dns_name
Expected name to validate in the presented certificate (only in CertificateMode::authority_based mode...
Definition: dnp3.hpp:5325
CertificateMode certificate_mode
Certificate validation mode.
Definition: dnp3.hpp:5341
std::string local_cert_path
Path to the PEM-encoded local certificate.
Definition: dnp3.hpp:5329
MinTlsVersion min_tls_version
Minimum TLS version allowed.
Definition: dnp3.hpp:5339
std::string password
Optional password if the private key file is encrypted.
Definition: dnp3.hpp:5337
std::string peer_cert_path
Path to the PEM-encoded certificate of the peer.
Definition: dnp3.hpp:5327
std::string private_key_path
Path to the the PEM-encoded private key.
Definition: dnp3.hpp:5331
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
Options that control how the update is performed.
Definition: dnp3.hpp:3558
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:3594
bool update_static
Optionally bypass updating the static database (the current value)
Definition: dnp3.hpp:3592
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:2635
static UtcTimestamp invalid()
Construct an invalid UtcTimestamp.
uint64_t value
Value of the timestamp (in milliseconds from UNIX Epoch).
Definition: dnp3.hpp:2671
static UtcTimestamp valid(uint64_t value)
Construct a valid UtcTimestamp.
bool is_valid
True if the timestamp is valid, false otherwise.
Definition: dnp3.hpp:2673