Unbind::Unbind(const SequenceNumber &sequence_number) : Header(CommandLength(min_length), CommandId(CommandId::Unbind), CommandStatus(CommandStatus::ESME_ROK), sequence_number) { }
CancelBroadcastSmResp::CancelBroadcastSmResp() : Header(CommandLength(min_length), CommandId(CommandId::CancelBroadcastSmResp), CommandStatus(CommandStatus::ESME_ROK), SequenceNumber::Min) { }
/// @brief Construct from a buffer. /// @param b The buffer (octet array). Smpp::Unbind::Unbind(const Smpp::Uint8* b) : Request(CommandLength(MinLength), CommandId(CommandId::Unbind), 1) { decode(b); }
Unbind::Unbind() : Header(CommandLength(min_length), CommandId(CommandId::Unbind), CommandStatus(CommandStatus::ESME_ROK), SequenceNumber::Min) { }
/// @brief Default constructor. /// note Sets all values to their defaults. Smpp::EnquireLinkResp::EnquireLinkResp() : Response(CommandLength(MinLength), CommandId(CommandId::EnquireLinkResp), CommandStatus(CommandStatus::ESME_ROK), SequenceNumber::Min) { }
BroadcastSm::BroadcastSm(const SequenceNumber &sequence_number, const ServiceType &service_type, const SmeAddress &source_addr, const MessageId &message_id, const PriorityFlag &priority_flag, const Time &schedule_delivery_time, const Time &validity_period, const ReplaceIfPresentFlag &replace_if_present_flag, const DataCoding &data_coding, const SmDefaultMsgId &sm_default_msg_id) : TlvsHeader(CommandLength(min_length), CommandId(CommandId::BroadcastSm), CommandStatus(CommandStatus::ESME_ROK), sequence_number), service_type(service_type), source_addr(source_addr), message_id(message_id), priority_flag(priority_flag), schedule_delivery_time(schedule_delivery_time), validity_period(validity_period), replace_if_present_flag(replace_if_present_flag), data_coding(data_coding), sm_default_msg_id(sm_default_msg_id) { Header::updateLength(service_type.length() + source_addr.getAddress().length() + message_id.length() + schedule_delivery_time.length() + validity_period.length()); }
//-------------------------------------------------------------------------------- PDU_bind_type_resp::PDU_bind_type_resp(uint32_t c) : SMPP_PDU(CommandLength(MinLength), CommandId (c), CommandStatus(CommandStatus::ESME_ROK), SequenceNumber::Min) { }
SubmitMultiResp::SubmitMultiResp() : TlvsHeader(CommandLength(min_length), CommandId(CommandId::SubmitMultiResp), CommandStatus(CommandStatus::ESME_ROK), SequenceNumber::Min) { }
DataSm::DataSm() : TlvsHeader(CommandLength(min_length), CommandId(CommandId::DataSm), CommandStatus(CommandStatus::ESME_ROK), SequenceNumber::Min) { }
/// @brief Constructor that requires values for all the mandatory parameters. /// @param commandStatus The command status to use. /// @param sequenceNumber The sequence number to use. Smpp::ReplaceSmResp::ReplaceSmResp(const CommandStatus& commandStatus, const SequenceNumber& sequenceNumber) : Response(CommandLength(MinLength), CommandId(CommandId::ReplaceSmResp), commandStatus, sequenceNumber) { }
/// @brief Constructor that requires values for all the mandatory parameters. /// @param commandStatus The command status to use. /// @param sequenceNumber The sequence number to use. Smpp::EnquireLinkResp::EnquireLinkResp(const CommandStatus& commandStatus, const SequenceNumber& sequenceNumber) : Response(CommandLength(MinLength), CommandId(CommandId::EnquireLinkResp), commandStatus, sequenceNumber) { }
/// @brief Construct from a buffer. /// @param b The buffer (octet array). Smpp::EnquireLinkResp::EnquireLinkResp(const Smpp::Uint8* b) : Response(CommandLength(MinLength), CommandId(CommandId::EnquireLinkResp), CommandStatus(CommandStatus::ESME_ROK), 1) { decode(b); }
CancelBroadcastSmResp::CancelBroadcastSmResp( const CommandStatus &command_status, const SequenceNumber &sequence_number) : Header(CommandLength(min_length), CommandId(CommandId::CancelBroadcastSmResp), command_status, sequence_number) { }
/** * See CAdaptationBase for description of method. * * @internalComponent */ void CSaaEmergencyCallRfAdaptation::RequestComplete(const StartupAdaptation::TCommand __DEBUG_ONLY(aCommandId), TDesC8& aRetPckg) { DEBUGPRINT3A("SAA - Response received from adaptation with commandId: %d, expecting %d", aCommandId, CommandId()); __ASSERT_DEBUG(aCommandId == CommandId(), CLAYER_PANIC(ECLayerUnexpectedCommandResponse)); switch(CommandId()) { case StartupAdaptation::EActivateRfForEmergencyCall: // Fall-through case StartupAdaptation::EDeactivateRfAfterEmergencyCall: { StartupAdaptation::TResponsePckg responsePckg; responsePckg.Copy(aRetPckg); CompleteRequestStatus(responsePckg()); break; } default: CLAYER_PANIC(ECLayerUnknownCommandResponse); break; } }
SubmitMultiResp::SubmitMultiResp(const CommandStatus &command_status, const SequenceNumber &sequence_number, const MessageId &message_id) : TlvsHeader(CommandLength(min_length), CommandId(CommandId::SubmitMultiResp), command_status, sequence_number), message_id(message_id) { Header::updateLength(message_id.length()); }
BindReceiverResp::BindReceiverResp(const CommandStatus &command_status, const SequenceNumber &sequence_number, const SystemId &system_id) : TlvsHeader(CommandLength(min_length), CommandId(CommandId::BindReceiverResp), command_status, sequence_number), system_id(system_id) { Header::updateLength(system_id.length()); }
/// @brief Constructor that requires values for all the mandatory parameters. /// @param commandStatus The command status to use. /// @param sequenceNumber The sequence number to use. /// @param messageId The message id to use. Smpp::DataSmResp::DataSmResp( const CommandStatus& commandStatus, const SequenceNumber& sequenceNumber, const MessageId& messageId) : Response(CommandLength(MinLength), CommandId(CommandId::DataSmResp), commandStatus, sequenceNumber), message_id_(messageId) { Header::update_length(message_id_.length()); }
/// @brief Constructor that requires values for all the mandatory parameters. /// @param commandStatus The command status to use. /// @param sequenceNumber The sequence number to use. /// @param messageId The message id to use. /// @param finalDate The final date to use. /// @param messageState The message state to use. /// @param errorCode The error code to use. Smpp::QuerySmResp::QuerySmResp( const CommandStatus& commandStatus, const SequenceNumber& sequenceNumber, const MessageId& messageId, const Smpp::Time& finalDate, const MessageState& messageState, const ErrorCode& errorCode) : Response(CommandLength(MinLength), CommandId(CommandId::QuerySmResp), commandStatus, sequenceNumber), message_id_(messageId), final_date_(finalDate), message_state_(messageState), error_code_(errorCode) { Header::update_length(message_id_.length() + final_date_.length()); }
DataSm::DataSm(const SequenceNumber &sequence_number, const ServiceType &service_type, const SmeAddress &source_addr, const SmeAddress &destination_addr, const EsmClass &esm_class, const RegisteredDelivery ®istered_delivery, const DataCoding &data_coding) : TlvsHeader(CommandLength(min_length), CommandId(CommandId::DataSm), CommandStatus(CommandStatus::ESME_ROK), sequence_number), service_type(service_type), source_addr(source_addr), destination_addr(destination_addr), esm_class(esm_class), registered_delivery(registered_delivery), data_coding(data_coding) { Header::updateLength(service_type.length() + source_addr.getAddress().length() + destination_addr.getAddress().length()); }
/// @brief Constructor that requires values for all the mandatory parameters. /// @note The sm_length parameter is derived from the short_message parameter. /// @param sequenceNumber The sequence number to use. /// @param serviceType The service type to use. /// @param sourceAddr The source address (ton, npi and address)t o use. /// @param destinationAddr The destination address (ton, npi and address). /// @param esmClass The esm class to use. /// @param protocolId The protocol Id to use. /// @param priorityFlag The priority flag to use to use. /// @param scheduleDeliveryTime The schedule delivery time to use. /// @param validityPeriod The validity period to use. /// @param registeredDelivery The registered delivery to use. /// @param replaceIfPresentFlag The replace if present flag to use. /// @param dataCoding The data coding value to use. /// @param smDefaultMsgId The SM default message Id to use. /// @param shortMessage The short message to use, its length is sm_length. Smpp::DeliverSm::DeliverSm( const SequenceNumber& sequenceNumber, const ServiceType& serviceType, const SmeAddress& sourceAddr, const SmeAddress& destinationAddr, const EsmClass& esmClass, const ProtocolId& protocolId, const PriorityFlag& priorityFlag, const Smpp::Time& scheduleDeliveryTime, const Smpp::Time& validityPeriod, const RegisteredDelivery& registeredDelivery, const ReplaceIfPresentFlag& replaceIfPresentFlag, const DataCoding& dataCoding, const SmDefaultMsgId& smDefaultMsgId, const ShortMessage& shortMessage) : Request(CommandLength(MinLength), CommandId(CommandId::DeliverSm), sequenceNumber), service_type_(serviceType), source_addr_(sourceAddr), destination_addr_(destinationAddr), esm_class_(esmClass), protocol_id_(protocolId), priority_flag_(priorityFlag), schedule_delivery_time_(scheduleDeliveryTime), validity_period_(validityPeriod), registered_delivery_(registeredDelivery), replace_if_present_flag_(replaceIfPresentFlag), data_coding_(dataCoding), sm_default_msg_id_(smDefaultMsgId), short_message_(shortMessage) { Header::update_length(service_type_.length() + source_addr_.address().length() + destination_addr_.address().length() + schedule_delivery_time_.length() + validity_period_.length() + short_message_.length()); }
send_context_t BeginSend(Connection *pConnection) const { send_context_t context={ Length(), uint32_t(clock()+rand()), pConnection->SendOffset() } ; while(context.sentinel==0){ context.sentinel=uint32_t(clock()+rand()); } if(context.length<20) throw std::logic_error("Packet::BeginSend - Cannot have a length of less than 20 bytes."); uint32_t command=CommandId(); pConnection->Send(context.length); pConnection->Send(command); pConnection->Send(context.sentinel); //fprintf(stderr, "Sent[length=%llu, command=%u, sentinel=%u\n", context.length, command, context.sentinel); return context; }
//-------------------------------------------------------------------------------- PDU_data_sm_resp::PDU_data_sm_resp() : SMPP_PDU(CommandLength(MinLength), CommandId(CommandId::DataSmResp), CommandStatus(CommandStatus::ESME_ROK), SequenceNumber::Min) {}
/// @brief Construct from a buffer. /// @param b The buffer (octet array). Smpp::DeliverSm::DeliverSm(const Smpp::Uint8* b) : Request(CommandLength(MinLength), CommandId(CommandId::DeliverSm), 1) { decode(b); }
/// @brief Default constructor. /// @note Sets all parameters to their default values. Smpp::DeliverSm::DeliverSm() : Request(CommandLength(MinLength), CommandId(CommandId::DeliverSm), SequenceNumber::Min) { }
//-------------------------------------------------------------------------------- PDU_bind_type::PDU_bind_type() : SMPP_PDU(CommandLength(MinLength), CommandId (CommandId::BindReceiver), CommandStatus(CommandStatus::ESME_ROK), SequenceNumber::Min) {}
/// @brief Default constructor. /// note Sets all values to their defaults. Smpp::Unbind::Unbind() : Request(CommandLength(MinLength), CommandId(CommandId::Unbind), SequenceNumber::Min) { }
/// @brief Constructor that requires values for all the mandatory parameters. /// @param commandStatus The command status to use. /// @param sequenceNumber The sequence number to use. Smpp::Unbind::Unbind(const SequenceNumber& sequenceNumber) : Request(CommandLength(MinLength), CommandId(CommandId::Unbind), sequenceNumber) { }
/// @brief Default constructor. /// @note Sets all parameters to their default values. Smpp::SubmitMulti::SubmitMulti() : Request(CommandLength(MinLength), CommandId(CommandId::SubmitMulti), SequenceNumber::Min) { }
/// @brief Construct from a buffer. /// @param b The buffer (octet array). Smpp::SubmitMulti::SubmitMulti(const Smpp::Uint8* b) : Request(CommandLength(MinLength), CommandId(CommandId::SubmitMulti), 1) { decode(b); }
BindReceiverResp::BindReceiverResp() : TlvsHeader(CommandLength(min_length), CommandId(CommandId::BindReceiverResp), CommandStatus(CommandStatus::ESME_ROK), SequenceNumber::Min) { }