public SmppPduDataSmResp(uint sequenceId, SmppCommandStatus status, string messageId, SmppOptionalParameter[] optionalParameters = null) : base(SmppCommandType.data_sm_resp, sequenceId, status, messageId) { offsetOptionalParameters = CurrentOffset; if (optionalParameters != null) WriteOptionalParameters(optionalParameters); }
protected SmppPdu(SmppCommandType commandType, SmppCommandStatus commandStatus = 0, uint seqNumber = 0) { data = new MemoryStream(); WriteInteger((uint)commandType); WriteInteger((uint)commandStatus); WriteInteger(seqNumber == 0 ? currentSeqNumber++ : seqNumber); if (currentSeqNumber > int.MaxValue) currentSeqNumber = 1; }
public SmppPduSmRespBase(SmppCommandType commandType, uint sequenceId, SmppCommandStatus status, string messageId) : base(commandType, status, sequenceId) { if (commandType != GetCommandType()) throw new Exception("Invaid command ID"); if (messageId.Length > 64) throw new ArgumentOutOfRangeException("messageId"); offsetMessageId = CurrentOffset; WriteCString(messageId); }
public SmppPduDataSmResp(uint sequenceId, SmppCommandStatus status, string messageId, SmppOptionalParameter[] optionalParameters = null) : base(SmppCommandType.data_sm_resp, sequenceId, status, messageId) { offsetOptionalParameters = CurrentOffset; if (optionalParameters != null) { WriteOptionalParameters(optionalParameters); } }
protected SmppPdu(SmppCommandType commandType, SmppCommandStatus commandStatus = 0, uint seqNumber = 0) { data = new MemoryStream(); WriteInteger((uint)commandType); WriteInteger((uint)commandStatus); WriteInteger(seqNumber == 0 ? currentSeqNumber++ : seqNumber); if (currentSeqNumber > int.MaxValue) { currentSeqNumber = 1; } }
public SmppPduBindRespBase(SmppCommandType commandType, uint sequenceId, SmppCommandStatus status, string systemId, SmppOptionalParameter[] optionalParameters = null) : base(commandType, status, sequenceId) { if (commandType != GetCommandType()) throw new Exception("Invaid command ID"); if (systemId.Length > 15) throw new ArgumentOutOfRangeException("systemId"); offsetSystemId = CurrentOffset; WriteCString(systemId); offsetOptionalParameters = CurrentOffset; if (optionalParameters != null) WriteOptionalParameters(optionalParameters); }
public SmppPduSmRespBase(SmppCommandType commandType, uint sequenceId, SmppCommandStatus status, string messageId) : base(commandType, status, sequenceId) { if (commandType != GetCommandType()) { throw new Exception("Invaid command ID"); } if (messageId.Length > 64) { throw new ArgumentOutOfRangeException("messageId"); } offsetMessageId = CurrentOffset; WriteCString(messageId); }
public SmppPduQuerySmResp(uint sequenceId, SmppCommandStatus status, string messageId, string finalDate, byte messageState, byte errorCode) : base(SmppCommandType.query_sm_resp, status, sequenceId) { if (messageId.Length > 64) throw new ArgumentOutOfRangeException("messageId"); offsetMessageId = CurrentOffset; WriteCString(messageId); if (finalDate.Length != 0 && finalDate.Length != 16) throw new ArgumentOutOfRangeException("finalDate"); offsetFinalDate = CurrentOffset; WriteCString(finalDate); offsetMessageState = CurrentOffset; WriteByte(messageState); offsetErrorCode = CurrentOffset; WriteByte(errorCode); }
public SmppPduBindRespBase(SmppCommandType commandType, uint sequenceId, SmppCommandStatus status, string systemId, SmppOptionalParameter[] optionalParameters = null) : base(commandType, status, sequenceId) { if (commandType != GetCommandType()) { throw new Exception("Invaid command ID"); } if (systemId.Length > 15) { throw new ArgumentOutOfRangeException("systemId"); } offsetSystemId = CurrentOffset; WriteCString(systemId); offsetOptionalParameters = CurrentOffset; if (optionalParameters != null) { WriteOptionalParameters(optionalParameters); } }
public SmppPduQuerySmResp(uint sequenceId, SmppCommandStatus status, string messageId, string finalDate, byte messageState, byte errorCode) : base(SmppCommandType.query_sm_resp, status, sequenceId) { if (messageId.Length > 64) { throw new ArgumentOutOfRangeException("messageId"); } offsetMessageId = CurrentOffset; WriteCString(messageId); if (finalDate.Length != 0 && finalDate.Length != 16) { throw new ArgumentOutOfRangeException("finalDate"); } offsetFinalDate = CurrentOffset; WriteCString(finalDate); offsetMessageState = CurrentOffset; WriteByte(messageState); offsetErrorCode = CurrentOffset; WriteByte(errorCode); }
private void SMPPPool_MultiSubmitFinished(uint sequenceNumber, string messageId, SmppCommandStatus cStatus, UnsuccessAddress[] unsuccessAddress) { lock (_syncLock) { if (_sentMessages.ContainsKey(sequenceNumber)) { if (cStatus == SmppCommandStatus.ESME_ROK) { Context.GetStatusUpdater().UpdateSMSStatus(_sentMessages[sequenceNumber], messageId, SMSStatus.Send, null, RoaminSMPP.Packet.Pdu.MessageStateType.Accepted); } else { Context.GetStatusUpdater().UpdateSMSStatus(_sentMessages[sequenceNumber], messageId, SMSStatus.SendError, null, cStatus); } _sentMessages.Remove(sequenceNumber); } } }
public SmppPduBindReceiverResp(uint sequenceId, SmppCommandStatus status, string systemId, SmppOptionalParameter[] optionalParameters = null) : base(SmppCommandType.bind_receiver_resp, sequenceId, status, systemId, optionalParameters) { }
public SmppPduGenerickNack(uint sequenceId, SmppCommandStatus status) : base(SmppCommandType.generic_nack, status, sequenceId) { }
public SmppPduUnbindResp(uint sequenceId, SmppCommandStatus status) : base(SmppCommandType.unbind_resp, status, sequenceId) { }
private void SMPPPool_QueryRequestFinished(string messageId, Pdu.MessageStateType messageStateType, SmppCommandStatus cStatus) { lock (_syncLock) { if (_sentMessages.ContainsKey(messageId) && cStatus == SmppCommandStatus.ESME_ROK) { Context.GetStatusUpdater().UpdateSMSStatus(_sentMessages[messageId], messageId, messageStateType.ConvertStatus(), null, messageStateType); _sentMessages.Remove(messageId); } } }
public SmppPduSubmitSmResp(uint sequenceId, SmppCommandStatus status, string messageId) : base(SmppCommandType.submit_sm_resp, sequenceId, status, messageId) { }
public SmppPduReplaceSmResp(uint sequenceId, SmppCommandStatus status) : base(SmppCommandType.replace_sm_resp, status, sequenceId) { }
public SmppPduCancelSmResp(uint sequenceId, SmppCommandStatus status) : base(SmppCommandType.cancel_sm_resp, status, sequenceId) { }
public SmppPduDeliverSmResp(uint sequenceId, SmppCommandStatus status = SmppCommandStatus.ESME_ROK) : base(SmppCommandType.deliver_sm_resp, sequenceId, status, "") { }
public SmppPduEnquireLinkResp(uint sequenceId, SmppCommandStatus status = SmppCommandStatus.ESME_ROK) : base(SmppCommandType.enquire_link_resp, status, sequenceId) { }