C# Class sharp_arduino_serial_packet_lib.SerialReaderWriter

Inheritance: IDisposable
Show file Open project: jeroendoggen/Arduino-serial-messaging Class Usage Examples

Public Properties

Property Type Description
incomingPacket Packet

Public Methods

Method Description
Dispose ( ) : void
OnNewSerialDataReceived ( object sender, SerialDataEventArgs e ) : void
ParseData ( string packetStr ) : void
SendPacket ( PacketTypes ptype, int nodeId, int sensorID, Commands command, int payload ) : void
SerialReaderWriter ( SerialSettings settings ) : System
SerialReaderWriter ( int baudrate = 115200, string comport = "COM2" ) : System
StartListening ( ) : void
StopListening ( ) : void

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Private Methods

Method Description
ComputeParity ( ) : int

Method Details

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

OnNewSerialDataReceived() public method

public OnNewSerialDataReceived ( object sender, SerialDataEventArgs e ) : void
sender object
e sharp_arduino_serial_packet_lib.SerialPortReaderWriter.SerialDataEventArgs
return void

ParseData() public method

public ParseData ( string packetStr ) : void
packetStr string
return void

SendPacket() public method

public SendPacket ( PacketTypes ptype, int nodeId, int sensorID, Commands command, int payload ) : void
ptype PacketTypes
nodeId int
sensorID int
command Commands
payload int
return void

SerialReaderWriter() public method

public SerialReaderWriter ( SerialSettings settings ) : System
settings sharp_arduino_serial_packet_lib.SerialPortReaderWriter.SerialSettings
return System

SerialReaderWriter() public method

public SerialReaderWriter ( int baudrate = 115200, string comport = "COM2" ) : System
baudrate int
comport string
return System

StartListening() public method

public StartListening ( ) : void
return void

StopListening() public method

public StopListening ( ) : void
return void

Property Details

incomingPacket public property

public Packet,sharp_arduino_serial_packet_lib incomingPacket
return Packet