Klika Tech / Mbed 2 deprecated Nucleo-AWS-IoT-mbed

Dependencies:   X_NUCLEO_IKS01A1 mbed FP MQTTPacket DnsQuery ATParser

Committer:
PavelSavyhin
Date:
Wed Sep 27 14:40:52 2017 +0300
Revision:
0:4cdaf9b1e7d0
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
PavelSavyhin 0:4cdaf9b1e7d0 1 /* CellularInterface
PavelSavyhin 0:4cdaf9b1e7d0 2 * Copyright (c) 2015 ARM Limited
PavelSavyhin 0:4cdaf9b1e7d0 3 *
PavelSavyhin 0:4cdaf9b1e7d0 4 * Licensed under the Apache License, Version 2.0 (the "License");
PavelSavyhin 0:4cdaf9b1e7d0 5 * you may not use this file except in compliance with the License.
PavelSavyhin 0:4cdaf9b1e7d0 6 * You may obtain a copy of the License at
PavelSavyhin 0:4cdaf9b1e7d0 7 *
PavelSavyhin 0:4cdaf9b1e7d0 8 * http://www.apache.org/licenses/LICENSE-2.0
PavelSavyhin 0:4cdaf9b1e7d0 9 *
PavelSavyhin 0:4cdaf9b1e7d0 10 * Unless required by applicable law or agreed to in writing, software
PavelSavyhin 0:4cdaf9b1e7d0 11 * distributed under the License is distributed on an "AS IS" BASIS,
PavelSavyhin 0:4cdaf9b1e7d0 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
PavelSavyhin 0:4cdaf9b1e7d0 13 * See the License for the specific language governing permissions and
PavelSavyhin 0:4cdaf9b1e7d0 14 * limitations under the License.
PavelSavyhin 0:4cdaf9b1e7d0 15 */
PavelSavyhin 0:4cdaf9b1e7d0 16
PavelSavyhin 0:4cdaf9b1e7d0 17 #ifndef CELLULAR_INTERFACE_H
PavelSavyhin 0:4cdaf9b1e7d0 18 #define CELLULAR_INTERFACE_H
PavelSavyhin 0:4cdaf9b1e7d0 19
PavelSavyhin 0:4cdaf9b1e7d0 20 #include "NetworkStack.h"
PavelSavyhin 0:4cdaf9b1e7d0 21
PavelSavyhin 0:4cdaf9b1e7d0 22 /** CellularInterface class
PavelSavyhin 0:4cdaf9b1e7d0 23 *
PavelSavyhin 0:4cdaf9b1e7d0 24 * Common interface that is shared between ethernet hardware
PavelSavyhin 0:4cdaf9b1e7d0 25 */
PavelSavyhin 0:4cdaf9b1e7d0 26 class CellularInterface
PavelSavyhin 0:4cdaf9b1e7d0 27 {
PavelSavyhin 0:4cdaf9b1e7d0 28 public:
PavelSavyhin 0:4cdaf9b1e7d0 29 /** Start the interface
PavelSavyhin 0:4cdaf9b1e7d0 30 *
PavelSavyhin 0:4cdaf9b1e7d0 31 * @param apn Optional name of the network to connect to
PavelSavyhin 0:4cdaf9b1e7d0 32 * @param username Optional username for your APN
PavelSavyhin 0:4cdaf9b1e7d0 33 * @param password Optional password for your APN
PavelSavyhin 0:4cdaf9b1e7d0 34 * @return 0 on success, negative error code on failure
PavelSavyhin 0:4cdaf9b1e7d0 35 */
PavelSavyhin 0:4cdaf9b1e7d0 36 virtual int connect(const char *apn = 0, const char *username = 0, const char *password = 0) = 0;
PavelSavyhin 0:4cdaf9b1e7d0 37
PavelSavyhin 0:4cdaf9b1e7d0 38 /** Stop the interface
PavelSavyhin 0:4cdaf9b1e7d0 39 *
PavelSavyhin 0:4cdaf9b1e7d0 40 * @return 0 on success, negative error code on failure
PavelSavyhin 0:4cdaf9b1e7d0 41 */
PavelSavyhin 0:4cdaf9b1e7d0 42 virtual int disconnect() = 0;
PavelSavyhin 0:4cdaf9b1e7d0 43
PavelSavyhin 0:4cdaf9b1e7d0 44 /** Get the local MAC address
PavelSavyhin 0:4cdaf9b1e7d0 45 *
PavelSavyhin 0:4cdaf9b1e7d0 46 * @return Null-terminated representation of the local MAC address
PavelSavyhin 0:4cdaf9b1e7d0 47 */
PavelSavyhin 0:4cdaf9b1e7d0 48 virtual const char *get_mac_address() = 0;
PavelSavyhin 0:4cdaf9b1e7d0 49 };
PavelSavyhin 0:4cdaf9b1e7d0 50
PavelSavyhin 0:4cdaf9b1e7d0 51 #endif