Exemple #1
0
        /// <summary>
        /// Writes the Data to a Stream
        /// </summary>
        /// <param name="format"></param>
        /// <param name="writer"></param>
        internal void Serialize(System.IO.BinaryWriter writer)
        {
            writer.Write(opcode);
            if (((Bhav)parent).Header.Format < 0x8007)
            {
                writer.Write((byte)formatSpecificGetAddr(addr1));
                writer.Write((byte)formatSpecificGetAddr(addr2));
            }
            else
            {
                writer.Write(formatSpecificGetAddr(addr1));
                writer.Write(formatSpecificGetAddr(addr2));
            }

            if (((Bhav)parent).Header.Format < 0x8003)
            {
                operands.Serialize(writer);
            }
            else if (((Bhav)parent).Header.Format < 0x8005)
            {
                operands.Serialize(writer);;
                reserved_01.Serialize(writer);
            }
            else
            {
                writer.Write(nodeversion);
                operands.Serialize(writer);
                reserved_01.Serialize(writer);
            }
        }