Gleb Klochkov / Mbed OS Climatcontroll_Main

Dependencies:   esp8266-driver

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers CellularInformation.h Source File

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 CELLULAR_INFORMATION_H_
00019 #define CELLULAR_INFORMATION_H_
00020 
00021 #include <stddef.h>
00022 #include "nsapi_types.h"
00023 
00024 namespace mbed {
00025 
00026 /**
00027  *  Class CellularInformation
00028  *
00029  *  An abstract interface that provides information about cellular device.
00030  */
00031 class CellularInformation
00032 {
00033 protected:
00034     // friend of CellularDevice so that it's the only way to close/delete this class.
00035     friend class CellularDevice;
00036 
00037     /** virtual Destructor
00038      */
00039     virtual ~CellularInformation() {};
00040 
00041 public:
00042     /** Request manufacturer identification of cellular device
00043      *
00044      *  @param buf      manufacturer identification
00045      *  @param buf_size max length of manufacturer identification is 2048 characters
00046      *  @return         on success read character count, on failure negative error code
00047      */
00048     virtual nsapi_size_or_error_t get_manufacturer(char *buf, size_t buf_size) = 0;
00049 
00050     /** Request model identification of cellular device
00051      *
00052      *  @param buf      model identification
00053      *  @param buf_size max length of model identification is 2048 characters
00054      *  @return         on success read character count, on failure negative error code
00055      */
00056     virtual nsapi_size_or_error_t get_model(char *buf, size_t buf_size) = 0;
00057 
00058     /** Request revision identification of cellular device
00059      *
00060      *  @param buf      revision identification
00061      *  @param buf_size max length of revision identification is 2048 characters
00062      *  @return         on success read character count, on failure negative error code
00063      */
00064     virtual nsapi_size_or_error_t get_revision(char *buf, size_t buf_size) = 0;
00065 };
00066 
00067 } // namespace mbed
00068 
00069 #endif // CELLULAR_INFORMATION_H_