Tanoda
|
Classes | |
struct | PoseReturn |
Public Member Functions | |
string | ReadSerialMessage () |
void | SendSerialMessage (byte[] message) |
delegate void | TearDownFunction () |
void | SetTearDownFunction (TearDownFunction userFunction) |
void | SendGripperOff () |
void | ResetSavedPositions () |
void | SavePosition () |
void | SavePositionsToFile () |
Static Public Member Functions | |
static string | ByteArrayToString (byte[] ba) |
static T[] | ConcatArrays< T > (params T[][] list) |
static byte | CalculateChecksum (byte[] payload) |
static unsafe PoseReturn | GetPoseFromArray (byte[] buffer) |
Public Attributes | |
string | portName = "COM7" |
int | baudRate = 115200 |
GameObject | messageListener |
int | reconnectionDelay = 1000 |
int | maxUnreadMessages = 1 |
float | x |
float | y |
float | z |
float | r |
Static Public Attributes | |
const string | SERIAL_DEVICE_CONNECTED = "__Connected__" |
const string | SERIAL_DEVICE_DISCONNECTED = "__Disconnected__" |
Protected Attributes | |
Thread | thread |
SerialThreadBytes | serialThread |
This class allows a Unity program to continually check for messages from a serial device.
It creates a Thread that communicates with the serial port and continually polls the messages on the wire. That Thread puts all the messages inside a Queue, and this SerialController class polls that queue by means of invoking SerialThread.GetSerialMessage().
The serial device must send its messages separated by a newline character. Neither the SerialController nor the SerialThread perform any validation on the integrity of the message. It's up to the one that makes sense of the data.
Definition at line 34 of file SerialControllerBytes.cs.
|
static |
Definition at line 157 of file SerialControllerBytes.cs.
|
static |
Definition at line 218 of file SerialControllerBytes.cs.
|
static |
Definition at line 205 of file SerialControllerBytes.cs.
|
static |
Definition at line 334 of file SerialControllerBytes.cs.
string SerialControllerBytes.ReadSerialMessage | ( | ) |
Definition at line 230 of file SerialControllerBytes.cs.
void SerialControllerBytes.ResetSavedPositions | ( | ) |
Definition at line 299 of file SerialControllerBytes.cs.
void SerialControllerBytes.SavePosition | ( | ) |
Definition at line 305 of file SerialControllerBytes.cs.
void SerialControllerBytes.SavePositionsToFile | ( | ) |
Definition at line 311 of file SerialControllerBytes.cs.
void SerialControllerBytes.SendGripperOff | ( | ) |
Definition at line 280 of file SerialControllerBytes.cs.
void SerialControllerBytes.SendSerialMessage | ( | byte[] | message | ) |
Definition at line 240 of file SerialControllerBytes.cs.
void SerialControllerBytes.SetTearDownFunction | ( | TearDownFunction | userFunction | ) |
Definition at line 253 of file SerialControllerBytes.cs.
delegate void SerialControllerBytes.TearDownFunction | ( | ) |
int SerialControllerBytes.baudRate = 115200 |
Definition at line 41 of file SerialControllerBytes.cs.
int SerialControllerBytes.maxUnreadMessages = 1 |
Definition at line 53 of file SerialControllerBytes.cs.
GameObject SerialControllerBytes.messageListener |
Definition at line 45 of file SerialControllerBytes.cs.
string SerialControllerBytes.portName = "COM7" |
Definition at line 38 of file SerialControllerBytes.cs.
float SerialControllerBytes.r |
Definition at line 162 of file SerialControllerBytes.cs.
int SerialControllerBytes.reconnectionDelay = 1000 |
Definition at line 49 of file SerialControllerBytes.cs.
|
static |
Definition at line 60 of file SerialControllerBytes.cs.
|
static |
Definition at line 61 of file SerialControllerBytes.cs.
|
protected |
Definition at line 65 of file SerialControllerBytes.cs.
|
protected |
Definition at line 64 of file SerialControllerBytes.cs.
float SerialControllerBytes.x |
Definition at line 162 of file SerialControllerBytes.cs.
float SerialControllerBytes.y |
Definition at line 162 of file SerialControllerBytes.cs.
float SerialControllerBytes.z |
Definition at line 162 of file SerialControllerBytes.cs.