S K UCI / Mbed 2 deprecated AutonomousDAQ

Dependencies:   mbed SDFileSystemFilinfo AriSnProtocol NetServicesMin AriSnComm MODSERIAL PowerControlClkPatch DS1820OW

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers SnCommWinUsb.cpp Source File

SnCommWinUsb.cpp

00001 #include "SnCommWinUsb.h"
00002 
00003 #include "SnCommUsb.h"
00004 
00005 #ifdef USE_MODSERIAL
00006 #include "MODSERIAL.h"
00007 #endif
00008 
00009 SnCommWinUsb::SnCommWinUsb(COMM_SERIALTYPE* cpu) :
00010     SnCommWin(new SnCommUsb(cpu)) {
00011 
00012 }
00013 
00014 SnCommWin::ECommWinResult SnCommWinUsb::OpenWindow(const bool sendStatus,
00015                                                    const SnConfigFrame& conf,
00016                                                    const SnPowerFrame& pow, // com win power
00017                                                    const SnEventFrame& stEvent,
00018                                                    const uint16_t seq,
00019                                                    const uint32_t numThmTrigs,
00020                                                    const uint32_t numSavedEvts, 
00021                                                    const float    seqlive,
00022                                                    const uint32_t powerOnTime,
00023                                                    const SnTempFrame& temper, // com win temp
00024                                                    char* const genBuf,
00025                                                    const uint32_t timeout_clock) {
00026 #ifdef DEBUG
00027     printf("SnCommWinUsb::OpenWindow\r\n");
00028 #endif
00029 
00030     SnCommWin::ECommWinResult ret = 
00031         fComm->Connect(timeout_clock) ? SnCommWin::kConnected : SnCommWin::kCanNotConnect;
00032     
00033     if (sendStatus) {
00034 #ifdef DEBUG
00035         printf("SnCommWinUsb calling SendStatus\r\n");
00036 #endif
00037      
00038         ret = SendStatus(conf, pow, stEvent, seq,
00039                          numThmTrigs, numSavedEvts, seqlive,
00040                          powerOnTime, temper,
00041                          genBuf,
00042                          timeout_clock);
00043     }
00044     
00045     return ret;
00046 }