當前位置: 首頁>>代碼示例>>C#>>正文


C# WireProtocol.Converter類代碼示例

本文整理匯總了C#中Microsoft.SPOT.Debugger.WireProtocol.Converter的典型用法代碼示例。如果您正苦於以下問題:C# Converter類的具體用法?C# Converter怎麽用?C# Converter使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Converter類屬於Microsoft.SPOT.Debugger.WireProtocol命名空間,在下文中一共展示了Converter類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: PrepareForDeserialize

				public void PrepareForDeserialize(int size, byte[] data, Converter converter)
				{
					module_serial_number = new byte[32];
					system_serial_number = new byte[16];
				}
開發者ID:Roddoric,項目名稱:Monkey.Robotics,代碼行數:5,代碼來源:WireProtocol.cs

示例2: OutgoingMessage

        public OutgoingMessage( IController parent, Converter converter, uint cmd, uint flags, object payload )
        {
            InitializeForSend( parent, converter, cmd, flags, payload );

            UpdateCRC( converter );
        }
開發者ID:awakegod,項目名稱:NETMF-LPC,代碼行數:6,代碼來源:Controller.cs

示例3: InitializeForSend

        internal void InitializeForSend( IController parent, Converter converter, uint cmd, uint flags, object payload )
        {
            Packet header = parent.NewPacket();

            header.m_cmd   = cmd;
            header.m_flags = flags;

            m_parent              = parent;

            m_raw                 = new MessageRaw ();
            m_base                = new MessageBase();
            m_base.m_header       = header;
            m_base.m_payload      = payload;

            if(payload != null)
            {                
                m_raw.m_payload = converter.Serialize( payload );

                m_base.m_header.m_size    = (uint)m_raw.m_payload.Length;
                m_base.m_header.m_crcData = CRC.ComputeCRC( m_raw.m_payload, 0 );
            }
        }
開發者ID:awakegod,項目名稱:NETMF-LPC,代碼行數:22,代碼來源:Controller.cs

示例4: Reply

        public bool Reply( Converter converter, uint flags, object payload )
        {
            
            OutgoingMessage msgReply = new OutgoingMessage( this, converter, flags, payload );

            return msgReply.Send();
        }
開發者ID:awakegod,項目名稱:NETMF-LPC,代碼行數:7,代碼來源:Controller.cs

示例5: UpdateCRC

        private void UpdateCRC( Converter converter )
        {
            Packet header = m_base.m_header;

            //
            // The CRC for the header is computed setting the CRC field to zero and then running the CRC algorithm.
            //
            header.m_crcHeader = 0;
            header.m_crcHeader = CRC.ComputeCRC( converter.Serialize( header ), 0 );

            m_raw.m_header = converter.Serialize( header );
        }
開發者ID:awakegod,項目名稱:NETMF-LPC,代碼行數:12,代碼來源:Controller.cs


注:本文中的Microsoft.SPOT.Debugger.WireProtocol.Converter類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。