91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 14KB
    文件類型: .7z
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-05-28
  • 語言: 其他
  • 標(biāo)簽: 讀取??解析??

資源簡介

簡潔明了,可以為相關(guān)人員提供一個(gè)解析文件的思路,沒有復(fù)雜的代碼,比較容易理解

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Windows.Forms;
using?System.Text.Regularexpressions;
using?TPCANHandle?=?System.Byte;
using?System.IO;
using?System.Threading;
using?System.Collections;

namespace?WindowsFormsApplication1
{
????public?partial?class?Form1?:?Form
????{
????????private?class?MessageStatus
????????{
????????????private?TPCANMsg?m_Msg;
????????????private?TPCANTimestamp?m_TimeStamp;
????????????private?int?m_index;
????????????public?MessageStatus(TPCANMsg?canMsg?TPCANTimestamp?canTimeStamp?int?listindex)
????????????{
????????????????m_Msg?=?canMsg;
????????????????m_TimeStamp?=?canTimeStamp;
????????????????m_index?=?listindex;
????????????}
????????????public?TPCANMsg?CANMsg
????????????{
????????????????get?{?return?CANMsg;?}
????????????}
????????????public?TPCANTimestamp?TimeStamp
????????????{
????????????????get?{?return?m_TimeStamp;?}
????????????}
????????????public?string?TypeString
????????????{
????????????????get?{?return?GetMsgTypeString();?}
????????????}
????????????public?string?IdString
????????????{
????????????????get?{?return?GetIdString();?}
????????????}
????????????public?string?DataString
????????????{
????????????????get?{?return?GetDataString();?}
????????????}
????????????private?string?GetDataString()
????????????{
????????????????string?strTemp;

????????????????strTemp?=?““;

????????????????if?((m_Msg.MSGTYPE?&?TPCANMessageType.PCAN_MESSAGE_RTR)?==?TPCANMessageType.PCAN_MESSAGE_RTR)
????????????????????return?“Remote?Request“;
????????????????else
????????????????????for?(int?i?=?0;?i?????????????????????????strTemp?+=?string.Format(“{0:X2}?“?m_Msg.DATA[i]);

????????????????return?strTemp;
????????????}
????????????private?string?GetMsgTypeString()
????????????{
????????????????string?strTemp;

????????????????if?((m_Msg.MSGTYPE?&?TPCANMessageType.PCAN_MESSAGE_EXTENDED)?==?TPCANMessageType.PCAN_MESSAGE_EXTENDED)
????????????????????strTemp?=?“EXTENDED“;
????????????????else
????????????????????strTemp?=?“STANDARD“;

????????????????if?((m_Msg.MSGTYPE?&?TPCANMessageType.PCAN_MESSAGE_RTR)?==?TPCANMessageType.PCAN_MESSAGE_RTR)
????????????????????strTemp?+=?“/RTR“;

????????????????return?strTemp;
????????????}
????????????private?string?GetIdString()
????????????{
????????????????//?We?format?the?ID?of?the?message?and?show?it
????????????????//
????????????????if?((m_Msg.MSGTYPE?&?TPCANMessageType.PCAN_MESSAGE_EXTENDED)?==?TPCANMessageType.PCAN_MESSAGE_EXTENDED)
????????????????????return?string.Format(“{0:X8}h“?m_Msg.ID);
????????????????else
????????????????????return?string.Format(“{0:X3}h“?m_Msg.ID);
????????????}
????????}
????????public?TPCANHandle?m_PcanHandle;
????????public?TPCANBaudrate?m_Baudrate;
????????public?TPCANType?m_HwType;
????????public?b

評論

共有 條評論

相關(guān)資源