Example #1
0
        public void TestBindTranceiverEncode()
        {
            var pdu = new BindTransceiver();

            pdu.SystemID   = systemId;
            pdu.Password   = password;
            pdu.SystemType = systemType;

            Assert.AreEqual(rawPdu, pdu.Encode(), "bind_tranceiver should be encoded properly");
        }
Example #2
0
        private void SendBindTransceiver()
        {
            string pdu;

            var bind_transceiver = new BindTransceiver
            {
                SystemID         = system_id,
                Password         = password,
                InterfaceVersion = Common.SmppVersionType.Version3_4,
                SystemType       = system_type,
                Ton             = (Common.TonType)source_ton,
                Npi             = (Common.NpiType)source_npi,
                sequence_number = sequence_number
            };

            commands_queue.Add(sequence_number, DateTime.Now);

            pdu = bind_transceiver.Encode();
            SendPDU(pdu);
            Events.LogChannelEvent(channel_name, "Sending [bind_transceiver]", debug ? pdu : "");
        }