コード例 #1
0
ファイル: AutoPinger.cs プロジェクト: abmantis/InDev
        /// <summary>
        /// Parse messages from the Revelation connection.
        /// </summary>
        /// <param name="data">The data from the revelation connected appliance.</param>
        public override void parseRevelationMessages(ExtendedRevelationPacket data)
        {
            List <RevealPacket> revealpkt_list = new List <RevealPacket>();

            revealpkt_list.ParseRevelationPacket(data);
            //A Revelation packet can contain more than one Reveal Message.
            foreach (RevealPacket reveal_pkt in revealpkt_list)
            {
                switch (reveal_pkt.API)
                {
                case API_NUMBER:       //parse opcodes to this API (already without the feedback bit, i.e. 0x25: reveal_pkt.OpCode = 5 , reveal_pkt.IsFeedback = true )
                    switch ((OPCODES)reveal_pkt.OpCode)
                    {
                    /*
                     * Create a opcode enumeration to parse specific opcode
                     * case OPCODES.SET_VALUE:
                     *     if(reveal_pkt.IsFeedback)
                     *     {
                     *          textBox1.Text = reveal_pkt.PayLoad[0].ToString();
                     *     }
                     *     break;
                     *   */
                    default:

                        break;
                    }
                    break;

                default:
                    break;
                }
            }
        }
コード例 #2
0
 /// <summary>
 /// Parse messages from the Revelation connection.
 /// </summary>
 /// <param name="data">The data from the revelation connected appliance.</param>
 public override void parseRevelationMessages(ExtendedRevelationPacket data)
 {
 }