PsiSwarm Library  0.8
SerialControl Class Reference

#include <serial.h>

Public Member Functions

void setup_serial_interfaces (void)
 

Detailed Description

SerialControl class Functions to handle command and user messages sent over the PC or BT serial interfaces. Most of the functions within this class are not intended to be called by user applications; once the setup_serial_interfaces() function has been called the enabled serial ports are attached to listeners which handle any received messages. A predefined message structure for commands has been created which allows most functions on the robot to be externally called, either using a PC-robot or Bluetooth connection.

For user functions, the main.cpp file should include a void handle_user_serial_message(char * message, char length, char interface) function to handle user-defined messages.

Definition at line 38 of file serial.h.

Member Function Documentation

§ setup_serial_interfaces()

void SerialControl::setup_serial_interfaces ( void  )

Sets the baud rates and enables the serial interfaces (PC and BT) as defined in the settings.h file Attaches listeners to both the serial ports that trigger when a message is received

Definition at line 54 of file serial.cpp.


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