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.
Dependencies: mbed SDFileSystemFilinfo AriSnProtocol NetServicesMin AriSnComm MODSERIAL PowerControlClkPatch DS1820OW
SnCommAfarTCP.h@3:24c5f0f50bf1, 2012-07-31 (annotated)
- Committer:
- uci1
- Date:
- Tue Jul 31 04:59:16 2012 +0000
- Revision:
- 3:24c5f0f50bf1
- Child:
- 5:9cea89700c66
Test bench version. Communications not completed. Debugging output present. But will read the local config file and save events that can be used for testing.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
uci1 | 3:24c5f0f50bf1 | 1 | #ifndef SN_SnCommAfarTCP |
uci1 | 3:24c5f0f50bf1 | 2 | #define SN_SnCommAfarTCP |
uci1 | 3:24c5f0f50bf1 | 3 | /* |
uci1 | 3:24c5f0f50bf1 | 4 | #include "SnCommWin.h" |
uci1 | 3:24c5f0f50bf1 | 5 | |
uci1 | 3:24c5f0f50bf1 | 6 | class SnConfigFrame; |
uci1 | 3:24c5f0f50bf1 | 7 | class SnEventFrame; |
uci1 | 3:24c5f0f50bf1 | 8 | |
uci1 | 3:24c5f0f50bf1 | 9 | class EthernetInterface; |
uci1 | 3:24c5f0f50bf1 | 10 | class TCPSocketConnection; |
uci1 | 3:24c5f0f50bf1 | 11 | |
uci1 | 3:24c5f0f50bf1 | 12 | class SnCommAfarTCP : public SnCommWin { |
uci1 | 3:24c5f0f50bf1 | 13 | protected: |
uci1 | 3:24c5f0f50bf1 | 14 | char* const fB64buf; |
uci1 | 3:24c5f0f50bf1 | 15 | uint32_t fbblen; |
uci1 | 3:24c5f0f50bf1 | 16 | EthernetInterface* fEth; |
uci1 | 3:24c5f0f50bf1 | 17 | TCPSocketConnection* fSock; |
uci1 | 3:24c5f0f50bf1 | 18 | std::string fRserv; |
uci1 | 3:24c5f0f50bf1 | 19 | int32_t fRport; |
uci1 | 3:24c5f0f50bf1 | 20 | |
uci1 | 3:24c5f0f50bf1 | 21 | virtual SnCommWin::ECommWinResult SendFilename(const char* fn, char* const genBuf); |
uci1 | 3:24c5f0f50bf1 | 22 | virtual SnCommWin::ECommWinResult SendData(FILE* inf); |
uci1 | 3:24c5f0f50bf1 | 23 | virtual SnCommWin::ECommWinResult SendConfAndEvents(FILE* inf, |
uci1 | 3:24c5f0f50bf1 | 24 | const SnConfigFrame& curConf, |
uci1 | 3:24c5f0f50bf1 | 25 | SnEventFrame& evt, |
uci1 | 3:24c5f0f50bf1 | 26 | char* const genBuf, |
uci1 | 3:24c5f0f50bf1 | 27 | const uint32_t nevts, |
uci1 | 3:24c5f0f50bf1 | 28 | const uint32_t firstEvt=0); |
uci1 | 3:24c5f0f50bf1 | 29 | |
uci1 | 3:24c5f0f50bf1 | 30 | public: |
uci1 | 3:24c5f0f50bf1 | 31 | SnCommAfarTCP(char* const b64buf, const uint32_t bblen); |
uci1 | 3:24c5f0f50bf1 | 32 | virtual ~SnCommAfarTCP(); |
uci1 | 3:24c5f0f50bf1 | 33 | |
uci1 | 3:24c5f0f50bf1 | 34 | virtual bool Connect(const uint32_t timeout); |
uci1 | 3:24c5f0f50bf1 | 35 | |
uci1 | 3:24c5f0f50bf1 | 36 | virtual SnCommWin::ECommWinResult OpenWindow(const uint32_t timeout, |
uci1 | 3:24c5f0f50bf1 | 37 | const bool sendStatus, |
uci1 | 3:24c5f0f50bf1 | 38 | const SnConfigFrame& conf, |
uci1 | 3:24c5f0f50bf1 | 39 | const SnEventFrame& evt, |
uci1 | 3:24c5f0f50bf1 | 40 | char* const genBuf); |
uci1 | 3:24c5f0f50bf1 | 41 | |
uci1 | 3:24c5f0f50bf1 | 42 | virtual SnCommWin::ECommWinResult WaitHandshake(const uint32_t timeout, |
uci1 | 3:24c5f0f50bf1 | 43 | char* const buf, |
uci1 | 3:24c5f0f50bf1 | 44 | const uint32_t bsize); |
uci1 | 3:24c5f0f50bf1 | 45 | |
uci1 | 3:24c5f0f50bf1 | 46 | virtual SnCommWin::ECommWinResult GetConfig(SnConfigFrame& conf, |
uci1 | 3:24c5f0f50bf1 | 47 | const uint32_t timeOut, |
uci1 | 3:24c5f0f50bf1 | 48 | char* const confBuf, |
uci1 | 3:24c5f0f50bf1 | 49 | const uint32_t bsize); |
uci1 | 3:24c5f0f50bf1 | 50 | |
uci1 | 3:24c5f0f50bf1 | 51 | virtual SnCommWin::ECommWinResult SendStatus(const SnConfigFrame& conf, |
uci1 | 3:24c5f0f50bf1 | 52 | const SnEventFrame& evt, |
uci1 | 3:24c5f0f50bf1 | 53 | char* const genBuf); |
uci1 | 3:24c5f0f50bf1 | 54 | |
uci1 | 3:24c5f0f50bf1 | 55 | |
uci1 | 3:24c5f0f50bf1 | 56 | }; |
uci1 | 3:24c5f0f50bf1 | 57 | */ |
uci1 | 3:24c5f0f50bf1 | 58 | #endif // SN_SnCommAfarTCP |