MHVLib  20111011
An efficiency oriented runtime library for AVR microcontrollers
MHV_Device_TX Class Reference

#include <MHV_Device_TX.h>

Inheritance diagram for MHV_Device_TX:
MHV_Display_Character MHV_Display_Monochrome MHV_HardwareSerial MHV_VusbTypist MHV_Display_HD44780 MHV_Display_Holtek_HT1632 MHV_Display_Monochrome_Buffered MHV_Display_HD44780_Direct_Connect MHV_Display_HD44780_Shift_Register MHV_PWMMatrix

List of all members.

Public Member Functions

bool canWrite ()
bool write (const char *buffer)
bool write (const char *buffer, uint16_t length)
bool write (const char *buffer, void(*completeFunction)(const char *))
bool write (const char *buffer, uint16_t length, void(*completeFunction)(const char *))
bool write_P (PGM_P buffer)
bool write_P (PGM_P buffer, uint16_t length)

Protected Member Functions

 MHV_Device_TX (MHV_RingBuffer *txPointers)
virtual void runTxBuffers ()=0
bool moreTX ()
int nextCharacter ()

Protected Attributes

MHV_TX_BUFFER _currentTx
MHV_RingBuffer_txPointers
const char * _tx

Detailed Description

Definition at line 54 of file MHV_Device_TX.h.


Constructor & Destructor Documentation

MHV_Device_TX::MHV_Device_TX ( MHV_RingBuffer txPointers) [protected]

Constructor

Parameters:
txPointersA ringbuffer to store tx pointers in

Definition at line 41 of file MHV_Device_TX.cpp.


Member Function Documentation

bool MHV_Device_TX::canWrite ( )

Definition at line 73 of file MHV_Device_TX.cpp.

bool MHV_Device_TX::moreTX ( ) [protected]

Called when a buffer has been processed

Returns:
true if there is another buffer to process

Definition at line 55 of file MHV_Device_TX.cpp.

int MHV_Device_TX::nextCharacter ( ) [protected]

Called by children to get a character to transmit

Returns:
the character, or -1 if there is nothing left

Definition at line 81 of file MHV_Device_TX.cpp.

virtual void MHV_Device_TX::runTxBuffers ( ) [protected, pure virtual]
bool MHV_Device_TX::write ( const char *  buffer)

Write a string asynchronously

Parameters:
bufferthe string
Returns:
false on success, true on failure

Definition at line 142 of file MHV_Device_TX.cpp.

bool MHV_Device_TX::write ( const char *  buffer,
uint16_t  length 
)

Write a buffer asynchronously

Parameters:
bufferthe buffer
lengththe length of the buffer
Returns:
0 on success 1 if there is already a string being sent

Definition at line 225 of file MHV_Device_TX.cpp.

bool MHV_Device_TX::write ( const char *  buffer,
void(*)(const char *)  completeFunction 
)

Write a string asynchronously

Parameters:
bufferthe string
completeFunctiona function to call when the string has been written (the string is passed as a parameter)
Returns:
false on success, true on failure

Definition at line 169 of file MHV_Device_TX.cpp.

bool MHV_Device_TX::write ( const char *  buffer,
uint16_t  length,
void(*)(const char *)  completeFunction 
)

Write a buffer asynchronously

Parameters:
bufferthe buffer
lengththe length of the buffer
completeFunctiona function to call when the string has been written (the string is passed as a parameter)
Returns:
0 on success 1 if there is already a string being sent

Definition at line 254 of file MHV_Device_TX.cpp.

bool MHV_Device_TX::write_P ( PGM_P  buffer)

Write a progmem string asynchronously

Parameters:
bufferthe progmem string
Returns:
false on success, true on failure

Definition at line 116 of file MHV_Device_TX.cpp.

bool MHV_Device_TX::write_P ( PGM_P  buffer,
uint16_t  length 
)

Write a buffer asynchronously

Parameters:
bufferthe buffer
lengththe length of the buffer
Returns:
0 on success 1 if there is already a string being sent

Definition at line 197 of file MHV_Device_TX.cpp.


Member Data Documentation

Definition at line 56 of file MHV_Device_TX.h.

const char* MHV_Device_TX::_tx [protected]

Definition at line 58 of file MHV_Device_TX.h.

Definition at line 57 of file MHV_Device_TX.h.


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