refactor(): Небольшая чистка кода
This commit is contained in:
parent
cb7cdfc87e
commit
9a84db4431
@ -146,10 +146,8 @@ bool free_rtos::EthUpdClient::write(uint32_t ip_dst_be, uint8_t * p_data, uint32
|
||||
hdr->Length = BASE_SWAP16(eth_pkt_.length);
|
||||
hdr->Chk_sum = 0;
|
||||
|
||||
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
memcpy(p_udp_data, p_data, len);
|
||||
|
||||
/// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
||||
if (use_checksum_) {
|
||||
uint32_t self_ip = ip_iface_.getSelfIpAddr();
|
||||
uint32_t chk_sum32 = 0;
|
||||
|
||||
@ -42,7 +42,7 @@ public:
|
||||
|
||||
int32_t read(uint8_t * p_data, uint32_t len);
|
||||
int32_t read_async(uint8_t * p_data, uint32_t len);
|
||||
/*
|
||||
|
||||
template<class T, class Allocator>
|
||||
int32_t read_async(std::vector<T, Allocator>& data, uint32_t len)
|
||||
{
|
||||
@ -58,7 +58,7 @@ public:
|
||||
|
||||
return get_data(data, len);
|
||||
}
|
||||
*/
|
||||
|
||||
bool write(uint32_t ip_dst_be, uint8_t * p_data, uint32_t len);
|
||||
|
||||
template<class T, class Allocator>
|
||||
@ -67,12 +67,12 @@ public:
|
||||
return write(ip_dst_be, data.data(), data.size() * sizeof(T));
|
||||
}
|
||||
|
||||
void clear(); ///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
void clear();
|
||||
|
||||
private:
|
||||
void put_data(uint32_t src_ip, uint8_t * p_data, uint32_t len);
|
||||
int32_t get_data(uint8_t * p_data, uint32_t len);
|
||||
/*
|
||||
|
||||
template<class T, class Allocator>
|
||||
int32_t get_data(std::vector<T, Allocator>& data, uint32_t len)
|
||||
{
|
||||
@ -91,9 +91,9 @@ private:
|
||||
|
||||
return size;
|
||||
}
|
||||
*/
|
||||
|
||||
private:
|
||||
const uint32_t max_buf_size = 0x8000; // 0x8000 - 32768, 0x10000 - 65536, 0x11CA - 4554, 0x0BDC - 3036, 0x100000 - 1Mb
|
||||
const uint32_t max_buf_size = 0x4000; // 0x4000 - 16384, 32768, 0x10000 - 65536, 0x11CA - 4554, 0x0BDC - 3036, 0x100000 - 1Mb
|
||||
|
||||
const uint16_t port_dst_be_; /// big endian
|
||||
const uint16_t port_src_be_; /// big endian
|
||||
|
||||
@ -54,7 +54,7 @@ int32_t free_rtos::EthUdpServer::Process(uint8_t * p_data, uint32_t len)
|
||||
|
||||
/// <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
if (item == connections_.end()) {
|
||||
EnetAppUtils_print("EthUdpServer::Process(): Port not found %d\r\n", port);
|
||||
//EnetAppUtils_print("EthUdpServer::Process(): Port not found %d\r\n", port);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user