| | 6 | |
| | 7 | == Toolbox v4.03 == |
| | 8 | The functions of the RWTH - Mindstorms NXT Toolbox can be categorized into a multiple layer structure. On the lowest layer '''Low Level and Helper functions''' are available, which mostly convert parameter modes to bytes words, determined by the LEGO direct commands documentation. The second layer includes '''Direct NXT Commands''' which are mapped from the LEGO direct command documentation without any limitations and can be identified by the ''NXT_*'' prefix. Also Bluetooth packet related functions can be found in this layer. Layer 3 provides '''High Level Functions''' for controlling the NXT motors, sensors and the Bluetooth connection. These functions are basically using the Direct NXT Commands of layer 2 to make the motor and sensor controlling more convenient and easily readable for the user. The top layer provides '''High Level Regulation''' functions for precise motor regulation and various utilities. |
| | 9 | |
| | 10 | {{{ |
| | 11 | #!html |
| | 12 | <br> |
| | 13 | <table border="2" cellpadding="10" align="center"> |
| | 14 | |
| | 15 | <tr bgcolor="#EEEEEE"> |
| | 16 | <td align="center"><b>Layer</b></td> |
| | 17 | <td><b>Description</b></td> |
| | 18 | <td valign="top"><b>Output/Motors</b></td> |
| | 19 | <td valign="top"><b>Input/Sensors</b></td> |
| | 20 | <td valign="top"><b>General</b></td> |
| | 21 | <td valign="top"><b>Bluetooth / USB</b></td> |
| | 22 | </tr> |
| | 23 | |
| | 24 | <!-- Layer 4 --> |
| | 25 | <tr bgcolor="#DDDDFF"> |
| | 26 | <td align="center" width="40"><b>4</b></td> |
| | 27 | <td><b>High Level Regulation / Utilities</b></td> |
| | 28 | <td valign="top"><b>NXTMotor</b><br>.display<br>.ReadFromNXT<br>.SendToNXT<br>.Stop<br>.WaitFor<br>.ResetPosition<br><br><b>NXC_MotorControl<br></td> |
| | 29 | <td valign="top"> </td> |
| | 30 | <td valign="top"><b>OptimizeToolboxPerformance</b><br><br><b>GUI_WatchMotorState</b><br><b>GUI_WatchSensor</b></td> |
| | 31 | <td valign="top"><b>COM_MakeBTConfigFile</b></td> |
| | 32 | </tr> |
| | 33 | |
| | 34 | <!-- Layer 3 --> |
| | 35 | <tr bgcolor="#BBBBFF"> |
| | 36 | <th align="center" rowspan="1"><b>3</b></th> |
| | 37 | <th align="left" rowspan="1"><b>High Level Functions</b></th> |
| | 38 | <td align="left" valign="top"><b>DirectMotorCommand</b><br><br><b>StopMotor</b><br><br><b>SwitchLamp</b><br><br>NXC_ResetErrorCorrection</td> |
| | 39 | <td align="left" valign="top" rowspan="1"><b>OpenLight<br>GetLight<br><br>OpenSound<br>GetSound<br><br>OpenSwitch<br>GetSwitch<br><br>OpenUltrasonic<br>GetUltrasonic<br>USMakeSnapshot<br>USGetSnapshotResults<br><br>OpenAccelerator<br>GetAccelerator<br><br>OpenColor<br>CalibrateColor<br>GetColor<br><br>OpenCompass<br>CalibrateCompass<br>GetCompass<br><br>OpenGyro<br>CalibrateGyro<br>GetGyro<br><br>OpenInfrared<br>GetInfrared<br><br>OpenRFID<br>GetRFID<br><br>CloseSensor</b></td> |
| | 40 | <td align="left" valign="top" rowspan="1"><b>readFromIniFile</b><br><br>MAP_GetCommModule<br>MAP_GetInputModule<br>MAP_GetOutputModule<br>MAP_GetSoundModule<br>MAP_GetUIModule<br><br>MAP_SetOutputModule<br><br>NXC_GetSensorMotorData</td> |
| | 41 | <td align="left" valign="top" rowspan="1"><b>COM_OpenNXT</b><br><b>COM_OpenNXTEx</b><br><br><b>COM_CloseNXT</b><br><br>COM_ReadI2C<br></td> |
| | 42 | </tr> |
| | 43 | |
| | 44 | |
| | 45 | |
| | 46 | <!-- Layer 2 --> |
| | 47 | <tr bgcolor="#9999FF"> |
| | 48 | <td align="center"><b>2</b></td> |
| | 49 | <td><b>Direct NXT Commands</b></td> |
| | 50 | <td valign="top"><b>NXT_SetOutputState<br><br>NXT_GetOutputState<br><br>NXT_ResetMotorPosition</b></td> |
| | 51 | <td valign="top"><b>NXT_SetInputMode<br><br>NXT_GetInputValues</b><br><br>NXT_ResetInputScaledValue<br><br>NXT_LSRead<br>NXT_LSWrite<br>NXT_LSGetStatus</td> |
| | 52 | <td valign="top"><b>NXT_PlayTone</b><br>NXT_PlaySoundFile<br>NXT_StopSoundPlayback<br><br>NXT_StartProgram<br>NXT_GetCurrentProgramName<br>NXT_StopProgram<br><br>NXT_SendKeepAlive<br>NXT_GetBatteryLevel<br>NXT_GetFirmwareVersion<br>NXT_SetBrickName<br><br>NXT_ReadIOMap<br>NXT_WriteIOMap<br><br>NXT_MessageWrite<br>NXT_MessageRead</td> |
| | 53 | <td valign="top">COM_CreatePacket<br>COM_SendPacket<br>COM_CollectPacket<br><br><b>COM_SetDefaultNXT</b><br>COM_GetDefaultNXT<br></td> |
| | 54 | </tr> |
| | 55 | |
| | 56 | <!-- Layer 1 --> |
| | 57 | <tr bgcolor="#7777FF"> |
| | 58 | <td align="center"><b>1</b></td> |
| | 59 | <td><b>Low Level Functions:<br>Helper, Conversion and<br> Lookup Functions</b></td> |
| | 60 | <td valign="top"><b>MOTOR_A<br>MOTOR_B<br>MOTOR_C</b><br><br><i>SetMotor</i> (o)<br><i>SetPower</i> (o)<br><i>SetAngleLimit</i> (o)<br><i>SetRampMode</i> (o)<br><i>SetTurnRatio</i> (o)<br><i>SpeedRegulation</i> (o)<br><i>SyncToMotor</i> (o)<br><i>GetMotor</i> (o)<br><i>SetMemoryCount</i> (o)<br><i>GetMemoryCount</i> (o)<br> |
| | 61 | <br><i>byte2outputmode<br>byte2regmode<br>byte2runstate<br>outputmode2byte<br>regmode2byte<br>runstate2byte</i><br><br><i>initializeGlobalMotorStateVar</i> (o)</td> |
| | 62 | <td valign="top"><b>SENSOR_1<br>SENSOR_2<br>SENSOR_3<br>SENSOR_4</b><br><br><i>byte2sensortype<br>byte2sensormode<br>sensortype2byte<br>sensormode2byte</i><br><br><i>waitUntilI2CReady</i></td> |
| | 63 | <td valign="top"><b>DebugMode</b><br><i>isdebug</i><br><br>textOut<br><br><i>dec2wordbytes<br>name2commandbytes<br>commandbyte2name<br>wordbytes2dec</i></td> |
| | 64 | <td valign="top">checkStatusByte<br><br><i>createHandleStruct</i><br><i>checkHandleStruct</i><br><br><i>getLibusbErrorString</i><br><i>getVISAErrorString</i><br><i>getReplyLengthFromCmdByte</i><br><br><i>fantom_proto</i><br><i>libusb_proto</i></td> |
| | 65 | </tr> |
| | 66 | |
| | 67 | <!-- Legend --> |
| | 68 | <tr bgcolor="#EEEEEE"> |
| | 69 | <td colspan="6" >legend: NXT_* = NXT Direct commands without any limitations (mapped to the LEGO direct command documentation)<br> |
| | 70 | |
| | 71 | COM_* = Functions related to the NXT communication<br> |
| | 72 | |
| | 73 | MAP_* = Functions related to the NXT module maps<br> |
| | 74 | |
| | 75 | NXC_* = Functions communicating with the embedded NXC program MotorControl<br> |
| | 76 | |
| | 77 | <b>bold</b> = Main funcions or main group functions<br> |
| | 78 | |
| | 79 | <i>italic</i> = private functions<br> |
| | 80 | |
| | 81 | (o) = obsolete / deprecated functions (might be removed in a future release) |
| | 82 | </td> |
| | 83 | </tr> |
| | 84 | </table> |
| | 85 | <br> |
| | 86 | }}} |
| | 87 | |
| | 88 | |
| | 89 | |
| | 90 | |