uses pushing box to write to google spreadsheets
Dependencies: GSM_PUSHING_BOX_STATE_MACHINE MBed_Adafruit-GPS-Library SDFileSystem mbed
Fork of DCS by
Socket/Socket.h@20:84661ac75715, 2015-10-21 (annotated)
- Committer:
- DeWayneDennis
- Date:
- Wed Oct 21 19:46:32 2015 +0000
- Revision:
- 20:84661ac75715
- Parent:
- 19:404594768414
a
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
DeWayneDennis | 19:404594768414 | 1 | /* |
DeWayneDennis | 19:404594768414 | 2 | Socket.h |
DeWayneDennis | 19:404594768414 | 3 | 2014 Copyright (c) Seeed Technology Inc. All right reserved. |
DeWayneDennis | 19:404594768414 | 4 | |
DeWayneDennis | 19:404594768414 | 5 | Author:lawliet zou(lawliet.zou@gmail.com) |
DeWayneDennis | 19:404594768414 | 6 | 2014-2-24 |
DeWayneDennis | 19:404594768414 | 7 | |
DeWayneDennis | 19:404594768414 | 8 | This library is free software; you can redistribute it and/or |
DeWayneDennis | 19:404594768414 | 9 | modify it under the terms of the GNU Lesser General Public |
DeWayneDennis | 19:404594768414 | 10 | License as published by the Free Software Foundation; either |
DeWayneDennis | 19:404594768414 | 11 | version 2.1 of the License, or (at your option) any later version. |
DeWayneDennis | 19:404594768414 | 12 | |
DeWayneDennis | 19:404594768414 | 13 | This library is distributed in the hope that it will be useful, |
DeWayneDennis | 19:404594768414 | 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
DeWayneDennis | 19:404594768414 | 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
DeWayneDennis | 19:404594768414 | 16 | Lesser General Public License for more details. |
DeWayneDennis | 19:404594768414 | 17 | |
DeWayneDennis | 19:404594768414 | 18 | You should have received a copy of the GNU Lesser General Public |
DeWayneDennis | 19:404594768414 | 19 | License along with this library; if not, write to the Free Software |
DeWayneDennis | 19:404594768414 | 20 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
DeWayneDennis | 19:404594768414 | 21 | */ |
DeWayneDennis | 19:404594768414 | 22 | #ifndef SOCKET_H_ |
DeWayneDennis | 19:404594768414 | 23 | #define SOCKET_H_ |
DeWayneDennis | 19:404594768414 | 24 | |
DeWayneDennis | 19:404594768414 | 25 | #include "GPRS.h" |
DeWayneDennis | 19:404594768414 | 26 | |
DeWayneDennis | 19:404594768414 | 27 | /** Socket file descriptor and select wrapper |
DeWayneDennis | 19:404594768414 | 28 | */ |
DeWayneDennis | 19:404594768414 | 29 | class Socket { |
DeWayneDennis | 19:404594768414 | 30 | public: |
DeWayneDennis | 19:404594768414 | 31 | /** Socket |
DeWayneDennis | 19:404594768414 | 32 | */ |
DeWayneDennis | 19:404594768414 | 33 | Socket(); |
DeWayneDennis | 19:404594768414 | 34 | |
DeWayneDennis | 19:404594768414 | 35 | void set_blocking(bool blocking, unsigned int timeout=1); |
DeWayneDennis | 19:404594768414 | 36 | |
DeWayneDennis | 19:404594768414 | 37 | /** Close the socket file descriptor |
DeWayneDennis | 19:404594768414 | 38 | */ |
DeWayneDennis | 19:404594768414 | 39 | int close(); |
DeWayneDennis | 19:404594768414 | 40 | |
DeWayneDennis | 19:404594768414 | 41 | ~Socket(); |
DeWayneDennis | 19:404594768414 | 42 | |
DeWayneDennis | 19:404594768414 | 43 | protected: |
DeWayneDennis | 19:404594768414 | 44 | int _sock_fd; |
DeWayneDennis | 19:404594768414 | 45 | GPRS* gprs; |
DeWayneDennis | 19:404594768414 | 46 | }; |
DeWayneDennis | 19:404594768414 | 47 | |
DeWayneDennis | 19:404594768414 | 48 | |
DeWayneDennis | 19:404594768414 | 49 | #endif /* SOCKET_H_ */ |