Method | Description | |
---|---|---|
Connect ( ) : bool |
Connect to NXT brick. If communication interface was connected before the call, existing connection will be reused. If it is required to force reconnection, then Disconnect method should be called before. |
|
Disconnect ( ) : void |
Disconnect from NXT brick.
|
|
ReadMessage ( byte buffer, int &length ) : bool |
Read message from NXT brick over the communication interface.
|
|
ReadMessage ( byte buffer, int offset, int &length ) : bool |
Read message from NXT brick over the communication interface.
|
|
SendMessage ( byte message ) : bool |
Send message to NXT brick over the communication interface. This method assumes that message starts from the start of the specified buffer and occupies entire buffer. |
|
SendMessage ( byte message, int length ) : bool |
Send message to NXT brick over the communication interface. This method assumes that message starts from the start of the specified buffer. |
|
SendMessage ( byte message, int offset, int length ) : bool |
Send message to NXT brick over the communication interface.
|
|
SerialCommunication ( string portName ) : System |
Initializes a new instance of the SerialCommunication class. This constructor initializes serial port with default write and read timeout values, which are 1000 milliseconds. |
|
SerialCommunication ( string portName, int writeTimeout, int readTimeout ) : System |
Initializes a new instance of the SerialCommunication class.
|
public ReadMessage ( byte buffer, int &length ) : bool | ||
buffer | byte | Buffer to use for message reading. |
length | int | On successful return the variable keeps message length. |
return | bool |
public ReadMessage ( byte buffer, int offset, int &length ) : bool | ||
buffer | byte | Buffer to use for message reading. |
offset | int | Offset in the buffer for message. |
length | int | On successful return the variable keeps message length. |
return | bool |
public SendMessage ( byte message ) : bool | ||
message | byte | Buffer containing the message to send. |
return | bool |
public SendMessage ( byte message, int length ) : bool | ||
message | byte | Buffer containing the message to send. |
length | int | Length of the message to send. |
return | bool |
public SendMessage ( byte message, int offset, int length ) : bool | ||
message | byte | Buffer containing the message to send. |
offset | int | Offset of the message in the buffer. |
length | int | Length of the message to send. |
return | bool |
public SerialCommunication ( string portName ) : System | ||
portName | string | Serial port name to use for communication. |
return | System |
public SerialCommunication ( string portName, int writeTimeout, int readTimeout ) : System | ||
portName | string | Serial port name to use for communication. |
writeTimeout | int | Timeout value used for write operations. |
readTimeout | int | Timeout value used for read operations. |
return | System |