ECRobot C++ API for LEGO MINDSTORMS NXT  1.0.10
util/BTConnection.h
00001 //
00002 // BTConnection.h
00003 //
00004 // Copyright 2009 by Takashi Chikamasa, Jon C. Martin and Robert W. Kramer
00005 //
00006 
00007 #ifndef BTCONNECTION_H_
00008 #define BTCONNECTION_H_
00009 
00010 #include "Bluetooth.h"
00011 #include "Lcd.h"
00012 #include "Nxt.h"
00013 
00014 extern "C"
00015 {
00016         #include "ecrobot_interface.h"
00017 };
00018 
00019 namespace ecrobot
00020 {
00024 class BTConnection
00025 {
00026 public:
00034         BTConnection(Bluetooth&bt, Lcd& lcd, Nxt& nxt): mrBt(bt), mrLcd(lcd), mrNxt(nxt) {}
00035 
00043         SINT connect(const CHAR* passkey, const CHAR* devname = 0);
00044 
00052         SINT connect(const CHAR* passkey, const U8 address[7]);
00053 
00054 private:
00055         Bluetooth &mrBt;
00056         Lcd& mrLcd;
00057         Nxt& mrNxt;
00058 };
00059 }
00060 
00061 #endif /* BTCONNECTION_H_ */
 All Classes Files Functions Variables Enumerations Enumerator Friends Defines