Arianna autonomous DAQ firmware
Dependencies: mbed SDFileSystemFilinfo AriSnProtocol NetServicesMin AriSnComm MODSERIAL PowerControlClkPatch DS1820OW
SnCommAfarTCP.h@5:9cea89700c66, 2012-08-03 (annotated)
- Committer:
- uci1
- Date:
- Fri Aug 03 00:04:34 2012 +0000
- Revision:
- 5:9cea89700c66
- Parent:
- 3:24c5f0f50bf1
- Child:
- 6:6f002d202f59
Bug fix to power: set 0 for cards and amps if on. Still working on communications. Many debug printouts.
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 | 5:9cea89700c66 | 13 | public: |
uci1 | 5:9cea89700c66 | 14 | static const int kSockTimeoutMs; |
uci1 | 5:9cea89700c66 | 15 | |
uci1 | 5:9cea89700c66 | 16 | typedef int (TCPSocketConnection::*TCPSendRecv)(char*, int, int); |
uci1 | 5:9cea89700c66 | 17 | |
uci1 | 3:24c5f0f50bf1 | 18 | protected: |
uci1 | 3:24c5f0f50bf1 | 19 | char* const fB64buf; |
uci1 | 3:24c5f0f50bf1 | 20 | uint32_t fbblen; |
uci1 | 3:24c5f0f50bf1 | 21 | EthernetInterface* fEth; |
uci1 | 3:24c5f0f50bf1 | 22 | TCPSocketConnection* fSock; |
uci1 | 3:24c5f0f50bf1 | 23 | std::string fRserv; |
uci1 | 3:24c5f0f50bf1 | 24 | int32_t fRport; |
uci1 | 3:24c5f0f50bf1 | 25 | |
uci1 | 3:24c5f0f50bf1 | 26 | virtual SnCommWin::ECommWinResult SendFilename(const char* fn, char* const genBuf); |
uci1 | 3:24c5f0f50bf1 | 27 | virtual SnCommWin::ECommWinResult SendData(FILE* inf); |
uci1 | 3:24c5f0f50bf1 | 28 | virtual SnCommWin::ECommWinResult SendConfAndEvents(FILE* inf, |
uci1 | 3:24c5f0f50bf1 | 29 | const SnConfigFrame& curConf, |
uci1 | 3:24c5f0f50bf1 | 30 | SnEventFrame& evt, |
uci1 | 3:24c5f0f50bf1 | 31 | char* const genBuf, |
uci1 | 3:24c5f0f50bf1 | 32 | const uint32_t nevts, |
uci1 | 3:24c5f0f50bf1 | 33 | const uint32_t firstEvt=0); |
uci1 | 3:24c5f0f50bf1 | 34 | |
uci1 | 3:24c5f0f50bf1 | 35 | public: |
uci1 | 3:24c5f0f50bf1 | 36 | SnCommAfarTCP(char* const b64buf, const uint32_t bblen); |
uci1 | 3:24c5f0f50bf1 | 37 | virtual ~SnCommAfarTCP(); |
uci1 | 3:24c5f0f50bf1 | 38 | |
uci1 | 3:24c5f0f50bf1 | 39 | virtual bool Connect(const uint32_t timeout); |
uci1 | 3:24c5f0f50bf1 | 40 | |
uci1 | 3:24c5f0f50bf1 | 41 | virtual SnCommWin::ECommWinResult OpenWindow(const uint32_t timeout, |
uci1 | 3:24c5f0f50bf1 | 42 | const bool sendStatus, |
uci1 | 3:24c5f0f50bf1 | 43 | const SnConfigFrame& conf, |
uci1 | 3:24c5f0f50bf1 | 44 | const SnEventFrame& evt, |
uci1 | 3:24c5f0f50bf1 | 45 | char* const genBuf); |
uci1 | 3:24c5f0f50bf1 | 46 | |
uci1 | 3:24c5f0f50bf1 | 47 | virtual SnCommWin::ECommWinResult WaitHandshake(const uint32_t timeout, |
uci1 | 3:24c5f0f50bf1 | 48 | char* const buf, |
uci1 | 3:24c5f0f50bf1 | 49 | const uint32_t bsize); |
uci1 | 3:24c5f0f50bf1 | 50 | |
uci1 | 3:24c5f0f50bf1 | 51 | virtual SnCommWin::ECommWinResult GetConfig(SnConfigFrame& conf, |
uci1 | 3:24c5f0f50bf1 | 52 | const uint32_t timeOut, |
uci1 | 3:24c5f0f50bf1 | 53 | char* const confBuf, |
uci1 | 3:24c5f0f50bf1 | 54 | const uint32_t bsize); |
uci1 | 3:24c5f0f50bf1 | 55 | |
uci1 | 3:24c5f0f50bf1 | 56 | virtual SnCommWin::ECommWinResult SendStatus(const SnConfigFrame& conf, |
uci1 | 3:24c5f0f50bf1 | 57 | const SnEventFrame& evt, |
uci1 | 3:24c5f0f50bf1 | 58 | char* const genBuf); |
uci1 | 3:24c5f0f50bf1 | 59 | |
uci1 | 3:24c5f0f50bf1 | 60 | |
uci1 | 3:24c5f0f50bf1 | 61 | }; |
uci1 | 3:24c5f0f50bf1 | 62 | */ |
uci1 | 3:24c5f0f50bf1 | 63 | #endif // SN_SnCommAfarTCP |