예제 #1
0
        public void Serialize(ByteArrayBuilder cmd)
        {
            cmd.AddUInt16(Modes.Count);
            cmd.Pad(2);

            foreach (Entry mode in Modes)
            {
                cmd.AddUInt8((uint)mode.Mode);
                cmd.Pad(3);
                cmd.AddUInt32((uint)(1 << (int)mode.MultiviewMode)); // TODO - should be mask
                cmd.AddUInt32((uint)(1 << (int)mode.SomeMode));      // TODO - should be mask
            }
        }
예제 #2
0
        public void Serialize(ByteArrayBuilder cmd)
        {
            cmd.AddUInt16(Modes.Count);
            cmd.Pad(2);

            foreach (Entry mode in Modes)
            {
                cmd.AddUInt8((uint)mode.Mode);
                cmd.Pad(3);
                cmd.AddUInt32(ModesToUInt(mode.MultiviewModes));
                cmd.AddUInt32(ModesToUInt(mode.DownConvertModes));
                cmd.AddBoolArray(mode.RequiresReconfig);
            }
        }
 private static void PutValue(ByteArrayBuilder cmd, double val)
 {
     cmd.AddUInt32((uint)(Math.Pow(10, val / 20d) * 128 * 65536d));
 }