Arianna autonomous DAQ firmware

Dependencies:   mbed SDFileSystemFilinfo AriSnProtocol NetServicesMin AriSnComm MODSERIAL PowerControlClkPatch DS1820OW

Committer:
uci1
Date:
Tue Jul 31 04:59:16 2012 +0000
Revision:
3:24c5f0f50bf1
Parent:
2:e67f7c158087
Child:
6:6f002d202f59
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?

UserRevisionLine numberNew contents of line
uci1 2:e67f7c158087 1 #ifndef SN_SnCommAfar
uci1 2:e67f7c158087 2 #define SN_SnCommAfar
uci1 2:e67f7c158087 3
uci1 2:e67f7c158087 4 #include "SnCommWin.h"
uci1 2:e67f7c158087 5
uci1 2:e67f7c158087 6 class Websocket;
uci1 2:e67f7c158087 7
uci1 2:e67f7c158087 8 class SnConfigFrame;
uci1 2:e67f7c158087 9 class SnEventFrame;
uci1 2:e67f7c158087 10
uci1 2:e67f7c158087 11 class SnCommAfar : public SnCommWin {
uci1 2:e67f7c158087 12 protected:
uci1 3:24c5f0f50bf1 13 char* const fB64buf;
uci1 3:24c5f0f50bf1 14 uint32_t fbblen;
uci1 3:24c5f0f50bf1 15
uci1 3:24c5f0f50bf1 16 virtual SnCommWin::ECommWinResult SendFilename(const char* fn, char* const genBuf);
uci1 2:e67f7c158087 17 virtual SnCommWin::ECommWinResult SendData(FILE* inf);
uci1 2:e67f7c158087 18 virtual SnCommWin::ECommWinResult SendConfAndEvents(FILE* inf,
uci1 2:e67f7c158087 19 const SnConfigFrame& curConf,
uci1 2:e67f7c158087 20 SnEventFrame& evt,
uci1 2:e67f7c158087 21 char* const genBuf,
uci1 2:e67f7c158087 22 const uint32_t nevts,
uci1 2:e67f7c158087 23 const uint32_t firstEvt=0);
uci1 2:e67f7c158087 24
uci1 2:e67f7c158087 25 public:
uci1 3:24c5f0f50bf1 26 SnCommAfar(char* const b64buf, const uint32_t bblen) : fB64buf(b64buf), fbblen(bblen) {}
uci1 2:e67f7c158087 27 virtual ~SnCommAfar() {}
uci1 2:e67f7c158087 28
uci1 2:e67f7c158087 29 virtual bool Connect(const uint32_t timeout);
uci1 2:e67f7c158087 30
uci1 2:e67f7c158087 31 virtual SnCommWin::ECommWinResult OpenWindow(const uint32_t timeout,
uci1 2:e67f7c158087 32 const bool sendStatus,
uci1 2:e67f7c158087 33 const SnConfigFrame& conf,
uci1 2:e67f7c158087 34 const SnEventFrame& evt,
uci1 2:e67f7c158087 35 char* const genBuf);
uci1 2:e67f7c158087 36
uci1 3:24c5f0f50bf1 37 virtual SnCommWin::ECommWinResult WaitHandshake(const uint32_t timeout,
uci1 3:24c5f0f50bf1 38 char* const buf,
uci1 3:24c5f0f50bf1 39 const uint32_t bsize);
uci1 3:24c5f0f50bf1 40
uci1 2:e67f7c158087 41 virtual SnCommWin::ECommWinResult GetConfig(SnConfigFrame& conf,
uci1 2:e67f7c158087 42 const uint32_t timeOut,
uci1 3:24c5f0f50bf1 43 char* const confBuf,
uci1 3:24c5f0f50bf1 44 const uint32_t bsize);
uci1 3:24c5f0f50bf1 45
uci1 2:e67f7c158087 46 virtual SnCommWin::ECommWinResult SendStatus(const SnConfigFrame& conf,
uci1 2:e67f7c158087 47 const SnEventFrame& evt,
uci1 2:e67f7c158087 48 char* const genBuf);
uci1 2:e67f7c158087 49
uci1 2:e67f7c158087 50 static Websocket& GetWS();
uci1 2:e67f7c158087 51
uci1 2:e67f7c158087 52 };
uci1 2:e67f7c158087 53
uci1 2:e67f7c158087 54 #endif // SN_SnCommAfar