/// <summary> /// Decodes the given DCS byte. /// </summary> /// <param name="dcs">The DCS octet to decode.</param> /// <returns>An object of type <see cref="T:GSMCommunication.PDUDecoder.DataCodingScheme" /> or one of its derived classes.</returns> public static DataCodingScheme Decode(byte dcs) { DataCodingScheme messageWaitingDiscard; byte num = (byte)(dcs >> 4 & 15); if ((dcs & 64) != 0 || (dcs & 128) != 0) { byte num1 = num; switch (num1) { case 12: { messageWaitingDiscard = new MessageWaitingDiscard(dcs); break; } case 13: { messageWaitingDiscard = new MessageWaitingStore(dcs); break; } case 14: { messageWaitingDiscard = new MessageWaitingStoreUcs2(dcs); break; } case 15: { messageWaitingDiscard = new MessageCoding(dcs); break; } default: { messageWaitingDiscard = new ReservedCodingGroup(dcs); break; } } } else { messageWaitingDiscard = new GeneralDataCoding(dcs); } return(messageWaitingDiscard); }
/// <summary> /// Decodes the given DCS byte. /// </summary> /// <param name="dcs">The DCS octet to decode.</param> /// <returns>An object of type <see cref="T:GSMCommunication.PDUDecoder.DataCodingScheme" /> or one of its derived classes.</returns> public static DataCodingScheme Decode(byte dcs) { DataCodingScheme messageWaitingDiscard; byte num = (byte)(dcs >> 4 & 15); if ((dcs & 64) != 0 || (dcs & 128) != 0) { byte num1 = num; switch (num1) { case 12: { messageWaitingDiscard = new MessageWaitingDiscard(dcs); break; } case 13: { messageWaitingDiscard = new MessageWaitingStore(dcs); break; } case 14: { messageWaitingDiscard = new MessageWaitingStoreUcs2(dcs); break; } case 15: { messageWaitingDiscard = new MessageCoding(dcs); break; } default: { messageWaitingDiscard = new ReservedCodingGroup(dcs); break; } } } else { messageWaitingDiscard = new GeneralDataCoding(dcs); } return messageWaitingDiscard; }