MHVLib  20111109
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_VusbConsole 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)
bool debug (const char *file, int line, const char *function, PGM_P format,...)
bool printf (PGM_P format,...)
bool write (uint8_t value)
bool write (uint16_t value)
bool write (uint32_t value)
bool write (int8_t value)
bool write (int16_t value)
bool write (int32_t value)

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 59 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::debug ( const char *  file,
int  line,
const char *  function,
PGM_P  format,
  ... 
)

Print a debug message

Parameters:
filethe filename
linethe line number
functionthe function name
formata printf format
...the printf parms
Returns:
false on success true if the message was not sent

Definition at line 296 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.

bool MHV_Device_TX::printf ( PGM_P  format,
  ... 
)

Print a message

Parameters:
formata printf format
...the printf parms
Returns:
false on success true if there is already a string being sent

Definition at line 338 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 if there is already a string being sent

Definition at line 144 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:
false on success true if there is already a string being sent

Definition at line 228 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 if there is already a string being sent

Definition at line 172 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:
false on success true if there is already a string being sent

Definition at line 257 of file MHV_Device_TX.cpp.

bool MHV_Device_TX::write ( uint8_t  value)

Print an integer

Parameters:
valuethe value to print
Returns:
false on success true if there is already a string being sent

Definition at line 370 of file MHV_Device_TX.cpp.

bool MHV_Device_TX::write ( uint16_t  value)

Print an integer

Parameters:
valuethe value to print
Returns:
false on success true if there is already a string being sent

Definition at line 389 of file MHV_Device_TX.cpp.

bool MHV_Device_TX::write ( uint32_t  value)

Print an integer

Parameters:
valuethe value to print
Returns:
false on success true if there is already a string being sent

Definition at line 408 of file MHV_Device_TX.cpp.

bool MHV_Device_TX::write ( int8_t  value)

Print an integer

Parameters:
valuethe value to print
Returns:
false on success true if there is already a string being sent

Definition at line 427 of file MHV_Device_TX.cpp.

bool MHV_Device_TX::write ( int16_t  value)

Print an integer

Parameters:
valuethe value to print
Returns:
false on success true if there is already a string being sent

Definition at line 446 of file MHV_Device_TX.cpp.

bool MHV_Device_TX::write ( int32_t  value)

Print an integer

Parameters:
valuethe value to print
Returns:
false on success true if there is already a string being sent

Definition at line 465 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 if there is already a string being sent

Definition at line 117 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:
false on success true if there is already a string being sent

Definition at line 200 of file MHV_Device_TX.cpp.


Member Data Documentation

Definition at line 61 of file MHV_Device_TX.h.

const char* MHV_Device_TX::_tx [protected]

Definition at line 63 of file MHV_Device_TX.h.

Definition at line 62 of file MHV_Device_TX.h.


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