Beispiel #1
0
        public static Octets EncodeCommand(Command cmd)
        {
            MemoryStream ms = new MemoryStream();
            BinaryWriter bw = new BinaryWriter(ms);
            ushort type = (ushort)cmd.getCommandType();
            bw.Write(type);
            cmd.marshal(bw);

            return new Octets(ms.ToArray());
        }