08 2019 档案

摘要:double sum = std::accumulate(std::begin(resultSet), std::end(resultSet), 0.0); double mean = sum / resultSet.size(); //均值 double accum = 0.0; std::for_each (std::begin(resultSet), st... 阅读全文
posted @ 2019-08-14 16:56 盖世猪猪侠 阅读(2922) 评论(0) 推荐(1)
摘要:/* 由于发过来的数据为16进制,故需要把16进制的数据变为10进制,然后由Mat进行保存 */ static int hex_table[] = { 0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0 阅读全文
posted @ 2019-08-09 13:41 盖世猪猪侠 阅读(996) 评论(0) 推荐(0)
摘要:#include #include #include using namespace std; int main(int argc, char *argv[]) { /* * Step 2 - Get a file name */ string file = "C:\\users\\jared\\testfiles\\smallcapture.p... 阅读全文
posted @ 2019-08-06 20:47 盖世猪猪侠 阅读(1012) 评论(0) 推荐(0)
摘要:#include static int hex_table[] = { 0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0, 0,0,0,0,1,2,3,4,5,6, 7,8,9,0,0,0,0,0,0, 0,10,11,12,13,14,15,0,0, ... 阅读全文
posted @ 2019-08-06 15:45 盖世猪猪侠 阅读(1048) 评论(0) 推荐(0)
摘要:#define _XKEYCHECK_H #define HAVE_REMOTE #include "pcap.h" #include "remote-ext.h" #include #include #include #pragma comment(lib, "wpcap.lib") #pragma comment(lib, "Ws2_32.lib") using namespace... 阅读全文
posted @ 2019-08-05 14:43 盖世猪猪侠 阅读(922) 评论(0) 推荐(0)
摘要:pcap_next_ex(pcap_t* p,struct pcap_pkthdr** pkt_header,const u_char** pkt_data) 功能: 从interface或离线记录文件获取一个报文 参数: p: 已打开的捕捉实例的描述符 pkt_header: 报文头 pkt_da 阅读全文
posted @ 2019-08-05 10:06 盖世猪猪侠 阅读(8021) 评论(1) 推荐(0)
摘要:在测试WinPcap手册给的代码: 会出现报错: 可能是因为版本不同导致,故需要添加头文件: 阅读全文
posted @ 2019-08-02 11:01 盖世猪猪侠 阅读(1036) 评论(0) 推荐(0)
摘要:在对WinPcap的文档进行学习时,直接复制了别人的代码,然后就是报错。 头疼不已,然后才发现C++的版本不一样,main函数前面必须加上数据类型,因此改为:int main(),一起就Ok了!! 阅读全文
posted @ 2019-08-02 10:14 盖世猪猪侠 阅读(289) 评论(0) 推荐(0)
摘要:工作需要,需要使用千兆网口的相机,为了快速抓取数据包需要使用WinPCAP开源包。 每次,再添加Iostream头文件后,就报错:The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find th 阅读全文
posted @ 2019-08-01 19:58 盖世猪猪侠 阅读(1561) 评论(1) 推荐(0)