#include <comm.h>
Public Member Functions | |
| NXTComm () | |
| bool | Open () |
| Initiates the NXT connection. | |
| bool | OpenBT () |
| Initiates the NXT connection through Bluetooth. | |
| bool | OpenBT (char *name) |
| Initiates a specific NXT connection through Bluetooth. | |
| void | Close () |
| Closes the NXT connection. | |
| void | SendDirectCommand (ViBoolean response, ViByte *dc_buf, int dc_buf_size, ViByte *re_buf, int re_buf_size) |
| Sends a direct command to the NXT. | |
| double | GetProtocolVersion () |
| double | GetFirmwareVersion () |
| std::string | GetName () |
| bool | SetName (char *name) |
| double | GetAvailableFlash () |
| Returns the amount of flash memory left. | |
| NXTFile | GetNXTFile (std::string filename, bool &isFatal) |
| Retrieves a specified file into an NXTFile. | |
| NXTFileIterator | GetFileIterator (std::string pattern, bool &isFatal) |
| Searches for files on the NXT and stores the results in an NXTFileIterator. | |
| void | destroyFileIterator (NXTFileIterator &iter) |
| Destroys an NXTFileIterator. | |
| void | destroyFile (NXTFile &file) |
| Destroys an NXTFile. | |
| NXTModuleIterator | GetModuleIterator (std::string pattern, int &statusCode) |
| Searches for modules on the NXT and stores the results in an NXTModuleIterator. | |
| void | destroyModuleIterator (NXTModuleIterator &iter) |
| Destroys an NXTModuleIterator. | |
| NXTModule | GetModule (std::string moduleName, int moduleID, int moduleSize, int ioMapSize, int &statCode) |
| Retrieves a specified module into an NXTModule. | |
| void | destroyModule (NXTModule &module) |
| Destroys an NXTModule. | |
Public Attributes | |
| nFANTOM100::tStatus | status |
| nFANTOM100::iNXTIterator * | nxtIteratorPtr |
| nFANTOM100::iNXT * | nxtPtr |
| nFANTOM100::iFileIterator * | fileIteratorPtr |
Definition at line 193 of file comm.h.
| Comm::NXTComm::NXTComm | ( | ) | [inline] |
| bool Comm::NXTComm::Open | ( | ) |
Initiates the NXT connection.
Returns true if it completed without error. Returns false if it failed. You should not continue to use the interface functions if this happens. Refer to example.cpp for info on how to properly handle this.
| bool Comm::NXTComm::OpenBT | ( | ) |
Initiates the NXT connection through Bluetooth.
Returns true if it completed without error. Returns false if it failed. You should not continue to use the interface functions if this happens. Refer to example.cpp for info on how to properly handle this.
| bool Comm::NXTComm::OpenBT | ( | char * | name | ) |
Initiates a specific NXT connection through Bluetooth.
Returns true if it completed without error. Returns false if it failed. You should not continue to use the interface functions if this happens. Refer to example.cpp for info on how to properly handle this.
| void Comm::NXTComm::Close | ( | ) |
Closes the NXT connection.
| void Comm::NXTComm::SendDirectCommand | ( | ViBoolean | response, | |
| ViByte * | dc_buf, | |||
| int | dc_buf_size, | |||
| ViByte * | re_buf, | |||
| int | re_buf_size | |||
| ) |
Sends a direct command to the NXT.
This low-level function is used to send commands to the NXT - just like all the other functions do. The only difference is that this function is harder to use, but in turn, provides much more control of the NXT. For a reference about direct commands, look in the PDF titled Appendix 2.
| response | Whether or not you want to recieve a response from the direct command. | |
| dc_buf | The buffer that contains the direct command. | |
| dc_buf_size | The number of bytes in the direct command buffer. | |
| re_buf | The buffer that will contain the response to the direct command if specified. | |
| re_buf_size | The number of bytes in the response buffer. |
| double Comm::NXTComm::GetProtocolVersion | ( | ) |
| double Comm::NXTComm::GetFirmwareVersion | ( | ) |
| std::string Comm::NXTComm::GetName | ( | ) |
| bool Comm::NXTComm::SetName | ( | char * | name | ) |
| double Comm::NXTComm::GetAvailableFlash | ( | ) |
Returns the amount of flash memory left.
| NXTFile Comm::NXTComm::GetNXTFile | ( | std::string | filename, | |
| bool & | isFatal | |||
| ) |
Retrieves a specified file into an NXTFile.
| NXTFileIterator Comm::NXTComm::GetFileIterator | ( | std::string | pattern, | |
| bool & | isFatal | |||
| ) |
Searches for files on the NXT and stores the results in an NXTFileIterator.
| void Comm::NXTComm::destroyFileIterator | ( | NXTFileIterator & | iter | ) |
Destroys an NXTFileIterator.
| NXTModuleIterator Comm::NXTComm::GetModuleIterator | ( | std::string | pattern, | |
| int & | statusCode | |||
| ) |
Searches for modules on the NXT and stores the results in an NXTModuleIterator.
| void Comm::NXTComm::destroyModuleIterator | ( | NXTModuleIterator & | iter | ) |
Destroys an NXTModuleIterator.
| NXTModule Comm::NXTComm::GetModule | ( | std::string | moduleName, | |
| int | moduleID, | |||
| int | moduleSize, | |||
| int | ioMapSize, | |||
| int & | statCode | |||
| ) |
Retrieves a specified module into an NXTModule.
| nFANTOM100::tStatus Comm::NXTComm::status |
| nFANTOM100::iNXTIterator* Comm::NXTComm::nxtIteratorPtr |
| nFANTOM100::iNXT* Comm::NXTComm::nxtPtr |
| nFANTOM100::iFileIterator* Comm::NXTComm::fileIteratorPtr |