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

NXT C++ Bluetooth Library
Class Nxt_network

Connection
   |
   +--Nxt_network

   in network.h
   in network.cpp

class Nxt_network
extends Connection

Class for Network communication


Constructor Summary
Nxt_network()
          Constructor for Network connection
~Nxt_network()
          
 
Method Summary
 void connect( unsigned int port, string ip_add, Server_settings& settings, string password = "" )
          Connect to the NXT using a network connection
 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

Nxt_network

public Nxt_network();
Constructor for Network connection

~Nxt_network

public ~Nxt_network();


Method Detail

connect

public void connect( unsigned int port, string ip_add, Server_settings& settings, string password = "" );
Connect to the NXT using a network connection
Parameters:
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]
See Also:
Server_settings_t

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:
NXT_NETWORK (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