TCP server that listens for connections and routes the messages to outstations.
More...
#include <dnp3.hpp>
|
class | CppOutstationServerFriend |
|
TCP server that listens for connections and routes the messages to outstations.
To add outstations to it, use OutstationServer::add_outstation(). Once all the outstations are added, the server can be started with OutstationServer::bind().
OutstationServer::~OutstationServer() is used to gracefully shutdown all the outstations and the server.
◆ OutstationServer()
Transfer ownership of the underlying C-type to this instance and invalidate the other instance.
- Note
- the moved class will now throw an exception if any method is called
- Parameters
-
other | Class from which ownership will be transfer to this instance |
◆ ~OutstationServer()
dnp3::OutstationServer::~OutstationServer |
( |
| ) |
|
Gracefully shutdown all the outstations associated to this server, stops the server and release resources.
◆ add_outstation()
Add an outstation to the server.
The returned Outstation can be used to modify points of the outstation.
In order for the outstation to run, the TCP server must be running. Use OutstationServer::bind() to run it.
- Parameters
-
config | Outstation configuration |
application | Outstation application callbacks |
information | Outstation information callbacks |
control_handler | Outstation control handler |
listener | Listener for the connection state |
filter | Address filter |
- Returns
- Outstation handle
- Exceptions
-
◆ bind()
void dnp3::OutstationServer::bind |
( |
| ) |
|
Bind the server to the port and starts listening. Also starts all the outstations associated to it.
- Exceptions
-
◆ create_tcp_server()
Create a new TCP server.
To start it, use OutstationServer::bind().
- Parameters
-
runtime | Runtime to execute the server on |
link_error_mode | Controls how link errors are handled with respect to the TCP session |
address | Address to bind the server to e.g. 127.0.0.1:20000 |
- Returns
- New TCP server instance
- Exceptions
-
◆ create_tls_server()
Create a new TLS server.
To start it, use OutstationServer::bind().
- Parameters
-
runtime | Runtime to execute the server on |
link_error_mode | Controls how link errors are handled with respect to the session |
address | Address to bind the server to e.g. 127.0.0.1:20000 |
tls_config | TLS server configuration |
- Returns
- New TLS server instance
- Exceptions
-
The documentation for this class was generated from the following file: