Overview   Project   Class   Tree   Index 
NXT C++ Bluetooth Library
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

NXT C++ Bluetooth Library
Class Bluetooth

Connection
   |
   +--Bluetooth

   in bluetooth.h
   in bluetooth.cpp

class Bluetooth
extends Connection

Class for Bluetooth communication


Constructor Summary
Bluetooth()
          Constructor for Bluetooth connection
~Bluetooth()
          
 
Method Summary
 void connect( unsigned int comport )
          Connect to the NXT
 void disconnect()
          Disconnect from the NXT
 void flush()
          Flush the input and output buffer
 Connection_type get_type()
          Get the connection type
 void receive( unsigned char* buffer, unsigned int length )
          Receive a byte string
 void send( unsigned char* buffer, unsigned int num_bytes )
          Send a byte string
   
Methods inherited from class Connection
send, connect, connect, disconnect, receive, flush, get_type
 

Constructor Detail

Bluetooth

public Bluetooth();
Constructor for Bluetooth connection

~Bluetooth

public ~Bluetooth();


Method Detail

connect

public void connect( unsigned int comport );
Connect to the NXT
Parameters:
comport - [specify the comport that is to used for the connection between the NXT and PC]

disconnect

public void disconnect();
Disconnect from the NXT

flush

public void flush();
Flush the input and output buffer

get_type

public Connection_type get_type();
Get the connection type
Returns:
BT = bluetooth (see the CONNECTION_TYPE enumeration)

receive

public void receive( unsigned char* buffer, unsigned int length );
Receive a byte string
Parameters:
*buffer - [a pointer to a buffer that can hold the received bytes]
length - [the number of bytes to receive]

send

public void send( unsigned char* buffer, unsigned int num_bytes );
Send a byte string
Parameters:
*buffer - [a pointer to a buffer that can hold the bytes to send]
num_bytes - [the number of bytes to send]

 Overview   Project   Class   Tree   Index 
NXT C++ Bluetooth Library
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD