NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
Comm module functions

Functions for accessing and modifying Comm module features. More...

Modules

 Direct Command functions
 Functions for sending direct commands to another NXT.
 
 System Command functions
 Functions for sending system commands to another NXT.
 

Functions

char JoystickMessageRead (byte queue, JoystickMessageType &msg)
 Read a joystick message from a queue/mailbox.
 
char JoystickExMessageRead (byte queue, JoystickExMessageType &msg)
 Read an extended joystick message from a queue/mailbox.
 
char SendMessage (byte queue, string msg)
 Send a message to a queue/mailbox.
 
char ReceiveMessage (byte queue, bool clear, string &msg)
 Read a message from a queue/mailbox.
 
char BluetoothStatus (byte conn)
 Check bluetooth status.
 
char BluetoothWrite (byte conn, byte buffer[])
 Write to a bluetooth connection.
 
char RemoteConnectionWrite (byte conn, byte buffer[])
 Write to a remote connection.
 
bool RemoteConnectionIdle (byte conn)
 Check if remote connection is idle.
 
char SendRemoteBool (byte conn, byte queue, bool bval)
 Send a boolean value to a remote mailbox.
 
char SendRemoteNumber (byte conn, byte queue, long val)
 Send a numeric value to a remote mailbox.
 
char SendRemoteString (byte conn, byte queue, string str)
 Send a string value to a remote mailbox.
 
char SendResponseBool (byte queue, bool bval)
 Write a boolean value to a local response mailbox.
 
char SendResponseNumber (byte queue, long val)
 Write a numeric value to a local response mailbox.
 
char SendResponseString (byte queue, string str)
 Write a string value to a local response mailbox.
 
char ReceiveRemoteBool (byte queue, bool clear, bool &bval)
 Read a boolean value from a queue/mailbox.
 
char ReceiveRemoteMessageEx (byte queue, bool clear, string &str, long &val, bool &bval)
 Read a value from a queue/mailbox.
 
char ReceiveRemoteNumber (byte queue, bool clear, long &val)
 Read a numeric value from a queue/mailbox.
 
char ReceiveRemoteString (byte queue, bool clear, string &str)
 Read a string value from a queue/mailbox.
 
void UseRS485 (void)
 Use the RS485 port.
 
char RS485Control (byte cmd, byte baud, unsigned int mode)
 Control the RS485 port.
 
byte RS485DataAvailable (void)
 Check for RS485 available data.
 
char RS485Initialize (void)
 Initialize RS485 port.
 
char RS485Disable (void)
 Disable RS485.
 
char RS485Enable (void)
 Enable RS485.
 
char RS485Read (byte &buffer[])
 Read RS485 data.
 
char RS485ReadEx (byte &buffer[], byte buflen)
 Read limited RS485 data.
 
byte RS485SendingData (void)
 Is RS485 sending data.
 
void RS485Status (byte &sendingData, byte &dataAvail)
 Check RS485 status.
 
char RS485Uart (byte baud, unsigned int mode)
 Configure RS485 UART.
 
char RS485Write (byte buffer[])
 Write RS485 data.
 
char SendRS485Bool (bool bval)
 Write RS485 boolean.
 
char SendRS485Number (long val)
 Write RS485 numeric.
 
char SendRS485String (string str)
 Write RS485 string.
 
void GetBTInputBuffer (const byte offset, byte cnt, byte &data[])
 Get bluetooth input buffer data.
 
void GetBTOutputBuffer (const byte offset, byte cnt, byte &data[])
 Get bluetooth output buffer data.
 
void GetHSInputBuffer (const byte offset, byte cnt, byte &data[])
 Get hi-speed port input buffer data.
 
void GetHSOutputBuffer (const byte offset, byte cnt, byte &data[])
 Get hi-speed port output buffer data.
 
void GetUSBInputBuffer (const byte offset, byte cnt, byte &data[])
 Get usb input buffer data.
 
