Main Page Namespace List Compound List File List Namespace Members Compound Members

# nFANTOM100::iModule Class Reference

Interface to a firmware module on a LEGO MINDSTORMS NXT. More...

`#include <iModule.h>`

List of all members.

## 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

## Detailed Description

Interface to a firmware module on a LEGO MINDSTORMS NXT.

## Member Function Documentation

virtual ViUInt32 nFANTOM100::iModule::getModuleID | ( | void |  | ) | const`[pure virtual]`

Retrieves the internal module ID of this module.

Returns:
  The internal module ID of this module.

virtual ViUInt32 nFANTOM100::iModule::getModuleIOMapSize | ( | void |  | ) | const`[pure virtual]`

Retrieves the size in bytes of the I/O map associated with this module.

Returns:
  The size in bytes of the I/O map associated with this module.

virtual ViUInt32 nFANTOM100::iModule::getModuleSize | ( | void |  | ) | const`[pure virtual]`

Retrieves the size in bytes of this module.

Returns:
  The size in bytes of this module.

virtual void nFANTOM100::iModule::getName | ( | ViChar | moduleName[] | ) | const`[pure virtual]`

Retrieves the name of this module.

Parameters:

  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 ViUInt32 nFANTOM100::iModule::readIOMap | ( | ViUInt32 | offsetInBytes,
|  | ViUInt32 | numberOfBytes,
|  | ViPBuf | dataBufferPtr,
|  | tStatus & | status
| ) | `[pure virtual]`

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.

Parameters:

  offsetInBytes | The index of the byte in the I/O map at which to start the read.
  numberOfBytes | The number of bytes that should be read from the I/O map.
  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.
  status | Status chaining object.

Returns:
  The number of bytes actually read from the I/O map.

Postcondition:
  The specified data buffer may be deallocated.

virtual ViUInt32 nFANTOM100::iModule::writeIOMap | ( | ViUInt32 | offsetInBytes,
|  | ViUInt32 | numberOfBytes,
|  | const ViByte | dataBufferPtr[],
|  | tStatus & | status
| ) | `[pure virtual]`

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.

Parameters:

  offsetInBytes | The index of the byte in the I/O map at which to start the write.
  numberOfBytes | The number of bytes to write into the I/O map.
  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.
  status | Status chaining object.

Returns:
  The number of bytes actually written into the I/O map.

Postcondition:
  The specified data buffer may be deallocated.

The documentation for this class was generated from the following file:

- iModule.h

© Copyright 2005-2006, National Instruments Corporation. All rights reserved.