|
|
@ -500,6 +500,7 @@ void _hf_recv_trend(uint8_t slot, char *pkt, uint16_t len)
|
|
|
|
hf_trend_head_t *head_trend = (hf_trend_head_t*)(pkt + sizeof(dau_pkt_head_t));
|
|
|
|
hf_trend_head_t *head_trend = (hf_trend_head_t*)(pkt + sizeof(dau_pkt_head_t));
|
|
|
|
char *data = (char*)(pkt + sizeof(dau_pkt_head_t) + sizeof(hf_trend_head_t));
|
|
|
|
char *data = (char*)(pkt + sizeof(dau_pkt_head_t) + sizeof(hf_trend_head_t));
|
|
|
|
char *point = NULL;
|
|
|
|
char *point = NULL;
|
|
|
|
|
|
|
|
uint32_t *temp = NULL;
|
|
|
|
uint8_t port = 0;
|
|
|
|
uint8_t port = 0;
|
|
|
|
hf_trend_ack_t ack;
|
|
|
|
hf_trend_ack_t ack;
|
|
|
|
hf_trend_ack_t *ack_p = (hf_trend_ack_t*)(pkt + sizeof(dau_pkt_head_t));
|
|
|
|
hf_trend_ack_t *ack_p = (hf_trend_ack_t*)(pkt + sizeof(dau_pkt_head_t));
|
|
|
@ -522,6 +523,19 @@ void _hf_recv_trend(uint8_t slot, char *pkt, uint16_t len)
|
|
|
|
//printh("vport %d index %d utc %d max %d\r\n", head_trend->vport, trend->col.index, trend->col.utc, trend->col.port[port].max);
|
|
|
|
//printh("vport %d index %d utc %d max %d\r\n", head_trend->vport, trend->col.index, trend->col.utc, trend->col.port[port].max);
|
|
|
|
//printh("avg %d cnt %d phase %d noise %d\r\n", trend->col.port[port].avg, trend->col.port[port].cnt, trend->col.port[port].phase, trend->col.port[port].noise);
|
|
|
|
//printh("avg %d cnt %d phase %d noise %d\r\n", trend->col.port[port].avg, trend->col.port[port].cnt, trend->col.port[port].phase, trend->col.port[port].noise);
|
|
|
|
//printh("event_cnt %d\r\n", trend->col.port[port].event_cnt);
|
|
|
|
//printh("event_cnt %d\r\n", trend->col.port[port].event_cnt);
|
|
|
|
|
|
|
|
temp = XMALLOC_Q(MTYPE_CSG, sizeof(uint32_t));
|
|
|
|
|
|
|
|
if (!temp)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
DBG(DBG_M_PD_HF_ERR, "XMALLOC ERROR!\r\n");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
*temp = 0x5a5a;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* 发送给后台, 内存由后台释放 */
|
|
|
|
|
|
|
|
if (dau_msg_send(DAU_SEND_TREND, slot, temp) != E_NONE)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (HF_TREND_TYPE_PRPD == head_trend->type)
|
|
|
|
else if (HF_TREND_TYPE_PRPD == head_trend->type)
|
|
|
@ -610,6 +624,7 @@ void _hf_recv_event(uint8_t slot, char *pkt, uint16_t len)
|
|
|
|
dau_t *dau = &daus[slot];
|
|
|
|
dau_t *dau = &daus[slot];
|
|
|
|
hf_data_t *hf_data = (hf_data_t*)dau->private_data;
|
|
|
|
hf_data_t *hf_data = (hf_data_t*)dau->private_data;
|
|
|
|
hf_event_t *event = &hf_data->event;
|
|
|
|
hf_event_t *event = &hf_data->event;
|
|
|
|
|
|
|
|
hf_event_t *event_send = NULL;
|
|
|
|
dau_pkt_head_t *head = (dau_pkt_head_t*)pkt;
|
|
|
|
dau_pkt_head_t *head = (dau_pkt_head_t*)pkt;
|
|
|
|
hf_event_head_t *head_event = (hf_event_head_t*)(pkt + sizeof(dau_pkt_head_t));
|
|
|
|
hf_event_head_t *head_event = (hf_event_head_t*)(pkt + sizeof(dau_pkt_head_t));
|
|
|
|
char *data = (char*)(pkt + sizeof(dau_pkt_head_t) + sizeof(hf_event_head_t));
|
|
|
|
char *data = (char*)(pkt + sizeof(dau_pkt_head_t) + sizeof(hf_event_head_t));
|
|
|
@ -648,6 +663,21 @@ void _hf_recv_event(uint8_t slot, char *pkt, uint16_t len)
|
|
|
|
//printh("vport %d power_fre %d type %d max %d\r\n", event->head.vport, event->head.power_fre, event->head.type, event->head.max);
|
|
|
|
//printh("vport %d power_fre %d type %d max %d\r\n", event->head.vport, event->head.power_fre, event->head.type, event->head.max);
|
|
|
|
//printh("identifier %d utc %d cnt %d avg %d\r\n", event->head.identifier, event->head.utc, event->head.cnt, event->head.avg);
|
|
|
|
//printh("identifier %d utc %d cnt %d avg %d\r\n", event->head.identifier, event->head.utc, event->head.cnt, event->head.avg);
|
|
|
|
//printh("point_cnt %d\r\n\n", event->head.point_cnt);
|
|
|
|
//printh("point_cnt %d\r\n\n", event->head.point_cnt);
|
|
|
|
|
|
|
|
/* 申请内存 */
|
|
|
|
|
|
|
|
event_send = XMALLOC_Q(MTYPE_CSG, sizeof(hf_event_t));
|
|
|
|
|
|
|
|
if (!event_send)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
DBG(DBG_M_PD_HF_ERR, "XMALLOC ERROR!\r\n");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
memcpy(event_send, event, sizeof(hf_event_t));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* 发送给后台, 内存由后台释放 */
|
|
|
|
|
|
|
|
if (dau_msg_send(DAU_SEND_EVENT, slot, event_send) != E_NONE)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|