MityDSP Documentation Index

MityDSP::tcDspFtdiVNC1::tcFtdiParser Class Reference

#include <DspFtdiVNC1.h>

List of all members.

Public Types

enum  teReceiveState {
  INIT, WAIT_PROMPT, WAIT_DATA, WAIT_DATA_PROMPT,
  IDLE
}

Public Member Functions

 tcFtdiParser (tcDspFtdiVNC1 *apVNC1, MBX_Handle ahMbx)
 Constructor.
void ReceiveThread ()
 Receive thread.
void SetCurrentCommand (tsCommandMbxData *mpData)
 Set the current command being proccessed by the receive parser.
bool ParseBuffer (char *apBuffer, int anLength)
 Parses a buffer received from the FTDI chip.
bool ParseSectorRead (char *apBuffer, int anLength)
 Parses a sector read.
void Reset ()
bool SendCommandAndWaitData (tsCommandMbxData &data)
 Sends a command and waits for the response or a timeout.
int RxPos () const
bool Enable (bool abEnable)
 Enables the receive thread.

Public Attributes

bool mbStarted

Static Public Attributes

static const int max_msg_size = 1024

Protected Attributes

teReceiveState meRxState
char * mpRxBuffer
char * mpDataStart
int mnExpectedData
int mnDataBytes
int mnRxErrors
int mnRxPos
int mnStatePos
bool mbErrorAllowed
MBX_Handle mhMbx
tsCommandMbxDatampResponseData
tcDspFtdiVNC1mpVNC1
volatile bool mbEnabled
 Enable parsing (set to false for debug commands).

Member Enumeration Documentation

Enumerator:
INIT 
WAIT_PROMPT 
WAIT_DATA 
WAIT_DATA_PROMPT 
IDLE 

Constructor & Destructor Documentation

tcDspFtdiVNC1::tcFtdiParser::tcFtdiParser ( tcDspFtdiVNC1 apVNC1,
MBX_Handle  ahMbx 
)

Constructor.

Parameters:
[in] apVNC1 pointer to the VNC1L object
[in] ahMbx pointer to the mailbox object
See also:
DspFtdiVNC1.h

Member Function Documentation

void tcDspFtdiVNC1::tcFtdiParser::ReceiveThread (  ) 

Receive thread.

Sends commands from the mailbox and parses the response.

See also:
DspFtdiVNC1.h

We could drop a command here, but this is only in debug mode anyway ... carpe dium!

void tcDspFtdiVNC1::tcFtdiParser::SetCurrentCommand ( tsCommandMbxData apData  ) 

Set the current command being proccessed by the receive parser.

Parameters:
[in] apData pointer to the command data
See also:
DspFtdiVNC1.h
bool tcDspFtdiVNC1::tcFtdiParser::ParseBuffer ( char *  apBuffer,
int  anLength 
)

Parses a buffer received from the FTDI chip.

Parameters:
[in] apBuffer Buffer to parse
[in] anLength Length of buffer in bytes
Returns:
true if the data and prompt was parsed.
See also:
DspFtdiVNC1.h
bool tcDspFtdiVNC1::tcFtdiParser::ParseSectorRead ( char *  apBuffer,
int  anLength 
)

Parses a sector read.

Parameters:
[in] apBuffer Buffer to parse, received in response to a sector read
[in] anLength Length of buffer in bytes
Returns:
true if the data and prompt was parsed.
See also:
DspFtdiVNC1.h
void MityDSP::tcDspFtdiVNC1::tcFtdiParser::Reset (  )  [inline]
bool tcDspFtdiVNC1::tcFtdiParser::SendCommandAndWaitData ( tsCommandMbxData arData  ) 

Sends a command and waits for the response or a timeout.

Parameters:
[in] arData pointer to the command data
Returns:
true if command was accepted and did not time out.
See also:
DspFtdiVNC1.h
int MityDSP::tcDspFtdiVNC1::tcFtdiParser::RxPos (  )  const [inline]
bool tcDspFtdiVNC1::tcFtdiParser::Enable ( bool  abEnable  ) 

Enables the receive thread.

Parameters:
[in] abEnable true if parser is enabled
See also:
DspFtdiVNC1.h

Member Data Documentation

Enable parsing (set to false for debug commands).


  
Generated on Fri Sep 23 16:33:50 2011 for MityDSP Core by  Doxygen Version 1.6.1
Copyright © 2009, Critical Link LLC, All rights reserved.