Пример #1
0
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());
}
Пример #2
0
DataSm::DataSm(const SequenceNumber &sequence_number,
               const ServiceType &service_type,
               const SmeAddress &source_addr,
               const SmeAddress &destination_addr,
               const EsmClass &esm_class,
               const RegisteredDelivery &registered_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());
}