@@ -57,53 +57,53 @@ class CellularSMS {
57
57
CellularSMSMmodeText
58
58
};
59
59
60
- /* * Does all the necessary initializations needed for receiving and sending sms .
60
+ /* * Does all the necessary initializations needed for receiving and sending SMS .
61
61
*
62
62
* @param mode enumeration for choosing the correct mode: text/pdu
63
63
* @return NSAPI_ERROR_OK on success
64
- * NSAPI_ERROR_NO_MEMORY on case of memory failure
65
- * NSAPI_ERROR_DEVICE_ERROR on case of other failures
64
+ * NSAPI_ERROR_NO_MEMORY on memory failure
65
+ * NSAPI_ERROR_DEVICE_ERROR on other failures
66
66
*/
67
67
virtual nsapi_error_t initialize (CellularSMSMmode mode) = 0;
68
68
69
69
/* * Send the SMS with the given parameters
70
70
*
71
- * @param phone_number Phone number where to send sms
71
+ * @param phone_number Phone number where to send SMS
72
72
* @param message SMS message content
73
73
* @param msg_len Length of the message
74
- * @return On success, length of the sent sms (positive value)
74
+ * @return On success, length of the sent SMS (positive value)
75
75
* NSAPI_ERROR_PARAMETER if invalid parameters
76
- * NSAPI_ERROR_NO_MEMORY on case of memory failure
77
- * NSAPI_ERROR_DEVICE_ERROR on case of other failures
76
+ * NSAPI_ERROR_NO_MEMORY on memory failure
77
+ * NSAPI_ERROR_DEVICE_ERROR on other failures
78
78
*/
79
79
virtual nsapi_size_or_error_t send_sms (const char *phone_number, const char *message, int msg_len) = 0;
80
80
81
81
/* * Gets the oldest received sms.
82
82
*
83
- * @param buf preallocated buffer for sms message content
83
+ * @param buf preallocated buffer for SMS message content
84
84
* @param buf_len length of allocated buf
85
- * @param phone_num preallocated buffer for phone number where sms was sent
85
+ * @param phone_num preallocated buffer for phone number where SMS was sent
86
86
* @param phone_len length of allocated phone_num buffer
87
87
* @param time_stamp preallocated buffer for TP-Service Centre Time Stamp (format: yy/MM/dd,hh:mm:ss-+zz). +-zz is timezone.
88
88
* The unit of time zone is a quarter of an hour relative to GMT. For example +32 would be GMT+8.
89
89
* @param time_len length of allocated time_stamp buffer
90
- * @param buf_size if method return error NSAPI_ERROR_NO_MEMORY because the given buf was not big enough this will
91
- * hold the size which is enough. Otherwise zero.
92
- * @return On success, length of the received sms , (length of the buf, positive value)
90
+ * @param buf_size if method return error NSAPI_ERROR_NO_MEMORY because the given buf was not big enough, this
91
+ * holds the size which is enough. Otherwise zero.
92
+ * @return On success, length of the received SMS , (length of the buf, positive value)
93
93
* NSAPI_ERROR_PARAMETER if invalid parameters
94
- * NSAPI_ERROR_NO_MEMORY on case of memory failure
95
- * SMS_ERROR_MULTIPART_ALL_PARTS_NOT_READ if sms was multipart but not all parts are present/failed to read.
96
- * -1 if no sms was found
97
- * NSAPI_ERROR_DEVICE_ERROR on case of other failures
94
+ * NSAPI_ERROR_NO_MEMORY on memory failure
95
+ * SMS_ERROR_MULTIPART_ALL_PARTS_NOT_READ if SMS was multipart but not all parts are present/failed to read.
96
+ * -1 if no SMS was found
97
+ * NSAPI_ERROR_DEVICE_ERROR on other failures
98
98
*/
99
99
virtual nsapi_size_or_error_t get_sms (char *buf, uint16_t buf_len, char *phone_num, uint16_t phone_len,
100
100
char *time_stamp, uint16_t time_len, int *buf_size) = 0;
101
101
102
- /* * Callback which is called when new sms is received. SMS can be fetched via method get_sms().
102
+ /* * Callback that is called when new SMS is received. SMS can be fetched using method get_sms().
103
103
*
104
- * @remark In PDU mode there can be multipart sms and callback is called for every received part.
104
+ * @remark In PDU mode, there can be multipart SMS, and callback is called for every received part.
105
105
*
106
- * @param func Callback function which is called when new sms is received.
106
+ * @param func Callback function that is called when new SMS is received.
107
107
*/
108
108
virtual void set_sms_callback (Callback<void ()> func) = 0;
109
109
@@ -120,7 +120,7 @@ class CellularSMS {
120
120
* "ME" - NVM SMS storage
121
121
*
122
122
* @return NSAPI_ERROR_OK on success
123
- * NSAPI_ERROR_DEVICE_ERROR on case of failure
123
+ * NSAPI_ERROR_DEVICE_ERROR on failure
124
124
*/
125
125
virtual nsapi_error_t set_cpms (const char *memr, const char *memw, const char *mems) = 0;
126
126
@@ -130,32 +130,32 @@ class CellularSMS {
130
130
* @param type 129 - national numbering scheme, 145 - international numbering scheme (contains the character "+")
131
131
*
132
132
* @return NSAPI_ERROR_OK on success
133
- * NSAPI_ERROR_DEVICE_ERROR on case of failure
133
+ * NSAPI_ERROR_DEVICE_ERROR on failure
134
134
*/
135
135
virtual nsapi_error_t set_csca (const char *sca, int type) = 0;
136
136
137
137
/* * Set command sets the current character set used by the device. "GSM", "IRA",....
138
138
*
139
139
* @remark Current implementation support only ASCII so choose the correct character set.
140
140
*
141
- * @param chr_set preferred character set list (comma separated). Modem might not support the wanted character set
141
+ * @param chr_set preferred character set list (comma separated). Modem might not support the wanted character set,
142
142
* so chr_set list is looped from start until supported set is found. Used character set index is returned.
143
143
* See more from 3GPP TS 27.005.
144
144
* @return Used character set index from the given list in case of success.
145
- * NSAPI_ERROR_DEVICE_ERROR on case of failure
145
+ * NSAPI_ERROR_DEVICE_ERROR on failure
146
146
*/
147
147
virtual nsapi_size_or_error_t set_cscs (const char *chr_set) = 0;
148
148
149
149
/* * Deletes all messages from the currently set memory/SIM
150
150
*
151
151
* @return NSAPI_ERROR_OK on success
152
- * NSAPI_ERROR_DEVICE_ERROR on case of failure
152
+ * NSAPI_ERROR_DEVICE_ERROR on failure
153
153
*/
154
154
virtual nsapi_error_t delete_all_messages () = 0;
155
155
156
- /* * Some modems need extra time between AT commands and responses or there will be error -314, SIM busy.
157
- * If SIM busy errors are an issue this time should be increased. It can also be set to zero to make
158
- * operations faster and more energy efficient if no errors will follow. By default wait time is zero.
156
+ /* * Some modems need extra time between AT commands and responses, or there will be error -314, SIM busy.
157
+ * If SIM busy errors are an issue, this time should be increased. It can also be set to zero to make
158
+ * operations faster and more energy efficient if no errors will follow. By default, wait time is zero.
159
159
*
160
160
* @param sim_wait_time
161
161
*/
0 commit comments