C++ Library for the PsiSwarm Robot - Version 0.8

Dependents:   PsiSwarm_V8_Blank_CPP Autonomia_RndmWlk

Fork of PsiSwarmV7_CPP by Psi Swarm Robot

Embed: (wiki syntax)

« Back to documentation index

SerialControl Class Reference

SerialControl Class Reference

SerialControl class Functions to handle command and user messages sent over the PC or BT serial interfaces. More...

#include <serial.h>

Public Member Functions

void 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.

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

void 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.