Knight KE / Mbed OS Game_Master
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 public:
00033     AT_CellularInformation(ATHandler &atHandler);
00034     virtual ~AT_CellularInformation();
00035 
00036 public:
00037     virtual nsapi_error_t get_manufacturer(char *buf, size_t buf_size);
00038 
00039     virtual nsapi_error_t get_model(char *buf, size_t buf_size);
00040 
00041     virtual nsapi_error_t get_revision(char *buf, size_t buf_size);
00042 
00043     virtual nsapi_error_t get_serial_number(char *buf, size_t buf_size, SerialNumberType type);
00044 
00045 protected:
00046     /** Request information text from cellular device
00047      *
00048      *  @param cmd      3gpp command string
00049      *  @param buf      buffer for response
00050      *  @param buf_size buffer size
00051      *  @return         on success read character count, on failure negative error code
00052      */
00053     nsapi_error_t get_info(const char *cmd, char *buf, size_t buf_size);
00054 };
00055 
00056 } // namespace mbed
00057 
00058 #endif // AT_CELLULAR_INFORMATION_H_