Public Member Functions | Private Attributes
uniserial Class Reference

#include <uniserial.hpp>

List of all members.

Public Member Functions

int Available ()
bool Flush ()
bool initialize ()
bool initialize (const std::string port_name, uint8_t num_bits, uint8_t parity, uint8_t num_stop_bits, uint16_t baud_rate)
bool Load_Byte (uint8_t byte)
uint8_t Read ()
bool Read_Bytes (uint8_t num_bytes, uint8_t *storage)
void setPortName (const std::string p)
 uniserial ()
bool Write (uint8_t byte)
bool Write_Bytes (uint8_t num_bytes, uint8_t *bytes_to_write)
 ~uniserial ()

Private Attributes

int baud_rate_
char Buffer [256]
uint8_t buffer_index_
int file_descriptor_
uint8_t num_bits_
uint8_t num_stop_bits_
uint8_t parity_
std::string port_name_

Detailed Description

a simple C++ Serial class for interfacing the Arduino (or other serial devices) over a Linux-based serial port using UNIX libraries.

Default settings established in the constructor will connect with an Arduino device at 115200 baud.

Definition at line 61 of file uniserial.hpp.


Constructor & Destructor Documentation

Definition at line 44 of file uniserial.cpp.

Definition at line 55 of file uniserial.cpp.


Member Function Documentation

Definition at line 257 of file uniserial.cpp.

bool uniserial::Flush ( )

Definition at line 264 of file uniserial.cpp.

Definition at line 209 of file uniserial.cpp.

bool uniserial::initialize ( const std::string  port_name,
uint8_t  num_bits,
uint8_t  parity,
uint8_t  num_stop_bits,
uint16_t  baud_rate 
)

Definition at line 60 of file uniserial.cpp.

bool uniserial::Load_Byte ( uint8_t  byte)

Definition at line 248 of file uniserial.cpp.

uint8_t uniserial::Read ( )

Definition at line 220 of file uniserial.cpp.

bool uniserial::Read_Bytes ( uint8_t  num_bytes,
uint8_t *  storage 
)

Definition at line 273 of file uniserial.cpp.

void uniserial::setPortName ( const std::string  p)

Definition at line 214 of file uniserial.cpp.

bool uniserial::Write ( uint8_t  byte)

Definition at line 234 of file uniserial.cpp.

bool uniserial::Write_Bytes ( uint8_t  num_bytes,
uint8_t *  bytes_to_write 
)

Definition at line 284 of file uniserial.cpp.


Member Data Documentation

int uniserial::baud_rate_ [private]

Definition at line 84 of file uniserial.hpp.

char uniserial::Buffer[256] [private]

Definition at line 80 of file uniserial.hpp.

uint8_t uniserial::buffer_index_ [private]

Definition at line 83 of file uniserial.hpp.

Definition at line 82 of file uniserial.hpp.

uint8_t uniserial::num_bits_ [private]

Definition at line 87 of file uniserial.hpp.

uint8_t uniserial::num_stop_bits_ [private]

Definition at line 89 of file uniserial.hpp.

uint8_t uniserial::parity_ [private]

Definition at line 88 of file uniserial.hpp.

std::string uniserial::port_name_ [private]

Definition at line 81 of file uniserial.hpp.


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


uniserial
Author(s): Joshua Vasquez and Philip Roan. Maintained by Philip Roan
autogenerated on Mon Oct 6 2014 10:09:49