I added functionality to get the RSSI, BER, and Cell Neighbor for reporting connection issues to M2X
Dependencies: WncControllerK64F
Sms/SMS.h@18:198e9b0acf11, 2016-11-17 (annotated)
- Committer:
- JMF
- Date:
- Thu Nov 17 16:13:29 2016 +0000
- Revision:
- 18:198e9b0acf11
- Parent:
- 7:fded23f50479
Updates to mbed os resulted in mutex.h going away and rtos.h needed to be used; This fixes the Mutex typedef failure. Also cast data buffers from 'char *' to (const std::uint8_t*) to conform with Fred's changes in WncController
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
JMF | 7:fded23f50479 | 1 | /* ===================================================================== |
JMF | 7:fded23f50479 | 2 | Copyright © 2016, Avnet (R) |
JMF | 7:fded23f50479 | 3 | |
JMF | 7:fded23f50479 | 4 | Contributors: |
JMF | 7:fded23f50479 | 5 | * James M Flynn, www.em.avnet.com |
JMF | 7:fded23f50479 | 6 | |
JMF | 7:fded23f50479 | 7 | Licensed under the Apache License, Version 2.0 (the "License"); |
JMF | 7:fded23f50479 | 8 | you may not use this file except in compliance with the License. |
JMF | 7:fded23f50479 | 9 | You may obtain a copy of the License at |
JMF | 7:fded23f50479 | 10 | |
JMF | 7:fded23f50479 | 11 | http://www.apache.org/licenses/LICENSE-2.0 |
JMF | 7:fded23f50479 | 12 | |
JMF | 7:fded23f50479 | 13 | Unless required by applicable law or agreed to in writing, |
JMF | 7:fded23f50479 | 14 | software distributed under the License is distributed on an |
JMF | 7:fded23f50479 | 15 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, |
JMF | 7:fded23f50479 | 16 | either express or implied. See the License for the specific |
JMF | 7:fded23f50479 | 17 | language governing permissions and limitations under the License. |
JMF | 7:fded23f50479 | 18 | |
JMF | 7:fded23f50479 | 19 | @file SMS.h |
JMF | 7:fded23f50479 | 20 | @version 1.0 |
JMF | 7:fded23f50479 | 21 | @date Oct 2016 |
JMF | 7:fded23f50479 | 22 | |
JMF | 7:fded23f50479 | 23 | ======================================================================== */ |
JMF | 7:fded23f50479 | 24 | |
JMF | 7:fded23f50479 | 25 | #ifndef SMS_H_ |
JMF | 7:fded23f50479 | 26 | #define SMS_H_ |
JMF | 7:fded23f50479 | 27 | |
JMF | 7:fded23f50479 | 28 | /** Virtual calss for IoT Short Messages Service (SMS) **/ |
JMF | 7:fded23f50479 | 29 | |
JMF | 7:fded23f50479 | 30 | class SMSInterface { |
JMF | 7:fded23f50479 | 31 | public: |
JMF | 7:fded23f50479 | 32 | /** Initialize interface |
JMF | 7:fded23f50479 | 33 | */ |
JMF | 7:fded23f50479 | 34 | virtual int init() = 0; |
JMF | 7:fded23f50479 | 35 | |
JMF | 7:fded23f50479 | 36 | |
JMF | 7:fded23f50479 | 37 | /** Send a SM |
JMF | 7:fded23f50479 | 38 | @param number The receiver's contact number |
JMF | 7:fded23f50479 | 39 | @param message The message to send |
JMF | 7:fded23f50479 | 40 | @return 0 on success, error code on failure |
JMF | 7:fded23f50479 | 41 | */ |
JMF | 7:fded23f50479 | 42 | virtual int send(const string& number, const string& message) = 0; |
JMF | 7:fded23f50479 | 43 | |
JMF | 7:fded23f50479 | 44 | |
JMF | 7:fded23f50479 | 45 | /** Receive a SM |
JMF | 7:fded23f50479 | 46 | @param msg_orig string containing the sender's phone number |
JMF | 7:fded23f50479 | 47 | @param Pointer to a string that contains the incoming message |
JMF | 7:fded23f50479 | 48 | @return 0 on success, error code on failure |
JMF | 7:fded23f50479 | 49 | */ |
JMF | 7:fded23f50479 | 50 | virtual int get(string& number, string& message) = 0; |
JMF | 7:fded23f50479 | 51 | }; |
JMF | 7:fded23f50479 | 52 | |
JMF | 7:fded23f50479 | 53 | #endif /* SMS_H_ */ |