Go to the documentation of this file.00001 #include "xid_device_scanner_t.h"
00002 #include "xid_con_t.h"
00003 #include "stim_tracker_t.h"
00004 #include <boost/shared_ptr.hpp>
00005 #include <iostream>
00006
00007 using namespace cedrus;
00008
00009 int main(int argc, char** argv)
00010 {
00011 xid_device_scanner_t scanner;
00012 scanner.detect_valid_xid_devices();
00013 if(scanner.st_device_count() == 0)
00014 {
00015 std::cout << "No StimTracker found" << std::endl;
00016 return 1;
00017 }
00018 else
00019 {
00020 std::cout << "StimTracker found!" << std::endl;
00021 }
00022
00023 boost::shared_ptr<xid_con_t> con =
00024 scanner.stimtracker_connection_at_index(0);
00025 con->open();
00026
00027 stim_tracker_t st(con,
00028 L"C:\\Users\\grant.CEDRUS\\Development\\PresentationDriver\\devconfig\\");
00029
00030 std::cout << st.get_device_name() << std::endl;
00031
00032 st.set_pulse_duration(UINT_MAX);
00033
00034 std::cout << "Raising all lines" << std::endl;
00035
00036 st.raise_lines(255);
00037
00038 Sleep(1000);
00039
00040 std::cout << "Clearing lines" << std::endl;
00041
00042 st.clear_lines(255);
00043 Sleep(1000);
00044
00045 std::cout << "Setting pulse duration to 100ms" << std::endl;
00046
00047 st.set_pulse_duration(100);
00048
00049 Sleep(1000);
00050
00051 std::cout << "OOOH!! FLASHY!! (Hit Ctrl-C to exit)" << std::endl;
00052
00053 int line = 1;
00054 while(true)
00055 {
00056 st.raise_lines(line);
00057
00058 line = line << 1;
00059 if(line > 255)
00060 line = 1;
00061 Sleep(200);
00062 }
00063
00064 return 0;
00065 }