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)); }
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)); }