Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-os-example-mbed5-blinky by
DuerOS-Light-SDK-v1.1.0/duer-os-light/src/iot-baidu-ota/coap_client.h@47:9e361da97763, 2017-07-18 (annotated)
- Committer:
- TMBOY
- Date:
- Tue Jul 18 16:54:45 2017 +0800
- Revision:
- 47:9e361da97763
?
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| TMBOY | 47:9e361da97763 | 1 | #pragma once |
| TMBOY | 47:9e361da97763 | 2 | #include "../iot-baidu-ca/source/baidu_ca_coap.h" |
| TMBOY | 47:9e361da97763 | 3 | #include "../iot-baidu-ca/include/baidu_ca.h" |
| TMBOY | 47:9e361da97763 | 4 | #include "../iot-baidu-ca-adapter/baidu_ca_network_socket.h" |
| TMBOY | 47:9e361da97763 | 5 | class CoapsClient |
| TMBOY | 47:9e361da97763 | 6 | { |
| TMBOY | 47:9e361da97763 | 7 | public: |
| TMBOY | 47:9e361da97763 | 8 | CoapsClient(const char* ip, unsigned short port, |
| TMBOY | 47:9e361da97763 | 9 | const char* path, const char* cert); |
| TMBOY | 47:9e361da97763 | 10 | ~CoapsClient(); |
| TMBOY | 47:9e361da97763 | 11 | int connect(); |
| TMBOY | 47:9e361da97763 | 12 | int get(unsigned int nOffset, unsigned char chBuffer[], unsigned int nSize); |
| TMBOY | 47:9e361da97763 | 13 | int disconnect(); |
| TMBOY | 47:9e361da97763 | 14 | private: |
| TMBOY | 47:9e361da97763 | 15 | void network_signal_handler(const bca_addr_t *addr); |
| TMBOY | 47:9e361da97763 | 16 | bca_coap_handler m_coapInstance; |
| TMBOY | 47:9e361da97763 | 17 | bool m_bConnected; |
| TMBOY | 47:9e361da97763 | 18 | bca_addr_t m_peer; |
| TMBOY | 47:9e361da97763 | 19 | const char* m_szPath; |
| TMBOY | 47:9e361da97763 | 20 | const char* m_szCert; |
| TMBOY | 47:9e361da97763 | 21 | duer::SocketAdapter::Callback _on_network_data_signal; |
| TMBOY | 47:9e361da97763 | 22 | |
| TMBOY | 47:9e361da97763 | 23 | }; |
