dnp3  0.9.0
Public Member Functions | List of all members
dnp3.TcpServer Class Reference

TCP server that listens for connections and routes the messages to outstations. More...

Public Member Functions

 TcpServer (Runtime runtime, LinkErrorMode linkErrorMode, string address)
 Create a new TCP server. More...
 
void Shutdown ()
 Gracefully shutdown all the outstations associated to this server, stops the server and release resources. More...
 
Outstation AddOutstation (OutstationConfig config, EventBufferConfig eventConfig, IOutstationApplication application, IOutstationInformation information, IControlHandler controlHandler, IConnectionStateListener listener, AddressFilter filter)
 Add an outstation to the server. More...
 
void Bind ()
 Bind the server to the port and starts listening. Also starts all the outstations associated to it. More...
 

Detailed Description

TCP server that listens for connections and routes the messages to outstations.

To add outstations to it, use TcpServer.AddOutstation. Once all the outstations are added, the server can be started with TcpServer.Bind.

TcpServer.Shutdown() is used to gracefully shutdown all the outstations and the server.

Constructor & Destructor Documentation

◆ TcpServer()

dnp3.TcpServer.TcpServer ( Runtime  runtime,
LinkErrorMode  linkErrorMode,
string  address 
)
inline

Create a new TCP server.

To start it, use TcpServer.Bind.

Parameters
runtimeRuntime to execute the server on
linkErrorModeControls how link errors are handled with respect to the TCP session
addressAddress to bind the server to e.g. 127.0.0.1:20000
Returns
New TCP server instance
Exceptions
ParamException

Member Function Documentation

◆ AddOutstation()

Outstation dnp3.TcpServer.AddOutstation ( OutstationConfig  config,
EventBufferConfig  eventConfig,
IOutstationApplication  application,
IOutstationInformation  information,
IControlHandler  controlHandler,
IConnectionStateListener  listener,
AddressFilter  filter 
)
inline

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 TcpServer.Bind to run it.

Parameters
configOutstation configuration
eventConfigEvent buffer configuration
applicationOutstation application callbacks
informationOutstation information callbacks
controlHandlerOutstation control handler
listenerListener for the connection state
filterAddress filter
Returns
Outstation handle
Exceptions
ParamException

◆ Bind()

void dnp3.TcpServer.Bind ( )
inline

Bind the server to the port and starts listening. Also starts all the outstations associated to it.

Exceptions
ParamException

◆ Shutdown()

void dnp3.TcpServer.Shutdown ( )
inline

Gracefully shutdown all the outstations associated to this server, stops the server and release resources.


The documentation for this class was generated from the following file: