SerialRxBasic Class Reference

#include <serialrx.h>

Inheritance diagram for SerialRxBasic:
Inheritance graph
[legend]
Collaboration diagram for SerialRxBasic:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void SetBaudRate (SystemClockOffset baud)
void SetHexOutput (bool newValue)
 SerialRxBasic ()
void Reset ()
virtual PinGetPin (const char *name)
virtual ~SerialRxBasic ()
virtual int Step (bool &trueHwStep, SystemClockOffset *timeToNextStepIn_ns=0)
 Return nonzero if a breakpoint was hit.

Protected Types

enum  T_RxState {
  RX_WAIT_LOWEDGE, RX_READ_STARTBIT, RX_READ_DATABIT_START, RX_READ_DATABIT_FIRST,
  RX_READ_DATABIT_SECOND, RX_READ_DATABIT_THIRD
}

Protected Member Functions

void PinStateHasChanged (Pin *)
virtual void CharReceived (unsigned char c)=0

Protected Attributes

Pin rx
std::map< std::string, Pin * > allPins
unsigned long long baudrate
int highCnt
int bitCnt
int maxBitCnt
int dataByte
T_RxState rxState
bool sendInHex

Detailed Description

Definition at line 34 of file serialrx.h.


Member Enumeration Documentation

enum SerialRxBasic::T_RxState [protected]
Enumerator:
RX_WAIT_LOWEDGE 
RX_READ_STARTBIT 
RX_READ_DATABIT_START 
RX_READ_DATABIT_FIRST 
RX_READ_DATABIT_SECOND 
RX_READ_DATABIT_THIRD 

Definition at line 49 of file serialrx.h.


Constructor & Destructor Documentation

SerialRxBasic::SerialRxBasic (  ) 

Definition at line 32 of file serialrx.cpp.

References allPins, Pin::RegisterCallback(), Reset(), rx, and sendInHex.

Here is the call graph for this function:

virtual SerialRxBasic::~SerialRxBasic (  )  [inline, virtual]

Definition at line 68 of file serialrx.h.


Member Function Documentation

virtual void SerialRxBasic::CharReceived ( unsigned char  c  )  [protected, pure virtual]

Implemented in SerialRxBuffered, and SerialRx.

Referenced by Step().

Here is the caller graph for this function:

Pin * SerialRxBasic::GetPin ( const char *  name  )  [virtual]

Definition at line 54 of file serialrx.cpp.

References allPins.

void SerialRxBasic::PinStateHasChanged ( Pin p  )  [protected, virtual]

Implements HasPinNotifyFunction.

Definition at line 39 of file serialrx.cpp.

References SystemClock::Add(), SystemClock::Instance(), RX_READ_STARTBIT, RX_WAIT_LOWEDGE, and rxState.

Here is the call graph for this function:

void SerialRxBasic::Reset ( void   ) 

Definition at line 48 of file serialrx.cpp.

References baudrate, maxBitCnt, RX_WAIT_LOWEDGE, and rxState.

Referenced by SerialRx::SerialRx(), and SerialRxBasic().

Here is the caller graph for this function:

void SerialRxBasic::SetBaudRate ( SystemClockOffset  baud  ) 

Definition at line 120 of file serialrx.cpp.

References baudrate.

void SerialRxBasic::SetHexOutput ( bool  newValue  ) 

Definition at line 124 of file serialrx.cpp.

References sendInHex.

int SerialRxBasic::Step ( bool &  trueHwStep,
SystemClockOffset timeToNextStepIn_ns = 0 
) [virtual]

Return nonzero if a breakpoint was hit.

Todo:
This is bug if frame format is different (eg 7 or 9 bits)

Implements SimulationMember.

Definition at line 58 of file serialrx.cpp.

References baudrate, bitCnt, CharReceived(), dataByte, highCnt, maxBitCnt, rx, RX_READ_DATABIT_FIRST, RX_READ_DATABIT_SECOND, RX_READ_DATABIT_THIRD, RX_READ_STARTBIT, RX_WAIT_LOWEDGE, and rxState.

Here is the call graph for this function:


Member Data Documentation

std::map< std::string, Pin *> SerialRxBasic::allPins [protected]

Definition at line 37 of file serialrx.h.

Referenced by GetPin(), and SerialRxBasic().

unsigned long long SerialRxBasic::baudrate [protected]

Definition at line 38 of file serialrx.h.

Referenced by Reset(), SetBaudRate(), and Step().

int SerialRxBasic::bitCnt [protected]

Definition at line 45 of file serialrx.h.

Referenced by Step().

int SerialRxBasic::dataByte [protected]

Definition at line 47 of file serialrx.h.

Referenced by Step().

int SerialRxBasic::highCnt [protected]

Definition at line 43 of file serialrx.h.

Referenced by Step().

int SerialRxBasic::maxBitCnt [protected]

Definition at line 46 of file serialrx.h.

Referenced by Reset(), and Step().

Pin SerialRxBasic::rx [protected]

Definition at line 36 of file serialrx.h.

Referenced by SerialRx::SerialRx(), SerialRxBasic(), and Step().

Definition at line 58 of file serialrx.h.

Referenced by PinStateHasChanged(), Reset(), and Step().

bool SerialRxBasic::sendInHex [protected]

Definition at line 60 of file serialrx.h.

Referenced by SerialRx::CharReceived(), SerialRxBasic(), and SetHexOutput().


The documentation for this class was generated from the following files:
Generated on Sun Feb 12 16:53:05 2012 for Simulavr by  doxygen 1.6.3