BA / Mbed OS BaBoRo1
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers AT_CellularInformation.h Source File

AT_CellularInformation.h

00001 /*
00002  * Copyright (c) 2018, Arm Limited and affiliates.
00003  * SPDX-License-Identifier: Apache-2.0
00004  *
00005  * Licensed under the Apache License, Version 2.0 (the "License");
00006  * you may not use this file except in compliance with the License.
00007  * You may obtain a copy of the License at
00008  *
00009  *     http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00018 #ifndef AT_CELLULAR_INFORMATION_H_
00019 #define AT_CELLULAR_INFORMATION_H_
00020 
00021 #include "CellularInformation.h"
00022 #include "AT_CellularBase.h"
00023 
00024 namespace mbed {
00025 
00026 /**
00027  * Class AT_CellularInformation
00028  *
00029  * Class that provides information about cellular device.
00030  */
00031 class AT_CellularInformation : public CellularInformation, public AT_CellularBase
00032 {
00033 public:
00034     AT_CellularInformation(ATHandler &atHandler);
00035     virtual ~AT_CellularInformation();
00036 
00037 public:
00038     virtual nsapi_size_or_error_t get_manufacturer(char *buf, size_t buf_size);
00039 
00040     virtual nsapi_size_or_error_t get_model(char *buf, size_t buf_size);
00041 
00042     virtual nsapi_size_or_error_t get_revision(char *buf, size_t buf_size);
00043 
00044 protected:
00045     /** Request information text from cellular device
00046      *
00047      *  @param cmd      3gpp command string
00048      *  @param buf      manufacturer identification
00049      *  @param buf_size max length of manufacturer identification is 2048 characters
00050      *  @return         on success read character count, on failure negative error code
00051      */
00052     nsapi_error_t get_info(const char *cmd, char *buf, size_t buf_size);
00053 };
00054 
00055 } // namespace mbed
00056 
00057 #endif // AT_CELLULAR_INFORMATION_H_