#include <CamParser.h>
|
| | tcCamParser (char *apMsgBuf, int len, bool CheckSumRequired=true) |
| |
| virtual | ~tcCamParser (void) |
| |
| virtual bool | ResetParser (char *apOutBuf=NULL, int anOutBufLen=0) |
| |
| virtual int | AddData (void *apData, int anLength) |
| |
| virtual unsigned int | ComputeChecksum (tsMsgHeader *apMessage, void *apPayload=NULL, int anPayloadLen=0) |
| |
| virtual void | PrepareOutput (tsMsgHeader *apMessage, void *apPayload=NULL, int anPayloadLen=0) |
| |
| virtual void | EnableChecksum (bool abEnable) |
| |
| | tcDspParserBase (char *apOutBuf=NULL, int anOutBufLen=4096) |
| |
| virtual | ~tcDspParserBase () |
| |
| virtual void | RegisterCallback (tfParserCallback afCallback, void *apUser=NULL) |
| |
|
| enum | teDspParseStatus {
eeParseOK = 0,
eeParseChecksumErr = -1,
eeParseSyncErr = -2,
eeParseBustedMsg = -3,
eeParseTooBigErr = -4,
eeBaseLast = -5
} |
| | possible return status' More...
|
| |
| typedef bool(* | tfParserCallback) (int, void *, int, unsigned int, void *) |
| |
| unsigned int | mnBytesRead |
| | Bytes passed to parser. More...
|
| |
| unsigned int | mnBytesWritten |
| | Bytes written to buffer. More...
|
| |
| unsigned int | mnGoodMsgs |
| | Count of valid messages decoded. More...
|
| |
| unsigned int | mnBadMsgs |
| | Count of bad messages. More...
|
| |
| unsigned int | mnSyncErrs |
| | Number of synchronization errors. More...
|
| |
| unsigned int | mnChecksumErrs |
| | Number of checksum errors. More...
|
| |
| int | AssembleLine (void *apInput, int anLength, bool &arLineComplete) |
| |
| char | AsciiHexDigitVal (char anHexdigit) |
| |
◆ teMsgState
| Enumerator |
|---|
| eeSyncSearch | |
| eeProcessHeader | |
| eeProcessBody | |
| eeMessageComplete | |
| eeRecordBusted | |
◆ tcCamParser()
| tcCamParser::tcCamParser |
( |
char * |
apMsgBuf, |
|
|
int |
len, |
|
|
bool |
CheckSumRequired = true |
|
) |
| |
◆ ~tcCamParser()
| tcCamParser::~tcCamParser |
( |
void |
| ) |
|
|
virtual |
◆ AddData()
| int tcCamParser::AddData |
( |
void * |
apData, |
|
|
int |
anLength |
|
) |
| |
|
virtual |
This routine is used to add data to the parser. In the base class, this is simply a "passthrough"... the input data is taken as a complete message and is passed to the callback. If the input fits in the output, the status is eeParseOK, otherwise eeParseTooBigErr.
- Parameters
-
| [in] | apData | Pointer to new data |
| [in] | anLength | Length of new data |
- Returns
- Integer number of messages completed this call.
- See also
- DspParserBase.h
Reimplemented from SocCamera::tcDspParserBase.
◆ ComputeChecksum()
| unsigned int tcCamParser::ComputeChecksum |
( |
tsMsgHeader * |
apMessage, |
|
|
void * |
apPayload = NULL, |
|
|
int |
anPayloadLen = 0 |
|
) |
| |
|
virtual |
◆ EnableChecksum()
| void tcCamParser::EnableChecksum |
( |
bool |
abEnable | ) |
|
|
virtual |
◆ PrepareOutput()
| void tcCamParser::PrepareOutput |
( |
tsMsgHeader * |
apMessage, |
|
|
void * |
apPayload = NULL, |
|
|
int |
anPayloadLen = 0 |
|
) |
| |
|
virtual |
◆ ResetParser()
| bool tcCamParser::ResetParser |
( |
char * |
apOutBuf = NULL, |
|
|
int |
anOutBufLen = 0 |
|
) |
| |
|
virtual |
This routine is used to reset a parser to an initialized state. A new output buffer may optionally be provided.
- Parameters
-
| [in] | apOutBuf | Address of new parser output buffer (default: NULL) |
| [in] | anOutBufLen | Length of new output buffer (default: 0) |
- Returns
- True, if successful.
- See also
- DspParserBase.h
Reimplemented from SocCamera::tcDspParserBase.
◆ mbCheckSumRqd
| bool tcCamParser::mbCheckSumRqd |
|
protected |
True if checksums should be used.
◆ meState
Current state of the parser.
◆ mnMaxPayload
| unsigned int tcCamParser::mnMaxPayload |
|
protected |
Maximum message payload length (bytes)
◆ mnOutOffset
| unsigned int tcCamParser::mnOutOffset |
|
protected |
Current offset in the output buffer.
◆ mnSeqNum
| unsigned char tcCamParser::mnSeqNum |
|
protected |
The documentation for this class was generated from the following files:
- /tmp/mitycam_sdk/ARM/camera_software/src/CommandInterface/MityViewer/CamParser.h
- /tmp/mitycam_sdk/ARM/camera_software/src/CommandInterface/MityViewer/CamParser.cpp