|
BowlerKernel
|


Public Member Functions | |
| Create (UARTChannel chan) | |
| void | setFullMode () |
| void | InitCreate () |
| void | InitCreateBlocking (int timeout) |
| void | move (short velocity, short radius) |
| void | driveStraight (short distance) |
| void | driveStraight (short velocity, short distance) |
| boolean | driveStraightBlocking (int timeout, short velocity, short distance) throws InterruptedException |
| void | turn (short angle) |
| void | turn (short velocity, short angle) |
| boolean | turnBlocking (int timeout, short velocity, short angle) throws InterruptedException |
| void | setLed (boolean max, boolean spot) |
| void | setStatusLed (int color, int intensity) |
| void | requestSensors () |
| void | requestSensors (CreateSensorRequest req) |
| void | onChannelEvent (DyIOChannelEvent e) |
| void | removeAllCreateSensorListeners () |
| void | removeCreateSensorListener (ICreateSensorListener l) |
| void | addCreateSensorListener (ICreateSensorListener l) |
Private Member Functions | |
| void | setLed () |
| void | send (byte[]b) throws Exception |
| void | fireCreatePacket (CreateSensors packet) |
Private Attributes | |
| short | myAngle |
| short | myDistance |
| short | previousRad =0 |
| short | previousVel =0 |
| UARTChannel | channel |
| byte[] | ledState ={(byte) 139,0,0,0} |
| byte[] | sensor = new byte[26] |
| CreateSensorRequest | senReq =CreateSensorRequest.NONE |
| ArrayList< ICreateSensorListener > | listeners = new ArrayList<ICreateSensorListener>() |
The Class Create.
Definition at line 30 of file Create.java.
| com.neuronrobotics.sdk.addons.irobot.Create.Create | ( | UARTChannel | chan | ) |
Instantiates a new creates the.
| chan | the chan |
Definition at line 65 of file Create.java.
References com.neuronrobotics.sdk.dyio.peripherals.UARTChannel.addUARTStreamListener(), com.neuronrobotics.sdk.addons.irobot.Create.channel, com.neuronrobotics.sdk.addons.irobot.Create.requestSensors(), com.neuronrobotics.sdk.addons.irobot.Create.send(), and com.neuronrobotics.sdk.dyio.peripherals.UARTChannel.setUARTBaudrate().

| void com.neuronrobotics.sdk.addons.irobot.Create.addCreateSensorListener | ( | ICreateSensorListener | l | ) |
addCreateSensorListener.
| l | add the specified listener |
Definition at line 461 of file Create.java.
References com.neuronrobotics.sdk.addons.irobot.Create.listeners.
| void com.neuronrobotics.sdk.addons.irobot.Create.driveStraight | ( | short | distance | ) |
Drive straight.
| distance | mm Distance from current location to drive |
Definition at line 150 of file Create.java.
Referenced by com.neuronrobotics.sdk.addons.irobot.Create.driveStraightBlocking().
| void com.neuronrobotics.sdk.addons.irobot.Create.driveStraight | ( | short | velocity, |
| short | distance | ||
| ) |
Driving macro. This will drive for a distance and stop.
| velocity | mm/s |
| distance | mm |
Definition at line 158 of file Create.java.
References com.neuronrobotics.sdk.addons.irobot.Create.send().

| boolean com.neuronrobotics.sdk.addons.irobot.Create.driveStraightBlocking | ( | int | timeout, |
| short | velocity, | ||
| short | distance | ||
| ) | throws InterruptedException |
Drive straight blocking.
| timeout | the timeout |
| velocity | mm/s |
| distance | mm |
| InterruptedException | the interrupted exception |
Definition at line 184 of file Create.java.
References com.neuronrobotics.sdk.addons.irobot.Create.driveStraight(), com.neuronrobotics.sdk.common.Log.error(), com.neuronrobotics.sdk.common.Log.info(), com.neuronrobotics.sdk.addons.irobot.Create.myDistance, and com.neuronrobotics.sdk.addons.irobot.Create.requestSensors().

|
private |
Fire create packet.
| packet | the packet |
Definition at line 473 of file Create.java.
References com.neuronrobotics.sdk.addons.irobot.CreateSensors.angle, com.neuronrobotics.sdk.addons.irobot.CreateSensors.distance, com.neuronrobotics.sdk.addons.irobot.Create.listeners, com.neuronrobotics.sdk.addons.irobot.Create.myAngle, and com.neuronrobotics.sdk.addons.irobot.Create.myDistance.
Referenced by com.neuronrobotics.sdk.addons.irobot.Create.onChannelEvent().
| void com.neuronrobotics.sdk.addons.irobot.Create.InitCreate | ( | ) |
Inits the create.
Definition at line 93 of file Create.java.
References com.neuronrobotics.sdk.addons.irobot.Create.send().

