Changing Legacy Code: With Confidenceprivate: void NewPacketCallback(Packet pkt); UpdateRate mCurrentUpdateRate; }; VHFDevice.hpp Following member variables void VHFDevice::NewPacketCallback ( Packet pkt) { ... if(pkt.updateRate == private: void NewPacketCallback(Packet pkt); UpdateRate mCurrentUpdateRate; }; VHFDevice.hpp Following member variables void VHFDevice::NewPacketCallback ( Packet pkt) { ... if(pkt.updateRate == { VHFRadio_Set_Sleep_Enabled(1); } ... } VHFDevice.cpp void VHFDevice::NewPacketCallback ( Packet pkt) { ... if(pkt.updateRate == GetUpdateRate()) { return; } if(IsDeviceAsleep()) { WakeUp();0 码力 | 114 页 | 982.54 KB | 6 月前3
Just-in-Time Compilation - J F Bastien - CppCon 2020Demultiplexing using Dynamic Code Generation A new packet-filter system, DPF (Dynamic Packet Filters), that provides both the traditional flexibility of packet filters and the speed of hand- crafted demultiplexing demultiplexing routines. DPF filters run 10–50 times faster than the fastest packet filters reported in the literature. DPF’s performance is either equivalent to or, when it can exploit runtime information declarative packet-filter language that is aggressively optimized using dynamic code generation. — 1994 (read)DPF Fast, Flexible Message Demultiplexing using Dynamic Code Generation A new packet-filter0 码力 | 111 页 | 3.98 MB | 6 月前3
failing successfullystruct packet_processor_begin { packet_processor& processor; }; struct device_processor_end : device_processor_begin { std::error_code ec; std::exception_ptr ex; device* which; }; struct packet_processor_end : packet_processor_begin { std::exception_ptr ex; session* which; }; struct processor_manager_callback { virtual void on(const device_processor_begin& e) = 0; virtual void on(const packet_processor_begin& = 0; virtual void on(const packet_processor_end& e) = 0; }; 38 struct device_processor_begin { device_processor& processor; }; struct packet_processor_begin { packet_processor& processor; }; struct0 码力 | 44 页 | 625.44 KB | 6 月前3
.NET玩转音视频操作 FFmpeg}) .WriteAll(fc); fc.WriteTrailer(); void LogPacket(FormatContext fc, Packet packet) { AVRational timebase = fc.Streams[packet.StreamIndex].TimeBase; Util.FixedFont(string.Format("pts:{0} pts_time:{1} av_ts2str(packet.Pts), av_ts2timestr(packet.Pts, timebase), av_ts2str(packet.Dts), av_ts2timestr(packet.Dts, timebase), av_ts2str(packet.Duration), av_ts2timestr(packet.Duration, timebase), packet.StreamIndex)) 示例1 纯代码生成视频·技术要点 1. Yuv420pSequence 2. IEnumerable 3. IEnumerable<Packet>0 码力 | 14 页 | 1.43 MB | 1 年前3
Writing Python Bindings for C++ Libraries: Easy-to-use Performancethe python thread run def print_packet(packet): print(packet) my_network_library = MyNetworkLibrary() my_network_library.register_callback_on_packet(print_packet) my_network_library.listenAndBl significantly more flexible now! def print_packet(packet): print(packet) my_network_library = MyNetworkLibrary() my_network_library.register_callback_on_packet(print_packet) my_network_library.listenInThread()0 码力 | 118 页 | 2.18 MB | 6 月前3
python3学习手册def icmp_checksum(packet): # inputif len(packet) & 1: # 长度的末位为1表示:长度不为2的倍数 (即末位不为0) packet = packet + b'\x00' # 0填充 words = array.array('h', packet) sum = 0 sum = (sum >> 16) + (sum & 0xffff) return (~sum) & 0xffff # 反回2字节校验和的反码 def generate_icmp_packet(icmp_data): # input icmp_type = 8 # echo_request icmp_code = 0 icmp_type, icmp_code, icmp_checkum, icmp_id, icmp_sequence) icmp_packet = icmp_header + icmp_data icmp_checkum = icmp_checksum(icmp_packet) icmp_header = struct.pack('bbHHh', icmp_type, icmp_code, 0 码力 | 213 页 | 3.53 MB | 1 年前3
FISCO BCOS 2.3.0 中文文档Default 1. Can set uint. -gDefault no -z packet> Default no -t Default auto generate -T packet = 1024M sql_mode =STRICT_TRANS_TABLES service mysql restart service mysqld start #若安装了mariadb,则使用下面的命令启动 service mariadb start mysql -uroot -p #执行下面命令,查看max_allowed_packet的值 MariaDB show variables like 'max_allowed_packet%'; +--------------------+------------+ | Variable_name | Value | +--------------------+------------+ | max_allowed_packet | 1073741824 | +-------------- 0 码力 | 1227 页 | 10.79 MB | 1 年前3
FISCO BCOS 2.4.0 中文文档Default 1. Can set uint. -gDefault no -z packet> Default no -t Default auto generate -k packet = 1024M sql_mode =STRICT_TRANS_TABLES service mysql restart service mysqld start #若安装了mariadb,则使用下面的命令启动 service mariadb start mysql -uroot -p #执行下面命令,查看max_allowed_packet的值 MariaDB show variables like 'max_allowed_packet%'; +--------------------+------------+ | Variable_name | Value | +--------------------+------------+ | max_allowed_packet | 1073741824 | +-------------- 0 码力 | 1314 页 | 11.21 MB | 1 年前3
FISCO BCOS 2.1.0 中文文档Default 1. Can set uint. -gDefault no -z packet> Default no -t Default auto generate -T packet = 1024M sql_mode =STRICT_TRANS_TABLES service mysql restart service mysqld start #若安装了mariadb,则使用下面的命令启动 service mariadb start mysql -uroot -p #执行下面命令,查看max_allowed_packet的值 MariaDB show variables like 'max_allowed_packet%'; +--------------------+------------+ | Variable_name | Value | +--------------------+------------+ | max_allowed_packet | 1073741824 | +-------------- 0 码力 | 1058 页 | 740.85 KB | 1 年前3
FISCO BCOS 2.5.0 中文文档Default 1. Can set uint. -gDefault no -z packet> Default no -t Default auto generate -6 0 码力 | 1456 页 | 13.35 MB | 1 年前3
共 381 条
- 1
- 2
- 3
- 4
- 5
- 6
- 39













