lib60870.NET
2.2.0
IEC 60870-5-101/104 Protocol Source Code Library for C#/.NET
|
This class represents a single IEC 60870-5 server (slave or controlled station). It is also the main access to the CS 104 server API. More...
Public Member Functions | |
ApplicationLayerParameters | GetApplicationLayerParameters () |
Server () | |
Create a new server using default connection parameters More... | |
Server (TlsSecurityInformation securityInfo) | |
Server (APCIParameters apciParameters, ApplicationLayerParameters alParameters) | |
Create a new server using the provided connection parameters. More... | |
Server (APCIParameters apciParameters, ApplicationLayerParameters alParameters, TlsSecurityInformation securityInfo) | |
void | AddRedundancyGroup (RedundancyGroup redundancyGroup) |
Adds a redundancy group to the server. Each redundancy group has its own event queue. More... | |
void | SetConnectionRequestHandler (ConnectionRequestHandler handler, object parameter) |
Sets a callback handler for connection request. The user can allow (returning true) or deny (returning false) the connection attempt. If no handler is installed every new connection will be accepted. More... | |
void | SetConnectionEventHandler (ConnectionEventHandler handler, object parameter) |
Sets the connection event handler. The connection event handler will be called whenever a new connection was opened, closed, activated, or inactivated. More... | |
void | SetLocalAddress (string localAddress) |
Sets the local IP address to bind the server. Default is "0.0.0.0" for all interfaces More... | |
void | SetLocalPort (int tcpPort) |
Sets the local TCP port to bind to. Default is 2404. More... | |
void | Start () |
Start the server. Listen to client connections. More... | |
void | Stop () |
Stop the server. Close all open client connections. More... | |
void | EnqueueASDU (ASDU asdu) |
Enqueues the ASDU to the transmission queue. More... | |
Public Member Functions inherited from lib60870.CS101.Slave | |
void | SetInterrogationHandler (InterrogationHandler handler, object parameter) |
Sets a callback for interrogaton requests. More... | |
void | SetCounterInterrogationHandler (CounterInterrogationHandler handler, object parameter) |
Sets a callback for counter interrogaton requests. More... | |
void | SetReadHandler (ReadHandler handler, object parameter) |
Sets a callback for read requests. More... | |
void | SetClockSynchronizationHandler (ClockSynchronizationHandler handler, object parameter) |
Sets a callback for the clock synchronization request. More... | |
void | SetResetProcessHandler (ResetProcessHandler handler, object parameter) |
void | SetDelayAcquisitionHandler (DelayAcquisitionHandler handler, object parameter) |
void | SetASDUHandler (ASDUHandler handler, object parameter) |
Sets a callback to handle ASDUs (commands, requests) form clients. This callback can be used when no other callback handles the message from the client/master. More... | |
void | SetFileReadyHandler (FileReadyHandler handler, object parameter) |
FilesAvailable | GetAvailableFiles () |
Public Attributes | |
ConnectionRequestHandler | connectionRequestHandler = null |
object | connectionRequestHandlerParameter = null |
Public Attributes inherited from lib60870.CS101.Slave | |
InterrogationHandler | interrogationHandler = null |
object | InterrogationHandlerParameter = null |
CounterInterrogationHandler | counterInterrogationHandler = null |
object | counterInterrogationHandlerParameter = null |
ReadHandler | readHandler = null |
object | readHandlerParameter = null |
ClockSynchronizationHandler | clockSynchronizationHandler = null |
object | clockSynchronizationHandlerParameter = null |
ResetProcessHandler | resetProcessHandler = null |
object | resetProcessHandlerParameter = null |
DelayAcquisitionHandler | delayAcquisitionHandler = null |
object | delayAcquisitionHandlerParameter = null |
ASDUHandler | asduHandler = null |
object | asduHandlerParameter = null |
Properties | |
ServerMode | ServerMode [get, set] |
Gets or sets the server mode (behavior regarding redundancy groups) More... | |
EnqueueMode | EnqueueMode [get, set] |
Gets or sets the mode of ASDU queue behaviour. Default mode is EnqueueMode.REMOVE_OLDEST. More... | |
int | MaxQueueSize [get, set] |
Gets or sets the maximum size of the ASDU queue. Setting this property has no effect after calling the Start method. More... | |
int | MaxOpenConnections [get, set] |
Gets or sets the maximum number of open TCP connections More... | |
int | OpenConnections [get] |
Gets the number of connected master/client stations. More... | |
Properties inherited from lib60870.CS101.Slave | |
bool | DebugOutput [get, set] |
Additional Inherited Members | |
Protected Attributes inherited from lib60870.CS101.Slave | |
bool | debugOutput |
FileReadyHandler | fileReadyHandler = null |
object | fileReadyHandlerParameter = null |
FilesAvailable | filesAvailable = new FilesAvailable() |
This class represents a single IEC 60870-5 server (slave or controlled station). It is also the main access to the CS 104 server API.
lib60870.CS104.Server.Server | ( | ) |
Create a new server using default connection parameters
lib60870.CS104.Server.Server | ( | APCIParameters | apciParameters, |
ApplicationLayerParameters | alParameters | ||
) |
Create a new server using the provided connection parameters.
parameters | Connection parameters |
void lib60870.CS104.Server.AddRedundancyGroup | ( | RedundancyGroup | redundancyGroup | ) |
Adds a redundancy group to the server. Each redundancy group has its own event queue.
redundancyGroup | Redundancy group. |
void lib60870.CS104.Server.EnqueueASDU | ( | ASDU | asdu | ) |
Enqueues the ASDU to the transmission queue.
If an active connection exists the ASDU will be sent to the active client immediately. Otherwhise the ASDU will be added to the transmission queue for later transmission.
asdu | ASDU to be sent |
lib60870.CS101.ASDUQueueException | when the ASDU queue is full and mode is EnqueueMode.THROW_EXCEPTION. |
void lib60870.CS104.Server.SetConnectionEventHandler | ( | ConnectionEventHandler | handler, |
object | parameter | ||
) |
Sets the connection event handler. The connection event handler will be called whenever a new connection was opened, closed, activated, or inactivated.
handler | Handler. |
parameter | Parameter. |
void lib60870.CS104.Server.SetConnectionRequestHandler | ( | ConnectionRequestHandler | handler, |
object | parameter | ||
) |
Sets a callback handler for connection request. The user can allow (returning true) or deny (returning false) the connection attempt. If no handler is installed every new connection will be accepted.
handler | Handler. |
parameter | Parameter. |
void lib60870.CS104.Server.SetLocalAddress | ( | string | localAddress | ) |
Sets the local IP address to bind the server. Default is "0.0.0.0" for all interfaces
localAddress | Local IP address or hostname to bind. |
void lib60870.CS104.Server.SetLocalPort | ( | int | tcpPort | ) |
Sets the local TCP port to bind to. Default is 2404.
tcpPort | Local TCP port to bind. |
void lib60870.CS104.Server.Start | ( | ) |
Start the server. Listen to client connections.
void lib60870.CS104.Server.Stop | ( | ) |
Stop the server. Close all open client connections.
|
getset |
Gets or sets the mode of ASDU queue behaviour. Default mode is EnqueueMode.REMOVE_OLDEST.
the mode of ASDU queue behaviour
|
getset |
Gets or sets the maximum number of open TCP connections
The maximum number of open TCP connections.
|
getset |
Gets or sets the maximum size of the ASDU queue. Setting this property has no effect after calling the Start method.
The size of the max queue.
|
get |
Gets the number of connected master/client stations.
The number of open connections.
|
getset |
Gets or sets the server mode (behavior regarding redundancy groups)
The server mode.