Tanoda
SerialControllerCustomDelimiter Class Reference
Inheritance diagram for SerialControllerCustomDelimiter:

Public Member Functions

byte[] ReadSerialMessage ()
 
void SendSerialMessage (byte[] message)
 
delegate void TearDownFunction ()
 
void SetTearDownFunction (TearDownFunction userFunction)
 

Public Attributes

string portName = "COM3"
 
int baudRate = 9600
 
GameObject messageListener
 
int reconnectionDelay = 1000
 
int maxUnreadMessages = 1
 
byte separator = 90
 

Protected Attributes

Thread thread
 
SerialThreadBinaryDelimited serialThread
 

Detailed Description

While 'SerialController' only allows reading/sending text data that is terminated by new-lines, this class allows reading/sending messages using a binary protocol where each message is separated from the next by a 1-char delimiter.

Definition at line 18 of file SerialControllerCustomDelimiter.cs.

Member Function Documentation

◆ ReadSerialMessage()

byte[] SerialControllerCustomDelimiter.ReadSerialMessage ( )

Definition at line 118 of file SerialControllerCustomDelimiter.cs.

◆ SendSerialMessage()

void SerialControllerCustomDelimiter.SendSerialMessage ( byte[]  message)

Definition at line 128 of file SerialControllerCustomDelimiter.cs.

◆ SetTearDownFunction()

void SerialControllerCustomDelimiter.SetTearDownFunction ( TearDownFunction  userFunction)

Definition at line 140 of file SerialControllerCustomDelimiter.cs.

◆ TearDownFunction()

delegate void SerialControllerCustomDelimiter.TearDownFunction ( )

Member Data Documentation

◆ baudRate

int SerialControllerCustomDelimiter.baudRate = 9600

Definition at line 25 of file SerialControllerCustomDelimiter.cs.

◆ maxUnreadMessages

int SerialControllerCustomDelimiter.maxUnreadMessages = 1

Definition at line 37 of file SerialControllerCustomDelimiter.cs.

◆ messageListener

GameObject SerialControllerCustomDelimiter.messageListener

Definition at line 29 of file SerialControllerCustomDelimiter.cs.

◆ portName

string SerialControllerCustomDelimiter.portName = "COM3"

Definition at line 22 of file SerialControllerCustomDelimiter.cs.

◆ reconnectionDelay

int SerialControllerCustomDelimiter.reconnectionDelay = 1000

Definition at line 33 of file SerialControllerCustomDelimiter.cs.

◆ separator

byte SerialControllerCustomDelimiter.separator = 90

Definition at line 41 of file SerialControllerCustomDelimiter.cs.

◆ serialThread

SerialThreadBinaryDelimited SerialControllerCustomDelimiter.serialThread
protected

Definition at line 45 of file SerialControllerCustomDelimiter.cs.

◆ thread

Thread SerialControllerCustomDelimiter.thread
protected

Definition at line 44 of file SerialControllerCustomDelimiter.cs.


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