Пример #1
0
        public TransactionBase(SPDHTransactionTypeEnum type, string name)
        {
            Header          = new Header();
            MandatoryFidIds = new List <FIDMeta>();
            Fids            = new List <FIDBase>();
            Type            = type;
            Name            = name;

            Header.SetValue(HeaderEntryEnum.DeviceType, Formatting.ASCIIStringToByteArray(SPDHConstants.DialOrLeasedLineTerminalOrNetwork));
            Header.SetValue(HeaderEntryEnum.TransmissionNumber, Formatting.ASCIIStringToByteArray(SPDHConstants.TransmissionNumberNotChecked));
        }
Пример #2
0
        public TransactionBase(byte[] raw, ref int pos, SPDHTransactionTypeEnum type)
        {
            Header          = new Header();
            MandatoryFidIds = new List <FIDMeta>();
            Fids            = new List <FIDBase>();
            Type            = type;
            Name            = type.ToString();
            pos             = Deserialize(raw, pos);

            Header.SetValue(HeaderEntryEnum.DeviceType, Formatting.ASCIIStringToByteArray(SPDHConstants.DialOrLeasedLineTerminalOrNetwork));
            Header.SetValue(HeaderEntryEnum.TransmissionNumber, Formatting.ASCIIStringToByteArray(SPDHConstants.TransmissionNumberNotChecked));
        }