*update system_monitor api (simplified)

This commit is contained in:
Gatsby Van
2024-01-31 10:05:43 +08:00
parent 9f75b519e0
commit 632b1ec636
4 changed files with 42 additions and 124 deletions
@@ -115,11 +115,11 @@ static int32_t Service_Packing(L2_INST *instPtr, L2_FRAME_TYPE type, uint8_t dst
uint32_t dataId;
if(L2_GetNodeType(instPtr) == L2_NODE_HEAD)
{
SysMonitor_GetSendPayloadFLJRaw(buff + L2_MSG_SVC_PAYLOAD, &dataId);
SysMonitor_GetSendPayloadRaw(buff + L2_MSG_SVC_PAYLOAD, &dataId, PAYLOAD_LEN_FLJ_TX);
}
else
{
SysMonitor_GetSendPayloadLJRaw(buff + L2_MSG_SVC_PAYLOAD, &dataId);
SysMonitor_GetSendPayloadRaw(buff + L2_MSG_SVC_PAYLOAD, &dataId, PAYLOAD_LEN_LJ_TX);
}
L2_FrameInsertChunk(buff, L2_MSG_SVC_PAYLOAD_ID, L2_MSG_SVC_PAYLOAD_ID_LEN, &dataId);
@@ -276,11 +276,11 @@ int32_t L2_Service_PktHandler(L2_INST *instPtr, uint8_t *msg)
{
if(L2_GetNodeType(instPtr) == L2_NODE_HEAD)
{
SysMonitor_UpdateRecvPayloadFLJRaw(msg+L2_MSG_SVC_PAYLOAD);
SysMonitor_UpdateRecvPayloadRaw(msg+L2_MSG_SVC_PAYLOAD, PAYLOAD_LEN_FLJ_RX);
}
else
{
SysMonitor_UpdateRecvPayloadLJRaw(msg+L2_MSG_SVC_PAYLOAD);
SysMonitor_UpdateRecvPayloadRaw(msg+L2_MSG_SVC_PAYLOAD, PAYLOAD_LEN_LJ_RX);
}
}