/* Memory storage location length (maximum) according to AT+CPMS command settings */
#define M2M_SMS_NUM_MEM_CHAR 4
/* SMS max status string length */
#define M2M_SMS_NUM_OF_STATUS_CHAR 13
/* SMS max address string length */
#define M2M_SMS_NUM_OF_ADDRESS_CHAR 20
/* SMS max date string length */
#define M2M_SMS_DATE_CHAR 10
/* SMS max time string length */
#define M2M_SMS_TIME_CHAR 15
/* SMS max data (text or PDU) length composed of 176 max data length +1 for NULL termination */
#define M2M_SMS_DATA_CHAR 177
/* M2M_T_SMS_MEM_STORAGE */
typedef struct _M2M_T_SMS_MEM_STORAGE
{
CHAR mem[M2M_SMS_NUM_MEM_CHAR]; /* selected memory location */
INT32 nUsed; /* space used (in Bytes) */
INT32 nTotal; /* total space (Bytes) */
} M2M_T_SMS_MEM_STORAGE;
/* M2M_T_SMS_INFO: SMS information */
typedef struct _M2M_T_SMS_INFO
{
INT32 index; /* The message index used to retrieve a message */
CHAR status[M2M_SMS_NUM_OF_STATUS_CHAR]; /* SMS status, i.e. REC READ, REC UNREAD */
CHAR originalAddress[M2M_SMS_NUM_OF_ADDRESS_CHAR]; /* SMS sender */
CHAR date[M2M_SMS_DATE_CHAR]; /* SMS receive date */
CHAR time[M2M_SMS_TIME_CHAR]; /* SMS receive time */
CHAR data[M2M_SMS_DATA_CHAR]; /* SMS receive data (text or PDU) */
} M2M_T_SMS_INFO;