|
NXT C++ Bluetooth Library | ||||||
FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Abstract class for connections
Constructor Summary | |
virtual ~Connection()
|
Method Summary | |
virtual void |
connect( unsigned int comport )
Connect to the NXT using BT (Dummy method does nothing - is implemented in sub class) |
virtual void |
connect( unsigned int port, string ip_add, Server_settings& settings, string password = "" )
Connect to the NXT using a network connection (Dummy method does nothing - is implemented in sub class) |
virtual void |
disconnect()= 0
Disconnect from the NXT (must be implemented in sub class) |
virtual void |
flush()= 0
Flush the input and output buffer (must be implemented in sub class) |
virtual Connection_type |
get_type()= 0
Get the connection type (must be implemented in sub class) |
virtual void |
receive( unsigned char* buffer, unsigned int length )= 0
Receive a byte string (must be implemented in sub class) |
virtual void |
send( unsigned char* buffer, unsigned int num_bytes )= 0
Send a byte string (must be implemented in sub class) |
Constructor Detail |
public virtual ~Connection();
Method Detail |
public virtual void connect( unsigned int comport );
comport
- [specify the comport that is to used for the BT connection between the NXT and PC]public virtual void connect( unsigned int port, string ip_add, Server_settings& settings, string password = "" );
port
- [specify the port that is to used for the network connection between the NXT and PC]
ip_add
- [specify the IP-address]
settings
- [used to retrive server settings]
password
- [set the password]Server_settings_t
public virtual void disconnect()= 0;
public virtual void flush()= 0;
public virtual Connection_type get_type()= 0;
public virtual void receive( unsigned char* buffer, unsigned int length )= 0;
*buffer
- [a pointer to a buffer that can hold the received bytes]
length
- [the number of bytes to receive]public virtual void send( unsigned char* buffer, unsigned int num_bytes )= 0;
*buffer
- [a pointer to a buffer that can hold the bytes to send]
num_bytes
- [the number of bytes to send]
|
NXT C++ Bluetooth Library | ||||||
FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |