|
dRonin
adbada4
dRonin GCS
|
#include <uavtalk.h>
Classes | |
| struct | ComStats |
| struct | UAVTalkFileData |
| struct | UAVTalkHeader |
Signals | |
| void | ackReceived (UAVObject *obj) |
| void | nackReceived (UAVObject *obj) |
| void | fileDataReceived (quint32 fileId, quint32 offset, quint8 *data, quint32 dataLen, bool eof, bool lastInSeq) |
Public Member Functions | |
| UAVTalk (QIODevice *iodev, UAVObjectManager *objMngr, bool canBlock=true) | |
| ~UAVTalk () | |
| bool | sendObject (UAVObject *obj, bool acked, bool allInstances) |
| bool | sendObjectRequest (UAVObject *obj, bool allInstances) |
| bool | requestFile (quint32 fileId, quint32 offset) |
| ComStats | getStats () |
| bool | processInput () |
Protected Member Functions | |
| bool | objectTransaction (UAVObject *obj, quint8 type, bool allInstances) |
| bool | receiveObject (quint8 type, quint32 objId, quint16 instId, quint8 *data, quint32 length) |
| bool | receiveFileChunk (quint32 fileId, quint8 *data, quint32 length) |
| UAVObject * | updateObject (quint32 objId, quint16 instId, quint8 *data) |
| bool | transmitNack (quint32 objId) |
| bool | transmitObject (UAVObject *obj, quint8 type, bool allInstances) |
| bool | transmitSingleObject (UAVObject *obj, quint8 type, bool allInstances) |
| quint8 | updateCRC (quint8 crc, const quint8 *data, qint32 length) |
| bool | transmitFrame (quint32 length, bool incrTxObj=true) |
Protected Attributes | |
| QPointer< QIODevice > | io |
| UAVObjectManager * | objMngr |
| bool | canBlock |
| quint8 | rxBuffer [MAX_PACKET_LENGTH *12] |
| quint8 | txBuffer [MAX_PACKET_LENGTH] |
| quint32 | startOffset |
| quint32 | filledBytes |
| ComStats | stats |
Static Protected Attributes | |
| static const int | VER_MASK = 0x70 |
| static const int | TYPE_MASK = 0x0f |
| static const int | TYPE_VER = 0x20 |
| static const int | TYPE_OBJ = 0x00 |
| static const int | TYPE_OBJ_REQ = 0x01 |
| static const int | TYPE_OBJ_ACK = 0x02 |
| static const int | TYPE_ACK = 0x03 |
| static const int | TYPE_NACK = 0x04 |
| static const int | TYPE_FILEREQ = 0x08 |
| static const int | TYPE_FILEDATA = 0x09 |
| static const int | MIN_HEADER_LENGTH = 8 |
| static const int | MAX_HEADER_LENGTH = MIN_HEADER_LENGTH + 2 |
| static const int | CHECKSUM_LENGTH = 1 |
| static const int | MAX_PACKET_LENGTH = 256 |
| static const int | MAX_PAYLOAD_LENGTH = (MAX_PACKET_LENGTH - CHECKSUM_LENGTH - MAX_HEADER_LENGTH) |
| static const quint16 | ALL_INSTANCES = 0xFFFF |
| static const quint16 | OBJID_NOTFOUND = 0x0000 |
| static const int | TX_BACKLOG_SIZE = 2 * 1024 |
| static const quint8 | crc_table [256] |
| static const quint8 | FILEDATA_FLAG_EOF = 0x01 |
| static const quint8 | FILEDATA_FLAG_LAST = 0x02 |