Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008 #include <tk_mkinterface/MKInterfaceConnection.hpp>
00009
00010 #include <tk_mkinterface/MKData.hpp>
00011
00012 #include <telekyb_base/TeleKyb.hpp>
00013
00014 using namespace telekyb;
00015
00016 int main(int argc, char **argv) {
00017
00018
00019 TeleKyb::init(argc,argv,"mk_test2");
00020
00021 std::vector<MKSingleValuePacket> conditions;
00022 MKSingleValuePacket robotID(40,1);
00023 MKSingleValuePacket firmware(41,1074);
00024
00025 conditions.push_back(robotID);
00026 conditions.push_back(firmware);
00027
00028 #ifdef __APPLE__
00029 MKInterfaceConnection* c = MKInterfaceConnection::findConnection("/dev","tty\\.usbserial-.*",conditions);
00030 #else
00031 MKInterfaceConnection* c = MKInterfaceConnection::findConnection("/dev/serial/by-id","usb-FTDI_FT232R_USB_UART_.*-if00-port0",conditions);
00032 #endif
00033
00034 if (c) {
00035 ROS_INFO("Found connection!!!!");
00036 delete c;
00037 }
00038
00039 TeleKyb::shutdown();
00040
00041 return EXIT_SUCCESS;
00042 }
00043
00044
00045
00046