Main Page | Class Hierarchy | Data Structures | File List | Data Fields | Globals

CommSerial Class Reference

#include <commserial.h>

Inheritance diagram for CommSerial:

Inheritance graph
[legend]
Collaboration diagram for CommSerial:

Collaboration graph
[legend]

Detailed Description

Serial Communication class.

A set of all functions, parameters and data related to the transmition and reception of data through the serial port.


Public Member Functions

 CommSerial (const char *device)
 Initializes the serial communication.

 ~CommSerial (void)
 Finishes the communication and resets the initial values of the serial port.

int send (unsigned char const *buffer, int numBytes)
 Transmits data through the serial port.

int receive (unsigned char *buffer_receive, int numBytes)
 Receives data from the serial port.


Constructor & Destructor Documentation

CommSerial::CommSerial const char *  device  ) 
 

Initializes the serial communication.

Sets the communication parameters such as baud rate, parity, etc.


Member Function Documentation

int CommSerial::receive unsigned char *  buffer_receive,
int  numBytes
[virtual]
 

Receives data from the serial port.

Parameters:
buffer_receive data received.
numBytes number of bytes expected to be received.
Returns:
the number of bytes received or an error code

Implements Communication.

int CommSerial::send unsigned char const *  buffer,
int  numBytes
[virtual]
 

Transmits data through the serial port.

Parameters:
buffer data to transmit.
numBytes the number of bytes to transmit.
Returns:
an error code

Implements Communication.


The documentation for this class was generated from the following file:
Generated on Sun Aug 21 21:28:47 2005 for PLC Modem/ABNT-14522 Library by doxygen 1.3.7