// display packet content
void cbToCoNet_vRxEvent(tsRxDataApp *pRx) {
int i;
static uint16 u16seqPrev = 0xFFFF;
uint8 *p = pRx->auData; // pointer to the payload
// print control info
vfPrintf(&sSerStream, LB"[PKT Ad:%04x,Ln:%03d,Seq:%03d,Lq:%03d,Tms:%05d \"",
pRx->u32SrcAddr, // source address
pRx->u8Len, // payload size
pRx->u8Seq, // seq number
pRx->u8Lqi, // LQI
pRx->u32Tick & 0xFFFF); // time stamp
// print first 32 bytes
for (i = 0; i < pRx->u8Len; i++) {
if (i < 32) {
sSerStream.bPutChar(sSerStream.u8Device,
(pRx->auData[i] >= 0x20 && pRx->auData[i] <= 0x7f) ? pRx->auData[i] : '.');
} else {
vfPrintf(&sSerStream, "..");
break;
}
}
vfPrintf(&sSerStream, "C\"]");
}