Example #1
0
 public SONInformation Decode(BitArrayInputStream input)
 {
     SONInformation information = new SONInformation();
     information.InitDefaults();
     input.ReadBit();
     switch (input.ReadBits(1))
     {
         case 0:
             {
                 int nBits = 1;
                 information.sONInformationRequest = (SONInformationRequest)input.ReadBits(nBits);
                 return information;
             }
         case 1:
             information.sONInformationReply = SONInformationReply.PerDecoder.Instance.Decode(input);
             return information;
     }
     throw new Exception(GetType().Name + ":NoChoice had been choose");
 }
Example #2
0
            public SONInformation Decode(BitArrayInputStream input)
            {
                SONInformation information = new SONInformation();

                information.InitDefaults();
                input.ReadBit();
                switch (input.ReadBits(1))
                {
                case 0:
                {
                    int nBits = 1;
                    information.sONInformationRequest = (SONInformationRequest)input.ReadBits(nBits);
                    return(information);
                }

                case 1:
                    information.sONInformationReply = SONInformationReply.PerDecoder.Instance.Decode(input);
                    return(information);
                }
                throw new Exception(GetType().Name + ":NoChoice had been choose");
            }