internal SmppQuerySmRes QuerySm(SmppQuerySmReq RequestPdu)
        {
            var asyncObject = new SmppAsyncObject();

            SendReqPdu(RequestPdu, ref asyncObject);
            return(new SmppQuerySmRes(asyncObject.PduRes));
        }
 internal void BeginQuerySm(SmppQuerySmReq RequestPdu, SmppQuerySmResHandler Callback, object State)
 {
     InitializeAsyncTransac(RequestPdu, Callback, State);
 }
Beispiel #3
0
 public SmppQuerySmEventArgs(SmppQuerySmReq Pdu, Guid ConnGuid)
 {
     _Pdu      = Pdu;
     _ConnGuid = ConnGuid;
 }
Beispiel #4
0
 public SmppQuerySmRes QuerySm(SmppQuerySmReq RequestPdu)
 {
     return(_InternalConnection.QuerySm(RequestPdu));
 }
Beispiel #5
0
 public void BeginQuerySm(SmppQuerySmReq RequestPdu, SmppQuerySmResHandler Callback, object State)
 {
     _InternalConnection.BeginQuerySm(RequestPdu, Callback, State);
 }
Beispiel #6
0
 public void BeginQuerySm(SmppQuerySmReq RequestPdu, SmppQuerySmResHandler Callback)
 {
     _InternalConnection.BeginQuerySm(RequestPdu, Callback, null);
 }
Beispiel #7
0
        void ProcessPdu(Guid ConnGuid, ByteBuilder bb)
        {
            var header = new SmppHeader(bb);

            if (bb.Count > 0x10)
            {
                bb.ToArray(0x10, bb.Count - 0x10);
            }
            if (((header.CommandId == 2) || (header.CommandId == 1)) || (header.CommandId == 9))
            {
                try {
                    var pdu = new SmppBindReq(bb);
                    if (OnBindReq != null)
                    {
                        OnBindReq(this, new SmppBindEventArgs(ConnGuid, pdu));
                    }
                } catch {}
            }
            else
            {
                int commandId = header.CommandId;
                if (commandId <= -2147483627)
                {
                    switch (commandId)
                    {
                    case -2147483643: {
                        var res = new SmppDeliverSmRes(bb);
                        if (OnDeliverSmRes != null)
                        {
                            OnDeliverSmRes(this, new SmppDeliverSmResEventArgs(ConnGuid, res));
                        }
                        return;
                    }

                    case -2147483627: {
                        var res2 = new SmppEnquireLinkRes(bb);
                        if (OnEnquireLinkRes != null)
                        {
                            OnEnquireLinkRes(this, new SmppEnquireLinkResEventArgs(ConnGuid, res2));
                            return;
                        }
                        break;
                    }
                    }
                }
                else
                {
                    switch (commandId)
                    {
                    case 3: {
                        var req4 = new SmppQuerySmReq(bb);
                        if (OnQuerySmReq != null)
                        {
                            OnQuerySmReq(this, new SmppQuerySmEventArgs(req4, ConnGuid));
                        }
                        return;
                    }

                    case 4: {
                        var req2 = new SmppSubmitSmReq(bb);
                        if (OnSubmitSmReq != null)
                        {
                            OnSubmitSmReq(this, new SmppSubmitSmEventArgs(ConnGuid, req2));
                        }
                        return;
                    }

                    case 5:
                        return;

                    case 6: {
                        var req5 = new SmppUnBindReq(bb);
                        if (OnUnBindReq != null)
                        {
                            OnUnBindReq(this, new SmppUnBindEventArgs(ConnGuid, req5));
                        }
                        return;
                    }

                    case 0x15: {
                        var req3 = new SmppEnquireLinkReq(bb);
                        if (OnEnquireLinkReq != null)
                        {
                            OnEnquireLinkReq(this, new SmppEnquireLinkEventArgs(ConnGuid, req3));
                        }
                        return;
                    }

                    default:
                        return;
                    }
                }
            }
        }