lib60870.NET 2.3.0
IEC 60870-5-101/104 Protocol Source Code Library for C#/.NET
Loading...
Searching...
No Matches
lib60870.CS101.CS101Master Class Reference
Inheritance diagram for lib60870.CS101.CS101Master:
Collaboration diagram for lib60870.CS101.CS101Master:

Public Member Functions

void Run ()
 Run the protocol state machines a single time. Alternative to Start/Stop when no background thread should be used Has to be called frequently.
 
void AddPortDeniedHandler (EventHandler eventHandler)
 
void Start ()
 Start a background thread running the master.
 
void Stop ()
 Stop the background thread.
 
LinkLayerState GetLinkLayerState ()
 
override void SetReceivedRawMessageHandler (RawMessageHandler handler, object parameter)
 
override void SetSentRawMessageHandler (RawMessageHandler handler, object parameter)
 
 CS101Master (SerialPort port, LinkLayerMode mode, LinkLayerParameters llParams=null, ApplicationLayerParameters alParams=null)
 
 CS101Master (Stream serialStream, LinkLayerMode mode, LinkLayerParameters llParams=null, ApplicationLayerParameters alParams=null)
 
void SetTimeouts (int messageTimeout, int characterTimeout)
 Sets the timeouts for receiving messages (in milliseconds)
 
void SetASDUReceivedHandler (ASDUReceivedHandler handler, object parameter)
 
void AddSlave (int slaveAddress)
 
LinkLayerState GetLinkLayerState (int slaveAddress)
 
void SetLinkLayerStateChangedHandler (LinkLayerStateChanged handler, object parameter)
 
void UseSlaveAddress (int slaveAddress)
 Sets the slave link layer address to be used.
 
void PollSingleSlave (int address)
 
void RequestClass1Data (int address)
 
void SendLinkLayerTestFunction ()
 
override void SendInterrogationCommand (CauseOfTransmission cot, int ca, byte qoi)
 
override void SendCounterInterrogationCommand (CauseOfTransmission cot, int ca, byte qcc)
 
override void SendReadCommand (int ca, int ioa)
 
override void SendClockSyncCommand (int ca, CP56Time2a time)
 
override void SendTestCommand (int ca)
 
override void SendTestCommandWithCP56Time2a (int ca, ushort tsc, CP56Time2a time)
 
override void SendResetProcessCommand (CauseOfTransmission cot, int ca, byte qrp)
 
override void SendDelayAcquisitionCommand (CauseOfTransmission cot, int ca, CP16Time2a delay)
 
override void SendControlCommand (CauseOfTransmission cot, int ca, InformationObject sc)
 
override void SendASDU (ASDU asdu)
 
override ApplicationLayerParameters GetApplicationLayerParameters ()
 
override void GetFile (int ca, int ioa, NameOfFile nof, IFileReceiver receiver)
 
override void SendFile (int ca, int ioa, NameOfFile nof, IFileProvider fileProvider)
 
- Public Member Functions inherited from lib60870.CS101.Master
void SendInterrogationCommand (CauseOfTransmission cot, int ca, byte qoi)
 Sends the interrogation command.
 
void SendCounterInterrogationCommand (CauseOfTransmission cot, int ca, byte qcc)
 Sends the counter interrogation command (C_CI_NA_1 typeID: 101)
 
void SendReadCommand (int ca, int ioa)
 Sends a read command (C_RD_NA_1 typeID: 102).
 
void SendClockSyncCommand (int ca, CP56Time2a time)
 Sends a clock synchronization command (C_CS_NA_1 typeID: 103).
 
void SendTestCommand (int ca)
 Sends a test command (C_TS_NA_1 typeID: 104).
 
void SendTestCommandWithCP56Time2a (int ca, ushort tsc, CP56Time2a time)
 Sends a test command with CP56Time2a time (C_TS_TA_1 typeID: 107).
 
void SendResetProcessCommand (CauseOfTransmission cot, int ca, byte qrp)
 Sends a reset process command (C_RP_NA_1 typeID: 105).
 
void SendDelayAcquisitionCommand (CauseOfTransmission cot, int ca, CP16Time2a delay)
 Sends a delay acquisition command (C_CD_NA_1 typeID: 106).
 
void SendControlCommand (CauseOfTransmission cot, int ca, InformationObject sc)
 Sends the control command.
 
void SendASDU (ASDU asdu)
 Sends an arbitrary ASDU to the connected slave.
 
void GetFile (int ca, int ioa, NameOfFile nof, IFileReceiver receiver)
 Read the file from slave (upload file)
 
void SendFile (int ca, int ioa, NameOfFile nof, IFileProvider fileProvider)
 Sends the file to slave (download file)
 
ApplicationLayerParameters GetApplicationLayerParameters ()
 Get the application layer parameters used by this master instance.
 
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.
 

Protected Attributes

Thread workerThread = null
 
SerialPort port = null
 
bool running = false
 
- Protected Attributes inherited from lib60870.CS101.Master
bool debugOutput
 

Properties

bool DIR [get, set]
 Value of DIR bit when sending messages.
 
int OwnAddress [get, set]
 
int SlaveAddress [get, set]
 Gets or sets the link layer slave address.
 
- Properties inherited from lib60870.CS101.Master
bool DebugOutput [get, set]
 

Member Function Documentation

◆ SetTimeouts()

void lib60870.CS101.CS101Master.SetTimeouts ( int messageTimeout,
int characterTimeout )

Sets the timeouts for receiving messages (in milliseconds)

Parameters
messageTimeoutTimeout to wait for the first character of a message
characterTimeoutTimeout to wait for next characters in a message

◆ UseSlaveAddress()

void lib60870.CS101.CS101Master.UseSlaveAddress ( int slaveAddress)

Sets the slave link layer address to be used.

Parameters
slaveAddressSlave link layer address.

Property Documentation

◆ SlaveAddress

int lib60870.CS101.CS101Master.SlaveAddress
getset

Gets or sets the link layer slave address.

Slave link layer address.


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