18#ifndef CELLULAR_SMS_H_
19#define CELLULAR_SMS_H_
21#if MBED_CONF_CELLULAR_USE_SMS
24#include "netsocket/nsapi_types.h"
29const uint16_t SMS_MAX_SIZE_WITH_CONCATENATION = 4096 + 1;
30const uint16_t SMS_MAX_PHONE_NUMBER_SIZE = 20 + 1;
31const uint16_t SMS_MAX_TIME_STAMP_SIZE = 20 + 1;
33const uint16_t SMS_MAX_SIZE_8BIT_SINGLE_SMS_SIZE = 140;
34const uint16_t SMS_MAX_SIZE_GSM7_SINGLE_SMS_SIZE = 160;
36const uint16_t SMS_SIM_WAIT_TIME_MILLISECONDS = 200;
38const int SMS_ERROR_MULTIPART_ALL_PARTS_NOT_READ = -5001;
53 friend class CellularDevice;
58 virtual ~CellularSMS() {};
62 enum CellularSMSMmode {
63 CellularSMSMmodePDU = 0,
67 enum CellularSMSEncoding {
68 CellularSMSEncoding7Bit,
69 CellularSMSEncoding8Bit,
80 CellularSMSEncoding encoding = CellularSMSEncoding::CellularSMSEncoding7Bit) = 0;
92 virtual nsapi_size_or_error_t send_sms(
const char *phone_number,
const char *message,
int msg_len) = 0;
112 virtual nsapi_size_or_error_t get_sms(
char *buf, uint16_t buf_len,
char *phone_num, uint16_t phone_len,
113 char *time_stamp, uint16_t time_len,
int *buf_size) = 0;
121 virtual void set_sms_callback(Callback<
void()> func) = 0;
138 virtual nsapi_error_t set_cpms(
const char *memr,
const char *memw,
const char *mems) = 0;
148 virtual nsapi_error_t set_csca(
const char *sca,
int type) = 0;
175 virtual void set_extra_sim_wait_time(
int sim_wait_time) = 0;
signed int nsapi_size_or_error_t
Type used to represent either a size or error passed through sockets.
signed int nsapi_error_t
Type used to represent error codes.