Daniel Vizcaya
/
04_RTOS_Embebidos
Entrega 3er corte - sistemas embebidos
mbed-os/features/netsocket/CellularInterface.h@0:6ad07c9019fd, 2018-05-30 (annotated)
- Committer:
- Bethory
- Date:
- Wed May 30 00:01:50 2018 +0000
- Revision:
- 0:6ad07c9019fd
Codigo de tales para todos los pasculaes
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Bethory | 0:6ad07c9019fd | 1 | /* CellularInterface |
Bethory | 0:6ad07c9019fd | 2 | * Copyright (c) 2015 ARM Limited |
Bethory | 0:6ad07c9019fd | 3 | * |
Bethory | 0:6ad07c9019fd | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
Bethory | 0:6ad07c9019fd | 5 | * you may not use this file except in compliance with the License. |
Bethory | 0:6ad07c9019fd | 6 | * You may obtain a copy of the License at |
Bethory | 0:6ad07c9019fd | 7 | * |
Bethory | 0:6ad07c9019fd | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
Bethory | 0:6ad07c9019fd | 9 | * |
Bethory | 0:6ad07c9019fd | 10 | * Unless required by applicable law or agreed to in writing, software |
Bethory | 0:6ad07c9019fd | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
Bethory | 0:6ad07c9019fd | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
Bethory | 0:6ad07c9019fd | 13 | * See the License for the specific language governing permissions and |
Bethory | 0:6ad07c9019fd | 14 | * limitations under the License. |
Bethory | 0:6ad07c9019fd | 15 | */ |
Bethory | 0:6ad07c9019fd | 16 | |
Bethory | 0:6ad07c9019fd | 17 | #ifndef CELLULAR_INTERFACE_H |
Bethory | 0:6ad07c9019fd | 18 | #define CELLULAR_INTERFACE_H |
Bethory | 0:6ad07c9019fd | 19 | |
Bethory | 0:6ad07c9019fd | 20 | #include "netsocket/NetworkInterface.h" |
Bethory | 0:6ad07c9019fd | 21 | |
Bethory | 0:6ad07c9019fd | 22 | /** CellularInterface class |
Bethory | 0:6ad07c9019fd | 23 | * |
Bethory | 0:6ad07c9019fd | 24 | * @deprecated This API will be deprecated in mbed-os-5.9. Use mbed-os/features/cellular/framework/API/CellularNetwork.h instead. |
Bethory | 0:6ad07c9019fd | 25 | * |
Bethory | 0:6ad07c9019fd | 26 | * Common interface that is shared between ethernet hardware |
Bethory | 0:6ad07c9019fd | 27 | * @addtogroup netsocket |
Bethory | 0:6ad07c9019fd | 28 | */ |
Bethory | 0:6ad07c9019fd | 29 | class CellularInterface : public NetworkInterface |
Bethory | 0:6ad07c9019fd | 30 | { |
Bethory | 0:6ad07c9019fd | 31 | public: |
Bethory | 0:6ad07c9019fd | 32 | /** CellularInterface lifetime |
Bethory | 0:6ad07c9019fd | 33 | */ |
Bethory | 0:6ad07c9019fd | 34 | MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularNetwork.h instead.") |
Bethory | 0:6ad07c9019fd | 35 | virtual ~CellularInterface() {}; |
Bethory | 0:6ad07c9019fd | 36 | |
Bethory | 0:6ad07c9019fd | 37 | /** Set the cellular network APN and credentials |
Bethory | 0:6ad07c9019fd | 38 | * |
Bethory | 0:6ad07c9019fd | 39 | * @deprecated This API will be deprecated in mbed-os-5.9. Use mbed-os/features/cellular/framework/API/CellularNetwork.h instead. |
Bethory | 0:6ad07c9019fd | 40 | * |
Bethory | 0:6ad07c9019fd | 41 | * @param apn Optional name of the network to connect to |
Bethory | 0:6ad07c9019fd | 42 | * @param username Optional username for the APN |
Bethory | 0:6ad07c9019fd | 43 | * @param password Optional password fot the APN |
Bethory | 0:6ad07c9019fd | 44 | * @return 0 on success, negative error code on failure |
Bethory | 0:6ad07c9019fd | 45 | */ |
Bethory | 0:6ad07c9019fd | 46 | MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularNetwork.h instead.") |
Bethory | 0:6ad07c9019fd | 47 | virtual nsapi_error_t set_credentials(const char *apn, |
Bethory | 0:6ad07c9019fd | 48 | const char *username = 0, const char *password = 0) = 0; |
Bethory | 0:6ad07c9019fd | 49 | |
Bethory | 0:6ad07c9019fd | 50 | /** Start the interface |
Bethory | 0:6ad07c9019fd | 51 | * |
Bethory | 0:6ad07c9019fd | 52 | * @deprecated This API will be deprecated in mbed-os-5.9. Use mbed-os/features/cellular/framework/API/CellularNetwork.h instead. |
Bethory | 0:6ad07c9019fd | 53 | * |
Bethory | 0:6ad07c9019fd | 54 | * @param apn Optional name of the network to connect to |
Bethory | 0:6ad07c9019fd | 55 | * @param username Optional username for your APN |
Bethory | 0:6ad07c9019fd | 56 | * @param password Optional password for your APN |
Bethory | 0:6ad07c9019fd | 57 | * @return 0 on success, negative error code on failure |
Bethory | 0:6ad07c9019fd | 58 | */ |
Bethory | 0:6ad07c9019fd | 59 | MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularNetwork.h instead.") |
Bethory | 0:6ad07c9019fd | 60 | virtual nsapi_error_t connect(const char *apn, |
Bethory | 0:6ad07c9019fd | 61 | const char *username = 0, const char *password = 0) = 0; |
Bethory | 0:6ad07c9019fd | 62 | |
Bethory | 0:6ad07c9019fd | 63 | /** Start the interface |
Bethory | 0:6ad07c9019fd | 64 | * |
Bethory | 0:6ad07c9019fd | 65 | * @deprecated This API will be deprecated in mbed-os-5.9. Use mbed-os/features/cellular/framework/API/CellularNetwork.h instead. |
Bethory | 0:6ad07c9019fd | 66 | * |
Bethory | 0:6ad07c9019fd | 67 | * Attempts to connect to a cellular network based on supplied credentials |
Bethory | 0:6ad07c9019fd | 68 | * |
Bethory | 0:6ad07c9019fd | 69 | * @return 0 on success, negative error code on failure |
Bethory | 0:6ad07c9019fd | 70 | */ |
Bethory | 0:6ad07c9019fd | 71 | MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularNetwork.h instead.") |
Bethory | 0:6ad07c9019fd | 72 | virtual nsapi_error_t connect() = 0; |
Bethory | 0:6ad07c9019fd | 73 | |
Bethory | 0:6ad07c9019fd | 74 | /** Stop the interface |
Bethory | 0:6ad07c9019fd | 75 | * |
Bethory | 0:6ad07c9019fd | 76 | * @deprecated This API will be deprecated in mbed-os-5.9. Use mbed-os/features/cellular/framework/API/CellularNetwork.h instead. |
Bethory | 0:6ad07c9019fd | 77 | * |
Bethory | 0:6ad07c9019fd | 78 | * @return 0 on success, negative error code on failure |
Bethory | 0:6ad07c9019fd | 79 | */ |
Bethory | 0:6ad07c9019fd | 80 | MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularNetwork.h instead.") |
Bethory | 0:6ad07c9019fd | 81 | virtual nsapi_error_t disconnect() = 0; |
Bethory | 0:6ad07c9019fd | 82 | }; |
Bethory | 0:6ad07c9019fd | 83 | |
Bethory | 0:6ad07c9019fd | 84 | |
Bethory | 0:6ad07c9019fd | 85 | #endif |