void GetUSBOutputBuffer (const byte offset, byte cnt, byte &data[])
 Get usb output buffer data.
 
void GetUSBPollBuffer (const byte offset, byte cnt, byte &data[])
 Get usb poll buffer data.
 
string BTDeviceName (const byte devidx)
 Get bluetooth device name.
 
string BTConnectionName (const byte conn)
 Get bluetooth device name.
 
string BTConnectionPinCode (const byte conn)
 Get bluetooth device pin code.
 
string BrickDataName (void)
 Get NXT name.
 
void GetBTDeviceAddress (const byte devidx, byte &data[])
 Get bluetooth device address.
 
void GetBTConnectionAddress (const byte conn, byte &data[])
 Get bluetooth device address.
 
void GetBrickDataAddress (byte &data[])
 Get NXT address.
 
long BTDeviceClass (const byte devidx)
 Get bluetooth device class.
 
byte BTDeviceStatus (const byte devidx)
 Get bluetooth device status.
 
long BTConnectionClass (const byte conn)
 Get bluetooth device class.
 
byte BTConnectionHandleNum (const byte conn)
 Get bluetooth device handle number.
 
byte BTConnectionStreamStatus (const byte conn)
 Get bluetooth device stream status.
 
byte BTConnectionLinkQuality (const byte conn)
 Get bluetooth device link quality.
 
int BrickDataBluecoreVersion (void)
 Get NXT bluecore version.
 
byte BrickDataBtStateStatus (void)
 Get NXT bluetooth state status.
 
byte BrickDataBtHardwareStatus (void)
 Get NXT bluetooth hardware status.
 
byte BrickDataTimeoutValue (void)
 Get NXT bluetooth timeout value.
 
byte BTInputBufferInPtr (void)
 Get bluetooth input buffer in-pointer.
 
byte BTInputBufferOutPtr (void)
 Get bluetooth input buffer out-pointer.
 
byte BTOutputBufferInPtr (void)
 Get bluetooth output buffer in-pointer.
 
byte BTOutputBufferOutPtr (void)
 Get bluetooth output buffer out-pointer.
 
byte HSInputBufferInPtr (void)
 Get hi-speed port input buffer in-pointer.
 
byte HSInputBufferOutPtr (void)
 Get hi-speed port input buffer out-pointer.
 
byte HSOutputBufferInPtr (void)
 Get hi-speed port output buffer in-pointer.
 
byte HSOutputBufferOutPtr (void)
 Get hi-speed port output buffer out-pointer.
 
byte USBInputBufferInPtr (void)
 Get usb port input buffer in-pointer.
 
byte USBInputBufferOutPtr (void)
 Get usb port input buffer out-pointer.
 
byte USBOutputBufferInPtr (void)
 Get usb port output buffer in-pointer.
 
byte USBOutputBufferOutPtr (void)
 Get usb port output buffer out-pointer.
 
byte USBPollBufferInPtr (void)
 Get usb port poll buffer in-pointer.
 
byte USBPollBufferOutPtr (void)
 Get usb port poll buffer out-pointer.
 
byte BTDeviceCount (void)
 Get bluetooth device count.
 
byte BTDeviceNameCount (void)
 Get bluetooth device name count.
 
byte HSFlags (void)
 Get hi-speed port flags.
 
byte HSSpeed (void)
 Get hi-speed port speed.
 
byte HSState (void)
 Get hi-speed port state.
 
byte HSAddress (void)
 Get hi-speed port address.
 
int HSMode (void)
 Get hi-speed port mode.
 
int BTDataMode (void)
 Get Bluetooth data mode.
 
int HSDataMode (void)
 Get hi-speed port datamode.
 
byte USBState (void)
 Get USB state.
 
void SetBTInputBuffer (const byte offset, byte cnt, byte data[])
 Set bluetooth input buffer data.
 
void SetBTInputBufferInPtr (byte n)
 Set bluetooth input buffer in-pointer.
 
