diff --git a/LEGO MINDSTORMS NXT Bluetooth Developer Kit/Appendix 1-LEGO MINDSTORMS NXT Communication protocol.pdf b/LEGO MINDSTORMS NXT Bluetooth Developer Kit/Appendix 1-LEGO MINDSTORMS NXT Communication protocol.pdf new file mode 100755 index 0000000..87c8a19 Binary files /dev/null and b/LEGO MINDSTORMS NXT Bluetooth Developer Kit/Appendix 1-LEGO MINDSTORMS NXT Communication protocol.pdf differ diff --git a/LEGO MINDSTORMS NXT Bluetooth Developer Kit/Appendix 2-LEGO MINDSTORMS NXT Direct commands.pdf b/LEGO MINDSTORMS NXT Bluetooth Developer Kit/Appendix 2-LEGO MINDSTORMS NXT Direct commands.pdf new file mode 100755 index 0000000..d18e587 Binary files /dev/null and b/LEGO MINDSTORMS NXT Bluetooth Developer Kit/Appendix 2-LEGO MINDSTORMS NXT Direct commands.pdf differ diff --git a/LEGO MINDSTORMS NXT Bluetooth Developer Kit/Appendix 3-LEGO MINDSTORMS NXT ARM7 Bluetooth Interface specification.pdf b/LEGO MINDSTORMS NXT Bluetooth Developer Kit/Appendix 3-LEGO MINDSTORMS NXT ARM7 Bluetooth Interface specification.pdf new file mode 100755 index 0000000..6c45fb2 Binary files /dev/null and b/LEGO MINDSTORMS NXT Bluetooth Developer Kit/Appendix 3-LEGO MINDSTORMS NXT ARM7 Bluetooth Interface specification.pdf differ diff --git a/LEGO MINDSTORMS NXT Bluetooth Developer Kit/LEGO MINDSTORMS NXT Bluetooth Developer Kit.pdf b/LEGO MINDSTORMS NXT Bluetooth Developer Kit/LEGO MINDSTORMS NXT Bluetooth Developer Kit.pdf new file mode 100755 index 0000000..927ef0f Binary files /dev/null and b/LEGO MINDSTORMS NXT Bluetooth Developer Kit/LEGO MINDSTORMS NXT Bluetooth Developer Kit.pdf differ diff --git a/LEGO MINDSTORMS NXT Hardware Developer Kit/Appendix 1-LEGO MINDSTORMS NXT hardware schematic.pdf b/LEGO MINDSTORMS NXT Hardware Developer Kit/Appendix 1-LEGO MINDSTORMS NXT hardware schematic.pdf new file mode 100755 index 0000000..1a5b11c Binary files /dev/null and b/LEGO MINDSTORMS NXT Hardware Developer Kit/Appendix 1-LEGO MINDSTORMS NXT hardware schematic.pdf differ diff --git a/LEGO MINDSTORMS NXT Hardware Developer Kit/Appendix 2-LEGO MINDSTORMS NXT Keypad schematic.pdf b/LEGO MINDSTORMS NXT Hardware Developer Kit/Appendix 2-LEGO MINDSTORMS NXT Keypad schematic.pdf new file mode 100755 index 0000000..c17b9bd Binary files /dev/null and b/LEGO MINDSTORMS NXT Hardware Developer Kit/Appendix 2-LEGO MINDSTORMS NXT Keypad schematic.pdf differ diff --git a/LEGO MINDSTORMS NXT Hardware Developer Kit/Appendix 3-LEGO MINDSTORMS NXT Light Sensor hardware schematic.pdf b/LEGO MINDSTORMS NXT Hardware Developer Kit/Appendix 3-LEGO MINDSTORMS NXT Light Sensor hardware schematic.pdf new file mode 100755 index 0000000..a8333b1 Binary files /dev/null and b/LEGO MINDSTORMS NXT Hardware Developer Kit/Appendix 3-LEGO MINDSTORMS NXT Light Sensor hardware schematic.pdf differ diff --git a/LEGO MINDSTORMS NXT Hardware Developer Kit/Appendix 4-LEGO MINDSTORMS NXT Sound Sensor hardware schematic.pdf b/LEGO MINDSTORMS NXT Hardware Developer Kit/Appendix 4-LEGO MINDSTORMS NXT Sound Sensor hardware schematic.pdf new file mode 100755 index 0000000..86152eb Binary files /dev/null and b/LEGO MINDSTORMS NXT Hardware Developer Kit/Appendix 4-LEGO MINDSTORMS NXT Sound Sensor hardware schematic.pdf differ diff --git a/LEGO MINDSTORMS NXT Hardware Developer Kit/Appendix 5-LEGO MINDSTORMS NXT Touch Sensor hardware schematic.pdf b/LEGO MINDSTORMS NXT Hardware Developer Kit/Appendix 5-LEGO MINDSTORMS NXT Touch Sensor hardware schematic.pdf new file mode 100755 index 0000000..0e41bda Binary files /dev/null and b/LEGO MINDSTORMS NXT Hardware Developer Kit/Appendix 5-LEGO MINDSTORMS NXT Touch Sensor hardware schematic.pdf differ diff --git a/LEGO MINDSTORMS NXT Hardware Developer Kit/Appendix 6-LEGO MINDSTORMS NXT Ultrasonic Sensor hardware schematic.pdf b/LEGO MINDSTORMS NXT Hardware Developer Kit/Appendix 6-LEGO MINDSTORMS NXT Ultrasonic Sensor hardware schematic.pdf new file mode 100755 index 0000000..e357787 Binary files /dev/null and b/LEGO MINDSTORMS NXT Hardware Developer Kit/Appendix 6-LEGO MINDSTORMS NXT Ultrasonic Sensor hardware schematic.pdf differ diff --git a/LEGO MINDSTORMS NXT Hardware Developer Kit/Appendix 7-LEGO MINDSTORMS NXT Ultrasonic Sensor I2C communication protocol.pdf b/LEGO MINDSTORMS NXT Hardware Developer Kit/Appendix 7-LEGO MINDSTORMS NXT Ultrasonic Sensor I2C communication protocol.pdf new file mode 100755 index 0000000..eb86aa5 Binary files /dev/null and b/LEGO MINDSTORMS NXT Hardware Developer Kit/Appendix 7-LEGO MINDSTORMS NXT Ultrasonic Sensor I2C communication protocol.pdf differ diff --git a/LEGO MINDSTORMS NXT Hardware Developer Kit/Appendix 8-LEGO MINDSTORMS NXT ARM7 Bluetooth Interface specification.pdf b/LEGO MINDSTORMS NXT Hardware Developer Kit/Appendix 8-LEGO MINDSTORMS NXT ARM7 Bluetooth Interface specification.pdf new file mode 100755 index 0000000..c5493e1 Binary files /dev/null and b/LEGO MINDSTORMS NXT Hardware Developer Kit/Appendix 8-LEGO MINDSTORMS NXT ARM7 Bluetooth Interface specification.pdf differ diff --git a/LEGO MINDSTORMS NXT Hardware Developer Kit/LEGO MINDSTORMS NXT Hardware Developer Kit.pdf b/LEGO MINDSTORMS NXT Hardware Developer Kit/LEGO MINDSTORMS NXT Hardware Developer Kit.pdf new file mode 100755 index 0000000..d49fcc0 Binary files /dev/null and b/LEGO MINDSTORMS NXT Hardware Developer Kit/LEGO MINDSTORMS NXT Hardware Developer Kit.pdf differ diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/SDKdoc_Download1.pdf b/LEGO MINDSTORMS NXT Software Developer Kit/SDKdoc_Download1.pdf new file mode 100755 index 0000000..9eda99b Binary files /dev/null and b/LEGO MINDSTORMS NXT Software Developer Kit/SDKdoc_Download1.pdf differ diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/fantom.chm b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/fantom.chm new file mode 100755 index 0000000..3ba6f22 Binary files /dev/null and b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/fantom.chm differ diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/MajorClasses.jpg b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/MajorClasses.jpg new file mode 100755 index 0000000..e16adbb Binary files /dev/null and b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/MajorClasses.jpg differ diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/ProtocolCommands.jpg b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/ProtocolCommands.jpg new file mode 100755 index 0000000..a5840be Binary files /dev/null and b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/ProtocolCommands.jpg differ diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/annotated.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/annotated.html new file mode 100755 index 0000000..138f280 --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/annotated.html @@ -0,0 +1,19 @@ +
+ + +nFANTOM100::iFile | Interface to a file on a LEGO MINDSTORMS NXT |
nFANTOM100::iFileIterator | Interface to an iterator for files on a LEGO MINDSTORMS NXT |
nFANTOM100::iModule | Interface to a firmware module on a LEGO MINDSTORMS NXT |
nFANTOM100::iModuleIterator | Interface to an iterator for firmware modules on a LEGO MINDSTORMS NXT |
nFANTOM100::iNXT | Interface to a LEGO MINDSTORMS NXT |
nFANTOM100::iNXTIterator | Interface to an iterator for LEGO MINDSTORMS NXTs |
nFANTOM100::tStatus | Class that contains a status code and the file name and line number where that status code was generated |
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iFile-members.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iFile-members.html new file mode 100755 index 0000000..bce4186 --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iFile-members.html @@ -0,0 +1,25 @@ + + + + [pure virtual]
[pure virtual]
[pure virtual]
[pure virtual]
[pure virtual]
[pure virtual]
[pure virtual]
[pure virtual]
[pure virtual]
[pure virtual]
[pure virtual]
[friend]
[pure virtual]
[protected, pure virtual]
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iFile.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iFile.html new file mode 100755 index 0000000..c6878fd --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iFile.html @@ -0,0 +1,586 @@ + + + +
+#include <iFile.h>
+
Public Methods | |
virtual void | getName (ViChar fileName[]) const=0 |
Retrieves the name of this file. More... | |
virtual ViUInt32 | getSize (tStatus &status)=0 |
Retrieves the total size of this file in bytes. More... | |
virtual ViUInt32 | getAvailableSize (tStatus &status)=0 |
Retrieves the remaining available size, in bytes, in this file. More... | |
virtual void | openForRead (tStatus &status)=0 |
Opens this file for reading. More... | |
virtual void | openForWrite (ViUInt32 sizeInBytes, tStatus &status)=0 |
Open this file for writing. More... | |
virtual void | openForLinearWrite (ViUInt32 sizeInBytes, tStatus &status)=0 |
Open this file for linear (contiguous) writing. More... | |
virtual void | openForDataWrite (ViUInt32 sizeInBytes, tStatus &status)=0 |
Open this data file for writing. More... | |
virtual void | openForDataAppend (tStatus &status)=0 |
Open this data file for appending additional data. More... | |
virtual void | close (tStatus &status)=0 |
Closes this file. More... | |
virtual ViUInt32 | read (ViPBuf bufferPtr, ViUInt32 numberOfBytes, tStatus &status)=0 |
Reads from this file. More... | |
virtual ViUInt32 | write (const ViByte bufferPtr[], ViUInt32 numberOfBytes, tStatus &status)=0 |
Writes to this file. More... | |
virtual void | remove (tStatus &status)=0 |
Removes this file. More... | |
Protected Methods | |
+virtual | ~iFile ()=0 |
Destructor. | |
Friends | |
+class | tNXT |
+
+
+
|
+
+ + | +
+
+ +Closes this file. + +Closes the file that corresponds to this object on the associated NXT. The file is not closed if the specified status is fatal.
|
+
+
+
|
+
+ + | +
+
+ +Retrieves the remaining available size, in bytes, in this file. + +This number is only helpful for data logging files, which can contain variable amounts of data. The returned size is undefined if the specified status is fatal.
|
+
+
+
|
+
+ + | +
+
+ +Retrieves the name of this file. + +
|
+
+
+
|
+
+ + | +
+
+ +Retrieves the total size of this file in bytes. + +The returned size is undefined if the specified status is fatal.
|
+
+
+
|
+
+ + | +
+
+ +Open this data file for appending additional data. + +Opens, for appending additional data, the data file that corresponds to this object on the associated NXT. If this file doesn't exist on the NXT, the behavior is undefined. If this file does exist on the NXT, the data that is written is appended to the end of the exiting data. The file is not opened if the specified status is fatal.
|
+
+
+
|
+
+ + | +
+
+ +Open this data file for writing. + +Opens, for writing, the data file that corresponds to this object on the associated NXT. This data file differs from normal files in that a data file can be closed before the entire file has been written. If this file doesn't exist on the NXT, it is created. If this file does exist on the NXT, an error is generated. The file is not opened if the specified status is fatal.
|
+
+
+
|
+
+ + | +
+
+ +Open this file for linear (contiguous) writing. + +Opens, for linear (contiguous) writing, the file that corresponds to this object on the associated NXT. If this file doesn't exist on the NXT, it is created. If this file does exist on the NXT, an error is generated. The file is not opened if the specified status is fatal.
|
+
+
+
|
+
+ + | +
+
+ +Opens this file for reading. + +Opens, for reading, the file that corresponds to this object on the associated NXT. The file is not opened if the specified status is fatal.
|
+
+
+
|
+
+ + | +
+
+ +Open this file for writing. + +Opens, for writing, the file that corresponds to this object on the associated NXT. If this file doesn't exist on the NXT, it is created. If this file does exist on the NXT, an error is generated. The file is not opened if the specified status is fatal.
|
+
+
+
|
+
+ + | +
+
+ +Reads from this file. + +Reads the specified number of bytes from this file into the specified buffer. No data is read if the specified status is fatal. The ownership of the buffer is not transferred to this file object.
|
+
+
+
|
+
+ + | +
+
+ +Removes this file. + +Removes the file that corresponds to this object on the associated NXT. The file is not removed if the specified status is fatal.
|
+
+
+
|
+
+ + | +
+
+ +Writes to this file. + +Writes the specified number of bytes from the specified buffer to this file. No data is written if the specified status is fatal. The ownership of the buffer is not transferred to this file object.
|
+
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iFileIterator-members.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iFileIterator-members.html new file mode 100755 index 0000000..6903598 --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iFileIterator-members.html @@ -0,0 +1,17 @@ + + + + [pure virtual]
[pure virtual]
[pure virtual]
[pure virtual]
[friend]
[protected, pure virtual]
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iFileIterator.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iFileIterator.html new file mode 100755 index 0000000..cebf200 --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iFileIterator.html @@ -0,0 +1,202 @@ + + + +
+#include <iFileIterator.h>
+
Public Methods | |
virtual iFile * | getFile (tStatus &status)=0 |
Creates a file object for the file referenced by this iterator. More... | |
virtual void | advance (tStatus &status)=0 |
Advances this iterator. More... | |
virtual void | getName (ViChar fileName[], tStatus &status)=0 |
Retrieves the name of the file to which this iterator refers. More... | |
virtual ViUInt32 | getSize (tStatus &status)=0 |
Retrieves the total size, in bytes, of the file to which this iterator refers. More... | |
Protected Methods | |
+virtual | ~iFileIterator ()=0 |
Destructor. | |
Friends | |
+class | tNXT |
+
+
+
|
+
+ + | +
+
+ +Advances this iterator. + +Advances this iterator to the next file that matches the previously specified file name pattern. If no more files match, this iterator is advanced to the end of the list. The iterator is not advanced if the specified status is fatal. If this iterator is already at the end of the list, a fatal status will be generated.
|
+
+
+
|
+
+ + | +
+
+ +Creates a file object for the file referenced by this iterator. + +Creates file object for the file referenced by this iterator. An object is not created if the specified status is fatal or if this iterator refers to the end of the list. The returned file object should be destroyed using the iNXT::destroyFile method.
|
+
+
+
|
+
+ + | +
+
+ +Retrieves the name of the file to which this iterator refers. + +
|
+
+
+
|
+
+ + | +
+
+ +Retrieves the total size, in bytes, of the file to which this iterator refers. + +
|
+
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iModule-members.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iModule-members.html new file mode 100755 index 0000000..5c3bb5c --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iModule-members.html @@ -0,0 +1,19 @@ + + + + [pure virtual]
[pure virtual]
[pure virtual]
[pure virtual]
[pure virtual]
[friend]
[pure virtual]
[protected, pure virtual]
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iModule.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iModule.html new file mode 100755 index 0000000..b6d012f --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iModule.html @@ -0,0 +1,315 @@ + + + +
+#include <iModule.h>
+
Public Methods | |
virtual void | getName (ViChar moduleName[]) const=0 |
Retrieves the name of this module. More... | |
virtual ViUInt32 | getModuleID (void) const=0 |
Retrieves the internal module ID of this module. More... | |
virtual ViUInt32 | getModuleSize (void) const=0 |
Retrieves the size in bytes of this module. More... | |
virtual ViUInt32 | getModuleIOMapSize (void) const=0 |
Retrieves the size in bytes of the I/O map associated with this module. More... | |
virtual ViUInt32 | readIOMap (ViUInt32 offsetInBytes, ViUInt32 numberOfBytes, ViPBuf dataBufferPtr, tStatus &status)=0 |
Reads a portion of this module's I/O map. More... | |
virtual ViUInt32 | writeIOMap (ViUInt32 offsetInBytes, ViUInt32 numberOfBytes, const ViByte dataBufferPtr[], tStatus &status)=0 |
Writes a portion of this module's I/O map. More... | |
Protected Methods | |
+virtual | ~iModule ()=0 |
Destructor. | |
Friends | |
+class | tNXT |
+
+
+
|
+
+ + | +
+
+ +Retrieves the internal module ID of this module. + +
|
+
+
+
|
+
+ + | +
+
+ +Retrieves the size in bytes of the I/O map associated with this module. + +
|
+
+
+
|
+
+ + | +
+
+ +Retrieves the size in bytes of this module. + +
|
+
+
+
|
+
+ + | +
+
+ +Retrieves the name of this module. + +
|
+
+
+
|
+
+ + | +
+
+ +Reads a portion of this module's I/O map. + +Reads the data located at [I/O map address] + [specified offset in bytes] into the specified data buffer. The read will attempt to copy the specified number of bytes. No read occurs if the specified status is fatal. The ownership of data buffer is not transferred to this module object.
|
+
+
+
|
+
+ + | +
+
+ +Writes a portion of this module's I/O map. + +Writes the specified data into this module's I/O map. The write starts at [I/O map address] + [specified offset in bytes] and stops after the specified number of bytes have been written. No write occurs if the specified status is fatal. The ownership of data buffer is not transferred to this module object.
|
+
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iModuleIterator-members.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iModuleIterator-members.html new file mode 100755 index 0000000..5709eb6 --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iModuleIterator-members.html @@ -0,0 +1,16 @@ + + + + [pure virtual]
[pure virtual]
[pure virtual]
[friend]
[protected, pure virtual]
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iModuleIterator.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iModuleIterator.html new file mode 100755 index 0000000..c4f1353 --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iModuleIterator.html @@ -0,0 +1,161 @@ + + + +
+#include <iModuleIterator.h>
+
Public Methods | |
virtual iModule * | getModule (tStatus &status)=0 |
Creates a module object for the module referenced by this iterator. More... | |
virtual void | advance (tStatus &status)=0 |
Advances this iterator. More... | |
virtual void | getName (ViChar moduleName[], tStatus &status)=0 |
Retrieves the name of the module to which this iterator refers. More... | |
Protected Methods | |
+virtual | ~iModuleIterator ()=0 |
Destructor. | |
Friends | |
+class | tNXT |
+
+
+
|
+
+ + | +
+
+ +Advances this iterator. + +Advances this iterator to the next module that matches the previously specified module name pattern. If no more modules match, this iterator is advanced to the end of the list. The iterator is not advanced if the specified status is fatal. If this iterator is already at the end of the list, a fatal status will be generated.
|
+
+
+
|
+
+ + | +
+
+ +Creates a module object for the module referenced by this iterator. + +Creates a module object for the module referenced by this iterator. An object is not created if the specified status is fatal or if this iterator refers to the end of the list. The returned module object should be destroyed using the iNXT::destroyModule method.
|
+
+
+
|
+
+ + | +
+
+ +Retrieves the name of the module to which this iterator refers. + +
|
+
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iNXT-members.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iNXT-members.html new file mode 100755 index 0000000..3ccee17 --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iNXT-members.html @@ -0,0 +1,43 @@ + + + + [pure virtual]
[pure virtual]
[pure virtual]
[pure virtual]
[pure virtual]
[pure virtual]
[static]
[static]
[pure virtual]
[pure virtual]
[pure virtual]
[pure virtual]
[static]
[static]
[pure virtual]
[pure virtual]
[static]
[pure virtual]
[pure virtual]
[pure virtual]
[static]
[static]
[pure virtual]
[pure virtual]
[pure virtual]
[pure virtual]
[pure virtual]
[static]
[pure virtual]
[protected, pure virtual]
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iNXT.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iNXT.html new file mode 100755 index 0000000..b0e273c --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iNXT.html @@ -0,0 +1,1422 @@ + + + +
+#include <iNXT.h>
+
Public Types | |
enum | tBuffer { + kBufferStandard, + + kBufferHighSpeed + + } |
Enumeration of buffer types on the NXT. | |
Public Methods | |
virtual iFile * | createFile (ViConstString fileName, tStatus &status)=0 |
Creates a file object for the file with the specified name on this NXT. More... | |
virtual void | destroyFile (iFile *filePtr)=0 |
Destroys the specified file object. More... | |
virtual iFileIterator * | createFileIterator (ViConstString fileNamePattern, tStatus &status)=0 |
Creates an iterator to the files on this NXT. More... | |
virtual void | destroyFileIterator (iFileIterator *fileIteratorPtr)=0 |
Destroys the specified file iterator. More... | |
virtual iModule * | createModule (ViConstString moduleName, ViUInt32 moduleID, ViUInt32 moduleSizeInBytes, ViUInt32 ioMapSizeInBytes, tStatus &status)=0 |
Creates a module object for the module with the specified name on this NXT. More... | |
virtual void | destroyModule (iModule *modulePtr)=0 |
Destroys the specified module object. More... | |
virtual iModuleIterator * | createModuleIterator (ViConstString moduleNamePattern, tStatus &status)=0 |
Creates an iterator to the modules on this NXT. More... | |
virtual void | destroyModuleIterator (iModuleIterator *moduleIteratorPtr)=0 |
Destroys the specified module iterator. More... | |
virtual void | getFirmwareVersion (ViUInt8 &protocolVersionMajorRef, ViUInt8 &protocolVersionMinorRef, ViUInt8 &firmwareVersionMajorRef, ViUInt8 &firmwareVersionMinorRef, tStatus &status)=0 |
Retrieves the firmware version of this NXT. More... | |
virtual ViUInt32 | sendDirectCommand (ViBoolean requireResponse, const ViByte commandBufferPtr[], ViUInt32 commandBufferSizeInBytes, ViPBuf responseBufferPtr, ViUInt32 responseBufferSizeInBytes, tStatus &status)=0 |
Sends the specified direct command to this NXT. More... | |
virtual void | downloadFirmware (const ViByte firmwareBufferPtr[], ViUInt32 firmwareBufferSizeInBytes, tStatus &status)=0 |
Downloads firmware to this NXT. More... | |
virtual ViUInt32 | write (const ViByte bufferPtr[], ViUInt32 numberOfBytes, tStatus &status)=0 |
Writes, in a generic fashion, to this NXT. More... | |
virtual ViUInt32 | read (ViPBuf bufferPtr, ViUInt32 numberOfBytes, tStatus &status)=0 |
Reads, in a generic fashion, from this NXT. More... | |
virtual void | bootIntoFirmwareDownloadMode (tStatus &status)=0 |
Reboots this NXT into firmware-download mode. More... | |
virtual void | setName (ViConstString newName, tStatus &status)=0 |
Sets the name of this NXT. More... | |
virtual void | getDeviceInfo (ViChar name[], ViByte bluetoothAddress[], ViUInt8 signalStrength[], ViUInt32 &availableFlash, tStatus &status)=0 |
Retrieves basic information about this NXT. More... | |
virtual void | eraseUserFlash (tStatus &status)=0 |
Erases all files from this NXT, leaving only the firmware. More... | |
+virtual ViUInt32 | pollAvailableLength (tBuffer bufferSelector, tStatus &status)=0 |
Polls the data buffer on this NXT for the number of bytes available to be read. | |
virtual ViUInt32 | readBufferData (ViPBuf dataBuffer, tBuffer bufferSelector, ViUInt32 numberOfBytesToRead, tStatus &status)=0 |
Reads data from the data buffer on this NXT. More... | |
+virtual void | getResourceString (ViChar resourceString[], tStatus &status)=0 |
Retrieves the resource string for this NXT's session. | |
+virtual void | bluetoothFactoryReset (tStatus &status)=0 |
Resets the Bluetooth module on this NXT to its factory settings. | |
Static Public Methods | |
nFANTOM100_kExport iNXT *_VI_FUNCC | createNXT (ViConstString resourceString, tStatus &status, ViBoolean checkFirmwareVersion=true) |
Creates an NXT object. More... | |
nFANTOM100_kExport void _VI_FUNCC | destroyNXT (iNXT *nxtPtr) |
Destroys an NXT object. More... | |
nFANTOM100_kExport iNXTIterator +*_VI_FUNCC | createNXTIterator (ViBoolean searchBluetooth, ViUInt32 bluetoothSearchTimeoutInSeconds, tStatus &status) |
Creates an NXT iterator. More... | |
+nFANTOM100_kExport void _VI_FUNCC | destroyNXTIterator (iNXTIterator *iterPtr) |
Destroys an NXT iterator object. | |
nFANTOM100_kExport void _VI_FUNCC | pairBluetooth (ViConstString resourceName, ViConstString passkey, ViChar pairedResourceName[], tStatus &status) |
Pairs with an NXT via Bluetooth. More... | |
nFANTOM100_kExport void _VI_FUNCC | unpairBluetooth (ViConstString resourceName, tStatus &status) |
Unpairs with an NXT via Bluetooth. More... | |
nFANTOM100_kExport ViBoolean +_VI_FUNCC | isPaired (ViConstString resourceName, tStatus &status) |
Determines if the NXT associated with the specified resource string is paired. More... | |
nFANTOM100_kExport void | findDeviceInFirmwareDownloadMode (ViChar resourceName[], tStatus &status) |
Finds the NXT that is currently in firmware-download mode. More... | |
Protected Methods | |
+virtual | ~iNXT ()=0 |
Destructor. |
+
+
+
|
+
+ + | +
+
+ +Reboots this NXT into firmware-download mode. + +This is required before invoking the downloadFirmware method. The reboot does not occur is the specified status is fatal.
|
+
+
+
|
+
+ + | +
+
+ +Creates a file object for the file with the specified name on this NXT. + +Invoking this method does not actually create a file on the NXT. Rather, this method creates a file object which may be used to open a file on this NXT, for reading or writing, or may be used to delete a file on the NXT. A file is not created if the specified status is fatal. The returned file object should be destroyed using the iNXT::destroyFile method.
|
+
+
+
|
+
+ + | +
+
+ +Creates an iterator to the files on this NXT. + +The iterator traverses those files on this NXT that match the specified file name pattern. The iterator is not created if the specified status is fatal. The returned file iterator object should be destroyed using the iNXT::destroyFileIterator method.
|
+
+
+
|
+
+ + | +
+
+ +Creates a module object for the module with the specified name on this NXT. + +Invoking this method does not actually create a module on the NXT. Rather, this method creates a module object which may be used to access an I/O map on this NXT. A module is not created if the specified status is fatal. The returned module object should be destroyed using the iNXT::destroyModule method.
|
+
+
+
|
+
+ + | +
+
+ +Creates an iterator to the modules on this NXT. + +The iterator traverses those modules on this NXT that match the specified module name pattern. The iterator is not created if the specified status is fatal. The returned module iterator object should be destroyed using the iNXT::destroyModuleIterator method.
|
+
+
+
|
+
+ + | +
+
+ +Creates an NXT object. + +Creates an NXT object representing the specified NXT. The NXT object is not created if the specified status is fatal. The returned NXT object should be destroyed using the iNXT::destroyNXT method.
|
+
+
+
|
+
+ + | +
+
+ +Creates an NXT iterator. + +The NXT iterator can be used to find all NXTs that are connected (USB) or in range (Bluetooth). The NXT iterator is not created if the specified status is fatal. The returned NXT iterator object should be destroyed using the iNXT::destroyNXTIterator method.
|
+
+
+
|
+
+ + | +
+
+ +Destroys the specified file object. + +Invoking this method does not actually delete a file on the NXT. Rather, this method destroys a file object which may have been used to open a file on this NXT for reading or writing, or may have been used to delete a file on the NXT.
|
+
+
+
|
+
+ + | +
+
+ +Destroys the specified file iterator. + +
|
+
+
+
|
+
+ + | +
+
+ +Destroys the specified module object. + +Invoking this method does not actually delete a module on this NXT. Rather, this method destroys a module object which may have been used to access an I/O map on this NXT.
|
+
+
+
|
+
+ + | +
+
+ +Destroys the specified module iterator. + +
|
+
+
+
|
+
+ + | +
+
+ +Destroys an NXT object. + +
|
+
+
+
|
+
+ + | +
+
+ +Downloads firmware to this NXT. + +The NXT must already be in firmware-download mode.
|
+
+
+
|
+
+ + | +
+
+ +Erases all files from this NXT, leaving only the firmware. + +All programs, sounds, and data logs are erased. The erasure does not occur if specified status is fatal.
|
+
+
+
|
+
+ + | +
+
+ +Finds the NXT that is currently in firmware-download mode. + +Note that only a single NXT may be in firmware-download mode at a time.
|
+
+
+
|
+
+ + | +
+
+ +Retrieves basic information about this NXT. + +Retrieves the name of this NXT, its Bluetooth address, the Bluetooth signal strength, and the number of bytes available. Information retrieval is not done if specified status is fatal.
|
+
+
+
|
+
+ + | +
+
+ +Retrieves the firmware version of this NXT. + +Returns the protocol and firmware versions installed on this NXT. The current version of this driver supports a protocol major version number of 1 and a firmware major version number of 1. If either of these major version numbers is a value other than 1, the driver will not attempt to communicate to the NXT. The returned versions are undefined if the specified status is fatal.
|
+
+
+
|
+
+ + | +
+
+ +Determines if the NXT associated with the specified resource string is paired. + +The determination is not done if the specified status is fatal.
|
+
+
+
|
+
+ + | +
+
+ +Pairs with an NXT via Bluetooth. + +Programmatically pairs the specified NXT to this computer and, on Windows, creates a virtual serial port to use for communication with that NXT. However, clients should not depend on the creation of this virtual serial port. The pairing is not done if the specified status is fatal.
|
+
+
+
|
+
+ + | +
+
+ +Reads, in a generic fashion, from this NXT. + +Reads a response directly from this NXT. In general, this method isn't used and, instead, the sendDirectCommand and other more specific methods are invoked when communication to the NXT. The command is not sent if the specified status is fatal.
|
+
+
+
|
+
+ + | +
+
+ +Reads data from the data buffer on this NXT. + +Data is not read if the specified status is fatal.
|
+
+
+
|
+
+ + | +
+
+ +Sends the specified direct command to this NXT. + +For more information on direct commands, refer to the LEGO MINDSTORMS NXT Direct commands document. The command is not sent if the specified status is fatal. The command buffer must be non-NULL and the command buffer size in bytes must be non-zero. If require response is set to true, the response buffer must be non-NULL and the response buffer size in bytes must be non-zero. If require response is set to false, the response buffer must be NULL and the response buffer size in bytes must be zero. Both of the buffer size parameters must be small enough to fit in one packet for whichever bus the NXT is connected over (USB or Bluetooth). This means the maximum length for a direct command over USB is 63 bytes; over Bluetooth, 65,533 bytes. If any of these requirements are violated, VI_ERROR_USER_BUF will be returned.
|
+
+
+
|
+
+ + | +
+
+ +Sets the name of this NXT. + +The specified name will be displayed on the NXT, show up during Bluetooth scans, and returned when the getDeviceInfo method is called.
|
+
+
+
|
+
+ + | +
+
+ +Unpairs with an NXT via Bluetooth. + +Programmatically destroys the Bluetooth pairing that was previously established between this computer and the specified NXT. On Mac OS X, this method has no effect and doesn't generate a fatal status. The unpairing is not done if the specified status is fatal.
|
+
+
+
|
+
+ + | +
+
+ +Writes, in a generic fashion, to this NXT. + +Writes a command directly to this NXT. In general, this method isn't used and, instead, the sendDirectCommand and other more specific methods are invoked when communication to the NXT. The write doesn not occur if the specified status is fatal.
|
+
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iNXTIterator-members.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iNXTIterator-members.html new file mode 100755 index 0000000..3115ac0 --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iNXTIterator-members.html @@ -0,0 +1,16 @@ + + + + [pure virtual]
[pure virtual]
[pure virtual]
[friend]
[protected, pure virtual]
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iNXTIterator.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iNXTIterator.html new file mode 100755 index 0000000..43eff57 --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1iNXTIterator.html @@ -0,0 +1,76 @@ + + + +
+#include <iNXTIterator.h>
+
Public Methods | |
+virtual void | getName (ViChar resourceName[], tStatus &status) const=0 |
Retrieves the name of the NXT to which this iterator refers. | |
virtual void | advance (tStatus &status)=0 |
Advances this iterator. More... | |
+virtual iNXT * | getNXT (tStatus &status)=0 |
Creates an NXT object for the NXT referenced by this iterator. | |
Protected Methods | |
+virtual | ~iNXTIterator ()=0 |
Destructor. | |
Friends | |
+class | iNXT |
+
+
+
|
+
+ + | +
+
+ +Advances this iterator. + +Advances this iterator to the next NXT that was found. If no more NXTs are found, this iterator is advanced to the end of the list. The iterator is not advanced if the specified status is fatal. If this iterator is already at the end of the list, a fatal status will be generated.
|
+
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1tStatus-members.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1tStatus-members.html new file mode 100755 index 0000000..a092259 --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1tStatus-members.html @@ -0,0 +1,26 @@ + + + + [private]
[private]
[private]
[inline]
[inline]
[inline]
[inline]
[inline]
[inline]
[inline]
[inline]
[inline]
[private]
[private]
[inline]
[inline]
[inline]
[inline]
[inline]
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1tStatus.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1tStatus.html new file mode 100755 index 0000000..abe406a --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/classnFANTOM100_1_1tStatus.html @@ -0,0 +1,560 @@ + + + +
+#include <tStatus.h>
+
Public Methods | |
tStatus (void) | |
constructor. More... | |
tStatus (const tStatus &status) | |
copy constructor. More... | |
tStatus (ViStatus code, const char *fileName, ViUInt32 lineNumber) | |
constructor with code, filename, and line number. More... | |
+ | ~tStatus () |
destructor. | |
ViStatus | getCode (void) const |
Returns the status code for this status object. More... | |
const char * | getFileName (void) const |
Returns the file name in which the status code, for this status object, was generated. More... | |
ViUInt32 | getLineNumber (void) const |
Returns the line number at which the status code, for this status object, was. More... | |
void | setCode (ViStatus code, const char *fileName, ViUInt32 lineNumber) |
Sets the status code, file name, and line number for this status object, if. More... | |
void | assign (const tStatus &status) |
Assigns the specified status object to this status object, if appropriate. More... | |
void | clear (void) |
Clears the status code for this status object. More... | |
bool | isFatal (void) const |
Returns true if this status object contains a status code that is fatal. More... | |
bool | isNotFatal (void) const |
Returns true if this status object contains a status code that is not fatal. More... | |
bool | isWarning (void) const |
Returns true if this status object contains a status code that is a warning. More... | |
bool | isSuccess (void) const |
Returns true if this status object contains the status code for success. More... | |
Private Types | |
enum | { kMaxFileNameLength = 101 + } |
Private Methods | |
+tStatus & | operator= (const tStatus &rhs) |
Private Attributes | |
+ViStatus | _code |
+ViChar | _fileName [kMaxFileNameLength] |
+ViUInt32 | _lineNumber |
+
+
+
|
+
+ + | +
+
+ +constructor. + +Creates a tStatus object intialized to success. + +
|
+
+
+
|
+
+ + | +
+
+ +copy constructor. + +Copies the code, line number, and file name from the specified tStatus object.
|
+
+
+
|
+
+ + | +
+
+ +constructor with code, filename, and line number. + +Creates a tStatus object initialized to the specified code, file name, and line number. Note that the nFANTOM_mLocation macro can be used to pass the fileName and lineNumber parameters.
|
+
+
+
|
+
+ + | +
+
+ +Assigns the specified status object to this status object, if appropriate. + +Stores the status code, file name, and line number of the specified status object in this status object if this status object contains a successful status code or if this status object contains a warning status code and the status code of the speciied status object is fatal. A fatal status code is denoted by a negative value. A successful status code is denoted by VI_SUCCESS.
|
+
+
+
|
+
+ + | +
+
+ +Clears the status code for this status object. + +
|
+
+
+
|
+
+ + | +
+
+ +Returns the status code for this status object. + +
|
+
+
+
|
+
+ + | +
+
+ +Returns the file name in which the status code, for this status object, was generated. + +
|
+
+
+
|
+
+ + | +
+
+ +Returns the line number at which the status code, for this status object, was. + +
|
+
+
+
|
+
+ + | +
+
+ +Returns true if this status object contains a status code that is fatal. + +A status code with a negative value is considered fatal. + +
|
+
+
+
|
+
+ + | +
+
+ +Returns true if this status object contains a status code that is not fatal. + +Any status code with a non-negative (including zero) value is considered non-fatal. + +
|
+
+
+
|
+
+ + | +
+
+ +Returns true if this status object contains the status code for success. + +A value of VI_SUCCESS represents success. + +
|
+
+
+
|
+
+ + | +
+
+ +Returns true if this status object contains a status code that is a warning. + +A status code with a non-zero, positive value is considered a warning. + +
|
+
+
+
|
+
+ + | +
+
+ +Sets the status code, file name, and line number for this status object, if. + +Stores the specified status code, file name, and line number in this status object if this status object contains a successful status code or if this status object contains a warning status code and the specified status code is fatal. A fatal status code is denoted by a negative value. A successful status code is denoted by VI_SUCCESS.
|
+
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/doxygen.css b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/doxygen.css new file mode 100755 index 0000000..c87eb8f --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/doxygen.css @@ -0,0 +1,23 @@ +H1 { text-align: center; } +A.qindex {} +A.qindexRef {} +A.el { text-decoration: none; font-weight: bold } +A.elRef { font-weight: bold } +A.code { text-decoration: none; font-weight: normal; color: #4444ee } +A.codeRef { font-weight: normal; color: #4444ee } +A:hover { text-decoration: none; background-color: #f2f2ff } +DL.el { margin-left: -1cm } +DIV.fragment { width: 100%; border: none; background-color: #eeeeee } +DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px } +TD.md { background-color: #f2f2ff; font-weight: bold; } +TD.mdname1 { background-color: #f2f2ff; font-weight: bold; color: #602020; } +TD.mdname { background-color: #f2f2ff; font-weight: bold; color: #602020; width: 600px; } +DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold } +DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller } +FONT.keyword { color: #008000 } +FONT.keywordtype { color: #604020 } +FONT.keywordflow { color: #e08000 } +FONT.comment { color: #800000 } +FONT.preprocessor { color: #806020 } +FONT.stringliteral { color: #002080 } +FONT.charliteral { color: #008080 } diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/doxygen.gif b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/doxygen.gif new file mode 100755 index 0000000..192c83c Binary files /dev/null and b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/doxygen.gif differ diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/files.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/files.html new file mode 100755 index 0000000..79d2cd1 --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/files.html @@ -0,0 +1,20 @@ + + + +iFile.h [code] | Interface for a file on a LEGO MINDSTORMS NXT |
iFileIterator.h [code] | Interface for an iterator for files on a LEGO MINDSTORMS NXT |
iModule.h [code] | Interface for a firmware module on a LEGO MINDSTORMS NXT |
iModuleIterator.h [code] | Interface for an iterator for firmware modules on a LEGO MINDSTORMS NXT |
iNXT.h [code] | Interface for a LEGO MINDSTORMS NXT and declaration of its factory |
iNXTIterator.h [code] | Interface used for searching for LEGO MINDSTORMS NXTs |
main.cpp | Fantom Driver Example |
tStatus.h [code] | Status code class |
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/functions.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/functions.html new file mode 100755 index 0000000..c340561 --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/functions.html @@ -0,0 +1,129 @@ + + + +
+Here is a list of all documented class members with links to the classes they belong to:- a -
+
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iFileIterator_8h-source.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iFileIterator_8h-source.html new file mode 100755 index 0000000..e40c830 --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iFileIterator_8h-source.html @@ -0,0 +1,107 @@ + + + +00001 +00005 /* +00006 © Copyright 2005-2006, +00007 National Instruments Corporation. +00008 All rights reserved. +00009 +00010 File: iFileIterator.h +00011 Originated: 12 May 2005 +00012 */ +00013 +00014 #ifndef ___fantom_iFileIterator_h___ +00015 #define ___fantom_iFileIterator_h___ +00016 +00017 +00018 // includes... +00019 +00020 #ifndef ___fantom_platform_h___ +00021 #include "platform.h" +00022 #endif +00023 +00024 #ifndef ___fantom_iFile_h___ +00025 #include "iFile.h" +00026 #endif +00027 +00028 #ifndef ___fantom_tStatus_h___ +00029 #include "tStatus.h" +00030 #endif +00031 +00032 +00033 // defines... +00034 +00035 +00036 namespace nFANTOM100 +00037 { +00038 // forward declarations... +00039 +00040 // typedefs... +00041 +00042 // classes... +00043 +00048 class iFileIterator +00049 { +00050 friend class tNXT; +00051 +00052 // methods +00053 protected: +00054 +00056 virtual ~iFileIterator() = 0; +00057 +00058 public: +00059 +00061 +00070 virtual iFile* getFile( tStatus& status ) = 0; +00071 +00073 +00082 virtual void advance( tStatus& status ) = 0; +00083 +00085 +00091 virtual void getName( ViChar fileName[], tStatus& status ) = 0; +00092 +00094 +00098 virtual ViUInt32 getSize( tStatus& status ) = 0; +00099 +00100 }; +00101 +00102 +00103 // constants... +00104 +00105 } // namespace nFANTOM100 +00106 +00107 +00108 // declarations for globally-scoped globals... +00109 +00110 // typedefs +00111 typedef ViObject nFANTOM100_iFileIterator; +00112 +00113 extern "C" +00114 { +00115 nFANTOM100_kExport nFANTOM100_iFile _VI_FUNCC nFANTOM100_iFileIterator_getFile( +00116 nFANTOM100_iFileIterator iteratorPtr, +00117 ViStatus* status ); +00118 +00119 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFileIterator_advance( +00120 nFANTOM100_iFileIterator iteratorPtr, +00121 ViStatus* status ); +00122 +00123 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFileIterator_getName( +00124 nFANTOM100_iFileIterator iteratorPtr, +00125 ViChar filename[], +00126 ViStatus* status ); +00127 +00128 nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iFileIterator_getSize( +00129 nFANTOM100_iFileIterator iteratorPtr, +00130 ViStatus* status ); +00131 } +00132 +00133 #endif // ___fantom_iFileIterator_h___ +
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iFileIterator_8h.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iFileIterator_8h.html new file mode 100755 index 0000000..35e60de --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iFileIterator_8h.html @@ -0,0 +1,43 @@ + + + +
+#include "platform.h"
+#include "iFile.h"
+
+
+Go to the source code of this file.
Namespaces | |
namespace | nFANTOM100 |
Compounds | |
class | nFANTOM100::iFileIterator |
Interface to an iterator for files on a LEGO MINDSTORMS NXT. More... | |
Typedefs | |
+typedef ViObject | nFANTOM100_iFileIterator |
Functions | |
+nFANTOM100_kExport nFANTOM100_iFile +_VI_FUNCC | nFANTOM100_iFileIterator_getFile (nFANTOM100_iFileIterator iteratorPtr, ViStatus *status) |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_iFileIterator_advance (nFANTOM100_iFileIterator iteratorPtr, ViStatus *status) |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_iFileIterator_getName (nFANTOM100_iFileIterator iteratorPtr, ViChar filename[], ViStatus *status) |
+nFANTOM100_kExport ViUInt32 +_VI_FUNCC | nFANTOM100_iFileIterator_getSize (nFANTOM100_iFileIterator iteratorPtr, ViStatus *status) |
+ +
+
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iFile_8h-source.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iFile_8h-source.html new file mode 100755 index 0000000..3490bc4 --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iFile_8h-source.html @@ -0,0 +1,178 @@ + + + +00001 +00005 /* +00006 © Copyright 2005-2006, +00007 National Instruments Corporation. +00008 All rights reserved. +00009 +00010 File: iFile.h +00011 Originated: 12 May 2005 +00012 */ +00013 +00014 #ifndef ___fantom_iFile_h___ +00015 #define ___fantom_iFile_h___ +00016 +00017 // includes... +00018 +00019 #ifndef ___fantom_platform_h___ +00020 #include "platform.h" +00021 #endif +00022 +00023 #ifndef ___fantom_tStatus_h___ +00024 #include "tStatus.h" +00025 #endif +00026 +00027 +00028 // defines... +00029 +00030 +00031 namespace nFANTOM100 +00032 { +00033 // forward declarations... +00034 +00035 // typedefs... +00036 +00037 // classes... +00038 +00043 class iFile +00044 { +00045 friend class tNXT; +00046 +00047 // methods +00048 protected: +00049 +00051 virtual ~iFile() = 0; +00052 +00053 public: +00054 +00056 +00061 virtual void getName( ViChar fileName[] ) const = 0; +00062 +00064 +00070 virtual ViUInt32 getSize( tStatus& status ) = 0; +00071 +00073 +00081 virtual ViUInt32 getAvailableSize( tStatus& status ) = 0; +00082 +00083 +00085 +00091 virtual void openForRead( tStatus& status ) = 0; +00092 +00093 +00095 +00104 virtual void openForWrite( ViUInt32 sizeInBytes, tStatus& status ) = 0; +00105 +00106 +00108 +00117 virtual void openForLinearWrite( ViUInt32 sizeInBytes, tStatus& status ) = 0; +00118 +00119 +00121 +00131 virtual void openForDataWrite( ViUInt32 sizeInBytes, tStatus& status ) = 0; +00132 +00133 +00135 +00144 virtual void openForDataAppend( tStatus& status ) = 0; +00145 +00146 +00148 +00154 virtual void close( tStatus& status ) = 0; +00155 +00156 +00158 +00173 virtual ViUInt32 read( ViPBuf bufferPtr, ViUInt32 numberOfBytes, tStatus& status ) = 0; +00174 +00175 +00177 +00192 virtual ViUInt32 write( const ViByte bufferPtr[], ViUInt32 numberOfBytes, +00193 tStatus& status ) = 0; +00194 +00195 +00197 +00203 virtual void remove( tStatus& status ) = 0; +00204 +00205 }; +00206 +00207 +00208 // constants... +00209 const ViUInt8 kProtocolFilenameLength = 19; // 15 basename + 1 dot + 3 extension = 19 +00210 +00211 } // namespace nFANTOM100 +00212 +00213 +00214 // declarations for globally-scoped globals... +00215 +00216 // typedefs... +00217 typedef ViObject nFANTOM100_iFile; +00218 +00219 // prototypes... +00220 extern "C" +00221 { +00222 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_getName( +00223 nFANTOM100_iFile filePtr, +00224 ViChar fileName[], +00225 ViStatus* status ); +00226 +00227 nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iFile_getSize( +00228 nFANTOM100_iFile filePtr, +00229 ViStatus* status ); +00230 +00231 nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iFile_getAvailableSize( +00232 nFANTOM100_iFile filePtr, +00233 ViStatus* status ); +00234 +00235 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_openForRead( +00236 nFANTOM100_iFile filePtr, +00237 ViStatus* status ); +00238 +00239 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_openForWrite( +00240 nFANTOM100_iFile filePtr, +00241 ViUInt32 sizeInBytes, +00242 ViStatus* status ); +00243 +00244 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_openForLinearWrite( +00245 nFANTOM100_iFile filePtr, +00246 ViUInt32 sizeInBytes, +00247 ViStatus* status ); +00248 +00249 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_openForDataWrite( +00250 nFANTOM100_iFile filePtr, +00251 ViUInt32 sizeInBytes, +00252 ViStatus* status ); +00253 +00254 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_openForDataAppend( +00255 nFANTOM100_iFile filePtr, +00256 ViStatus* status ); +00257 +00258 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_close( +00259 nFANTOM100_iFile filePtr, +00260 ViStatus* status ); +00261 +00262 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_read( +00263 nFANTOM100_iFile filePtr, +00264 ViPBuf bufferPtr, +00265 ViUInt32 numberOfBytes, +00266 ViStatus* status ); +00267 +00268 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_write( +00269 nFANTOM100_iFile filePtr, +00270 const ViByte bufferPtr[], +00271 ViUInt32 numberOfBytes, +00272 ViStatus* status ); +00273 +00274 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_remove( +00275 nFANTOM100_iFile filePtr, +00276 ViStatus* status ); +00277 +00278 } +00279 +00280 #endif // ___fantom_iFile_h___ +
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iFile_8h.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iFile_8h.html new file mode 100755 index 0000000..953e792 --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iFile_8h.html @@ -0,0 +1,59 @@ + + + +
+#include "platform.h"
+#include "tStatus.h"
+
+
+Go to the source code of this file.
Namespaces | |
namespace | nFANTOM100 |
Compounds | |
class | nFANTOM100::iFile |
Interface to a file on a LEGO MINDSTORMS NXT. More... | |
Typedefs | |
+typedef ViObject | nFANTOM100_iFile |
Functions | |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_iFile_getName (nFANTOM100_iFile filePtr, ViChar fileName[], ViStatus *status) |
+nFANTOM100_kExport ViUInt32 +_VI_FUNCC | nFANTOM100_iFile_getSize (nFANTOM100_iFile filePtr, ViStatus *status) |
+nFANTOM100_kExport ViUInt32 +_VI_FUNCC | nFANTOM100_iFile_getAvailableSize (nFANTOM100_iFile filePtr, ViStatus *status) |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_iFile_openForRead (nFANTOM100_iFile filePtr, ViStatus *status) |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_iFile_openForWrite (nFANTOM100_iFile filePtr, ViUInt32 sizeInBytes, ViStatus *status) |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_iFile_openForLinearWrite (nFANTOM100_iFile filePtr, ViUInt32 sizeInBytes, ViStatus *status) |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_iFile_openForDataWrite (nFANTOM100_iFile filePtr, ViUInt32 sizeInBytes, ViStatus *status) |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_iFile_openForDataAppend (nFANTOM100_iFile filePtr, ViStatus *status) |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_iFile_close (nFANTOM100_iFile filePtr, ViStatus *status) |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_iFile_read (nFANTOM100_iFile filePtr, ViPBuf bufferPtr, ViUInt32 numberOfBytes, ViStatus *status) |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_iFile_write (nFANTOM100_iFile filePtr, const ViByte bufferPtr[], ViUInt32 numberOfBytes, ViStatus *status) |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_iFile_remove (nFANTOM100_iFile filePtr, ViStatus *status) |
+ +
+
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iModuleIterator_8h-source.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iModuleIterator_8h-source.html new file mode 100755 index 0000000..0285b14 --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iModuleIterator_8h-source.html @@ -0,0 +1,100 @@ + + + +00001 +00005 /* +00006 © Copyright 2005-2006, +00007 National Instruments Corporation. +00008 All rights reserved. +00009 +00010 File: iModuleIterator.h +00011 Originated: 8 Aug 2005 +00012 */ +00013 +00014 #ifndef ___fantom_iModuleIterator_h___ +00015 #define ___fantom_iModuleIterator_h___ +00016 +00017 +00018 // includes... +00019 +00020 #ifndef ___fantom_platform_h___ +00021 #include "platform.h" +00022 #endif +00023 +00024 #ifndef ___fantom_iModule_h___ +00025 #include "iModule.h" +00026 #endif +00027 +00028 #ifndef ___fantom_tStatus_h___ +00029 #include "tStatus.h" +00030 #endif +00031 +00032 +00033 // defines... +00034 +00035 +00036 namespace nFANTOM100 +00037 { +00038 // forward declarations... +00039 +00040 // typedefs... +00041 +00042 // classes... +00043 +00048 class iModuleIterator +00049 { +00050 friend class tNXT; +00051 +00052 // methods +00053 protected: +00054 +00056 virtual ~iModuleIterator() = 0; +00057 +00058 public: +00059 +00061 +00070 virtual iModule* getModule( tStatus& status ) = 0; +00071 +00073 +00082 virtual void advance( tStatus& status ) = 0; +00083 +00085 +00092 virtual void getName( ViChar moduleName[], tStatus& status ) = 0; +00093 +00094 }; +00095 +00096 +00097 // constants... +00098 +00099 } // namespace nFANTOM100 +00100 +00101 +00102 // declarations for globally-scoped globals... +00103 +00104 // typedefs +00105 typedef ViObject nFANTOM100_iModuleIterator; +00106 +00107 extern "C" +00108 { +00109 nFANTOM100_kExport nFANTOM100_iModule _VI_FUNCC nFANTOM100_iModuleIterator_getModule( +00110 nFANTOM100_iModuleIterator iteratorPtr, +00111 ViStatus* status ); +00112 +00113 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iModuleIterator_advance( +00114 nFANTOM100_iModuleIterator iteratorPtr, +00115 ViStatus* status ); +00116 +00117 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iModuleIterator_getName( +00118 nFANTOM100_iModuleIterator iteratorPtr, +00119 ViChar moduleName[], +00120 ViStatus* status ); +00121 } +00122 +00123 #endif // ___fantom_iModuleIterator_h___ +
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iModuleIterator_8h.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iModuleIterator_8h.html new file mode 100755 index 0000000..cac0510 --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iModuleIterator_8h.html @@ -0,0 +1,40 @@ + + + +
+#include "platform.h"
+#include "iModule.h"
+
+
+Go to the source code of this file.
Namespaces | |
namespace | nFANTOM100 |
Compounds | |
class | nFANTOM100::iModuleIterator |
Interface to an iterator for firmware modules on a LEGO MINDSTORMS NXT. More... | |
Typedefs | |
+typedef ViObject | nFANTOM100_iModuleIterator |
Functions | |
+nFANTOM100_kExport nFANTOM100_iModule +_VI_FUNCC | nFANTOM100_iModuleIterator_getModule (nFANTOM100_iModuleIterator iteratorPtr, ViStatus *status) |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_iModuleIterator_advance (nFANTOM100_iModuleIterator iteratorPtr, ViStatus *status) |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_iModuleIterator_getName (nFANTOM100_iModuleIterator iteratorPtr, ViChar moduleName[], ViStatus *status) |
+ +
+
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iModule_8h-source.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iModule_8h-source.html new file mode 100755 index 0000000..750be4d --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iModule_8h-source.html @@ -0,0 +1,110 @@ + + + +00001 +00005 /* +00006 © Copyright 2005-2006, +00007 National Instruments Corporation. +00008 All rights reserved. +00009 +00010 File: iModule.h +00011 Originated: 8 Aug 2005 +00012 */ +00013 +00014 #ifndef ___fantom_iModule_h___ +00015 #define ___fantom_iModule_h___ +00016 +00017 #ifndef ___fantom_platform_h___ +00018 #include "platform.h" +00019 #endif +00020 +00021 #ifndef ___fantom_tStatus_h___ +00022 #include "tStatus.h" +00023 #endif +00024 +00025 +00026 // defines... +00027 +00028 +00029 namespace nFANTOM100 +00030 { +00031 +00036 class iModule +00037 { +00038 friend class tNXT; +00039 +00040 // methods +00041 protected: +00042 +00044 virtual ~iModule() = 0; +00045 +00046 public: +00047 +00049 +00054 virtual void getName( ViChar moduleName[] ) const = 0; +00055 +00057 +00060 virtual ViUInt32 getModuleID( void ) const = 0; +00061 +00063 +00066 virtual ViUInt32 getModuleSize( void ) const = 0; +00067 +00069 +00072 virtual ViUInt32 getModuleIOMapSize( void ) const = 0; +00073 +00075 +00091 virtual ViUInt32 readIOMap( ViUInt32 offsetInBytes, ViUInt32 numberOfBytes, +00092 ViPBuf dataBufferPtr, tStatus& status ) = 0; +00093 +00095 +00111 virtual ViUInt32 writeIOMap( ViUInt32 offsetInBytes, ViUInt32 numberOfBytes, +00112 const ViByte dataBufferPtr[], tStatus& status ) = 0; +00113 +00114 }; +00115 +00116 }; // nFANTOM100 +00117 +00118 typedef ViObject nFANTOM100_iModule; +00119 +00120 extern "C" +00121 { +00122 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iModule_getName( +00123 nFANTOM100_iModule modulePtr, +00124 ViChar moduleName[], +00125 ViStatus* status ); +00126 +00127 nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iModule_getModuleID( +00128 nFANTOM100_iModule modulePtr, +00129 ViStatus* status ); +00130 +00131 nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iModule_getModuleSize( +00132 nFANTOM100_iModule modulePtr, +00133 ViStatus* status ); +00134 +00135 nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iModule_getIOMapSize( +00136 nFANTOM100_iModule modulePtr, +00137 ViStatus* status ); +00138 +00139 nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iModule_readIOMap( +00140 nFANTOM100_iModule modulePtr, +00141 ViUInt32 offset, +00142 ViUInt32 numberBytesToRead, +00143 ViPBuf dataBuffer, +00144 ViStatus* status ); +00145 +00146 nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iModule_writeIOMap( +00147 nFANTOM100_iModule modulePtr, +00148 ViUInt32 offset, +00149 ViUInt32 numberBytesToWrite, +00150 const ViByte dataBuffer[], +00151 ViStatus* status ); +00152 } +00153 +00154 #endif // ___fantom_iModule_h___ +
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iModule_8h.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iModule_8h.html new file mode 100755 index 0000000..ceabaea --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iModule_8h.html @@ -0,0 +1,50 @@ + + + +
+#include "platform.h"
+#include "tStatus.h"
+
+
+Go to the source code of this file.
Namespaces | |
namespace | nFANTOM100 |
Compounds | |
class | nFANTOM100::iModule |
Interface to a firmware module on a LEGO MINDSTORMS NXT. More... | |
Typedefs | |
+typedef ViObject | nFANTOM100_iModule |
Functions | |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_iModule_getName (nFANTOM100_iModule modulePtr, ViChar moduleName[], ViStatus *status) |
+nFANTOM100_kExport ViUInt32 +_VI_FUNCC | nFANTOM100_iModule_getModuleID (nFANTOM100_iModule modulePtr, ViStatus *status) |
+nFANTOM100_kExport ViUInt32 +_VI_FUNCC | nFANTOM100_iModule_getModuleSize (nFANTOM100_iModule modulePtr, ViStatus *status) |
+nFANTOM100_kExport ViUInt32 +_VI_FUNCC | nFANTOM100_iModule_getIOMapSize (nFANTOM100_iModule modulePtr, ViStatus *status) |
+nFANTOM100_kExport ViUInt32 +_VI_FUNCC | nFANTOM100_iModule_readIOMap (nFANTOM100_iModule modulePtr, ViUInt32 offset, ViUInt32 numberBytesToRead, ViPBuf dataBuffer, ViStatus *status) |
+nFANTOM100_kExport ViUInt32 +_VI_FUNCC | nFANTOM100_iModule_writeIOMap (nFANTOM100_iModule modulePtr, ViUInt32 offset, ViUInt32 numberBytesToWrite, const ViByte dataBuffer[], ViStatus *status) |
+ +
+
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iNXTIterator_8h-source.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iNXTIterator_8h-source.html new file mode 100755 index 0000000..8250d74 --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iNXTIterator_8h-source.html @@ -0,0 +1,112 @@ + + + +00001 +00005 /* +00006 © Copyright 2005-2006, +00007 National Instruments Corporation. +00008 All rights reserved. +00009 +00010 File: iNXTIterator.h +00011 Originated: 17 Oct 2005 +00012 */ +00013 +00014 #ifndef ___fantom_iNXTIterator_h___ +00015 #define ___fantom_iNXTIterator_h___ +00016 +00017 +00018 // includes... +00019 +00020 #ifndef ___fantom_platform_h___ +00021 #include "platform.h" +00022 #endif +00023 +00024 #ifndef ___fantom_tStatus_h___ +00025 #include "tStatus.h" +00026 #endif +00027 +00028 +00029 // defines... +00030 +00031 +00032 namespace nFANTOM100 +00033 { +00034 // forward declarations... +00035 class iNXT; +00036 +00037 // typedefs... +00038 +00039 // classes... +00040 +00045 class iNXTIterator +00046 { +00047 friend class iNXT; +00048 +00049 // methods +00050 protected: +00051 +00053 virtual ~iNXTIterator() = 0; +00054 +00055 public: +00056 +00058 /* +00059 \param resourceName Populated with the name of the NXT to which this iterator +00060 currently refers. The resource name character array must have a capacity of 256 +00061 bytes. +00062 \param status Status chaining object. +00063 */ +00064 virtual void getName( ViChar resourceName[], tStatus& status ) const = 0; +00065 +00067 +00075 virtual void advance( tStatus& status ) = 0; +00076 +00078 /* +00079 Creates an NXT object for the NXT referenced by this iterator. An object is not +00080 created if the specified status is fatal or if this iterator refers to the end of +00081 the list. The returned iNXT object should be destroyed using the iNXT::destroyNXT +00082 method. +00083 +00084 \param status Status chaining object. +00085 \return A pointer to the iNXT object that was created. +00086 */ +00087 virtual iNXT* getNXT( tStatus& status ) = 0; +00088 }; +00089 +00090 +00091 // constants... +00092 +00093 } // namespace nFANTOM100 +00094 +00095 +00096 // declarations for globally-scoped globals... +00097 +00098 // typedefs +00099 typedef ViObject nFANTOM100_iNXTIterator; +00100 +00101 // we must duplicate this typedef for the getNXT C wrapper +00102 typedef ViObject nFANTOM100_iNXT; +00103 +00104 extern "C" +00105 { +00106 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXTIterator_getName( +00107 nFANTOM100_iNXTIterator iteratorPtr, +00108 ViChar resourceName[], +00109 ViStatus* status ); +00110 +00111 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXTIterator_advance( +00112 nFANTOM100_iNXTIterator iteratorPtr, +00113 ViStatus* status ); +00114 +00115 nFANTOM100_kExport nFANTOM100_iNXT _VI_FUNCC nFANTOM100_iNXTIterator_getNXT( +00116 nFANTOM100_iNXTIterator iteratorPtr, +00117 ViStatus* status ); +00118 } +00119 +00120 #endif // ___fantom_iNXTIterator_h___ +
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iNXTIterator_8h.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iNXTIterator_8h.html new file mode 100755 index 0000000..7ff6529 --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iNXTIterator_8h.html @@ -0,0 +1,42 @@ + + + +
+#include "platform.h"
+#include "tStatus.h"
+
+
+Go to the source code of this file.
Namespaces | |
namespace | nFANTOM100 |
Compounds | |
class | nFANTOM100::iNXTIterator |
Interface to an iterator for LEGO MINDSTORMS NXTs. More... | |
Typedefs | |
+typedef ViObject | nFANTOM100_iNXTIterator |
+typedef ViObject | nFANTOM100_iNXT |
Functions | |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_iNXTIterator_getName (nFANTOM100_iNXTIterator iteratorPtr, ViChar resourceName[], ViStatus *status) |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_iNXTIterator_advance (nFANTOM100_iNXTIterator iteratorPtr, ViStatus *status) |
+nFANTOM100_kExport nFANTOM100_iNXT +_VI_FUNCC | nFANTOM100_iNXTIterator_getNXT (nFANTOM100_iNXTIterator iteratorPtr, ViStatus *status) |
+ +
+
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iNXT_8h-source.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iNXT_8h-source.html new file mode 100755 index 0000000..6b74215 --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iNXT_8h-source.html @@ -0,0 +1,398 @@ + + + +00001 +00005 /* +00006 © Copyright 2005-2006, +00007 National Instruments Corporation. +00008 All rights reserved. +00009 +00010 File: iNXT.h +00011 Originated: 12 May 2005 +00012 */ +00013 +00014 #ifndef ___fantom_iNXT_h___ +00015 #define ___fantom_iNXT_h___ +00016 +00017 +00018 // includes... +00019 +00020 #ifndef ___fantom_platform_h___ +00021 #include "platform.h" +00022 #endif +00023 +00024 #ifndef ___fantom_iFile_h___ +00025 #include "iFile.h" +00026 #endif +00027 +00028 #ifndef ___fantom_iFileIterator_h___ +00029 #include "iFileIterator.h" +00030 #endif +00031 +00032 #ifndef ___fantom_iModule_h___ +00033 #include "iModule.h" +00034 #endif +00035 +00036 #ifndef ___fantom_iModuleIterator_h___ +00037 #include "iModuleIterator.h" +00038 #endif +00039 +00040 #ifndef ___fantom_iNXTIterator_h___ +00041 #include "iNXTIterator.h" +00042 #endif +00043 +00044 #ifndef ___fantom_tStatus_h___ +00045 #include "tStatus.h" +00046 #endif +00047 +00048 // defines... +00049 +00050 +00051 namespace nFANTOM100 +00052 { +00053 // forward declarations... +00054 +00055 // typedefs... +00056 +00057 // classes... +00058 +00063 class iNXT +00064 { +00065 // methods +00066 protected: +00067 +00069 virtual ~iNXT() = 0; +00070 +00071 public: +00072 +00074 enum tBuffer +00075 { +00076 // The buffer associated with the standard port. +00077 kBufferStandard, +00078 +00079 // The buffer associated with the high-speed port. +00080 kBufferHighSpeed +00081 }; +00082 +00084 +00096 virtual iFile* createFile( ViConstString fileName, tStatus& status ) = 0; +00097 +00098 +00100 +00107 virtual void destroyFile( iFile* filePtr ) = 0; +00108 +00109 +00111 +00128 virtual iFileIterator* createFileIterator( ViConstString fileNamePattern, +00129 tStatus& status ) = 0; +00130 +00131 +00133 +00136 virtual void destroyFileIterator( iFileIterator* fileIteratorPtr ) = 0; +00137 +00139 +00153 virtual iModule* createModule( ViConstString moduleName, ViUInt32 moduleID, +00154 ViUInt32 moduleSizeInBytes, ViUInt32 ioMapSizeInBytes, tStatus& status ) = 0; +00155 +00157 +00164 virtual void destroyModule( iModule* modulePtr ) = 0; +00165 +00166 +00168 +00181 virtual iModuleIterator* createModuleIterator( ViConstString moduleNamePattern, +00182 tStatus& status ) = 0; +00183 +00184 +00186 +00189 virtual void destroyModuleIterator( iModuleIterator* moduleIteratorPtr ) = 0; +00190 +00192 +00209 virtual void getFirmwareVersion( ViUInt8& protocolVersionMajorRef, +00210 ViUInt8& protocolVersionMinorRef, ViUInt8& firmwareVersionMajorRef, +00211 ViUInt8& firmwareVersionMinorRef, tStatus& status ) = 0; +00212 +00213 +00215 +00240 virtual ViUInt32 sendDirectCommand( ViBoolean requireResponse, const ViByte commandBufferPtr[], +00241 ViUInt32 commandBufferSizeInBytes, ViPBuf responseBufferPtr, +00242 ViUInt32 responseBufferSizeInBytes, tStatus& status ) = 0; +00243 +00245 +00252 virtual void downloadFirmware( const ViByte firmwareBufferPtr[], +00253 ViUInt32 firmwareBufferSizeInBytes, tStatus& status ) = 0; +00254 +00255 +00257 +00269 virtual ViUInt32 write( const ViByte bufferPtr[], ViUInt32 numberOfBytes, +00270 tStatus& status ) = 0; +00271 +00273 +00284 virtual ViUInt32 read ( ViPBuf bufferPtr, ViUInt32 numberOfBytes, tStatus& status ) = 0; +00285 +00287 +00293 virtual void bootIntoFirmwareDownloadMode( tStatus& status ) = 0; +00294 +00296 +00304 virtual void setName( ViConstString newName, tStatus& status ) = 0; +00305 +00307 +00324 virtual void getDeviceInfo( ViChar name[], ViByte bluetoothAddress[], +00325 ViUInt8 signalStrength[], ViUInt32 &availableFlash, tStatus& status ) = 0; +00326 +00328 +00334 virtual void eraseUserFlash( tStatus& status ) = 0; +00335 +00337 /* +00338 The data buffer is not polled if the specified status is fatal. +00339 +00340 \param bufferSelector The buffer from which to read. +00341 \param status Status chaining object. +00342 \return The number of bytes in the buffer available to be read. +00343 */ +00344 virtual ViUInt32 pollAvailableLength( tBuffer bufferSelector, tStatus& status ) = 0; +00345 +00347 +00356 virtual ViUInt32 readBufferData( ViPBuf dataBuffer, tBuffer bufferSelector, +00357 ViUInt32 numberOfBytesToRead, tStatus& status ) = 0; +00358 +00360 /* +00361 An example resource string could look like the one of the following: +00362 BTH::LEGOBrick::00:16:53:04:05:06::5 +00363 BTH::LEGOBrick::00:16:53:04:05:06::1 +00364 BTH::Brick2::00:16:53:44:FF:66 +00365 USB0::0x0694::0x0002::0016535127BA::RAW +00366 +00367 \param resourceString Populated with the resource string. The resource string must +00368 have a capacity of 256 bytes. +00369 \param status Status chaining object. +00370 */ +00371 virtual void getResourceString( ViChar resourceString[], tStatus& status ) = 0; +00372 +00374 /* +00375 \param status Status chaining object. +00376 */ +00377 virtual void bluetoothFactoryReset( tStatus& status ) = 0; +00378 +00380 +00393 nFANTOM100_kExport static iNXT* _VI_FUNCC createNXT( ViConstString resourceString, +00394 tStatus& status, ViBoolean checkFirmwareVersion = true ); +00395 +00397 +00400 nFANTOM100_kExport static void _VI_FUNCC destroyNXT( iNXT* nxtPtr ); +00401 +00403 +00417 nFANTOM100_kExport static iNXTIterator* _VI_FUNCC createNXTIterator( +00418 ViBoolean searchBluetooth, ViUInt32 bluetoothSearchTimeoutInSeconds, +00419 tStatus& status ); +00420 +00422 /* +00423 \param iterPtr A pointer to the iNXTIterator object to destroy. +00424 */ +00425 nFANTOM100_kExport static void _VI_FUNCC destroyNXTIterator( iNXTIterator* iterPtr ); +00426 +00428 +00444 nFANTOM100_kExport static void _VI_FUNCC pairBluetooth( ViConstString resourceName, +00445 ViConstString passkey, ViChar pairedResourceName[], tStatus& status ); +00446 +00448 +00457 nFANTOM100_kExport static void _VI_FUNCC unpairBluetooth( ViConstString resourceName, +00458 tStatus& status ); +00459 +00461 +00470 nFANTOM100_kExport static ViBoolean _VI_FUNCC isPaired( ViConstString resourceName, +00471 tStatus& status ); +00472 +00474 +00481 nFANTOM100_kExport static void findDeviceInFirmwareDownloadMode( ViChar resourceName[], +00482 tStatus& status ); +00483 +00484 +00485 private: +00486 +00487 }; +00488 +00489 // constants... +00490 +00491 } // namespace nFANTOM100 +00492 +00493 +00494 // declarations for globally-scoped globals... +00495 +00496 // typedefs... +00497 typedef ViObject nFANTOM100_iNXT; +00498 +00499 // prototypes... +00500 extern "C" +00501 { +00502 +00503 nFANTOM100_kExport nFANTOM100_iNXTIterator _VI_FUNCC nFANTOM100_createNXTIterator( +00504 ViBoolean searchBluetooth, +00505 ViUInt32 bluetoothSearchTimeoutInSeconds, +00506 ViStatus* status ); +00507 +00508 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_destroyNXTIterator( +00509 nFANTOM100_iNXTIterator iterPtr, +00510 ViStatus* status ); +00511 +00512 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_pairBluetooth( +00513 ViConstString resourceName, +00514 ViConstString passkey, +00515 ViChar pairedResourceName[], +00516 ViStatus* status ); +00517 +00518 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_unpairBluetooth( +00519 ViConstString resourceName, +00520 ViStatus* status ); +00521 +00522 nFANTOM100_kExport ViBoolean _VI_FUNCC nFANTOM100_isPaired( +00523 ViConstString resourceName, +00524 ViStatus* status ); +00525 +00526 nFANTOM100_kExport nFANTOM100_iNXT _VI_FUNCC nFANTOM100_createNXT( +00527 ViConstString resourceString, +00528 ViStatus* status, +00529 ViBoolean checkFirmwareVersion ); +00530 +00531 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_destroyNXT( +00532 nFANTOM100_iNXT nxtPtr, +00533 ViStatus* status ); +00534 +00535 nFANTOM100_kExport nFANTOM100_iFile _VI_FUNCC nFANTOM100_iNXT_createFile( +00536 nFANTOM100_iNXT nxtPtr, +00537 ViConstString fileName, +00538 ViStatus* status ); +00539 +00540 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_destroyFile( +00541 nFANTOM100_iNXT nxtPtr, +00542 nFANTOM100_iFile filePtr, +00543 ViStatus* status ); +00544 +00545 nFANTOM100_kExport nFANTOM100_iFileIterator _VI_FUNCC nFANTOM100_iNXT_createFileIterator( +00546 nFANTOM100_iNXT nxtPtr, +00547 ViConstString fileNamePattern, +00548 ViStatus* status ); +00549 +00550 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_destroyFileIterator( +00551 nFANTOM100_iNXT nxtPtr, +00552 nFANTOM100_iFileIterator fileIteratorPtr, +00553 ViStatus* status ); +00554 +00555 nFANTOM100_kExport nFANTOM100_iModule _VI_FUNCC nFANTOM100_iNXT_createModule( +00556 nFANTOM100_iNXT nxtPtr, +00557 ViConstString moduleName, +00558 ViUInt32 moduleID, +00559 ViUInt32 moduleSize, +00560 ViUInt32 ioMapSizeInBytes, +00561 ViStatus* status ); +00562 +00563 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_destroyModule( +00564 nFANTOM100_iNXT nxtPtr, +00565 nFANTOM100_iModule modulePtr, +00566 ViStatus* status ); +00567 +00568 nFANTOM100_kExport nFANTOM100_iModuleIterator _VI_FUNCC nFANTOM100_iNXT_createModuleIterator( +00569 nFANTOM100_iNXT nxtPtr, +00570 ViConstString moduleNamePattern, +00571 ViStatus* status ); +00572 +00573 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_destroyModuleIterator( +00574 nFANTOM100_iNXT nxtPtr, +00575 nFANTOM100_iModuleIterator moduleIteratorPtr, +00576 ViStatus* status ); +00577 +00578 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_getFirmwareVersion( +00579 nFANTOM100_iNXT nxtPtr, +00580 ViUInt8* protocolVersionMajorPtr, +00581 ViUInt8* protocolVersionMinorPtr, +00582 ViUInt8* firmwareVersionMajorPtr, +00583 ViUInt8* firmwareVersionMinorPtr, +00584 ViStatus* status ); +00585 +00586 nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iNXT_sendDirectCommand( +00587 nFANTOM100_iNXT nxtPtr, +00588 ViBoolean requireResponse, +00589 const ViByte commandBufferPtr[], +00590 ViUInt32 commandBufferSizeInBytes, +00591 ViPBuf responseBufferPtr, +00592 ViUInt32 responseBufferSizeInBytes, +00593 ViStatus* status ); +00594 +00595 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_findDeviceInFirmwareDownloadMode( +00596 ViChar resourceString[], +00597 ViStatus* status ); +00598 +00599 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_downloadFirmware( +00600 nFANTOM100_iNXT nxtPtr, +00601 const ViByte firmwareBufferPtr[], +00602 ViUInt32 firmwareBufferSize, +00603 ViStatus* status ); +00604 +00605 nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iNXT_write( +00606 nFANTOM100_iNXT nxtPtr, +00607 const ViByte bufferPtr[], +00608 ViUInt32 numberOfBytes, +00609 ViStatus* status ); +00610 +00611 nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iNXT_read( +00612 nFANTOM100_iNXT nxtPtr, +00613 ViPBuf bufferPtr, +00614 ViUInt32 numberOfBytes, +00615 ViStatus* status ); +00616 +00617 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_bootIntoFirmwareDownloadMode( +00618 ViConstString resouceName, +00619 ViStatus* status ); +00620 +00621 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_setName( +00622 nFANTOM100_iNXT nxtPtr, +00623 ViConstString newName, +00624 ViStatus* status ); +00625 +00626 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_getDeviceInfo( +00627 nFANTOM100_iNXT nxtPtr, +00628 ViChar name[], +00629 ViByte bluetoothAddress[], +00630 ViUInt8 signalStrength[], +00631 ViUInt32* availableFlash, +00632 ViStatus* status ); +00633 +00634 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_eraseUserFlash( +00635 nFANTOM100_iNXT nxtPtr, +00636 ViStatus* status ); +00637 +00638 nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iNXT_pollAvailableLength( +00639 nFANTOM100_iNXT nxtPtr, +00640 ViUInt32 bufferIndex, +00641 ViStatus* status ); +00642 +00643 nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iNXT_readBufferData( +00644 nFANTOM100_iNXT nxtPtr, +00645 ViPBuf dataBuffer, +00646 ViUInt32 bufferIndex, +00647 ViUInt32 numberOfBytesToRead, +00648 ViStatus* status ); +00649 +00650 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_getResourceString( +00651 nFANTOM100_iNXT nxtPtr, +00652 ViChar resourceString[], +00653 ViStatus* status ); +00654 +00655 nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_bluetoothFactoryReset( +00656 nFANTOM100_iNXT nxtPtr, +00657 ViStatus* status ); +00658 +00659 +00660 } // extern "C" +00661 +00662 +00663 // inline functions and function macros... +00664 +00665 +00666 #endif // ___fantom_iNXT_h___ +
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iNXT_8h.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iNXT_8h.html new file mode 100755 index 0000000..c0adc29 --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/iNXT_8h.html @@ -0,0 +1,107 @@ + + + +
+#include "platform.h"
+#include "iFile.h"
+#include "iFileIterator.h"
+#include "iModule.h"
+#include "iModuleIterator.h"
+#include "iNXTIterator.h"
+
+
+Go to the source code of this file.
Namespaces | |
namespace | nFANTOM100 |
Compounds | |
class | nFANTOM100::iNXT |
Interface to a LEGO MINDSTORMS NXT. More... | |
Typedefs | |
+typedef ViObject | nFANTOM100_iNXT |
Functions | |
+nFANTOM100_kExport nFANTOM100_iNXTIterator +_VI_FUNCC | nFANTOM100_createNXTIterator (ViBoolean searchBluetooth, ViUInt32 bluetoothSearchTimeoutInSeconds, ViStatus *status) |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_destroyNXTIterator (nFANTOM100_iNXTIterator iterPtr, ViStatus *status) |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_pairBluetooth (ViConstString resourceName, ViConstString passkey, ViChar pairedResourceName[], ViStatus *status) |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_unpairBluetooth (ViConstString resourceName, ViStatus *status) |
+nFANTOM100_kExport ViBoolean +_VI_FUNCC | nFANTOM100_isPaired (ViConstString resourceName, ViStatus *status) |
+nFANTOM100_kExport nFANTOM100_iNXT +_VI_FUNCC | nFANTOM100_createNXT (ViConstString resourceString, ViStatus *status, ViBoolean checkFirmwareVersion) |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_destroyNXT (nFANTOM100_iNXT nxtPtr, ViStatus *status) |
+nFANTOM100_kExport nFANTOM100_iFile +_VI_FUNCC | nFANTOM100_iNXT_createFile (nFANTOM100_iNXT nxtPtr, ViConstString fileName, ViStatus *status) |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_iNXT_destroyFile (nFANTOM100_iNXT nxtPtr, nFANTOM100_iFile filePtr, ViStatus *status) |
+nFANTOM100_kExport nFANTOM100_iFileIterator +_VI_FUNCC | nFANTOM100_iNXT_createFileIterator (nFANTOM100_iNXT nxtPtr, ViConstString fileNamePattern, ViStatus *status) |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_iNXT_destroyFileIterator (nFANTOM100_iNXT nxtPtr, nFANTOM100_iFileIterator fileIteratorPtr, ViStatus *status) |
+nFANTOM100_kExport nFANTOM100_iModule +_VI_FUNCC | nFANTOM100_iNXT_createModule (nFANTOM100_iNXT nxtPtr, ViConstString moduleName, ViUInt32 moduleID, ViUInt32 moduleSize, ViUInt32 ioMapSizeInBytes, ViStatus *status) |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_iNXT_destroyModule (nFANTOM100_iNXT nxtPtr, nFANTOM100_iModule modulePtr, ViStatus *status) |
+nFANTOM100_kExport nFANTOM100_iModuleIterator +_VI_FUNCC | nFANTOM100_iNXT_createModuleIterator (nFANTOM100_iNXT nxtPtr, ViConstString moduleNamePattern, ViStatus *status) |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_iNXT_destroyModuleIterator (nFANTOM100_iNXT nxtPtr, nFANTOM100_iModuleIterator moduleIteratorPtr, ViStatus *status) |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_iNXT_getFirmwareVersion (nFANTOM100_iNXT nxtPtr, ViUInt8 *protocolVersionMajorPtr, ViUInt8 *protocolVersionMinorPtr, ViUInt8 *firmwareVersionMajorPtr, ViUInt8 *firmwareVersionMinorPtr, ViStatus *status) |
+nFANTOM100_kExport ViUInt32 +_VI_FUNCC | nFANTOM100_iNXT_sendDirectCommand (nFANTOM100_iNXT nxtPtr, ViBoolean requireResponse, const ViByte commandBufferPtr[], ViUInt32 commandBufferSizeInBytes, ViPBuf responseBufferPtr, ViUInt32 responseBufferSizeInBytes, ViStatus *status) |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_iNXT_findDeviceInFirmwareDownloadMode (ViChar resourceString[], ViStatus *status) |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_iNXT_downloadFirmware (nFANTOM100_iNXT nxtPtr, const ViByte firmwareBufferPtr[], ViUInt32 firmwareBufferSize, ViStatus *status) |
+nFANTOM100_kExport ViUInt32 +_VI_FUNCC | nFANTOM100_iNXT_write (nFANTOM100_iNXT nxtPtr, const ViByte bufferPtr[], ViUInt32 numberOfBytes, ViStatus *status) |
+nFANTOM100_kExport ViUInt32 +_VI_FUNCC | nFANTOM100_iNXT_read (nFANTOM100_iNXT nxtPtr, ViPBuf bufferPtr, ViUInt32 numberOfBytes, ViStatus *status) |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_iNXT_bootIntoFirmwareDownloadMode (ViConstString resouceName, ViStatus *status) |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_iNXT_setName (nFANTOM100_iNXT nxtPtr, ViConstString newName, ViStatus *status) |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_iNXT_getDeviceInfo (nFANTOM100_iNXT nxtPtr, ViChar name[], ViByte bluetoothAddress[], ViUInt8 signalStrength[], ViUInt32 *availableFlash, ViStatus *status) |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_iNXT_eraseUserFlash (nFANTOM100_iNXT nxtPtr, ViStatus *status) |
+nFANTOM100_kExport ViUInt32 +_VI_FUNCC | nFANTOM100_iNXT_pollAvailableLength (nFANTOM100_iNXT nxtPtr, ViUInt32 bufferIndex, ViStatus *status) |
+nFANTOM100_kExport ViUInt32 +_VI_FUNCC | nFANTOM100_iNXT_readBufferData (nFANTOM100_iNXT nxtPtr, ViPBuf dataBuffer, ViUInt32 bufferIndex, ViUInt32 numberOfBytesToRead, ViStatus *status) |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_iNXT_getResourceString (nFANTOM100_iNXT nxtPtr, ViChar resourceString[], ViStatus *status) |
+nFANTOM100_kExport void _VI_FUNCC | nFANTOM100_iNXT_bluetoothFactoryReset (nFANTOM100_iNXT nxtPtr, ViStatus *status) |
+ +
+
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/index.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/index.html new file mode 100755 index 0000000..5610123 --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/index.html @@ -0,0 +1,38 @@ + + + ++
+The main.cpp file contains a simple example. +
+The below commands are the most basic way to build this example. Using an Integrated Development Environment such as Visual Studio or Xcode may be easier. +
+To build this example on Windows: +
+cl.exe /I <path to SDK include directory> <path to fantom.lib in SDK> main.cpp +
+To build this example on Mac OS X 10.4: +
+gcc-3.3 -I <path to SDK include directory> -framework Fantom -dylib_file Library/Frameworks/VISA.framework/Versions/A/VISA:/Library/Frameworks/VISA.framework/Versions /A/VISA -lstdc++ main.cpp +
+Note that you will need to have the VISA and NiSpyLog frameworks installed in order to link the example. A development version of NI-VISA, which includes the VISA and NiSpyLog frameworks may be downloaded from National Instruments. +
+The following design class diagrams may help understand the Fantom API. +
+
+
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/main_8cpp.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/main_8cpp.html new file mode 100755 index 0000000..abd231d --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/main_8cpp.html @@ -0,0 +1,188 @@ + + + +
+#include "fantom/iNXT.h"
+#include "fantom/iNXTIterator.h"
+#include "fantom/tStatus.h"
+#include <string.h>
+
Functions | |
+int _VI_FUNCC | main (int argc, char **argv) |
+ +
+ +
+
+/* + © Copyright 2006, + National Instruments Corporation. + All rights reserved. + + Originated: 10 March 2006 +*/ + +// includes... + +#include "fantom/iNXT.h" +#include "fantom/iNXTIterator.h" +#include "fantom/tStatus.h" + +#include <string.h> + + +// globally-scoped globals... + +// private globals... + +// methods... + +int _VI_FUNCC main( int argc, char** argv ) +{ + nFANTOM100::tStatus status; + nFANTOM100::iNXTIterator* nxtIteratorPtr = NULL; + nFANTOM100::iNXT* nxtPtr = NULL; + nFANTOM100::iFile* filePtr = NULL; + nFANTOM100::iFileIterator* fileIteratorPtr = NULL; + + // Create an NXT iterator object which is used to find all accessible NXT devices. + nxtIteratorPtr = nFANTOM100::iNXT::createNXTIterator( + false /* don't search for NXTs over Bluetooth (only search USB) */, + 0 /* timeout for Bluetooth discovery ignored */, status ); + + // Creating the NXT iterator object could fail, better check status before dereferencing a + // potentially NULL pointer. + if( status.isNotFatal()) + { + // Create an NXT object for the first NXT that was found. Note that if a NXT is found + // over BT, the computer and the NXT must be paired before an NXT object can be + // created. This can be done programatically using the iNXT::pairBluetooth method. + nxtPtr = nxtIteratorPtr->getNXT( status ); + + // Destroy the NXT iterator object which we no longer need + nFANTOM100::iNXT::destroyNXTIterator( nxtIteratorPtr ); + } + + // Creating the NXT object could fail, better check status before dereferencing a potentially + // NULL pointer. + if( status.isNotFatal()) + { + ViUInt8 protocolVersionMajor = 0; + ViUInt8 protocolVersionMinor = 0; + ViUInt8 firmwareVersionMajor = 0; + ViUInt8 firmwareVersionMinor = 0; + + // Query the version numbers for the protocol and firmware installed on the NXT. + nxtPtr->getFirmwareVersion( protocolVersionMajor, protocolVersionMinor, + firmwareVersionMajor, firmwareVersionMinor, status ); + + // This is a direct command to play a tone. + ViUInt8 directCommandBuffer[] = { 0x03, 0x00, 0x18, 0x10, 0x00 }; + + // Send the direct command to the NXT. + nxtPtr->sendDirectCommand( false /* a response is not required for this direct command */, + reinterpret_cast< ViByte* >( directCommandBuffer ), sizeof( directCommandBuffer ), + NULL /* no response buffer */, 0 /* no response buffer, specify 0 for size */, status ); + + // Create a file object + filePtr = nxtPtr->createFile( "example.log", status ); + } + + // Creating the file object could fail, better check status before dereferencing a + // potentially NULL pointer. + if( status.isNotFatal()) + { + ViUInt8 fileBuffer[100] = {}; + ViUInt32 fileSizeInBytes = 100; + for( ViUInt8 index = 0; index < fileSizeInBytes; ++index ) + { + fileBuffer[index] = index; + } + + // Open the file for writing, this will also create this file on the NXT. + filePtr->openForWrite( fileSizeInBytes, status ); + + // Write the file contents. + filePtr->write( fileBuffer, fileSizeInBytes, status ); + + // Close the file. + filePtr->close( status ); + + // Destroy the file object. Note that this does not affect the file on the NXT. + nxtPtr->destroyFile( filePtr ); + + // Create a file iterator object which is used to find files on the NXT. + fileIteratorPtr = nxtPtr->createFileIterator( "*.*" /* find all files on the NXT */, + status ); + } + + // Creating the file iterator object could fail, better check status before dereferencing a + // potentially NULL pointer. + if( status.isNotFatal()) + { + ViChar fileName[20]; + + // Iterate through all of the files on the NXT until we find our log file. Obviously, + // this isn't necessary in this simple example but is for illustrative purposes. + while( status.isNotFatal()) + { + fileIteratorPtr->getName( fileName, status ); + if( 0 == ::strcmp( fileName, "example.log" )) + { + break; + } + + fileIteratorPtr->advance( status ); + } + + // Now that we have found our log file, create a file object that corresponds to it. + filePtr = fileIteratorPtr->getFile( status ); + + // Destroy the file iterator. + nxtPtr->destroyFileIterator( fileIteratorPtr ); + } + + // Creating the file object could fail, better check status before dereferencing a + // potentially NULL pointer. + if( status.isNotFatal()) + { + ViUInt8 fileBuffer[100] = {}; + ViUInt32 fileSizeInBytes = 100; + + // Open the file for reading. + filePtr->openForRead( status ); + + // Read the file contents. + filePtr->read( fileBuffer, fileSizeInBytes, status ); + + // Close the file. + filePtr->close( status ); + + // Remove the file. This deletes the file from the NXT. + filePtr->remove( status ); + + // Destroy the file object. + nxtPtr->destroyFile( filePtr ); + } + + // Destroy the NXT object. + nFANTOM100::iNXT::destroyNXT( nxtPtr ); + + return 0; +} +
+
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/namespacemembers.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/namespacemembers.html new file mode 100755 index 0000000..8bf8a9c --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/namespacemembers.html @@ -0,0 +1,62 @@ + + + +
+Here is a list of all documented namespace members with links to the namespaces they belong to:- k -
+
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/namespacenFANTOM100.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/namespacenFANTOM100.html new file mode 100755 index 0000000..a04758b --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/namespacenFANTOM100.html @@ -0,0 +1,243 @@ + + + ++
Compounds | |
class | nFANTOM100::iFile |
Interface to a file on a LEGO MINDSTORMS NXT. More... | |
class | nFANTOM100::iFileIterator |
Interface to an iterator for files on a LEGO MINDSTORMS NXT. More... | |
class | nFANTOM100::iModule |
Interface to a firmware module on a LEGO MINDSTORMS NXT. More... | |
class | nFANTOM100::iModuleIterator |
Interface to an iterator for firmware modules on a LEGO MINDSTORMS NXT. More... | |
class | nFANTOM100::iNXT |
Interface to a LEGO MINDSTORMS NXT. More... | |
class | nFANTOM100::iNXTIterator |
Interface to an iterator for LEGO MINDSTORMS NXTs. More... | |
class | nFANTOM100::tStatus |
Class that contains a status code and the file name and line number where that status code was generated. More... | |
Enumerations | |
enum | tFANTOMStatus { + kStatusFirst = (kStatusOffset + 0), + + kStatusPairingFailed = (kStatusOffset + -5), + + kStatusBluetoothSearchFailed = (kStatusOffset + -6), + + kStatusSystemLibraryNotFound = (kStatusOffset + -7), + + kStatusUnpairingFailed = (kStatusOffset + -8), + + kStatusInvalidFilename = (kStatusOffset + -9), + + kStatusInvalidIteratorDereference = (kStatusOffset + -10), + + kStatusLockOperationFailed = (kStatusOffset + -11), + + kStatusSizeUnknown = (kStatusOffset + -12), + + kStatusDuplicateOpen = (kStatusOffset + -13), + + kStatusEmptyFile = (kStatusOffset + -14), + + kStatusFirmwareDownloadFailed = (kStatusOffset + -15), + + kStatusPortNotFound = (kStatusOffset + -16), + + kStatusNoMoreItemsFound = (kStatusOffset + -17), + + kStatusTooManyUnconfiguredDevices = (kStatusOffset + -18), + + kStatusCommandMismatch = (kStatusOffset + -19), + + kStatusIllegalOperation = (kStatusOffset + -20), + + kStatusBluetoothCacheUpdateFailed = (kStatusOffset + -21), + + kStatusNonNXTDeviceSelected = (kStatusOffset + -22), + + kStatusRetryConnection = (kStatusOffset + -23), + + kStatusPowerCycleNXT = (kStatusOffset + -24), + + kStatusFeatureNotImplemented = (kStatusOffset + -99), + + kStatusFWIllegalHandle = (kStatusOffset + -189), + + kStatusFWIllegalFileName = (kStatusOffset + -190), + + kStatusFWOutOfBounds = (kStatusOffset + -191), + + kStatusFWModuleNotFound = (kStatusOffset + -192), + + kStatusFWFileExists = (kStatusOffset + -193), + + kStatusFWFileIsFull = (kStatusOffset + -194), + + kStatusFWAppendNotPossible = (kStatusOffset + -195), + + kStatusFWNoWriteBuffers = (kStatusOffset + -196), + + kStatusFWFileIsBusy = (kStatusOffset + -197), + + kStatusFWUndefinedError = (kStatusOffset + -198), + + kStatusFWNoLinearSpace = (kStatusOffset + -199), + + kStatusFWHandleAlreadyClosed = (kStatusOffset + -200), + + kStatusFWFileNotFound = (kStatusOffset + -201), + + kStatusFWNotLinearFile = (kStatusOffset + -202), + + kStatusFWEndOfFile = (kStatusOffset + -203), + + kStatusFWEndOfFileExpected = (kStatusOffset + -204), + + kStatusFWNoMoreFiles = (kStatusOffset + -205), + + kStatusFWNoSpace = (kStatusOffset + -206), + + kStatusFWNoMoreHandles = (kStatusOffset + -207), + + kStatusFWUnknownErrorCode = (kStatusOffset + -208), + + kStatusLast = (kStatusOffset + -999) + + } |
Enumeration of Fantom-specific status codes. NI-VISA status codes may also be returned. These are documented in the NI-VISA Programmer Reference Manual which is available from <http://ni.com/>. More... | |
Functions | |
+ViStatus | convertStatus (ViUInt8 firmwareStatus) |
Variables | |
+const ViUInt8 | kProtocolFilenameLength = 19 |
+const ViInt32 | kStatusOffset = -142000 |
+const ViStatus | kStatusSuccess = VI_SUCCESS |
+
+
|
+
+ + | +
+
+ +Enumeration of Fantom-specific status codes. NI-VISA status codes may also be returned. These are documented in the NI-VISA Programmer Reference Manual which is available from <http://ni.com/>. + +
|
+
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/namespaces.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/namespaces.html new file mode 100755 index 0000000..4fca030 --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/namespaces.html @@ -0,0 +1,13 @@ + + + +nFANTOM100 | The namespace for Fantom 1.0 |
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/tStatus_8h-source.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/tStatus_8h-source.html new file mode 100755 index 0000000..05537c5 --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/tStatus_8h-source.html @@ -0,0 +1,330 @@ + + + +00001 +00005 /* +00006 © Copyright 2005-2006, +00007 National Instruments Corporation. +00008 All rights reserved. +00009 +00010 File: tStatus.h +00011 Originated: 10 March 2005 +00012 */ +00013 +00014 #ifndef ___fantom_tStatus_h___ +00015 #define ___fantom_tStatus_h___ +00016 +00017 // includes ... +00018 +00019 #ifndef ___fantom_platform_h___ +00020 #include "platform.h" +00021 #endif +00022 +00023 #include <string.h> +00024 +00025 +00026 // defines... +00027 +00028 #define nFANTOM_mLocation __FILE__, __LINE__ +00029 +00030 #define nFANTOM_ForceToWarning(s) (((s) >= 0 ) ? (s) : -(s)) +00031 #define nFANTOM_ForceToFatal(s) (((s) <= 0 ) ? (s) : -(s)) +00032 +00036 namespace nFANTOM100 +00037 { +00038 // forward declarations... +00039 +00040 // typedefs... +00041 +00042 // classes... +00043 const ViInt32 kStatusOffset = -142000; // 0xFFFDD550 +00044 const ViStatus kStatusSuccess = VI_SUCCESS; +00045 +00051 enum tFANTOMStatus +00052 { +00053 kStatusFirst = (kStatusOffset + 0), +00054 +00057 kStatusPairingFailed = (kStatusOffset + -5), // 0x54B +00058 +00060 kStatusBluetoothSearchFailed = (kStatusOffset + -6), // 0x54A +00061 +00063 kStatusSystemLibraryNotFound = (kStatusOffset + -7), // 0x549 +00064 +00066 kStatusUnpairingFailed = (kStatusOffset + -8), // 0x548 +00067 +00069 kStatusInvalidFilename = (kStatusOffset + -9), // 0x547 +00070 +00072 kStatusInvalidIteratorDereference = (kStatusOffset + -10), // 0x546 +00073 +00075 kStatusLockOperationFailed = (kStatusOffset + -11), // 0x545 +00076 +00078 kStatusSizeUnknown = (kStatusOffset + -12), // 0x544 +00079 +00081 kStatusDuplicateOpen = (kStatusOffset + -13), // 0x543 +00082 +00085 kStatusEmptyFile = (kStatusOffset + -14), // 0x542 +00086 +00088 kStatusFirmwareDownloadFailed = (kStatusOffset + -15), // 0x541 +00089 +00091 kStatusPortNotFound = (kStatusOffset + -16), // 0x540 +00092 +00094 kStatusNoMoreItemsFound = (kStatusOffset + -17), // 0x53F +00095 +00097 kStatusTooManyUnconfiguredDevices = (kStatusOffset + -18), // 0x53E +00098 +00100 kStatusCommandMismatch = (kStatusOffset + -19), // 0x53D +00101 +00103 kStatusIllegalOperation = (kStatusOffset + -20), // 0x53C +00104 +00107 kStatusBluetoothCacheUpdateFailed = (kStatusOffset + -21), // 0x53B +00108 +00110 kStatusNonNXTDeviceSelected = (kStatusOffset + -22), // 0x53A +00111 +00113 kStatusRetryConnection = (kStatusOffset + -23), // 0x539 +00114 +00116 kStatusPowerCycleNXT = (kStatusOffset + -24), // 0x538 +00117 +00119 kStatusFeatureNotImplemented = (kStatusOffset + -99), // 0x4ED +00120 +00122 kStatusFWIllegalHandle = (kStatusOffset + -189), // 0x493 +00123 +00125 kStatusFWIllegalFileName = (kStatusOffset + -190), // 0x492 +00126 +00128 kStatusFWOutOfBounds = (kStatusOffset + -191), // 0x491 +00129 +00131 kStatusFWModuleNotFound = (kStatusOffset + -192), // 0x490 +00132 +00134 kStatusFWFileExists = (kStatusOffset + -193), // 0x48F +00135 +00137 kStatusFWFileIsFull = (kStatusOffset + -194), // 0x48E +00138 +00140 kStatusFWAppendNotPossible = (kStatusOffset + -195), // 0x48D +00141 +00143 kStatusFWNoWriteBuffers = (kStatusOffset + -196), // 0x48C +00144 +00146 kStatusFWFileIsBusy = (kStatusOffset + -197), // 0x48B +00147 +00149 kStatusFWUndefinedError = (kStatusOffset + -198), // 0x48A +00150 +00152 kStatusFWNoLinearSpace = (kStatusOffset + -199), // 0x489 +00153 +00155 kStatusFWHandleAlreadyClosed = (kStatusOffset + -200), // 0x488 +00156 +00158 kStatusFWFileNotFound = (kStatusOffset + -201), // 0x487 +00159 +00161 kStatusFWNotLinearFile = (kStatusOffset + -202), // 0x486 +00162 +00164 kStatusFWEndOfFile = (kStatusOffset + -203), // 0x485 +00165 +00167 kStatusFWEndOfFileExpected = (kStatusOffset + -204), // 0x484 +00168 +00170 kStatusFWNoMoreFiles = (kStatusOffset + -205), // 0x483 +00171 +00173 kStatusFWNoSpace = (kStatusOffset + -206), // 0x482 +00174 +00176 kStatusFWNoMoreHandles = (kStatusOffset + -207), // 0x481 +00177 +00179 kStatusFWUnknownErrorCode = (kStatusOffset + -208), // 0x480 +00180 +00181 kStatusLast = (kStatusOffset + -999) +00182 }; +00183 +00188 class tStatus +00189 { +00190 public: +00191 +00192 // methods +00193 +00195 +00200 inline tStatus( void ) : +00201 _code( VI_SUCCESS ), +00202 _lineNumber( 0 ) +00203 { +00204 _fileName[0] = '\0'; +00205 } +00206 +00207 +00209 +00214 inline tStatus( const tStatus& status ) : +00215 _code( status._code ), +00216 _lineNumber( status._lineNumber ) +00217 { +00218 ::strcpy( _fileName, "" ); +00219 ::strncat( _fileName, status._fileName, kMaxFileNameLength - 1 ); +00220 } +00221 +00222 +00224 +00233 inline tStatus( ViStatus code, const char* fileName, ViUInt32 lineNumber ) : +00234 _code( code ), +00235 _lineNumber( lineNumber ) +00236 { +00237 ::strcpy( _fileName, "" ); +00238 ::strncat( _fileName, reinterpret_cast<const char*>( fileName ), kMaxFileNameLength - 1 ); +00239 } +00240 +00241 +00243 inline ~tStatus() +00244 { +00245 } +00246 +00247 +00249 +00252 inline ViStatus getCode( void ) const +00253 { +00254 return _code; +00255 } +00256 +00257 +00259 +00262 inline const char* getFileName( void ) const +00263 { +00264 return _fileName; +00265 } +00266 +00267 +00269 // generated. +00274 inline ViUInt32 getLineNumber( void ) const +00275 { +00276 return _lineNumber; +00277 } +00278 +00279 +00281 // appropriate. +00293 inline void setCode( ViStatus code, const char* fileName, ViUInt32 lineNumber ) +00294 { +00295 if(( isSuccess() && code != VI_SUCCESS ) || ( isNotFatal() && code < VI_SUCCESS )) +00296 { +00297 _code = code; +00298 _lineNumber = lineNumber; +00299 ::strcpy( _fileName, "" ); +00300 ::strncat( _fileName, fileName, kMaxFileNameLength - 1 ); +00301 } +00302 } +00303 +00304 +00306 +00315 inline void assign( const tStatus& status ) +00316 { +00317 setCode( status.getCode(), status.getFileName(), status.getLineNumber()); +00318 } +00319 +00320 +00322 +00325 inline void clear( void ) +00326 { +00327 _code = VI_SUCCESS; +00328 _lineNumber = 0; +00329 _fileName[0] = '\0'; +00330 } +00331 +00332 +00334 +00340 inline bool isFatal( void ) const +00341 { +00342 return ( _code < VI_SUCCESS ); +00343 } +00344 +00346 +00352 inline bool isNotFatal( void ) const +00353 { +00354 return !isFatal(); +00355 } +00356 +00357 +00359 +00365 inline bool isWarning( void ) const +00366 { +00367 return ( _code > VI_SUCCESS ); +00368 } +00369 +00370 +00372 +00378 inline bool isSuccess( void ) const +00379 { +00380 return ( _code == VI_SUCCESS ); +00381 } +00382 +00383 private: +00384 +00385 // declared private to prevent assignment +00386 tStatus& operator=(const tStatus& rhs); +00387 +00388 enum +00389 { +00390 kMaxFileNameLength = 101 +00391 }; +00392 +00393 ViStatus _code; +00394 ViChar _fileName[ kMaxFileNameLength ]; +00395 ViUInt32 _lineNumber; +00396 }; +00397 +00398 +00399 // declarations for globally-scoped globals... +00400 inline ViStatus convertStatus( ViUInt8 firmwareStatus ) +00401 { +00402 ViStatus status; +00403 switch (firmwareStatus) +00404 { +00405 // each of these cases corresponds to a unique status code returned by the firmware +00406 case 0x00 : status = kStatusSuccess; +00407 break; +00408 case 0x81 : status = kStatusFWNoMoreHandles; // No more available handles +00409 break; +00410 case 0x82 : status = kStatusFWNoSpace; // No space +00411 break; +00412 case 0x83 : status = kStatusFWNoMoreFiles; // No more files +00413 break; +00414 case 0x84 : status = kStatusFWEndOfFileExpected; // End of file expected +00415 break; +00416 case 0x85 : status = kStatusFWEndOfFile; // End of file reached +00417 break; +00418 case 0x86 : status = kStatusFWNotLinearFile; // Not a linear file +00419 break; +00420 case 0x87 : status = kStatusFWFileNotFound; // File not found +00421 break; +00422 case 0x88 : status = kStatusFWHandleAlreadyClosed; // Handle is already closed +00423 break; +00424 case 0x89 : status = kStatusFWNoLinearSpace; // No linear space available +00425 break; +00426 case 0x8A : status = kStatusFWUndefinedError; // Undefined error +00427 break; +00428 case 0x8B : status = kStatusFWFileIsBusy; // File is busy +00429 break; +00430 case 0x8C : status = kStatusFWNoWriteBuffers; // No write buffers available +00431 break; +00432 case 0x8D : status = kStatusFWAppendNotPossible; // Append not possible +00433 break; +00434 case 0x8E : status = kStatusFWFileIsFull; // File is full +00435 break; +00436 case 0x8F : status = kStatusFWFileExists; // File already exists +00437 break; +00438 case 0x90 : status = kStatusFWModuleNotFound; // Module not found +00439 break; +00440 case 0x91 : status = kStatusFWOutOfBounds; // Out of module I/O map boundary +00441 break; +00442 case 0x92 : status = kStatusFWIllegalFileName; // Illegal file name +00443 break; +00444 case 0x93 : status = kStatusFWIllegalHandle; // Illegal handle +00445 break; +00446 default : +00447 status = kStatusFWUnknownErrorCode; +00448 } +00449 return status; +00450 } +00451 +00452 // prototypes... +00453 +00454 } // namespace nFANTOM100 +00455 +00456 // inline functions and function macros... +00457 +00458 #endif // ___fantom_tStatus_h___ +
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/tStatus_8h.html b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/tStatus_8h.html new file mode 100755 index 0000000..7194a91 --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/documentation/html/tStatus_8h.html @@ -0,0 +1,33 @@ + + + +
+#include <string.h>
+#include "platform.h"
+
+
+Go to the source code of this file.
Namespaces | |
namespace | nFANTOM100 |
Defines | |
+#define | nFANTOM_mLocation __FILE__, __LINE__ |
+#define | nFANTOM_ForceToWarning(s) (((s) >= 0 ) ? (s) : -(s)) |
+#define | nFANTOM_ForceToFatal(s) (((s) <= 0 ) ? (s) : -(s)) |
+ +
+
+ © Copyright 2005-2006, National Instruments Corporation. All rights reserved. +
+ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/includes/fantom/iFile.h b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/includes/fantom/iFile.h new file mode 100755 index 0000000..d9884f9 --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/includes/fantom/iFile.h @@ -0,0 +1,280 @@ +/*! + \file iFile.h + \brief Interface for a file on a LEGO MINDSTORMS NXT. +*/ +/* + © Copyright 2005-2006, + National Instruments Corporation. + All rights reserved. + + File: iFile.h + Originated: 12 May 2005 +*/ + +#ifndef ___fantom_iFile_h___ +#define ___fantom_iFile_h___ + +// includes... + +#ifndef ___fantom_platform_h___ + #include "platform.h" +#endif + +#ifndef ___fantom_tStatus_h___ + #include "tStatus.h" +#endif + + +// defines... + + +namespace nFANTOM100 +{ + // forward declarations... + + // typedefs... + + // classes... + + /*! + \class iFile + \brief Interface to a file on a LEGO MINDSTORMS NXT. + */ + class iFile + { + friend class tNXT; + + // methods + protected: + + //! Destructor + virtual ~iFile() = 0; + + public: + + //! Retrieves the name of this file. + /*! + \param fileName Populated with the name of this file. The file name character array + must be able to accomodate a NULL-terminated, 15.3 formatted module name. That + is, it must have a capacity of 20 bytes. + */ + virtual void getName( ViChar fileName[] ) const = 0; + + //! Retrieves the total size of this file in bytes. + /*! + The returned size is undefined if the specified status is fatal. + + \param status Status chaining object. + \return The total size of this file in bytes. + */ + virtual ViUInt32 getSize( tStatus& status ) = 0; + + //! Retrieves the remaining available size, in bytes, in this file. + /*! + This number is only helpful for data logging files, which can contain variable + amounts of data. + The returned size is undefined if the specified status is fatal. + + \param status Status chaining object. + \return The remaining available size, in bytes, in this file. + */ + virtual ViUInt32 getAvailableSize( tStatus& status ) = 0; + + + //! Opens this file for reading. + /*! + Opens, for reading, the file that corresponds to this object on the associated NXT. + The file is not opened if the specified status is fatal. + + \param status Status chaining object. + */ + virtual void openForRead( tStatus& status ) = 0; + + + //! Open this file for writing. + /*! + Opens, for writing, the file that corresponds to this object on the associated NXT. + If this file doesn't exist on the NXT, it is created. If this file does exist on + the NXT, an error is generated. + The file is not opened if the specified status is fatal. + + \param sizeInBytes Size of the data, in bytes, that will be written to this file. + \param status Status chaining object. + */ + virtual void openForWrite( ViUInt32 sizeInBytes, tStatus& status ) = 0; + + + //! Open this file for linear (contiguous) writing. + /*! + Opens, for linear (contiguous) writing, the file that corresponds to this object on + the associated NXT. If this file doesn't exist on the NXT, it is created. If this + file does exist on the NXT, an error is generated. + The file is not opened if the specified status is fatal. + + \param sizeInBytes Size of the data, in bytes, that will be written to the file. + \param status Status chaining object. + */ + virtual void openForLinearWrite( ViUInt32 sizeInBytes, tStatus& status ) = 0; + + + //! Open this data file for writing. + /*! + Opens, for writing, the data file that corresponds to this object on the associated + NXT. This data file differs from normal files in that a data file can be closed + before the entire file has been written. If this file doesn't exist on the NXT, + it is created. If this file does exist on the NXT, an error is generated. + The file is not opened if the specified status is fatal. + + \param sizeInBytes Size of the data, in bytes, that may be written to the file. + \param status Status chaining object. + */ + virtual void openForDataWrite( ViUInt32 sizeInBytes, tStatus& status ) = 0; + + + //! Open this data file for appending additional data. + /*! + Opens, for appending additional data, the data file that corresponds to this object + on the associated NXT. If this file doesn't exist on the NXT, the behavior is + undefined. If this file does exist on the NXT, the data that is written is + appended to the end of the exiting data. + The file is not opened if the specified status is fatal. + + \param status Status chaining object. + */ + virtual void openForDataAppend( tStatus& status ) = 0; + + + //! Closes this file. + /*! + Closes the file that corresponds to this object on the associated NXT. + The file is not closed if the specified status is fatal. + + \param status Status chaining object. + */ + virtual void close( tStatus& status ) = 0; + + + //! Reads from this file + /*! + Reads the specified number of bytes from this file into the specified buffer. No data + is read if the specified status is fatal. The ownership of the buffer is not + transferred to this file object. + + \param bufferPtr A pointer to the buffer that will be populated with the data that is + read. The capacity of the specified buffer must be at least the specified number + of bytes. + \param numberOfBytes Number of bytes to read. + \param status Status chaining object. + \return The number of bytes actually read from this file. + + \pre This file must have been opened for reading with the iFile::openForRead method. + \post The specified buffer may be deallocated. + */ + virtual ViUInt32 read( ViPBuf bufferPtr, ViUInt32 numberOfBytes, tStatus& status ) = 0; + + + //! Writes to this file + /*! + Writes the specified number of bytes from the specified buffer to this file. No data + is written if the specified status is fatal. The ownership of the buffer is not + transferred to this file object. + + \param bufferPtr A pointer to the buffer that contains the data that will be written. + The capacity of the specified buffer must be at least the specified number of + bytes. + \param numberOfBytes Number of bytes to write to this file. + \param status Status chaining object. + \return The number of bytes actually written to this file. + + \pre This file must have previously been opened for writing. + \post The specified buffer may be deallocated. + */ + virtual ViUInt32 write( const ViByte bufferPtr[], ViUInt32 numberOfBytes, + tStatus& status ) = 0; + + + //! Removes this file + /*! + Removes the file that corresponds to this object on the associated NXT. + The file is not removed if the specified status is fatal. + + \param status Status chaining object. + */ + virtual void remove( tStatus& status ) = 0; + + }; + + + // constants... + const ViUInt8 kProtocolFilenameLength = 19; // 15 basename + 1 dot + 3 extension = 19 + +} // namespace nFANTOM100 + + + // declarations for globally-scoped globals... + + // typedefs... + typedef ViObject nFANTOM100_iFile; + + // prototypes... + extern "C" + { + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_getName( + nFANTOM100_iFile filePtr, + ViChar fileName[], + ViStatus* status ); + + nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iFile_getSize( + nFANTOM100_iFile filePtr, + ViStatus* status ); + + nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iFile_getAvailableSize( + nFANTOM100_iFile filePtr, + ViStatus* status ); + + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_openForRead( + nFANTOM100_iFile filePtr, + ViStatus* status ); + + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_openForWrite( + nFANTOM100_iFile filePtr, + ViUInt32 sizeInBytes, + ViStatus* status ); + + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_openForLinearWrite( + nFANTOM100_iFile filePtr, + ViUInt32 sizeInBytes, + ViStatus* status ); + + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_openForDataWrite( + nFANTOM100_iFile filePtr, + ViUInt32 sizeInBytes, + ViStatus* status ); + + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_openForDataAppend( + nFANTOM100_iFile filePtr, + ViStatus* status ); + + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_close( + nFANTOM100_iFile filePtr, + ViStatus* status ); + + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_read( + nFANTOM100_iFile filePtr, + ViPBuf bufferPtr, + ViUInt32 numberOfBytes, + ViStatus* status ); + + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_write( + nFANTOM100_iFile filePtr, + const ViByte bufferPtr[], + ViUInt32 numberOfBytes, + ViStatus* status ); + + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_remove( + nFANTOM100_iFile filePtr, + ViStatus* status ); + + } + +#endif // ___fantom_iFile_h___ diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/includes/fantom/iFileIterator.h b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/includes/fantom/iFileIterator.h new file mode 100755 index 0000000..5803be8 --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/includes/fantom/iFileIterator.h @@ -0,0 +1,133 @@ +/*! + \file iFileIterator.h + \brief Interface for an iterator for files on a LEGO MINDSTORMS NXT. +*/ +/* + © Copyright 2005-2006, + National Instruments Corporation. + All rights reserved. + + File: iFileIterator.h + Originated: 12 May 2005 +*/ + +#ifndef ___fantom_iFileIterator_h___ +#define ___fantom_iFileIterator_h___ + + +// includes... + +#ifndef ___fantom_platform_h___ + #include "platform.h" +#endif + +#ifndef ___fantom_iFile_h___ + #include "iFile.h" +#endif + +#ifndef ___fantom_tStatus_h___ + #include "tStatus.h" +#endif + + +// defines... + + +namespace nFANTOM100 +{ + // forward declarations... + + // typedefs... + + // classes... + + /*! + \class iFileIterator + \brief Interface to an iterator for files on a LEGO MINDSTORMS NXT. + */ + class iFileIterator + { + friend class tNXT; + + // methods + protected: + + //! Destructor + virtual ~iFileIterator() = 0; + + public: + + //! Creates a file object for the file referenced by this iterator. + /*! + Creates file object for the file referenced by this iterator. An object is not + created if the specified status is fatal or if this iterator refers to the end of + the list. The returned file object should be destroyed using the + iNXT::destroyFile method. + + \param status Status chaining object. + \return A pointer to the iFile object that was created. + */ + virtual iFile* getFile( tStatus& status ) = 0; + + //! Advances this iterator. + /*! + Advances this iterator to the next file that matches the previously specified file + name pattern. If no more files match, this iterator is advanced to the end of the + list. + The iterator is not advanced if the specified status is fatal. + If this iterator is already at the end of the list, a fatal status will be generated. + + \param status Status chaining object. + */ + virtual void advance( tStatus& status ) = 0; + + //! Retrieves the name of the file to which this iterator refers. + /*! + \param fileName Populated with the name of the file to which this iterator refers. + The file name character array must be able to accomodate a NULL-terminated, 15.3 + formatted file name. This is, it must have a capacity of 20 bytes. + \param status Status chaining object. + */ + virtual void getName( ViChar fileName[], tStatus& status ) = 0; + + //! Retrieves the total size, in bytes, of the file to which this iterator refers. + /*! + \param status Status chaining object. + \return The total size of the file in bytes. + */ + virtual ViUInt32 getSize( tStatus& status ) = 0; + + }; + + + // constants... + +} // namespace nFANTOM100 + + + // declarations for globally-scoped globals... + + // typedefs + typedef ViObject nFANTOM100_iFileIterator; + + extern "C" + { + nFANTOM100_kExport nFANTOM100_iFile _VI_FUNCC nFANTOM100_iFileIterator_getFile( + nFANTOM100_iFileIterator iteratorPtr, + ViStatus* status ); + + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFileIterator_advance( + nFANTOM100_iFileIterator iteratorPtr, + ViStatus* status ); + + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFileIterator_getName( + nFANTOM100_iFileIterator iteratorPtr, + ViChar filename[], + ViStatus* status ); + + nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iFileIterator_getSize( + nFANTOM100_iFileIterator iteratorPtr, + ViStatus* status ); + } + +#endif // ___fantom_iFileIterator_h___ diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/includes/fantom/iModule.h b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/includes/fantom/iModule.h new file mode 100755 index 0000000..1f03849 --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/includes/fantom/iModule.h @@ -0,0 +1,154 @@ +/*! + \file iModule.h + \brief Interface for a firmware module on a LEGO MINDSTORMS NXT. +*/ +/* + © Copyright 2005-2006, + National Instruments Corporation. + All rights reserved. + + File: iModule.h + Originated: 8 Aug 2005 +*/ + +#ifndef ___fantom_iModule_h___ +#define ___fantom_iModule_h___ + +#ifndef ___fantom_platform_h___ + #include "platform.h" +#endif + +#ifndef ___fantom_tStatus_h___ + #include "tStatus.h" +#endif + + +// defines... + + +namespace nFANTOM100 +{ + + /*! + \class iModule + \brief Interface to a firmware module on a LEGO MINDSTORMS NXT. + */ + class iModule + { + friend class tNXT; + + // methods + protected: + + //! Destructor + virtual ~iModule() = 0; + + public: + + //! Retrieves the name of this module. + /*! + \param moduleName Populated with the name of this module. The module name character + array must be able to accomodate a NULL-terminated, 15.3 formatted module name. + That is, it must have a capacity of 20 bytes. + */ + virtual void getName( ViChar moduleName[] ) const = 0; + + //! Retrieves the internal module ID of this module. + /*! + \return The internal module ID of this module. + */ + virtual ViUInt32 getModuleID( void ) const = 0; + + //! Retrieves the size in bytes of this module. + /*! + \return The size in bytes of this module. + */ + virtual ViUInt32 getModuleSize( void ) const = 0; + + //! Retrieves the size in bytes of the I/O map associated with this module. + /*! + \return The size in bytes of the I/O map associated with this module. + */ + virtual ViUInt32 getModuleIOMapSize( void ) const = 0; + + //! Reads a portion of this module's I/O map. + /*! + Reads the data located at [I/O map address] + [specified offset in bytes] into the + specified data buffer. The read will attempt to copy the specified number of + bytes. No read occurs if the specified status is fatal. The ownership of data + buffer is not transferred to this module object. + + \param offsetInBytes The index of the byte in the I/O map at which to start the read. + \param numberOfBytes The number of bytes that should be read from the I/O map. + \param dataBufferPtr A pointer to the data buffer that will be populated with the + data that is read. The capacity of the specified data buffer must be at least the + specified number of bytes. + \param status Status chaining object. + \return The number of bytes actually read from the I/O map. + + \post The specified data buffer may be deallocated. + */ + virtual ViUInt32 readIOMap( ViUInt32 offsetInBytes, ViUInt32 numberOfBytes, + ViPBuf dataBufferPtr, tStatus& status ) = 0; + + //! Writes a portion of this module's I/O map. + /*! + Writes the specified data into this module's I/O map. The write starts at [I/O map + address] + [specified offset in bytes] and stops after the specified number of + bytes have been written. No write occurs if the specified status is fatal. The + ownership of data buffer is not transferred to this module object. + + \param offsetInBytes The index of the byte in the I/O map at which to start the write. + \param numberOfBytes The number of bytes to write into the I/O map. + \param dataBufferPtr A pointer to the data buffer that contains the data that will be + written. The capacity of the specified data buffer must be at least the specified + number of bytes. + \param status Status chaining object. + \return The number of bytes actually written into the I/O map. + + \post The specified data buffer may be deallocated. + */ + virtual ViUInt32 writeIOMap( ViUInt32 offsetInBytes, ViUInt32 numberOfBytes, + const ViByte dataBufferPtr[], tStatus& status ) = 0; + + }; + +}; // nFANTOM100 + +typedef ViObject nFANTOM100_iModule; + +extern "C" +{ + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iModule_getName( + nFANTOM100_iModule modulePtr, + ViChar moduleName[], + ViStatus* status ); + + nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iModule_getModuleID( + nFANTOM100_iModule modulePtr, + ViStatus* status ); + + nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iModule_getModuleSize( + nFANTOM100_iModule modulePtr, + ViStatus* status ); + + nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iModule_getIOMapSize( + nFANTOM100_iModule modulePtr, + ViStatus* status ); + + nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iModule_readIOMap( + nFANTOM100_iModule modulePtr, + ViUInt32 offset, + ViUInt32 numberBytesToRead, + ViPBuf dataBuffer, + ViStatus* status ); + + nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iModule_writeIOMap( + nFANTOM100_iModule modulePtr, + ViUInt32 offset, + ViUInt32 numberBytesToWrite, + const ViByte dataBuffer[], + ViStatus* status ); +} + +#endif // ___fantom_iModule_h___ diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/includes/fantom/iModuleIterator.h b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/includes/fantom/iModuleIterator.h new file mode 100755 index 0000000..402bf1a --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/includes/fantom/iModuleIterator.h @@ -0,0 +1,123 @@ +/*! + \file iModuleIterator.h + \brief Interface for an iterator for firmware modules on a LEGO MINDSTORMS NXT. +*/ +/* + © Copyright 2005-2006, + National Instruments Corporation. + All rights reserved. + + File: iModuleIterator.h + Originated: 8 Aug 2005 +*/ + +#ifndef ___fantom_iModuleIterator_h___ +#define ___fantom_iModuleIterator_h___ + + +// includes... + +#ifndef ___fantom_platform_h___ + #include "platform.h" +#endif + +#ifndef ___fantom_iModule_h___ + #include "iModule.h" +#endif + +#ifndef ___fantom_tStatus_h___ + #include "tStatus.h" +#endif + + +// defines... + + +namespace nFANTOM100 +{ + // forward declarations... + + // typedefs... + + // classes... + + /*! + \class iModuleIterator + \brief Interface to an iterator for firmware modules on a LEGO MINDSTORMS NXT. + */ + class iModuleIterator + { + friend class tNXT; + + // methods + protected: + + //! Destructor + virtual ~iModuleIterator() = 0; + + public: + + //! Creates a module object for the module referenced by this iterator. + /*! + Creates a module object for the module referenced by this iterator. An object is not + created if the specified status is fatal or if this iterator refers to the end of + the list. The returned module object should be destroyed using the + iNXT::destroyModule method. + + \param status Status chaining object. + \return A pointer to the iModule object that was created. + */ + virtual iModule* getModule( tStatus& status ) = 0; + + //! Advances this iterator. + /*! + Advances this iterator to the next module that matches the previously specified + module name pattern. If no more modules match, this iterator is advanced to the + end of the list. + The iterator is not advanced if the specified status is fatal. + If this iterator is already at the end of the list, a fatal status will be generated. + + \param status Status chaining object. + */ + virtual void advance( tStatus& status ) = 0; + + //! Retrieves the name of the module to which this iterator refers. + /*! + \param moduleName Populated with the name of the module to which this iterator + refers. The module name character array must be able to accomodate a + NULL-terminated, 15.3 formatted module name. This is, it must have a capacity of + 20 bytes. + \param status Status chaining object. + */ + virtual void getName( ViChar moduleName[], tStatus& status ) = 0; + + }; + + + // constants... + +} // namespace nFANTOM100 + + + // declarations for globally-scoped globals... + + // typedefs + typedef ViObject nFANTOM100_iModuleIterator; + + extern "C" + { + nFANTOM100_kExport nFANTOM100_iModule _VI_FUNCC nFANTOM100_iModuleIterator_getModule( + nFANTOM100_iModuleIterator iteratorPtr, + ViStatus* status ); + + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iModuleIterator_advance( + nFANTOM100_iModuleIterator iteratorPtr, + ViStatus* status ); + + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iModuleIterator_getName( + nFANTOM100_iModuleIterator iteratorPtr, + ViChar moduleName[], + ViStatus* status ); + } + +#endif // ___fantom_iModuleIterator_h___ diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/includes/fantom/iNXT.h b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/includes/fantom/iNXT.h new file mode 100755 index 0000000..ba61db8 --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/includes/fantom/iNXT.h @@ -0,0 +1,666 @@ +/*! + \file iNXT.h + \brief Interface for a LEGO MINDSTORMS NXT and declaration of its factory. +*/ +/* + © Copyright 2005-2006, + National Instruments Corporation. + All rights reserved. + + File: iNXT.h + Originated: 12 May 2005 +*/ + +#ifndef ___fantom_iNXT_h___ +#define ___fantom_iNXT_h___ + + +// includes... + +#ifndef ___fantom_platform_h___ + #include "platform.h" +#endif + +#ifndef ___fantom_iFile_h___ + #include "iFile.h" +#endif + +#ifndef ___fantom_iFileIterator_h___ + #include "iFileIterator.h" +#endif + +#ifndef ___fantom_iModule_h___ + #include "iModule.h" +#endif + +#ifndef ___fantom_iModuleIterator_h___ + #include "iModuleIterator.h" +#endif + +#ifndef ___fantom_iNXTIterator_h___ + #include "iNXTIterator.h" +#endif + +#ifndef ___fantom_tStatus_h___ + #include "tStatus.h" +#endif + +// defines... + + +namespace nFANTOM100 +{ + // forward declarations... + + // typedefs... + + // classes... + + /*! + \class iNXT + \brief Interface to a LEGO MINDSTORMS NXT. + */ + class iNXT + { + // methods + protected: + + //! Destructor + virtual ~iNXT() = 0; + + public: + + //! Enumeration of buffer types on the NXT + enum tBuffer + { + // The buffer associated with the standard port. + kBufferStandard, + + // The buffer associated with the high-speed port. + kBufferHighSpeed + }; + + //! Creates a file object for the file with the specified name on this NXT. + /*! + Invoking this method does not actually create a file on the NXT. Rather, this method + creates a file object which may be used to open a file on this NXT, for reading or + writing, or may be used to delete a file on the NXT. + A file is not created if the specified status is fatal. + The returned file object should be destroyed using the iNXT::destroyFile method. + + \param fileName Name of the file. The file name must conform to the 15.3 naming + convention and be NULL-terminated. + \param status Status chaining object. + \return A pointer to the iFile object that was created. + */ + virtual iFile* createFile( ViConstString fileName, tStatus& status ) = 0; + + + //! Destroys the specified file object. + /*! + Invoking this method does not actually delete a file on the NXT. Rather, this method + destroys a file object which may have been used to open a file on this NXT for + reading or writing, or may have been used to delete a file on the NXT. + + \param filePtr Pointer to the file object to destroy. + */ + virtual void destroyFile( iFile* filePtr ) = 0; + + + //! Creates an iterator to the files on this NXT. + /*! + The iterator traverses those files on this NXT that match the specified file name + pattern. + The iterator is not created if the specified status is fatal. + The returned file iterator object should be destroyed using the + iNXT::destroyFileIterator method. + + \param fileNamePattern The file name pattern against which to match when iterating + over the files on this NXT. The file name pattern may contain wildcards. The + wildcards may be used in the following manner: *.* (all files on this NXT); + fileBaseName.* (all files on this NXT with the specified base name regardless of + extension); *.fileExtension (all files on this NXT with the specified extension, + regardless of basename); fileBaseName.fileExtension (the file on this NXT with the + specified base name and extension). + \param status Status chaining object. + \return A pointer to the iFileIterator object that was created. + */ + virtual iFileIterator* createFileIterator( ViConstString fileNamePattern, + tStatus& status ) = 0; + + + //! Destroys the specified file iterator. + /*! + \param fileIteratorPtr A pointer to the file iterator to destroy. + */ + virtual void destroyFileIterator( iFileIterator* fileIteratorPtr ) = 0; + + //! Creates a module object for the module with the specified name on this NXT. + /*! + Invoking this method does not actually create a module on the NXT. Rather, this + method creates a module object which may be used to access an I/O map on this NXT. + A module is not created if the specified status is fatal. + The returned module object should be destroyed using the iNXT::destroyModule method. + + \param moduleName The name of the module. The module name must conform to the 15.3 + naming convention and be NULL-terminated. + \param moduleID The NXT-internal ID of the module. + \param moduleSizeInBytes The number of bytes the module occupies. + \param ioMapSizeInBytes The number of bytes the module's I/O map occupies. + \param status Status chaining object. + \return A pointer to the iModule object that was created. + */ + virtual iModule* createModule( ViConstString moduleName, ViUInt32 moduleID, + ViUInt32 moduleSizeInBytes, ViUInt32 ioMapSizeInBytes, tStatus& status ) = 0; + + //! Destroys the specified module object. + /*! + Invoking this method does not actually delete a module on this NXT. Rather, this + method destroys a module object which may have been used to access an I/O map on + this NXT. + + \param modulePtr Pointer to the module object to destroy. + */ + virtual void destroyModule( iModule* modulePtr ) = 0; + + + //! Creates an iterator to the modules on this NXT. + /*! + The iterator traverses those modules on this NXT that match the specified module name + pattern. + The iterator is not created if the specified status is fatal. + The returned module iterator object should be destroyed using the + iNXT::destroyModuleIterator method. + + \param moduleNamePattern The module name pattern against which to match. The module + name pattern may contain wildcards. Since extensions are implicit in the case of + modules, a wildcard may only be used for the module name, as in "*.mod". + \param status Status chaining object. + \return A pointer to an iModuleIterator object that was created. + */ + virtual iModuleIterator* createModuleIterator( ViConstString moduleNamePattern, + tStatus& status ) = 0; + + + //! Destroys the specified module iterator. + /*! + \param moduleIteratorPtr A pointer to the module iterator object to destroy. + */ + virtual void destroyModuleIterator( iModuleIterator* moduleIteratorPtr ) = 0; + + //! Retrieves the firmware version of this NXT. + /*! + Returns the protocol and firmware versions installed on this NXT. + The current version of this driver supports a protocol major version number of 1 and a + firmware major version number of 1. If either of these major version numbers is a + value other than 1, the driver will not attempt to communicate to the NXT. + The returned versions are undefined if the specified status is fatal. + + \param protocolVersionMajorRef Reference to parameter that will be populated with the + major protocol version. + \param protocolVersionMinorRef Reference to parameter that will be populated with the + minor protocol version. + \param firmwareVersionMajorRef Reference to parameter that will be populated with the + major firmware verison. + \param firmwareVersionMinorRef Reference to parameter that will be populated with the + minor firmware verison. + \param status Status chaining object. + */ + virtual void getFirmwareVersion( ViUInt8& protocolVersionMajorRef, + ViUInt8& protocolVersionMinorRef, ViUInt8& firmwareVersionMajorRef, + ViUInt8& firmwareVersionMinorRef, tStatus& status ) = 0; + + + //! Sends the specified direct command to this NXT. + /*! + For more information on direct commands, refer to the LEGO MINDSTORMS NXT Direct + commands document. + The command is not sent if the specified status is fatal. + The command buffer must be non-NULL and the command buffer size in bytes must be + non-zero. + If require response is set to true, the response buffer must be non-NULL and the + response buffer size in bytes must be non-zero. + If require response is set to false, the response buffer must be NULL and the + response buffer size in bytes must be zero. + Both of the buffer size parameters must be small enough to fit in one packet for + whichever bus the NXT is connected over (USB or Bluetooth). This means the + maximum length for a direct command over USB is 63 bytes; over Bluetooth, 65,533 + bytes. + If any of these requirements are violated, VI_ERROR_USER_BUF will be returned. + + \param requireResponse Boolean flag indicating if a response is required. + \param commandBufferPtr Buffer containing the direct command to send to the NXT. + \param commandBufferSizeInBytes Number of bytes in the command buffer. + \param responseBufferPtr Buffer that will be populated with the response to the direct + command. + \param responseBufferSizeInBytes Capacity of the response buffer in bytes. + \param status Status chaining object. + \return Number of bytes written to the response buffer. + */ + virtual ViUInt32 sendDirectCommand( ViBoolean requireResponse, const ViByte commandBufferPtr[], + ViUInt32 commandBufferSizeInBytes, ViPBuf responseBufferPtr, + ViUInt32 responseBufferSizeInBytes, tStatus& status ) = 0; + + //! Downloads firmware to this NXT. + /*! + The NXT must already be in firmware-download mode. + + \param firmwareBufferPtr The buffer containing the new firmware binary image. + \param firmwareBufferSizeInBytes The number of bytes in the new firmware image. + \param status Status chaining object. + */ + virtual void downloadFirmware( const ViByte firmwareBufferPtr[], + ViUInt32 firmwareBufferSizeInBytes, tStatus& status ) = 0; + + + //! Writes, in a generic fashion, to this NXT. + /*! + Writes a command directly to this NXT. In general, this method isn't used and, + instead, the sendDirectCommand and other more specific methods are invoked when + communication to the NXT. + The write doesn not occur if the specified status is fatal. + + \param bufferPtr A pointer to the buffer that contains the command that will be + written. + \param numberOfBytes Size of the buffer. + \param status Status chaining object. + \return The number of bytes actually written to the NXT. + */ + virtual ViUInt32 write( const ViByte bufferPtr[], ViUInt32 numberOfBytes, + tStatus& status ) = 0; + + //! Reads, in a generic fashion, from this NXT. + /*! + Reads a response directly from this NXT. In general, this method isn't used and, + instead, the sendDirectCommand and other more specific methods are invoked when + communication to the NXT. + The command is not sent if the specified status is fatal. + + \param bufferPtr A pointer to the buffer that will be populated with the response. + \param numberOfBytes Number of bytes expected to be read from this NXT. + \param status Status chaining object. + \return The number of bytes actually read from this NXT. + */ + virtual ViUInt32 read ( ViPBuf bufferPtr, ViUInt32 numberOfBytes, tStatus& status ) = 0; + + //! Reboots this NXT into firmware-download mode. + /*! + This is required before invoking the downloadFirmware method. + The reboot does not occur is the specified status is fatal. + + \param status Status chaining object. + */ + virtual void bootIntoFirmwareDownloadMode( tStatus& status ) = 0; + + //! Sets the name of this NXT. + /*! + The specified name will be displayed on the NXT, show up during Bluetooth scans, and + returned when the getDeviceInfo method is called. + + \param newName The name for the NXT. The name can be at most 15 characters. However, + the NXT can only display 8 characters. The string must be NULL terminated. + \param status Status chaining object. + */ + virtual void setName( ViConstString newName, tStatus& status ) = 0; + + //! Retrieves basic information about this NXT. + /*! + Retrieves the name of this NXT, its Bluetooth address, the Bluetooth signal strength, + and the number of bytes available. + Information retrieval is not done if specified status is fatal. + + \param name Populated with the name of this NXT. The name character array must be + able to accomodate a NULL-terminated 15 character name. That is, it must have a + capacity of 16 bytes. + \param bluetoothAddress Populated with this NXT's Bluetooth address. The bluetooth + address array must have a capacity of six bytes. + \param signalStrength Populated with strength of the signal for this NXT's four + Bluetooth conenctions. The signal strength array must have a capacity of four + bytes. + \param availableFlash Populated with the amount of memory in bytes that is not + occupied by firmware or user files. + \param status Status chaining object. + */ + virtual void getDeviceInfo( ViChar name[], ViByte bluetoothAddress[], + ViUInt8 signalStrength[], ViUInt32 &availableFlash, tStatus& status ) = 0; + + //! Erases all files from this NXT, leaving only the firmware. + /*! + All programs, sounds, and data logs are erased. + The erasure does not occur if specified status is fatal. + + \param status Status chaining object. + */ + virtual void eraseUserFlash( tStatus& status ) = 0; + + //! Polls the data buffer on this NXT for the number of bytes available to be read. + /* + The data buffer is not polled if the specified status is fatal. + + \param bufferSelector The buffer from which to read. + \param status Status chaining object. + \return The number of bytes in the buffer available to be read. + */ + virtual ViUInt32 pollAvailableLength( tBuffer bufferSelector, tStatus& status ) = 0; + + //! Reads data from the data buffer on this NXT. + /*! + Data is not read if the specified status is fatal. + + \param dataBuffer Populated with the data that is read from the specified buffer. + \param bufferSelector The buffer from which to read. + \param numberOfBytesToRead The number of bytes to read from the data buffer. + \param status Status chaining object. + \return The number of bytes actually read from the data buffer. + */ + virtual ViUInt32 readBufferData( ViPBuf dataBuffer, tBuffer bufferSelector, + ViUInt32 numberOfBytesToRead, tStatus& status ) = 0; + + //! Retrieves the resource string for this NXT's session. + /* + An example resource string could look like the one of the following: + BTH::LEGOBrick::00:16:53:04:05:06::5 + BTH::LEGOBrick::00:16:53:04:05:06::1 + BTH::Brick2::00:16:53:44:FF:66 + USB0::0x0694::0x0002::0016535127BA::RAW + + \param resourceString Populated with the resource string. The resource string must + have a capacity of 256 bytes. + \param status Status chaining object. + */ + virtual void getResourceString( ViChar resourceString[], tStatus& status ) = 0; + + //! Resets the Bluetooth module on this NXT to its factory settings. + /* + \param status Status chaining object. + */ + virtual void bluetoothFactoryReset( tStatus& status ) = 0; + + //! Creates an NXT object + /*! + Creates an NXT object representing the specified NXT. + The NXT object is not created if the specified status is fatal. + The returned NXT object should be destroyed using the iNXT::destroyNXT method. + + \param resourceString A string identifying which resource should be opened. A list + of possible strings can be obtained using an iNXTIterator (refer to the + createNXTIterator method). + \param status Status chaining object. + \param checkFirmwareVersion A boolean flag that specifies whether version validation + should occur (defaults to true). + \return A pointer to the iNXT object that was created. + */ + nFANTOM100_kExport static iNXT* _VI_FUNCC createNXT( ViConstString resourceString, + tStatus& status, ViBoolean checkFirmwareVersion = true ); + + //! Destroys an NXT object + /*! + \param nxtPtr A pointer to the NXT object to destroy; may be NULL + */ + nFANTOM100_kExport static void _VI_FUNCC destroyNXT( iNXT* nxtPtr ); + + //! Creates an NXT iterator. + /*! + The NXT iterator can be used to find all NXTs that are connected (USB) or in range + (Bluetooth). + The NXT iterator is not created if the specified status is fatal. + The returned NXT iterator object should be destroyed using the + iNXT::destroyNXTIterator method. + + \param searchBluetooth A boolean flag that specifies if the iterator should traverse + NXTs via Bluetooth. + \param bluetoothSearchTimeoutInSeconds The minimum number of seconds that should be + spent waiting for Bluetooth devices to respond. + \param status Status chaining object. + \return A pointer to the iNXTIterator object that was created. + */ + nFANTOM100_kExport static iNXTIterator* _VI_FUNCC createNXTIterator( + ViBoolean searchBluetooth, ViUInt32 bluetoothSearchTimeoutInSeconds, + tStatus& status ); + + //! Destroys an NXT iterator object. + /* + \param iterPtr A pointer to the iNXTIterator object to destroy. + */ + nFANTOM100_kExport static void _VI_FUNCC destroyNXTIterator( iNXTIterator* iterPtr ); + + //! Pairs with an NXT via Bluetooth. + /*! + Programmatically pairs the specified NXT to this computer and, on Windows, creates a + virtual serial port to use for communication with that NXT. However, clients + should not depend on the creation of this virtual serial port. + The pairing is not done if the specified status is fatal. + + \param resourceName The resource string that specifies the NXT with which to pair. + \param passkey A string containing the passkey the computer should exchange with the + device. The passkey cannot be longer than 15 characters and must be + NULL-terminated. + \param pairedResourceName A Bluetooth resource string representing the paired device. + On Windows, the specified resourceName is suffixed with the COM port; On Mac OS X, + the RFCOMM channel identifier. The resource string must have a capacity of 256 + bytes. + \param status Status chaining object. + */ + nFANTOM100_kExport static void _VI_FUNCC pairBluetooth( ViConstString resourceName, + ViConstString passkey, ViChar pairedResourceName[], tStatus& status ); + + //! Unpairs with an NXT via Bluetooth. + /*! + Programmatically destroys the Bluetooth pairing that was previously established + between this computer and the specified NXT. On Mac OS X, this method has no + effect and doesn't generate a fatal status. + The unpairing is not done if the specified status is fatal. + + \param resourceName The resource string that specifies the NXT with which to unpair. + \param status Status chaining object. + */ + nFANTOM100_kExport static void _VI_FUNCC unpairBluetooth( ViConstString resourceName, + tStatus& status ); + + //! Determines if the NXT associated with the specified resource string is paired. + /*! + The determination is not done if the specified status is fatal. + + \param resourceName A resource string that specifies the NXT for which to check its + pairing status. + \param status Status chaining object. + \return VI_TRUE if the NXT is paired with this computer (or if it is connected via + USB); VI_FALSE otherwise. + */ + nFANTOM100_kExport static ViBoolean _VI_FUNCC isPaired( ViConstString resourceName, + tStatus& status ); + + //! Finds the NXT that is currently in firmware-download mode. + /*! + Note that only a single NXT may be in firmware-download mode at a time. + + \param resourceName Populated with the resource string. The resource string must + have a capacity of 256 bytes. + \param status Status chaining object. + */ + nFANTOM100_kExport static void findDeviceInFirmwareDownloadMode( ViChar resourceName[], + tStatus& status ); + + + private: + + }; + + // constants... + +} // namespace nFANTOM100 + + + // declarations for globally-scoped globals... + + // typedefs... + typedef ViObject nFANTOM100_iNXT; + + // prototypes... + extern "C" + { + + nFANTOM100_kExport nFANTOM100_iNXTIterator _VI_FUNCC nFANTOM100_createNXTIterator( + ViBoolean searchBluetooth, + ViUInt32 bluetoothSearchTimeoutInSeconds, + ViStatus* status ); + + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_destroyNXTIterator( + nFANTOM100_iNXTIterator iterPtr, + ViStatus* status ); + + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_pairBluetooth( + ViConstString resourceName, + ViConstString passkey, + ViChar pairedResourceName[], + ViStatus* status ); + + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_unpairBluetooth( + ViConstString resourceName, + ViStatus* status ); + + nFANTOM100_kExport ViBoolean _VI_FUNCC nFANTOM100_isPaired( + ViConstString resourceName, + ViStatus* status ); + + nFANTOM100_kExport nFANTOM100_iNXT _VI_FUNCC nFANTOM100_createNXT( + ViConstString resourceString, + ViStatus* status, + ViBoolean checkFirmwareVersion ); + + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_destroyNXT( + nFANTOM100_iNXT nxtPtr, + ViStatus* status ); + + nFANTOM100_kExport nFANTOM100_iFile _VI_FUNCC nFANTOM100_iNXT_createFile( + nFANTOM100_iNXT nxtPtr, + ViConstString fileName, + ViStatus* status ); + + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_destroyFile( + nFANTOM100_iNXT nxtPtr, + nFANTOM100_iFile filePtr, + ViStatus* status ); + + nFANTOM100_kExport nFANTOM100_iFileIterator _VI_FUNCC nFANTOM100_iNXT_createFileIterator( + nFANTOM100_iNXT nxtPtr, + ViConstString fileNamePattern, + ViStatus* status ); + + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_destroyFileIterator( + nFANTOM100_iNXT nxtPtr, + nFANTOM100_iFileIterator fileIteratorPtr, + ViStatus* status ); + + nFANTOM100_kExport nFANTOM100_iModule _VI_FUNCC nFANTOM100_iNXT_createModule( + nFANTOM100_iNXT nxtPtr, + ViConstString moduleName, + ViUInt32 moduleID, + ViUInt32 moduleSize, + ViUInt32 ioMapSizeInBytes, + ViStatus* status ); + + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_destroyModule( + nFANTOM100_iNXT nxtPtr, + nFANTOM100_iModule modulePtr, + ViStatus* status ); + + nFANTOM100_kExport nFANTOM100_iModuleIterator _VI_FUNCC nFANTOM100_iNXT_createModuleIterator( + nFANTOM100_iNXT nxtPtr, + ViConstString moduleNamePattern, + ViStatus* status ); + + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_destroyModuleIterator( + nFANTOM100_iNXT nxtPtr, + nFANTOM100_iModuleIterator moduleIteratorPtr, + ViStatus* status ); + + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_getFirmwareVersion( + nFANTOM100_iNXT nxtPtr, + ViUInt8* protocolVersionMajorPtr, + ViUInt8* protocolVersionMinorPtr, + ViUInt8* firmwareVersionMajorPtr, + ViUInt8* firmwareVersionMinorPtr, + ViStatus* status ); + + nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iNXT_sendDirectCommand( + nFANTOM100_iNXT nxtPtr, + ViBoolean requireResponse, + const ViByte commandBufferPtr[], + ViUInt32 commandBufferSizeInBytes, + ViPBuf responseBufferPtr, + ViUInt32 responseBufferSizeInBytes, + ViStatus* status ); + + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_findDeviceInFirmwareDownloadMode( + ViChar resourceString[], + ViStatus* status ); + + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_downloadFirmware( + nFANTOM100_iNXT nxtPtr, + const ViByte firmwareBufferPtr[], + ViUInt32 firmwareBufferSize, + ViStatus* status ); + + nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iNXT_write( + nFANTOM100_iNXT nxtPtr, + const ViByte bufferPtr[], + ViUInt32 numberOfBytes, + ViStatus* status ); + + nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iNXT_read( + nFANTOM100_iNXT nxtPtr, + ViPBuf bufferPtr, + ViUInt32 numberOfBytes, + ViStatus* status ); + + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_bootIntoFirmwareDownloadMode( + ViConstString resouceName, + ViStatus* status ); + + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_setName( + nFANTOM100_iNXT nxtPtr, + ViConstString newName, + ViStatus* status ); + + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_getDeviceInfo( + nFANTOM100_iNXT nxtPtr, + ViChar name[], + ViByte bluetoothAddress[], + ViUInt8 signalStrength[], + ViUInt32* availableFlash, + ViStatus* status ); + + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_eraseUserFlash( + nFANTOM100_iNXT nxtPtr, + ViStatus* status ); + + nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iNXT_pollAvailableLength( + nFANTOM100_iNXT nxtPtr, + ViUInt32 bufferIndex, + ViStatus* status ); + + nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iNXT_readBufferData( + nFANTOM100_iNXT nxtPtr, + ViPBuf dataBuffer, + ViUInt32 bufferIndex, + ViUInt32 numberOfBytesToRead, + ViStatus* status ); + + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_getResourceString( + nFANTOM100_iNXT nxtPtr, + ViChar resourceString[], + ViStatus* status ); + + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXT_bluetoothFactoryReset( + nFANTOM100_iNXT nxtPtr, + ViStatus* status ); + + + } // extern "C" + + +// inline functions and function macros... + + +#endif // ___fantom_iNXT_h___ diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/includes/fantom/iNXTIterator.h b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/includes/fantom/iNXTIterator.h new file mode 100755 index 0000000..6f43537 --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/includes/fantom/iNXTIterator.h @@ -0,0 +1,120 @@ +/*! + \file iNXTIterator.h + \brief Interface used for searching for LEGO MINDSTORMS NXTs. +*/ +/* + © Copyright 2005-2006, + National Instruments Corporation. + All rights reserved. + + File: iNXTIterator.h + Originated: 17 Oct 2005 +*/ + +#ifndef ___fantom_iNXTIterator_h___ +#define ___fantom_iNXTIterator_h___ + + +// includes... + +#ifndef ___fantom_platform_h___ + #include "platform.h" +#endif + +#ifndef ___fantom_tStatus_h___ + #include "tStatus.h" +#endif + + +// defines... + + +namespace nFANTOM100 +{ + // forward declarations... + class iNXT; + + // typedefs... + + // classes... + + /*! + \class iNXTIterator + \brief Interface to an iterator for LEGO MINDSTORMS NXTs. + */ + class iNXTIterator + { + friend class iNXT; + + // methods + protected: + + //! Destructor + virtual ~iNXTIterator() = 0; + + public: + + //! Retrieves the name of the NXT to which this iterator refers. + /* + \param resourceName Populated with the name of the NXT to which this iterator + currently refers. The resource name character array must have a capacity of 256 + bytes. + \param status Status chaining object. + */ + virtual void getName( ViChar resourceName[], tStatus& status ) const = 0; + + //! Advances this iterator. + /*! + Advances this iterator to the next NXT that was found. If no more NXTs are found, + this iterator is advanced to the end of the list. + The iterator is not advanced if the specified status is fatal. + If this iterator is already at the end of the list, a fatal status will be generated. + + \param status Status chaining object. + */ + virtual void advance( tStatus& status ) = 0; + + //! Creates an NXT object for the NXT referenced by this iterator. + /* + Creates an NXT object for the NXT referenced by this iterator. An object is not + created if the specified status is fatal or if this iterator refers to the end of + the list. The returned iNXT object should be destroyed using the iNXT::destroyNXT + method. + + \param status Status chaining object. + \return A pointer to the iNXT object that was created. + */ + virtual iNXT* getNXT( tStatus& status ) = 0; + }; + + + // constants... + +} // namespace nFANTOM100 + + + // declarations for globally-scoped globals... + + // typedefs + typedef ViObject nFANTOM100_iNXTIterator; + + // we must duplicate this typedef for the getNXT C wrapper + typedef ViObject nFANTOM100_iNXT; + + extern "C" + { + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXTIterator_getName( + nFANTOM100_iNXTIterator iteratorPtr, + ViChar resourceName[], + ViStatus* status ); + + nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iNXTIterator_advance( + nFANTOM100_iNXTIterator iteratorPtr, + ViStatus* status ); + + nFANTOM100_kExport nFANTOM100_iNXT _VI_FUNCC nFANTOM100_iNXTIterator_getNXT( + nFANTOM100_iNXTIterator iteratorPtr, + ViStatus* status ); + } + +#endif // ___fantom_iNXTIterator_h___ diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/includes/fantom/platform.h b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/includes/fantom/platform.h new file mode 100755 index 0000000..7455796 --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/includes/fantom/platform.h @@ -0,0 +1,94 @@ +/*! + \file platform.h + \brief This file contains platform-related defines. +*/ +/* + © Copyright 2005, + National Instruments Corporation. + All rights reserved. + + File: platform.h + Originated: 23 June 2005 +*/ + + +#ifndef ___fantom_platform_h___ +#define ___fantom_platform_h___ + +#ifndef __VISATYPE_HEADER__ + #include "visatype.h" +#endif + + +#define nFANTOM100_kOSMacOSX 0 +#define nFANTOM100_kOSWin32 0 + +#define nFANTOM100_kProcessorI386 0 +#define nFANTOM100_kProcessorPPC 0 + +#define nFANTOM100_kCompilerMSVC 0 +#define nFANTOM100_kCompilerApple 0 + + +#if (( defined( __GNUG__ ) || defined( __GNUC__ )) && defined( __APPLE__ )) + + #undef nFANTOM100_kOSMacOSX + #define nFANTOM100_kOSMacOSX 1 + + #undef nFANTOM100_kCompilerApple + #define nFANTOM100_kCompilerApple ( __GNUC__ * 10000 \ + + __GNUC_MINOR__ * 100 \ + + __GNUC_PATCHLEVEL__ ) + + #if ( defined( __ppc__ )) + #undef nFANTOM100_kProcessorPPC + #define nFANTOM100_kProcessorPPC 1 + + #define nFANTOM100_kBigEndian 1 + #define nFANTOM100_kLittleEndian 0 + #elif ( defined( __i386__ )) + #undef nFANTOM100_kProcessorI386 + #define nFANTOM100_kProcessorI386 1 + + #define nFANTOM100_kBigEndian 0 + #define nFANTOM100_kLittleEndian 1 + #else + #error Unknown processor. + #endif + + #ifdef nFANTOM100_kExportSymbols + #define nFANTOM100_kExport __attribute__ ((section ("__TEXT,__export"))) + #else + #define nFANTOM100_kExport + #endif + + +#elif ( defined( _MSC_VER ) && ( defined( _M_IX86 ) || defined( _M_I86 ))) + + #undef nFANTOM100_kOSWin32 + #define nFANTOM100_kOSWin32 1 + + #undef nFANTOM100_kCompilerMSVC + #define nFANTOM100_kCompilerMSVC _MSC_VER + + #undef nFANTOM100_kProcessorI386 + #define nFANTOM100_kProcessorI386 1 + + #ifdef nFANTOM100_kExportSymbols + #define nFANTOM100_kExport __declspec(dllexport) + #else + #define nFANTOM100_kExport __declspec(dllimport) + #endif + + #define nFANTOM100_kBigEndian 0 + #define nFANTOM100_kLittleEndian 1 + +#else + + #error Unknown platform. + +#endif + + +#endif // ___fantom_platform_h___ + diff --git a/LEGO MINDSTORMS NXT Software Developer Kit/fantom/includes/fantom/tStatus.h b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/includes/fantom/tStatus.h new file mode 100755 index 0000000..7622c63 --- /dev/null +++ b/LEGO MINDSTORMS NXT Software Developer Kit/fantom/includes/fantom/tStatus.h @@ -0,0 +1,458 @@ +/*! + \file tStatus.h + \brief Status code class +*/ +/* + © Copyright 2005-2006, + National Instruments Corporation. + All rights reserved. + + File: tStatus.h + Originated: 10 March 2005 +*/ + +#ifndef ___fantom_tStatus_h___ +#define ___fantom_tStatus_h___ + +// includes ... + +#ifndef ___fantom_platform_h___ + #include "platform.h" +#endif + +#include