*add service data logging

This commit is contained in:
Gatsby Van
2024-01-31 19:47:11 +08:00
parent b9e055c039
commit e308a61abc
@@ -141,6 +141,9 @@ static int32_t Service_Packing(L2_INST *instPtr, L2_FRAME_TYPE type, uint8_t dst
DBG_ERROR("Fail to append CRC...\n");
return Status;
}
memcpy(instPtr->serviceFSM->txLog.data, buff, L2_SVC_PACK_LEN);
instPtr->serviceFSM->txLog.dataId = dataId;
break;
}
default:
@@ -295,6 +298,10 @@ int32_t L2_Service_PktHandler(L2_INST *instPtr, uint8_t *msg)
}
}
// Logging
memcpy(instPtr->serviceFSM->rxLog.data, msg, L2_SVC_PACK_LEN);
instPtr->serviceFSM->rxLog.dataId = dataId;
#ifdef DATALINK_ENABLE_AUTOTIMESYNC
// Implement a auto time sync.
if (L2_GetNodeType(instPtr) != L2_NODE_HEAD)