| void com.neuronrobotics.sdk.addons.irobot.Create.InitCreateBlocking | ( | int | timeout | ) |
Inits the create blocking.
| timeout | the timeout |
Definition at line 107 of file Create.java.
References com.neuronrobotics.sdk.common.Log.info(), and com.neuronrobotics.sdk.addons.irobot.Create.send().

| void com.neuronrobotics.sdk.addons.irobot.Create.move | ( | short | velocity, |
| short | radius | ||
| ) |
wrapper for the drive command NOTE, this is not a positional, only velocity. It will run forever until you tell it to stop Special cases for radius param: straight = 32768 = hex 8000 Turn in place clockwise = -1 Turn in place counter-clockwise = 1
| velocity | mm/s 32768 to -32768 |
| radius | mm 32768 to -32768 |
Definition at line 132 of file Create.java.
References com.neuronrobotics.sdk.addons.irobot.Create.previousRad, com.neuronrobotics.sdk.addons.irobot.Create.previousVel, and com.neuronrobotics.sdk.addons.irobot.Create.send().

| void com.neuronrobotics.sdk.addons.irobot.Create.onChannelEvent | ( | DyIOChannelEvent | e | ) |
On channel event.
| e | the e |
Implements com.neuronrobotics.sdk.dyio.IChannelEventListener.
Definition at line 374 of file Create.java.
References com.neuronrobotics.sdk.addons.irobot.Create.channel, com.neuronrobotics.sdk.common.Log.error(), com.neuronrobotics.sdk.addons.irobot.Create.fireCreatePacket(), com.neuronrobotics.sdk.dyio.peripherals.UARTChannel.getBytes(), com.neuronrobotics.sdk.addons.irobot.CreateSensorRequest.NONE, com.neuronrobotics.sdk.addons.irobot.Create.senReq, and com.neuronrobotics.sdk.addons.irobot.Create.sensor.

| void com.neuronrobotics.sdk.addons.irobot.Create.removeAllCreateSensorListeners | ( | ) |
removeAllCreateSensorListeners clears the list of async packet listeners.
Definition at line 437 of file Create.java.
References com.neuronrobotics.sdk.addons.irobot.Create.listeners.
| void com.neuronrobotics.sdk.addons.irobot.Create.removeCreateSensorListener | ( | ICreateSensorListener | l | ) |
removeCreateSensorListener.
| l | remove the specified listener |
Definition at line 447 of file Create.java.
References com.neuronrobotics.sdk.addons.irobot.Create.listeners.
| void com.neuronrobotics.sdk.addons.irobot.Create.requestSensors | ( | ) |
Request sensors.
Definition at line 331 of file Create.java.
References com.neuronrobotics.sdk.addons.irobot.CreateSensorRequest.ALL.
Referenced by com.neuronrobotics.sdk.addons.irobot.Create.Create(), com.neuronrobotics.sdk.addons.irobot.Create.driveStraightBlocking(), and com.neuronrobotics.sdk.addons.irobot.Create.turnBlocking().
| void com.neuronrobotics.sdk.addons.irobot.Create.requestSensors | ( | CreateSensorRequest | req | ) |
Request sensors.
| req | the req |
Definition at line 340 of file Create.java.
References com.neuronrobotics.sdk.addons.irobot.CreateSensorRequest.getValue(), com.neuronrobotics.sdk.addons.irobot.Create.send(), and com.neuronrobotics.sdk.addons.irobot.Create.senReq.

|
private |
Send.
| b | the b |
| Exception | the exception |
Definition at line 367 of file Create.java.
References com.neuronrobotics.sdk.addons.irobot.Create.channel, and com.neuronrobotics.sdk.dyio.peripherals.UARTChannel.sendBytes().
Referenced by com.neuronrobotics.sdk.addons.irobot.Create.Create(), com.neuronrobotics.sdk.addons.irobot.Create.driveStraight(), com.neuronrobotics.sdk.addons.irobot.Create.InitCreate(), com.neuronrobotics.sdk.addons.irobot.Create.InitCreateBlocking(), com.neuronrobotics.sdk.addons.irobot.Create.move(), com.neuronrobotics.sdk.addons.irobot.Create.requestSensors(), com.neuronrobotics.sdk.addons.irobot.Create.setFullMode(), com.neuronrobotics.sdk.addons.irobot.Create.setLed(), and com.neuronrobotics.sdk.addons.irobot.Create.turn().

| void com.neuronrobotics.sdk.addons.irobot.Create.setFullMode | ( | ) |
Sets the full mode.
Definition at line 81 of file Create.java.
References com.neuronrobotics.sdk.addons.irobot.Create.send().

|
private |
Sets the led.
Definition at line 353 of file Create.java.
References com.neuronrobotics.sdk.addons.irobot.Create.ledState, and com.neuronrobotics.sdk.addons.irobot.Create.send().
Referenced by com.neuronrobotics.sdk.addons.irobot.Create.setLed(), and com.neuronrobotics.sdk.addons.irobot.Create.setStatusLed().

