| | |
| | | |
| | | #define DEBUG(fmt, args...) LOGD("<parse_net> <%s>: " fmt, __func__, ##args) |
| | | |
| | | //#define ENABLE_DEBUG_PROTOCOL |
| | | |
| | | using namespace std; |
| | | |
| | | #define PKT_HEAD_CHAR 0x7E |
| | |
| | | } |
| | | |
| | | #ifdef ENABLE_DEBUG_PROTOCOL |
| | | /*{ |
| | | { |
| | | static char buff[16384]; |
| | | |
| | | buff[0] = 0; |
| | |
| | | sprintf(buff + strlen(buff), "%02X ", item->data[i]); |
| | | |
| | | if (strlen(buff) > 800) { |
| | | DEBUG("%s -> %s...", item->access == DATA_ACCESS_MCU ? "UART" : "TCP" , buff); |
| | | DEBUG("DATAOUT: %s -> %s...", item->access == DATA_ACCESS_MCU ? "UART" : "TCP" , buff); |
| | | buff[0] = 0; |
| | | } |
| | | } |
| | | |
| | | if (strlen(buff) > 0) { |
| | | DEBUG("%s -> %s", item->access == DATA_ACCESS_MCU ? "UART" : "TCP", buff); |
| | | DEBUG("DATAOUT: %s -> %s", item->access == DATA_ACCESS_MCU ? "UART" : "TCP", buff); |
| | | } |
| | | }*/ |
| | | } |
| | | #endif |
| | | // 系统层确认发送成功 |
| | | item->curr_cnt += 1; |