C# Class MaCRo.Communications.SerialTransport

Show file Open project: AlexAlbala/MaCRo Class Usage Examples

Protected Properties

Property Type Description
SendBuffer MaCRo.Tools.Dictionary
coder Coder
end bool
headerACK SafeSerialHeader
port System.IO.Ports.SerialPort
reSend Thread
receive Thread
sequence byte
sta SerialTransportAddress

Public Methods

Method Description
GetTransportAddress ( ) : TransportAddress
Receive ( ) : void
Send ( TransportAddress t, byte data ) : void
SerialTransport ( SerialTransportAddress sta, int baudRate ) : System
Start ( Coder coder ) : void
Stop ( ) : void

Protected Methods

Method Description
WriteToPort ( byte buffer, int offset, int count, bool safe ) : void

Private Methods

Method Description
CreateSerialPort ( SerialTransportAddress sta, int baudRate ) : SerialPort

Override this method in order to perform a custom Serial Port initialization.

GetSequence ( ) : byte
ProcessPacket ( SerialHeader sh, byte buffer, int offset ) : void
ReSend ( ) : void

Method Details

GetTransportAddress() public method

public GetTransportAddress ( ) : TransportAddress
return TransportAddress

Receive() public method

public Receive ( ) : void
return void

Send() public method

public Send ( TransportAddress t, byte data ) : void
t TransportAddress
data byte
return void

SerialTransport() public method

public SerialTransport ( SerialTransportAddress sta, int baudRate ) : System
sta SerialTransportAddress
baudRate int
return System

Start() public method

public Start ( Coder coder ) : void
coder Coder
return void

Stop() public method

public Stop ( ) : void
return void

WriteToPort() protected method

protected WriteToPort ( byte buffer, int offset, int count, bool safe ) : void
buffer byte
offset int
count int
safe bool
return void

Property Details

SendBuffer protected property

protected Dictionary,MaCRo.Tools SendBuffer
return MaCRo.Tools.Dictionary

coder protected property

protected Coder,MaCRo.Communications coder
return Coder

end protected property

protected bool end
return bool

headerACK protected property

protected SafeSerialHeader,MaCRo.Communications headerACK
return SafeSerialHeader

port protected property

protected SerialPort,System.IO.Ports port
return System.IO.Ports.SerialPort

reSend protected property

protected Thread reSend
return Thread

receive protected property

protected Thread receive
return Thread

sequence protected property

protected byte sequence
return byte

sta protected property

protected SerialTransportAddress,MaCRo.Communications sta
return SerialTransportAddress