#include <ArduinoClient.h>
Public Member Functions | |
| ArduinoClient (const char *DeviceName, int Baudrate=9600) | |
| ~ArduinoClient () | |
| Destructor. | |
| ArduinoRet | SendCommand (ArduinoInstr Instruction, int Argument=-1, int *ToReturn=NULL) |
| Send a given command and returns the command's return data through the Return pointer. | |
| void | Reset () |
| Reset the internal connection and the software state of the Arduino. | |
Private Member Functions | |
| void | SendMsg (ArduinoInstr Instruction, int Argument=-1) |
| Send a given packet. | |
| ArduinoRet | GetMsg (int *Return=NULL) |
| Waits and returns a return state. Fails and returns RET_ERROR in 1 second if nothing occures. | |
Private Attributes | |
| int | SerialID |
| The serial port ID for serial communications. | |
| int | ErrorCount |
| The number of errors in a row, possible for a reset. | |
| ArduinoClient::ArduinoClient | ( | const char * | DeviceName, | |
| int | Baudrate = 9600 | |||
| ) |
Constructor Takes a device name and baudrate (Defaulted to 9600)
| ArduinoClient::~ArduinoClient | ( | ) |
Destructor.
| ArduinoRet ArduinoClient::SendCommand | ( | ArduinoInstr | Instruction, | |
| int | Argument = -1, |
|||
| int * | ToReturn = NULL | |||
| ) |
Send a given command and returns the command's return data through the Return pointer.
| void ArduinoClient::Reset | ( | ) |
Reset the internal connection and the software state of the Arduino.
| void ArduinoClient::SendMsg | ( | ArduinoInstr | Instruction, | |
| int | Argument = -1 | |||
| ) | [private] |
Send a given packet.
| ArduinoRet ArduinoClient::GetMsg | ( | int * | Return = NULL |
) | [private] |
Waits and returns a return state. Fails and returns RET_ERROR in 1 second if nothing occures.
int ArduinoClient::SerialID [private] |
The serial port ID for serial communications.
int ArduinoClient::ErrorCount [private] |
The number of errors in a row, possible for a reset.
1.5.5