Mistake on this page?
Report an issue in GitHub or email us
QUECTEL_BC95_CellularStack.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 
18 #ifndef QUECTEL_BC95_CELLULARSTACK_H_
19 #define QUECTEL_BC95_CELLULARSTACK_H_
20 
21 #include "AT_CellularStack.h"
22 
23 namespace mbed {
24 
26 public:
27  QUECTEL_BC95_CellularStack(ATHandler &atHandler, int cid, nsapi_ip_stack_t stack_type, AT_CellularDevice &device);
28  virtual ~QUECTEL_BC95_CellularStack();
29 
30 protected: // NetworkStack
31 
32  virtual nsapi_error_t socket_listen(nsapi_socket_t handle, int backlog);
33 
35  nsapi_socket_t *handle, SocketAddress *address = 0);
36 
37  virtual nsapi_error_t socket_connect(nsapi_socket_t handle, const SocketAddress &address);
38 
39 protected: // AT_CellularStack
40 
41  virtual nsapi_error_t socket_close_impl(int sock_id);
42 
44 
46  const void *data, nsapi_size_t size);
47 
49  void *buffer, nsapi_size_t size);
50 
51 private:
52  // URC handlers
53  void urc_nsonmi();
54  void urc_nsocli();
55 
56  events::EventQueue *_event_queue;
57  int _txfull_event_id;
58  void txfull_event_timeout();
59 };
60 } // namespace mbed
61 #endif /* QUECTEL_BC95_CELLULARSTACK_H_ */
EventQueue.
Definition: EventQueue.h:62
virtual nsapi_error_t socket_connect(nsapi_socket_t handle, const SocketAddress &address)
Connects TCP socket to a remote host.
Class AT_CellularStack.
void * nsapi_socket_t
Opaque handle for network sockets.
Definition: nsapi_types.h:252
virtual nsapi_error_t socket_accept(nsapi_socket_t server, nsapi_socket_t *handle, SocketAddress *address=0)
Accepts a connection on a TCP socket.
signed int nsapi_error_t
Type used to represent error codes.
Definition: nsapi_types.h:140
signed int nsapi_size_or_error_t
Type used to represent either a size or error passed through sockets.
Definition: nsapi_types.h:151
virtual nsapi_error_t socket_listen(nsapi_socket_t handle, int backlog)
Listen for connections on a TCP socket.
virtual nsapi_error_t socket_close_impl(int sock_id)
Implements modem specific AT command set for socket closing.
virtual nsapi_error_t create_socket_impl(CellularSocket *socket)
Implements modem specific AT command set for creating socket.
SocketAddress class.
Definition: SocketAddress.h:37
virtual nsapi_size_or_error_t socket_recvfrom_impl(CellularSocket *socket, SocketAddress *address, void *buffer, nsapi_size_t size)
Implements modem specific AT command set for receiving data.
Class AT_CellularDevice.
unsigned int nsapi_size_t
Type used to represent the size of data passed through sockets.
Definition: nsapi_types.h:144
Definition: ATHandler.h:46
Class for sending AT commands and parsing AT responses.
Definition: ATHandler.h:70
virtual nsapi_size_or_error_t socket_sendto_impl(CellularSocket *socket, const SocketAddress &address, const void *data, nsapi_size_t size)
Implements modem specific AT command set for sending data.
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.