Keywords: MOP transceiver, data format
Yes, the data received by MOP is raw data and data length, which can be sent and received according to a custom format. As long as the sending and receiving ends are consistent.
Refer to the data package in the demo:
om_download_sample.cpp
mopRet = OM_Pipeline->recvData(readPack, &readPack.length);中
MopPipeline::DataPackType readPack = {(uint8_t *) recvBuf, RELIABLE_RECV_ONCE_BUFFER_SIZE};
typedef struct sampleProtocolStruct {
uint8_t cmd;
uint8_t subcmd;
uint16_t seq;
uint32_t dataLen;
union dataType {
fileInfo info;
targetFileName targetFile;
uint8_t fileData[0];
} data;
} sampleProtocolStruct;
Note: This article is from Chinese and is translated by machine. If there is any error, please point it out and we will correct it in time
Comments
0 comments
Please sign in to leave a comment.