![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Arianna autonomous DAQ firmware
Dependencies: mbed SDFileSystemFilinfo AriSnProtocol NetServicesMin AriSnComm MODSERIAL PowerControlClkPatch DS1820OW
Diff: SnCommWinSBD.cpp
- Revision:
- 37:ff95e7070f26
- Child:
- 40:1324da35afd4
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SnCommWinSBD.cpp Wed May 29 00:20:31 2013 +0000 @@ -0,0 +1,39 @@ +#include "SnCommWinSBD.h" + +#include "SnCommSBD.h" + +SnCommWinSBD::SnCommWinSBD(Serial* sbd, Serial* cpu) : + SnCommWin(new SnCommSBD(sbd, cpu)) { + +} + +SnCommWin::ECommWinResult SnCommWinSBD::OpenWindow(const uint32_t timeout, + const bool sendStatus, + const SnConfigFrame& conf, + const SnEventFrame& evt, + const SnPowerFrame& pow, + const uint16_t seq, + const float thmrate, + const float evtrate, + char* const genBuf) { +#ifdef DEBUG + printf("SnCommWinSBD::OpenWindow\r\n"); +#endif + + const bool canCon = fComm->Connect(timeout); + +#ifdef DEBUG + printf("canCon=%d\r\n",(int)canCon); +#endif + + SnCommWin::ECommWinResult ret = canCon ? SnCommWin::kConnected + : SnCommWin::kCanNotConnect; + + if (canCon && sendStatus) { + ret = SendStatus(conf, evt, pow, seq, thmrate, evtrate, genBuf, timeout); + } + + return ret; + +} +