ublox-cellular-base

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers UbloxATCmdParser.h Source File

UbloxATCmdParser.h

00001 /*
00002  * Copyright (c) 2017, 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 #ifdef TARGET_UBLOX_C030_R41XM
00018 #ifndef UBLOXATCMDPARSER_H_
00019 #define UBLOXATCMDPARSER_H_
00020 
00021 #include "ATCmdParser.h"
00022 #include "mbed.h"
00023 
00024 namespace mbed {
00025 
00026 /**
00027  *  Class UbloxATCmdParser
00028  *
00029  */
00030 class UbloxATCmdParser : public ATCmdParser
00031 {
00032 public:
00033     UbloxATCmdParser(FileHandle *fh, const char *output_delimiter = "\r",
00034              int buffer_size = 256, int timeout = 8000, bool debug = false);
00035     ~UbloxATCmdParser();
00036 
00037     bool send(const char *command, ...) MBED_PRINTF_METHOD(1,2);
00038 
00039     void set_timeout(int timeout);
00040 
00041     bool is_idle_mode_enabled();
00042 
00043     void idle_mode_enabled();
00044 
00045     void idle_mode_disabled();
00046     
00047 private:
00048     bool _idle_mode_status;
00049     Timer _wakeup_timer;
00050     int _timeout;
00051 };
00052 
00053 
00054 } // namespace mbed
00055 
00056 #endif
00057 #endif
00058