Public Member Functions | Private Attributes
SerialCommunication Class Reference

#include <serial_communication.h>

Inheritance diagram for SerialCommunication:
Inheritance graph
[legend]

List of all members.

Public Member Functions

int close_port (struct termios *oldtio)
 Method to return the original config to the serial port and close it.
int open_port (struct termios *oldtio)
 Method to open and configure the serial port.
int send_character (unsigned char *str)
 Method that send characters by the serial port for the at89c2051.
 SerialCommunication ()
 Empty constructor.
void set_serial_device (std::string serial_device)
 Method to set the serial device name.
 ~SerialCommunication ()
 Destructor.

Private Attributes

int _file_descriptor
struct termios _oldtio
std::string _serial_device

Detailed Description

Definition at line 36 of file serial_communication.h.


Constructor & Destructor Documentation

Empty constructor.

Definition at line 30 of file serial_communication.cpp.

Destructor.

Definition at line 37 of file serial_communication.cpp.


Member Function Documentation

int SerialCommunication::close_port ( struct termios *  oldtio) [virtual]

Method to return the original config to the serial port and close it.

Parameters:
oldtio,structureto configure the serial port.
Returns:
error: -1 or successful: 0.

Implements SerialCommunicationInterface.

Definition at line 94 of file serial_communication.cpp.

int SerialCommunication::open_port ( struct termios *  oldtio) [virtual]

Method to open and configure the serial port.

Parameters:
oldtio,structureto configure the serial port.
Returns:
error: -1 or successful: 0.

Implements SerialCommunicationInterface.

Definition at line 50 of file serial_communication.cpp.

int SerialCommunication::send_character ( unsigned char *  str) [virtual]

Method that send characters by the serial port for the at89c2051.

Parameters:
str,stringto send by the serial port.
Returns:
error: -1 or successful: 0.

Implements SerialCommunicationInterface.

Definition at line 110 of file serial_communication.cpp.

void SerialCommunication::set_serial_device ( std::string  serial_device) [virtual]

Method to set the serial device name.

Parameters:
serial_device,theserial device name.
Returns:

Implements SerialCommunicationInterface.

Definition at line 43 of file serial_communication.cpp.


Member Data Documentation

Definition at line 80 of file serial_communication.h.

struct termios SerialCommunication::_oldtio [private]

Definition at line 79 of file serial_communication.h.

std::string SerialCommunication::_serial_device [private]

Definition at line 77 of file serial_communication.h.


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


maggie_serial_comm_drivers
Author(s): Raul Perula-Martinez
autogenerated on Mon Sep 14 2015 03:06:42