| void com.neuronrobotics.sdk.addons.irobot.Create.setLed | ( | boolean | max, |
| boolean | spot | ||
| ) |
Sets the led.
| max | sets the state of the "max" led |
| spot | sets the state of the "spot" led |
Definition at line 308 of file Create.java.
References com.neuronrobotics.sdk.addons.irobot.Create.ledState, and com.neuronrobotics.sdk.addons.irobot.Create.setLed().

| void com.neuronrobotics.sdk.addons.irobot.Create.setStatusLed | ( | int | color, |
| int | intensity | ||
| ) |
Sets the status led.
| color | Power Color (0 – 255), 0 = green, 255 = red |
| intensity | Power Intensity (0 – 255), 0 = off, 255 = full intensity |
Definition at line 322 of file Create.java.
References com.neuronrobotics.sdk.addons.irobot.Create.ledState, and com.neuronrobotics.sdk.addons.irobot.Create.setLed().

| void com.neuronrobotics.sdk.addons.irobot.Create.turn | ( | short | angle | ) |
Turn.
| angle | degrees Distance from current location to drive |
Definition at line 228 of file Create.java.
Referenced by com.neuronrobotics.sdk.addons.irobot.Create.turn(), and com.neuronrobotics.sdk.addons.irobot.Create.turnBlocking().
| void com.neuronrobotics.sdk.addons.irobot.Create.turn | ( | short | velocity, |
| short | angle | ||
| ) |
Driving macro. This will drive for a distance and stop.
| velocity | mm/s |
| angle | degrees |
Definition at line 236 of file Create.java.
References com.neuronrobotics.sdk.addons.irobot.Create.send(), and com.neuronrobotics.sdk.addons.irobot.Create.turn().

| boolean com.neuronrobotics.sdk.addons.irobot.Create.turnBlocking | ( | int | timeout, |
| short | velocity, | ||
| short | angle | ||
| ) | throws InterruptedException |
Turn blocking.
| timeout | the timeout |
| velocity | the velocity |
| angle | the angle |
| InterruptedException | the interrupted exception |
Definition at line 263 of file Create.java.
References com.neuronrobotics.sdk.common.Log.error(), com.neuronrobotics.sdk.common.Log.info(), com.neuronrobotics.sdk.addons.irobot.Create.myAngle, com.neuronrobotics.sdk.addons.irobot.Create.requestSensors(), and com.neuronrobotics.sdk.addons.irobot.Create.turn().

|
private |
The channel.
Definition at line 46 of file Create.java.
Referenced by com.neuronrobotics.sdk.addons.irobot.Create.Create(), com.neuronrobotics.sdk.addons.irobot.Create.onChannelEvent(), and com.neuronrobotics.sdk.addons.irobot.Create.send().
|
private |
The led state.
Definition at line 49 of file Create.java.
Referenced by com.neuronrobotics.sdk.addons.irobot.Create.setLed(), and com.neuronrobotics.sdk.addons.irobot.Create.setStatusLed().
|
private |
The listeners.
Definition at line 58 of file Create.java.
Referenced by com.neuronrobotics.sdk.addons.irobot.Create.addCreateSensorListener(), com.neuronrobotics.sdk.addons.irobot.Create.fireCreatePacket(), com.neuronrobotics.sdk.addons.irobot.Create.removeAllCreateSensorListeners(), and com.neuronrobotics.sdk.addons.irobot.Create.removeCreateSensorListener().
|
private |
The my angle.
Definition at line 33 of file Create.java.
Referenced by com.neuronrobotics.sdk.addons.irobot.Create.fireCreatePacket(), and com.neuronrobotics.sdk.addons.irobot.Create.turnBlocking().
|
private |
The my distance.
Definition at line 36 of file Create.java.
Referenced by com.neuronrobotics.sdk.addons.irobot.Create.driveStraightBlocking(), and com.neuronrobotics.sdk.addons.irobot.Create.fireCreatePacket().
|
private |
The previous rad.
Definition at line 40 of file Create.java.
Referenced by com.neuronrobotics.sdk.addons.irobot.Create.move().
|
private |
The previous vel.
Definition at line 43 of file Create.java.
Referenced by com.neuronrobotics.sdk.addons.irobot.Create.move().
|
private |
The sen req.
Definition at line 55 of file Create.java.
Referenced by com.neuronrobotics.sdk.addons.irobot.Create.onChannelEvent(), and com.neuronrobotics.sdk.addons.irobot.Create.requestSensors().
|
private |
The sensor.
Definition at line 52 of file Create.java.
Referenced by com.neuronrobotics.sdk.addons.irobot.Create.onChannelEvent().