資源簡介
格西烽火2.0--串口、網口通信測試軟件(完美和諧)

代碼片段和文件信息
using?System;
namespace?Geshe.Utils
{
????public?static?class?BSBits
????{
????????public?static?void?BSSetBits(byte[]?dst?int?index?UInt32?src?int?len)
????????{
????????????UInt32?val;
????????????int?i?bit_pos?dst_byte_pos;
????????????if?(len?>?32)?return;
????????????dst_byte_pos?=?index?/?8;
????????????bit_pos?=?index?%?8;
????????????val?=?src;
????????????for?(i?=?0;?i?????????????{
????????????????dst[dst_byte_pos]?=?(byte)((dst[dst_byte_pos]?&?((byte)(~(1?<>?i)?&?0x01)?<????????????????bit_pos++;
????????????????if?(bit_pos?==?8)
????????????????{
????????????????????bit_pos?=?0;
????????????????????dst_byte_pos++;
????????????????}
????????????}
????????}
????????public?static?void?BSSetBits(byte[]?dst?int?dstIndex?byte[]?src?int?srcIndex?int?len)
????????{
????????????int?i?dst_bit_pos?src_bit_pos?dst_byte_pos?src_byte_pos;
????????????dst_byte_pos?=?dstIndex?/?8;
????????????src_byte_pos?=?srcIndex?/?8;
????????dst_bit_pos?=?dstIndex%8;
????????src_bit_pos?=?srcIndex%8;
????????for?(i=0;?i ????????????{
????????????????dst[dst_byte_pos]?=?(byte)((dst[dst_byte_pos]?&?(~(1?<>?src_bit_pos)?&?0x01)?< ????????dst_bit_pos++;
????????src_bit_pos++;
????????if?(dst_bit_pos?==?8)?{
????????dst_bit_pos?=?0;
????????????????????dst_byte_pos++;
????????}
????????if?(src_bit_pos?==?8)?{
????????src_bit_pos?=?0;
????????????????????src_byte_pos++;
????????}
????????}
????????}
????????public?static?int?BSCmpBits(byte[]?dst?int?dstIndex?byte[]?src?int?srcIndex?int?len)
????????{
????????????int?matchIndex;
????????????return?BSCmpBits(dst?dstIndex?src?srcIndex?len?out?matchIndex);
????????}
????????///?
????????///?
????????///?
????????///?
????????///?
????????///?
????????///?
????????///?
????????///?當前匹配到的位索引
????????///?
????????public?static?int?BSCmpBits(byte[]?dst?int?dstIndex?byte[]?src?int?srcIndex?int?len?out?int?matchIndex)
????????{
????????????int?i?dst_bit_pos?src_bit_pos?dst_byte_pos?src_byte_pos;
????????????dst_byte_pos?=?dstIndex?/?8;
????????????src_byte_pos?=?srcIndex?/?8;
????????????dst_bit_pos?=?dstIndex?%?8;
????????????src_bit_pos?=?srcIndex?%?8;
????????????matchIndex?=?len;
????????????for?(i?=?0;?i?????????????{
????????????????if?(((dst[dst_byte_pos]?>>?dst_bit_pos)?&?0x01)?!=?((src[src_byte_pos]?>>?src_bit_pos)?&?0x01))
????????????????{
????????????????????matchIndex?=?i;
????????????????????return?1;
????????????????}
????????????????dst_bit_pos++;
????????????????src_bit_pos++;
????????????????if?(dst_bit_pos?==?8)
?????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???24975872??2016-04-28?14:33??GBeacon\Beacon.exe
?????文件??????????3??2016-04-28?13:07??GBeacon\Beacon.log
?????文件???????3777??2016-04-29?15:17??GBeacon\Beacon.xm
?????文件?????913271??2015-10-10?06:54??GBeacon\Docs\Beacon.chm
?????文件?????898513??2015-10-10?06:54??GBeacon\Docs\Beacon_en.chm
?????文件???????3340??2015-10-10?06:54??GBeacon\Examples\Plugins\Geshe.Utils\GBits.cs
?????文件????????637??2015-10-10?06:54??GBeacon\Examples\Plugins\Geshe.Utils\GCalculator.cs
?????文件???????3067??2015-10-10?06:54??GBeacon\Examples\Plugins\Geshe.Utils\GConvert.cs
?????文件???????2390??2015-10-10?06:54??GBeacon\Examples\Plugins\Geshe.Utils\Geshe.Utils.csproj
?????文件???????1426??2015-10-10?06:54??GBeacon\Examples\Plugins\Geshe.Utils\Properties\AssemblyInfo.cs
?????文件???????3076??2015-10-10?06:54??GBeacon\Examples\Plugins\Geshe.Utils.Excel\Geshe.Utils.Excel.csproj
?????文件???????7885??2015-10-10?06:54??GBeacon\Examples\Plugins\Geshe.Utils.Excel\GExcel.cs
?????文件???????1438??2015-10-10?06:54??GBeacon\Examples\Plugins\Geshe.Utils.Excel\Properties\AssemblyInfo.cs
?????文件???????1946??2015-10-10?06:54??GBeacon\Examples\Plugins\ParallelPort\ParallelPort.cs
?????文件???????2492??2015-10-10?06:54??GBeacon\Examples\Plugins\ParallelPort\ParallelPort.csproj
?????文件???????1428??2015-10-10?06:54??GBeacon\Examples\Plugins\ParallelPort\Properties\AssemblyInfo.cs
?????文件???????1084??2015-10-10?06:54??GBeacon\Examples\Plugins\ParallelPort\Resources\inpout32-Readme.txt
?????文件??????32768??2015-10-10?06:54??GBeacon\Examples\Plugins\ParallelPort\Resources\inpout32.dll
?????文件???????4615??2015-10-10?06:54??GBeacon\Examples\Plugins\Plugins.sln
?????文件???????1418??2015-10-10?06:54??GBeacon\Examples\Plugins\WinForm\Properties\AssemblyInfo.cs
?????文件???????2884??2015-10-10?06:54??GBeacon\Examples\Plugins\WinForm\WinForm.csproj
?????文件???????1395??2015-10-10?06:54??GBeacon\Examples\Plugins\WinForm\WinFormAgent.cs
?????文件????????713??2015-10-10?06:54??GBeacon\Examples\Plugins\WinForm\WinWindow.cs
?????文件???????3299??2015-10-10?06:54??GBeacon\Examples\Plugins\WinForm\WinWindow.Designer.cs
?????文件???????5817??2015-10-10?06:54??GBeacon\Examples\Plugins\WinForm\WinWindow.resx
?????文件???????2252??2015-10-10?06:54??GBeacon\Examples\Plugins\WpfForm\Properties\AssemblyInfo.cs
?????文件???????3144??2015-10-10?06:54??GBeacon\Examples\Plugins\WpfForm\WpfForm.csproj
?????文件???????1431??2015-10-10?06:54??GBeacon\Examples\Plugins\WpfForm\WpfFormAgent.cs
?????文件????????942??2015-10-10?06:54??GBeacon\Examples\Plugins\WpfForm\WpfWindow.xaml
?????文件????????965??2015-10-10?06:54??GBeacon\Examples\Plugins\WpfForm\WpfWindow.xaml.cs
............此處省略62個文件信息
- 上一篇:準考證制作打印 軟件
- 下一篇:plc入門教程
評論
共有 條評論