C# Class serial_packet_protocolOld.packet_protocol

Mostra file Open project: uiacm/tower_creator

Public Methods

Method Description
ByteArrayToString ( byte ba ) : string
ByteArrayToString ( byte bytes, EncodingType encodingType ) : string
StrToByteArray ( string str ) : byte[]
checksum_apply ( byte complete_packet, int packet_sz ) : void
close ( ) : void
extract_packet ( ) : char[]
packet_protocol ( spp_COMPorts cport, spp_BaudRates brate ) : System
send_byte_buffer ( ) : void
snd_ascii_hex ( int packet_type, byte payload, int payload_sz ) : int
snd_packet ( int packet_type, byte payload, int payload_sz ) : int
total_packets ( ) : int
write_string ( string buffer ) : void

Private Methods

Method Description
checksum_eval ( ) : int
clean_gen_buffer ( ) : void
connect ( spp_COMPorts cport, spp_BaudRates brate ) : void
packet_rx_callback_latch ( string data ) : void
packet_store_char ( char c ) : void
port_DataReceived ( object sender, SerialDataReceivedEventArgs e ) : void
process_packet ( ) : void

Method Details

ByteArrayToString() public static method

public static ByteArrayToString ( byte ba ) : string
ba byte
return string

ByteArrayToString() public static method

public static ByteArrayToString ( byte bytes, EncodingType encodingType ) : string
bytes byte
encodingType EncodingType
return string

StrToByteArray() public static method

public static StrToByteArray ( string str ) : byte[]
str string
return byte[]

checksum_apply() public method

public checksum_apply ( byte complete_packet, int packet_sz ) : void
complete_packet byte
packet_sz int
return void

close() public method

public close ( ) : void
return void

extract_packet() public method

public extract_packet ( ) : char[]
return char[]

packet_protocol() public method

public packet_protocol ( spp_COMPorts cport, spp_BaudRates brate ) : System
cport spp_COMPorts
brate spp_BaudRates
return System

send_byte_buffer() public method

public send_byte_buffer ( ) : void
return void

snd_ascii_hex() public method

public snd_ascii_hex ( int packet_type, byte payload, int payload_sz ) : int
packet_type int
payload byte
payload_sz int
return int

snd_packet() public method

public snd_packet ( int packet_type, byte payload, int payload_sz ) : int
packet_type int
payload byte
payload_sz int
return int

total_packets() public method

public total_packets ( ) : int
return int

write_string() public method

public write_string ( string buffer ) : void
buffer string
return void