void SetBTInputBufferOutPtr (byte n)
 Set bluetooth input buffer out-pointer.
 
void SetBTOutputBuffer (const byte offset, byte cnt, byte data[])
 Set bluetooth output buffer data.
 
void SetBTOutputBufferInPtr (byte n)
 Set bluetooth output buffer in-pointer.
 
void SetBTOutputBufferOutPtr (byte n)
 Set bluetooth output buffer out-pointer.
 
void SetHSInputBuffer (const byte offset, byte cnt, byte data[])
 Set hi-speed port input buffer data.
 
void SetHSInputBufferInPtr (byte n)
 Set hi-speed port input buffer in-pointer.
 
void SetHSInputBufferOutPtr (byte n)
 Set hi-speed port input buffer out-pointer.
 
void SetHSOutputBuffer (const byte offset, byte cnt, byte data[])
 Set hi-speed port output buffer data.
 
void SetHSOutputBufferInPtr (byte n)
 Set hi-speed port output buffer in-pointer.
 
void SetHSOutputBufferOutPtr (byte n)
 Set hi-speed port output buffer out-pointer.
 
void SetUSBInputBuffer (const byte offset, byte cnt, byte data[])
 Set USB input buffer data.
 
void SetUSBInputBufferInPtr (byte n)
 Set USB input buffer in-pointer.
 
void SetUSBInputBufferOutPtr (byte n)
 Set USB input buffer out-pointer.
 
void SetUSBOutputBuffer (const byte offset, byte cnt, byte data[])
 Set USB output buffer data.
 
void SetUSBOutputBufferInPtr (byte n)
 Set USB output buffer in-pointer.
 
void SetUSBOutputBufferOutPtr (byte n)
 Set USB output buffer out-pointer.
 
void SetUSBPollBuffer (const byte offset, byte cnt, byte data[])
 Set USB poll buffer data.
 
void SetUSBPollBufferInPtr (byte n)
 Set USB poll buffer in-pointer.
 
void SetUSBPollBufferOutPtr (byte n)
 Set USB poll buffer out-pointer.
 
void SetHSFlags (byte hsFlags)
 Set hi-speed port flags.
 
void SetHSSpeed (byte hsSpeed)
 Set hi-speed port speed.
 
void SetHSState (byte hsState)
 Set hi-speed port state.
 
void SetHSAddress (byte hsAddress)
 Set hi-speed port address.
 
void SetHSMode (unsigned int hsMode)
 Set hi-speed port mode.
 
void SetBTDataMode (const byte dataMode)
 Set Bluetooth data mode.
 
void SetHSDataMode (const byte dataMode)
 Set hi-speed port data mode.
 
void SetUSBState (byte usbState)
 Set USB state.
 
void SysMessageWrite (MessageWriteType &args)
 Write message.
 
void SysMessageRead (MessageReadType &args)
 Read message.
 
void SysCommBTWrite (CommBTWriteType &args)
 Write data to a Bluetooth connection.
 
void SysCommBTCheckStatus (CommBTCheckStatusType &args)
 Check Bluetooth connection status.
 
void SysCommExecuteFunction (CommExecuteFunctionType &args)
 Execute any Comm module command.
 
void SysCommHSControl (CommHSControlType &args)
 Control the hi-speed port.
 
void SysCommHSCheckStatus (CommHSCheckStatusType &args)
 Check the hi-speed port status.
 
void SysCommHSRead (CommHSReadWriteType &args)
 Read from the hi-speed port.
 
void SysCommHSWrite (CommHSReadWriteType &args)
 Write to the hi-speed port.
 
void SysCommBTOnOff (CommBTOnOffType &args)
 Turn on or off the bluetooth subsystem.
 
void SysCommBTConnection (CommBTConnectionType &args)
 Connect or disconnect a bluetooth device.
 

Detailed Description

Functions for accessing and modifying Comm module features.