|
lib60870.NET 2.3.0
IEC 60870-5-101/104 Protocol Source Code Library for C#/.NET
|
CS 101 slave implementation (implements Slave interface) More...


Public Member Functions | |
| void | Stop () |
| Stops the receive message loop. | |
| void | SetUserDataQueueSizes (int class1QueueSize, int class2QueueSize) |
| Sets the user data queue sizes. When the maximum size is reached the oldest value will be deleted when a new ASDU is added. | |
| bool | IsUserDataClass1QueueFull () |
| Determines whether the user data class 1 queue is full. | |
| void | EnqueueUserDataClass1 (ASDU asdu) |
| Enqueues an ASDU into the class 1 queue (for events, command responses, and other high-priority messages). | |
| bool | IsUserDataClass2QueueFull () |
| Determines whether the user data class 2 queue is full. | |
| void | EnqueueUserDataClass2 (ASDU asdu) |
| Enqueues an ASDU into the class 2 queue (for periodic measurments, background scan, and other low-priority data). | |
| CS101Slave (SerialPort port, LinkLayerParameters parameters=null) | |
| Initializes a new instance of the lib60870.CS101.CS101Slave class. | |
| CS101Slave (Stream serialStream, LinkLayerParameters parameters=null) | |
| Initializes a new instance of the lib60870.CS101.CS101Slave class. | |
| void | SendLinkLayerTestFunction () |
| Sends a link layer test function. | |
| void | Run () |
| Run a the message receiver and state machines once. Can be used if no threads should be used. | |
| void | ReceiveMessageLoop () |
| Starts a loop that handles incoming messages. | |
| void | SetReceivedRawMessageHandler (RawMessageHandler handler, object parameter) |
| Sets the raw message handler for received messages. | |
| void | SetSentRawMessageHandler (RawMessageHandler handler, object parameter) |
| Sets the sent message handler for sent messages. | |
Public Member Functions inherited from lib60870.CS101.Slave | |
| void | SetInterrogationHandler (InterrogationHandler handler, object parameter) |
| Sets a callback for interrogaton requests. | |
| void | SetCounterInterrogationHandler (CounterInterrogationHandler handler, object parameter) |
| Sets a callback for counter interrogaton requests. | |
| void | SetReadHandler (ReadHandler handler, object parameter) |
| Sets a callback for read requests. | |
| void | SetClockSynchronizationHandler (ClockSynchronizationHandler handler, object parameter) |
| Sets a callback for the clock synchronization request. | |
| 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. | |
| void | SetFileReadyHandler (FileReadyHandler handler, object parameter) |
| Sets a callback handler that is called when a file ready message is received from a master. | |
| FilesAvailable | GetAvailableFiles () |
| Gets the available files that are registered with the file server. | |
Properties | |
| ApplicationLayerParameters | Parameters [get, set] |
| Gets or sets the application layer parameters-. | |
| bool | DIR [get, set] |
| Gets or sets the direction bit value used for balanced mode (default is false) | |
| LinkLayerMode | LinkLayerMode [get, set] |
| Gets or sets the link layer mode (balanced or unbalanced). | |
| int | LinkLayerAddress [get, set] |
| Gets or sets the own link layer address. | |
| int | LinkLayerAddressOtherStation [get, set] |
| Gets or sets the link layer address of the other station (for balanced mode). | |
| override int | FileTimeout [get, set] |
Properties inherited from lib60870.CS101.Slave | |
| bool | DebugOutput [get, set] |
| virtual int | FileTimeout [get, set] |
| Gets or sets the file service timeout. | |
Additional Inherited Members | |
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 |
Protected Attributes inherited from lib60870.CS101.Slave | |
| bool | debugOutput |
| FilesAvailable | filesAvailable = new FilesAvailable() |
CS 101 slave implementation (implements Slave interface)
| lib60870.CS101.CS101Slave.CS101Slave | ( | SerialPort | port, |
| LinkLayerParameters | parameters = null ) |
Initializes a new instance of the lib60870.CS101.CS101Slave class.
| port | serial port instance |
| parameters | link layer parameters |
| lib60870.CS101.CS101Slave.CS101Slave | ( | Stream | serialStream, |
| LinkLayerParameters | parameters = null ) |
Initializes a new instance of the lib60870.CS101.CS101Slave class.
| serialStream | A stream instance (e.g. TcpClientVirtualSerialPort or TcpServerVirtualSerialPort. |
| parameters | link layer parameters |
| void lib60870.CS101.CS101Slave.EnqueueUserDataClass1 | ( | ASDU | asdu | ) |
| void lib60870.CS101.CS101Slave.EnqueueUserDataClass2 | ( | ASDU | asdu | ) |
| bool lib60870.CS101.CS101Slave.IsUserDataClass1QueueFull | ( | ) |
Determines whether the user data class 1 queue is full.
true if the queue is full; otherwise, false.| bool lib60870.CS101.CS101Slave.IsUserDataClass2QueueFull | ( | ) |
Determines whether the user data class 2 queue is full.
true if the queue is full; otherwise, false.| void lib60870.CS101.CS101Slave.ReceiveMessageLoop | ( | ) |
Starts a loop that handles incoming messages.
It is best to be started in a separate thread. The loop can be stopped with the Stop method.
| void lib60870.CS101.CS101Slave.SetReceivedRawMessageHandler | ( | RawMessageHandler | handler, |
| object | parameter ) |
Sets the raw message handler for received messages.
| handler | Handler/delegate that will be invoked when a message is received |
| parameter | will be passed to the delegate |
| void lib60870.CS101.CS101Slave.SetSentRawMessageHandler | ( | RawMessageHandler | handler, |
| object | parameter ) |
Sets the sent message handler for sent messages.
| handler | Handler/delegate that will be invoked when a message is sent< |
| parameter | will be passed to the delegate |
| void lib60870.CS101.CS101Slave.SetUserDataQueueSizes | ( | int | class1QueueSize, |
| int | class2QueueSize ) |
Sets the user data queue sizes. When the maximum size is reached the oldest value will be deleted when a new ASDU is added.
| class1QueueSize | Class 1 queue size. |
| class2QueueSize | Class 2 queue size. |
|
getset |
Gets or sets the direction bit value used for balanced mode (default is false)
true if DIR is set otherwise, false.
|
getset |
Gets or sets the own link layer address.
own link layer address.
|
getset |
Gets or sets the link layer address of the other station (for balanced mode).
link layer address of other station.
|
getset |
Gets or sets the link layer mode (balanced or unbalanced).
The link layer mode.
|
getset |
Gets or sets the application layer parameters-.
Should be set before starting the communication
application layer parameters.