![]() |
dnp3 (C++ API) 1.6.0
|
Outstation handle. More...
#include <dnp3.hpp>
Public Member Functions | |
| Outstation (Outstation &&other) noexcept | |
| Transfer ownership of the underlying C-type to this instance and invalidate the other instance. More... | |
| ~Outstation () | |
| Free resources of the outstation. More... | |
| void | enable () |
| enable communications More... | |
| void | disable () |
| disable communications More... | |
| void | transaction (DatabaseTransaction &callback) |
| Acquire a mutex on the underlying database and apply a set of changes as a transaction. More... | |
| void | set_decode_level (const DecodeLevel &level) |
| Set decoding log level. More... | |
Static Public Member Functions | |
| 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. More... | |
| 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 listener. More... | |
| 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 added and removed. More... | |
| 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. More... | |
| 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. More... | |
| 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 running on a serial port which is tolerant to the serial port being added and removed. More... | |
Friends | |
| class | CppOutstationFriend |
Outstation handle.
Use this handle to modify the internal database.
|
inlinenoexcept |
Transfer ownership of the underlying C-type to this instance and invalidate the other instance.
| other | Class from which ownership will be transfer to this instance |
| dnp3::Outstation::~Outstation | ( | ) |
Free resources of the outstation.
|
static |
Create an outstation instance running on a serial port.
The port is opened immediately on the calling thread and fails if not successful
| runtime | runtime on which to spawn the outstation |
| serial_path | Path of the serial device |
| settings | settings for the serial port |
| config | outstation configuration |
| application | application interface |
| information | informational events interface |
| control_handler | control handler interface |
NULL if the port cannot be opened | ParamException |
|
static |
Create an outstation instance running on a serial port which is tolerant to the serial port being added and removed.
| runtime | runtime on which to spawn the outstation |
| serial_path | Path of the serial device |
| settings | settings for the serial port |
| open_retry_delay | delay between attempts to open the serial port |
| config | outstation configuration |
| application | application interface |
| information | informational events interface |
| control_handler | control handler interface |
| port_listener | port state listener |
NULL if the port cannot be opened | ParamException |
|
static |
This method is implemented in terms of Outstation::create_serial_session_2() but without a port listener.
| runtime | runtime on which to spawn the outstation |
| serial_path | Path of the serial device |
| settings | settings for the serial port |
| open_retry_delay | delay between attempts to open the serial port |
| config | outstation configuration |
| application | application interface |
| information | informational events interface |
| control_handler | control handler interface |
NULL if the port cannot be opened | ParamException |
|
static |
Create an outstation instance running as a TCP client.
| runtime | runtime on which to spawn the outstation |
| link_error_mode | Controls how link errors are handled with respect to the TCP session |
| endpoints | List of IP endpoints. |
| connect_strategy | Controls the timing of (re)connection attempts |
| connect_options | Options that control the TCP connection process |
| config | outstation configuration |
| application | application interface |
| information | informational events interface |
| control_handler | control handler interface |
| listener | Connection listener used to receive updates on the status of the connection |
| ParamException |
|
static |
Create an outstation instance running as a TLS client.
| runtime | runtime on which to spawn the outstation |
| link_error_mode | Controls how link errors are handled with respect to the TCP session |
| endpoints | List of IP endpoints. |
| connect_strategy | Controls the timing of (re)connection attempts |
| connect_options | Options that control the TCP connection process |
| config | outstation configuration |
| application | application interface |
| information | informational events interface |
| control_handler | control handler interface |
| listener | Connection listener used to receive updates on the status of the connection |
| tls_config | TLS client configuration |
| ParamException |
|
static |
Create an outstation instance running on a serial port which is tolerant to the serial port being added and removed.
| runtime | runtime on which to spawn the outstation |
| udp_config | UDP configuration |
| config | outstation configuration |
| application | application interface |
| information | informational events interface |
| control_handler | control handler interface |
NULL if the port cannot be opened | ParamException |
| void dnp3::Outstation::disable | ( | ) |
disable communications
| ParamException |
| void dnp3::Outstation::enable | ( | ) |
enable communications
| ParamException |
| void dnp3::Outstation::set_decode_level | ( | const DecodeLevel & | level | ) |
| void dnp3::Outstation::transaction | ( | DatabaseTransaction & | callback | ) |
Acquire a mutex on the underlying database and apply a set of changes as a transaction.
| callback | Interface on which to execute the transaction |