Exemple #1
0
        void CheckType(DebugSerializeType expectedType, int expectedBitCount)
        {
            var type     = (DebugSerializeType)bitStream.ReadBits(4);
            var bitCount = bitStream.ReadBits(7);

            if (bitCount != expectedBitCount)
            {
                throw new Exception($"Expected type {expectedType} bitcount {expectedBitCount} received type {type} {bitCount}");
            }

            if (type != expectedType)
            {
                throw new Exception($"Expected type {expectedType} received {type}");
            }
        }
Exemple #2
0
 void WriteType(DebugSerializeType type, int bitCount)
 {
     // log.Debug($"Type {type} bitcount {bitCount}");
     InternalWriteBits((uint)type, 4);
     InternalWriteBits((uint)bitCount, 7);
 }
Exemple #3
0
 public static string TypeToString(DebugSerializeType type)
 {
     return(type.ToString());
 }