Mistake on this page?
Report an issue in GitHub or email us
AT_CellularBase.h
1 /*
2  * Copyright (c) 2017, Arm Limited and affiliates.
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 #ifndef AT_CELLULAR_BASE_H_
18 #define AT_CELLULAR_BASE_H_
19 
20 #include "ATHandler.h"
21 
22 namespace mbed {
23 
24 /**
25  * Class AT_CellularBase
26  *
27  * A base class for AT-classes.
28  */
30 public:
32  /** Getter for at handler. Common method for all AT-classes.
33  *
34  * @return reference to ATHandler
35  */
37 
38  /** Gets the device error that happened when using AT commands/responses. This is at error
39  * returned by the device. Returned CME/CMS errors can be found from 3gpp documents 27007 and 27005.
40  *
41  * @return at error (CME/CMS) while communicating with the device
42  */
44 
45  /* Supported features by the modem
46  *
47  * NOTE! These are used as index to feature table, so the only allowed modification to this is appending
48  * to the end (just before PROPERTY_MAX). Do not modify any of the existing fields.
49  */
50  enum CellularProperty {
51  PROPERTY_C_EREG, // AT_CellularNetwork::RegistrationMode. What support modem has for this registration type.
52  PROPERTY_C_GREG, // AT_CellularNetwork::RegistrationMode. What support modem has for this registration type.
53  PROPERTY_C_REG, // AT_CellularNetwork::RegistrationMode. What support modem has for this registration type.
54  PROPERTY_AT_CGSN_WITH_TYPE, // 0 = not supported, 1 = supported. AT+CGSN without type is likely always supported similar to AT+GSN.
55  PROPERTY_AT_CGDATA, // 0 = not supported, 1 = supported. Alternative is to support only ATD*99***<cid>#
56  PROPERTY_AT_CGAUTH, // 0 = not supported, 1 = supported. APN authentication AT commands supported
57  PROPERTY_AT_CNMI, // 0 = not supported, 1 = supported. New message (SMS) indication AT command
58  PROPERTY_AT_CSMP, // 0 = not supported, 1 = supported. Set text mode AT command
59  PROPERTY_AT_CMGF, // 0 = not supported, 1 = supported. Set preferred message format AT command
60  PROPERTY_AT_CSDH, // 0 = not supported, 1 = supported. Show text mode AT command
61  PROPERTY_IPV4_PDP_TYPE, // 0 = not supported, 1 = supported. Does modem support IPV4?
62  PROPERTY_IPV6_PDP_TYPE, // 0 = not supported, 1 = supported. Does modem support IPV6?
63  PROPERTY_IPV4V6_PDP_TYPE, // 0 = not supported, 1 = supported. Does modem support IPV4 and IPV6 simultaneously?
64  PROPERTY_NON_IP_PDP_TYPE, // 0 = not supported, 1 = supported. Does modem support Non-IP?
65  PROPERTY_AT_CGEREP, // 0 = not supported, 1 = supported. Does modem support AT command AT+CGEREP.
66 
67  PROPERTY_MAX
68  };
69 
70  /** Cellular module need to define an array of cellular properties which defines module supported property values.
71  *
72  * @param property_array array of module properties
73  */
74  static void set_cellular_properties(const intptr_t *property_array);
75 
76  /** Get value for the given key.
77  *
78  * @param key key for value to be fetched
79  * @return property value for the given key. Value type is defined in enum CellularProperty
80  */
81  static intptr_t get_property(CellularProperty key);
82 
83 protected:
84 
85  static const intptr_t *_property_array;
86 
87  ATHandler &_at;
88 };
89 
90 } // namespace mbed
91 
92 #endif /* AT_CELLULAR_BASE_H_ */
static void set_cellular_properties(const intptr_t *property_array)
Cellular module need to define an array of cellular properties which defines module supported propert...
device_err_t get_device_error() const
Gets the device error that happened when using AT commands/responses.
static intptr_t get_property(CellularProperty key)
Get value for the given key.
AT response error with error code and type.
Definition: ATHandler.h:60
Class AT_CellularBase.
ATHandler & get_at_handler()
Getter for at handler.
Class for sending AT commands and parsing AT responses.
Definition: ATHandler.h:66
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.