Пример #1
0
        public SubmitMessage(GsmDataCoding coding)
        {
            _Coding = coding;
            if (coding == GsmDataCoding.Ascii)
            {
                _DataHeader = new DataHeader();
                {
                    InfoElement.PortAddress elem = new InfoElement.PortAddress(InfoElement.AddressingScheme.TwoOctet)
                    {
                        SourcePort = 16001,
                        TargetPort = 16001
                    };
                    _DataHeader.Add(elem);
                }
                _DataHeaderIndication = DataHeaderIndication.Yes;
            }
            else
            {
                _DataHeaderIndication = DataHeaderIndication.No;
            }

            _ProtocolIdentifier = new ProtocolIdentifier();
            _DataCodingScheme   = new DataCodingScheme(coding);
            _ValidityPeriod     = new ValidityPeriod(ValidityPeriodDuration.OneDay);
        }
Пример #2
0
        /// <summary>
        ///
        /// </summary>
        public SubmitMessage(GsmDataCoding coding, int port)
        {
            _Coding = coding;
            _DataHeaderIndication = DataHeaderIndication.Yes;
            _DataHeader           = new DataHeader();
            {
                InfoElement.PortAddress elem = new InfoElement.PortAddress(InfoElement.AddressingScheme.TwoOctet)
                {
                    SourcePort = (ushort)port,
                    TargetPort = (ushort)port
                };
                _DataHeader.Add(elem);
            }

            _ProtocolIdentifier = new ProtocolIdentifier();
            _DataCodingScheme   = new DataCodingScheme(coding);
            _ValidityPeriod     = new ValidityPeriod(ValidityPeriodDuration.OneDay);
        }