#include <cconfiguration.h>


Data Structures | |
| struct | tConfigRecord |
| struct | tInjection |
| struct | tInjector |
| struct | tMap |
| struct | tMap2D |
| struct | tScaledMap |
| struct | tScaledMap2D |
| struct | tTimer |
Public Member Functions | |
| CMachine::ubit32 | calculateCRC32 () |
| Calculate the CRC for the conficuration record. | |
| CConfiguration (CConfiguration &other) | |
| CConfiguration () | |
| void | close () |
| Close the configuration record. | |
| bool | commit () |
| Commit the contents of the record in RAM to EEPROM or FLASH... | |
| CConfiguration & | copy (CConfiguration &other) |
| Copy from another configuration record. | |
| CMachine::ubit32 | crc32 () |
| Retrieve the current CRC from the configuration record. | |
| CMachine::ubit32 | getDisplacement () |
| Get total displacement. | |
| CMachine::ubit16 | getFlowRate (CMachine::ubit16 n) |
| Get an injector flow rate. | |
| CMachine::ubit32 | getFuelMapCellValue (CMachine::ubit32 x, CMachine::ubit32 y, CMachine::ubit32 index=1) |
| Query fuel map cell value. | |
| void | getFuelMapSize (CMachine::ubit32 *fx, CMachine::ubit32 *fy, CMachine::ubit32 index=1) |
| Get config record fuel map size. | |
| CMachine::ubit16 | getFuelPressureMax (CMachine::ubit16 sensor) |
| Determine the maximum fuel pressure setting in terms of A/D reading. | |
| CMachine::ubit16 | getFuelPressureMin (CMachine::ubit16 sensor) |
| Determine the minimum fuel pressure setting in terms of A/D reading. | |
| CMachine::ubit16 | getInjectorOpenDelay (CMachine::ubit16 n) |
| Get an injector open delay. | |
| CMachine::ubit16 | getInjectorPWMDutyCycle () |
| Get injector PWM duty cycle. | |
| CMachine::ubit16 | getInjectorPWMFrequency () |
| Get injector PWM frequency. | |
| CMachine::ubit16 | getInjectorStrategy () |
| Get the injector strategy. | |
| CMachine::ubit16 | getInjectorVoltageCompensation (CMachine::ubit16 n, CMachine::ubit16 i) |
| Get an injector voltage correction. | |
| CMachine::ubit16 | getInjectorVoltageCompensationScale (CMachine::ubit16 n, CMachine::ubit16 i) |
| Get an injector voltage correction scale. | |
| CMachine::ubit16 | getInjectorVoltageCompensationScaleSize (CMachine::ubit16 n) |
| Get an injector voltage correction scale size. | |
| CMachine::ubit16 | getNumCylinders () |
| Get number of cylinders. | |
| CMachine::ubit16 | getNumInjectors () |
| Get number of injectors. | |
| CMachine::ubit16 | getOneShotPrescaleA () |
| CMachine::ubit16 | getOneShotPrescaleB () |
| CMachine::ubit16 | getPWMTimeThreshold (CMachine::ubit16 n) |
| Get an injector PWM time threshold. | |
| void | getSizes (CMachine::ubit32 *fx, CMachine::ubit32 *fy) |
| Get config record table and map sizes. | |
| virtual bool | initializeStorage () |
| Initialize configuration storage. | |
| bool | openRead () |
| Open configuration record for reading. | |
| bool | openWrite () |
| Open configuration record for writing. | |
| CMachine::ubit32 | setDisplacement (CMachine::ubit32 n) |
| Store total displacement. | |
| CMachine::ubit16 | setFlowRate (CMachine::ubit16 n, CMachine::ubit16 r) |
| Set an injector flow rate. | |
| CMachine::ubit32 | setFuelMapCellValue (CMachine::ubit32 x, CMachine::ubit32 y, CMachine::ubit32 v, CMachine::ubit32 index=1) |
| Set fuel map cell value. | |
| void | setFuelMapSize (CMachine::ubit32 *fx, CMachine::ubit32 *fy, CMachine::ubit32 index=1) |
| Put config record fuel map size. | |
| CMachine::ubit16 | setFuelPressureMax (CMachine::ubit16 sensor, CMachine::ubit16 v) |
| Determine the maximum fuel pressure setting in terms of A/D reading. | |
| CMachine::ubit16 | setFuelPressureMin (CMachine::ubit16 sensor, CMachine::ubit16 v) |
| Determine the minimum fuel pressure setting in terms of A/D reading. | |
| CMachine::ubit16 | setInjectorOpenDelay (CMachine::ubit16 n, CMachine::ubit16 d) |
| Set an injector open delay. | |
| CMachine::ubit16 | setInjectorPWMDutyCycle (CMachine::ubit16 n) |
| Store injector PWM duty cycle. | |
| CMachine::ubit16 | setInjectorPWMFrequency (CMachine::ubit16 n) |
| Store injector PWM frequency. | |
| CMachine::ubit16 | setInjectorStrategy (CMachine::ubit16 injectorStrategy) |
| Set the injector strategy. | |
| CMachine::ubit16 | setInjectorVoltageCompensation (CMachine::ubit16 n, CMachine::ubit16 i, CMachine::ubit16 c) |
| Set an injector voltage correction. | |
| CMachine::ubit16 | setInjectorVoltageCompensationScale (CMachine::ubit16 n, CMachine::ubit16 i, CMachine::ubit16 c) |
| Set an injector voltage correction scale. | |
| CMachine::ubit16 | setInjectorVoltageCompensationScaleSize (CMachine::ubit16 n, CMachine::ubit16 s) |
| Set an injector voltage correction scale size. | |
| CMachine::ubit16 | setNumCylinders (CMachine::ubit16 n) |
| Store number of cylinders. | |
| CMachine::ubit16 | setNumInjectors (CMachine::ubit16 n) |
| Store number of injectors. | |
| CMachine::ubit16 | setOneShotPrescaleA (CMachine::ubit16 v) |
| CMachine::ubit16 | setOneShotPrescaleB (CMachine::ubit16 v) |
| CMachine::ubit16 | setPWMTimeThreshold (CMachine::ubit16 n, CMachine::ubit16 d) |
| Set an injector PWM time threshold. | |
| void | setSizes (CMachine::ubit32 *fx, CMachine::ubit32 *fy) |
| Set config record table and map sizes. | |
| bool | valid () |
| Determine of the current record is valid by verifying the CRC. | |
| bool | writable () |
| virtual | ~CConfiguration () |
Protected Types | |
Protected Member Functions | |
| bool | commit32 (CMachine::ubit32 **pp, CMachine::ubit32 *src, CMachine::bit32 size) |
| Commit a buffer on 32-bit bounds. | |
| bool | commitVLD (tConfigRecord *volatileRecord) |
| Commit VLD record. | |
| bool | commitVolatile1DMap (CMachine::ubit32 **pp, tMap *map) |
| Commit Volatile 1D Map. | |
| bool | commitVolatile2DMap (CMachine::ubit32 **pp, tMap2D *map) |
| Commit Volatile 2D Map. | |
| bool | commitVolatileScaled1DMap (CMachine::ubit32 **pp, tScaledMap *map) |
| Commit Volatile Scaled 1D Map. | |
| bool | commitVolatileScaled2DMap (CMachine::ubit32 **pp, tScaledMap2D *map) |
| Commit Volatile Scaled 2D Map. | |
| bool | createVolatile1DMap (tMap *dst, tMap *src) |
| Allocate and load a 1D map into RAM. | |
| bool | createVolatile2DMap (tMap2D *dst, tMap2D *src) |
| Allocate and load a 2D Scaled map into RAM. | |
| bool | createVolatileRecord (bool copy=false) |
| Load configuration record into RAM. | |
| bool | createVolatileScaled1DMap (tScaledMap *dst, tScaledMap *src) |
| Allocate and load a 1D Scaled map into RAM. | |
| bool | createVolatileScaled2DMap (tScaledMap2D *dst, tScaledMap2D *src) |
| Allocate and load a 2D Scaled map into RAM. | |
| bool | createVolatileVLDRecord (tConfigRecord *volatileRecord) |
| Load VLD record into RAM. | |
| void | disposeVolatile1DMap (tMap *src) |
| Dispose a 1D map. | |
| void | disposeVolatile2DMap (tMap2D *src) |
| Dispose a 2D map. | |
| void | disposeVolatileRecord () |
| Dispose of RAM allocated by createVolatileRecord() method. | |
| void | disposeVolatileScaled1DMap (tScaledMap *src) |
| Dispose a 1D Scaled map from RAM. | |
| void | disposeVolatileScaled2DMap (tScaledMap2D *src) |
| Dispose a 2D Scaled map from RAM. | |
| void | disposeVolatileVLDRecord (tConfigRecord *volatileRecord) |
| Dispose VLD record from RAM. | |
| virtual tConfigRecord * | fixedRecord () |
| Return a pointer to the fixed config record. | |
| CMachine::ubit16 | get2DMapCell (tMap2D *map, CMachine::ubit32 x, CMachine::ubit32 y) |
| Get a cell value from a 2D map. | |
| void | get2DMapSize (tMap2D *map, CMachine::ubit32 *x, CMachine::ubit32 *y) |
| Get size from a 2D map. | |
| virtual CMachine::ubit16 | getUBit16 (CMachine::ubit16 *mem) |
| Get an 16-bit word from memory location... | |
| virtual CMachine::ubit32 | getUBit32 (CMachine::ubit32 *mem) |
| Get an 16-bit word from memory location... | |
| virtual CMachine::ubit8 | getUBit8 (CMachine::ubit8 *mem) |
| Get an 8-bit word from memory location... | |
| void * | memcpy (void *dest, void *src, CMachine::ubit32 size) |
| memory to memory copy using getters and setters. | |
| tConfigRecord * | record () |
| Return a pointer to the current configuration record. CAUTION: Do not reference the contents of the record directly, use the byte, word, and double word access methods ONLY, this is the mechanism that allows the off-chip EEPROM config records to work. | |
| CMachine::ubit16 | set2DMapCell (tMap2D *map, CMachine::ubit32 x, CMachine::ubit32 y, CMachine::ubit16 value) |
| Get a cell value from a 2D map. | |
| void | set2DMapSize (tMap2D *map, CMachine::ubit32 *x, CMachine::ubit32 *y) |
| Get size from a 2D map. | |
| virtual CMachine::ubit16 | setUBit16 (CMachine::ubit16 *mem, CMachine::ubit16 data) |
| Store an 16-bit word to memory location... | |
| virtual CMachine::ubit32 | setUBit32 (CMachine::ubit32 *mem, CMachine::ubit32 data) |
| Store an 32-bit word to memory location... | |
| virtual CMachine::ubit8 | setUBit8 (CMachine::ubit8 *mem, CMachine::ubit8 data) |
| Store an 8-bit word to memory location... | |
| void | setWritable (bool w) |
| Set record as writable. | |
| CMachine::ubit32 | vld () |
| Return a Variable Length Data (VLD) pointer to the storage area for variable length table data. The cofiguration record itself is a fixed size, so the variable length table data must be calculated and allocated separatly at the time the record is commited. | |
Private Attributes | |
| CMachine::ubit32 | mConfigRecord |
| bool | mWritable |
Definition at line 32 of file cconfiguration.h.
enum PikeAero::CConfiguration::tCalculationAlgorithm [protected] |
Definition at line 388 of file cconfiguration.h.
00389 { 00390 calcSpeedDensity=0, /* Speed Density (using MAP sensor, RPM, and inlet air temperature */ 00391 calcAlphaN, /* Alpha-N (ignoring MAP, and using the RPM, throttle position sensor, and intake air temp. */ 00392 } tCalculationAlgorithm;
enum PikeAero::CConfiguration::tInjectorStrategy [protected] |
Definition at line 380 of file cconfiguration.h.
00381 { 00382 injectorBatch=0, /* batch mode */ 00383 injectorBank, /* bank mode */ 00384 injectorSequential, /* sequential */ 00385 } tInjectorStrategy;
enum PikeAero::CConfiguration::tTimingSource [protected] |
Definition at line 447 of file cconfiguration.h.
00447 { 00448 timerCrank=0, /* Crankshaft timing */ 00449 timerCam /* Camshaft timing */ 00450 } tTimingSource;
| PikeAero::CConfiguration::CConfiguration | ( | ) |
Definition at line 31 of file cconfiguration.cpp.
References fixedRecord(), and mConfigRecord.
00032 : inherited() 00033 , mWritable(false) 00034 { 00035 mConfigRecord = (CMachine::ubit32)fixedRecord(); 00036 }

| PikeAero::CConfiguration::CConfiguration | ( | CConfiguration & | other | ) |
Definition at line 38 of file cconfiguration.cpp.
References copy().
00039 { 00040 copy(other); 00041 }

| PikeAero::CConfiguration::~CConfiguration | ( | ) | [virtual] |
| CMachine::ubit32 PikeAero::CConfiguration::calculateCRC32 | ( | ) |
Calculate the CRC for the conficuration record.
FIXME - drill down into each data structure and map to get full CRC check...
Definition at line 532 of file cconfiguration.cpp.
References crc32(), and record().
Referenced by valid().
00533 { 00534 /** FIXME - drill down into each data structure and map to get full CRC check... */ 00535 tConfigRecord* p = record(); 00536 CMachine::ubit32 crc = 0; 00537 crc = CMachine::crc32( (CMachine::ubit8*)p, sizeof(tConfigRecord), crc ); 00538 crc = CMachine::crc32( (CMachine::ubit8*)&(p->injection), sizeof(tInjection), crc ); 00539 for ( CMachine::ubit32 i=0; i < 8; i++ ) 00540 { 00541 crc = CMachine::crc32( (CMachine::ubit8*)&(p->injection.injector[i]), sizeof(tInjector), crc ); 00542 } 00543 return crc; 00544 }


| void PikeAero::CConfiguration::close | ( | ) |
Close the configuration record.
Definition at line 125 of file cconfiguration.cpp.
References disposeVolatileRecord(), fixedRecord(), mConfigRecord, mWritable, and writable().
Referenced by PikeAero::CCommandHandler::commandCLOSE(), PikeAero::CCommandHandler::commandCOMMIT(), PikeAero::CCommandHandler::commandCOPY(), PikeAero::CCommandHandler::commandERASE(), PikeAero::CCommandHandler::commandOPEN(), copy(), openRead(), and openWrite().
00126 { 00127 if ( writable() ) 00128 { 00129 disposeVolatileRecord(); 00130 mWritable = false; 00131 } 00132 mConfigRecord = (CMachine::ubit32)fixedRecord(); 00133 }


| bool PikeAero::CConfiguration::commit | ( | ) |
Commit the contents of the record in RAM to EEPROM or FLASH...
true on success, else fail.
Definition at line 473 of file cconfiguration.cpp.
References commitVLD(), fixedRecord(), initializeStorage(), memcpy(), record(), and writable().
00474 { 00475 bool rc = false; 00476 if ( writable() && initializeStorage() ) 00477 { 00478 tConfigRecord* dstRecord = fixedRecord(); 00479 tConfigRecord* srcRecord = record(); 00480 rc = commitVLD( srcRecord ); 00481 if ( rc ) 00482 { 00483 memcpy( dstRecord, srcRecord, sizeof( tConfigRecord ) ); 00484 } 00485 } 00486 return rc; 00487 }

| bool PikeAero::CConfiguration::commit32 | ( | CMachine::ubit32 ** | pp, | |
| CMachine::ubit32 * | src, | |||
| CMachine::bit32 | size | |||
| ) | [protected] |
Commit a buffer on 32-bit bounds.
| p | Pointer-pointer to destination, 32-bit bounds - next destination returned in p. | |
| src | Source buffer. | |
| size | Size in bytes. |
Definition at line 377 of file cconfiguration.cpp.
References setUBit32().
Referenced by commitVolatile1DMap(), and commitVolatile2DMap().
00378 { 00379 bool rc = true; 00380 while ( rc && size > 0 ) 00381 { 00382 rc = ( setUBit32( *pp, *src ) == *src ); 00383 *pp++; 00384 src++; 00385 size -= 4; 00386 } 00387 return rc; 00388 }


| bool PikeAero::CConfiguration::commitVLD | ( | tConfigRecord * | volatileRecord | ) | [protected] |
Commit VLD record.
Commit VLD records.
| volatileRecord | Pointer to the volatile record. |
writes on 32-bit boundaries
Fuel Maps...
allocate and copy the fuel map...
Fuel Injectors...
Definition at line 448 of file cconfiguration.cpp.
References PikeAero::CMachine::align32(), commitVolatileScaled1DMap(), commitVolatileScaled2DMap(), fixedRecord(), PikeAero::CConfiguration::CConfiguration::tInjection::fuelMaps, PikeAero::CConfiguration::CConfiguration::tConfigRecord::injection, PikeAero::CConfiguration::CConfiguration::tInjection::injector, PikeAero::CConfiguration::CConfiguration::tInjection::mapFuel, and PikeAero::CConfiguration::CConfiguration::tInjector::voltageCompensation.
Referenced by commit().
00449 { 00450 bool rc = false; 00451 00452 CMachine::ubit32* p = (CMachine::ubit32*)CMachine::align32( (CMachine::ubit32)fixedRecord() + sizeof( tConfigRecord ) ); /** writes on 32-bit boundaries */ 00453 00454 /** Fuel Maps... */ 00455 for( CMachine::ubit32 n=0; n < volatileRecord->injection.fuelMaps; n++ ) 00456 { 00457 rc = commitVolatileScaled2DMap( &p, &(volatileRecord->injection.mapFuel[n]) ); /** allocate and copy the fuel map... */ 00458 } 00459 00460 /** Fuel Injectors... */ 00461 for( CMachine::ubit32 i=0; i < 8; i++ ) 00462 { 00463 rc = commitVolatileScaled1DMap( &p, &(volatileRecord->injection.injector[i].voltageCompensation) ); 00464 } 00465 00466 return rc; 00467 }


| bool PikeAero::CConfiguration::commitVolatile1DMap | ( | CMachine::ubit32 ** | pp, | |
| tMap * | map | |||
| ) | [protected] |
Commit Volatile 1D Map.
| pp | Pointer-pointer to destination pointer, 32-bit bounds - next destination returned in p. | |
| map | 1D map. |
Definition at line 396 of file cconfiguration.cpp.
References commit32(), PikeAero::CConfiguration::CConfiguration::tMap::map, and PikeAero::CConfiguration::CConfiguration::tMap::size.
Referenced by commitVolatileScaled1DMap(), and commitVolatileScaled2DMap().
00397 { 00398 return commit32( pp, (CMachine::ubit32*)map->map, (map->size * sizeof( CMachine::ubit16 ) ) ); 00399 }


| bool PikeAero::CConfiguration::commitVolatile2DMap | ( | CMachine::ubit32 ** | pp, | |
| tMap2D * | map | |||
| ) | [protected] |
Commit Volatile 2D Map.
| pp | Pointer-pointer to destination pointer, 32-bit bounds - next destination returned in p. | |
| map | 2D Map pointer. |
Definition at line 424 of file cconfiguration.cpp.
References commit32(), PikeAero::CConfiguration::CConfiguration::tMap2D::map, PikeAero::CConfiguration::CConfiguration::tMap2D::sizeX, and PikeAero::CConfiguration::CConfiguration::tMap2D::sizeY.
Referenced by commitVolatileScaled2DMap().
00425 { 00426 return commit32( pp, (CMachine::ubit32*)map->map, (map->sizeX * map->sizeY) * sizeof( CMachine::ubit16 ) ); 00427 }


| bool PikeAero::CConfiguration::commitVolatileScaled1DMap | ( | CMachine::ubit32 ** | pp, | |
| tScaledMap * | map | |||
| ) | [protected] |
Commit Volatile Scaled 1D Map.
| pp | Pointer-pointer to destination pointer, 32-bit bounds - next destination returned in p. | |
| 1D | map pointer. |
Definition at line 407 of file cconfiguration.cpp.
References commitVolatile1DMap(), PikeAero::CConfiguration::CConfiguration::tScaledMap::map, and PikeAero::CConfiguration::CConfiguration::tScaledMap::scale.
Referenced by commitVLD().
00408 { 00409 bool rc = false; 00410 rc = commitVolatile1DMap( pp, &(map->map) ); 00411 if ( rc ) 00412 { 00413 rc = commitVolatile1DMap( pp, &(map->scale) ); 00414 } 00415 return rc; 00416 }


| bool PikeAero::CConfiguration::commitVolatileScaled2DMap | ( | CMachine::ubit32 ** | pp, | |
| tScaledMap2D * | map | |||
| ) | [protected] |
Commit Volatile Scaled 2D Map.
| pp | Pointer to destination pointer, 32-bit bounds - next destination returned in p. | |
| volatileRecord | Pointer to the volatile record. |
| pp | Pointer-pointer to destination pointer, 32-bit bounds - next destination returned in p. | |
| volatileRecord | Pointer to the volatile record. |
Definition at line 435 of file cconfiguration.cpp.
References commitVolatile1DMap(), commitVolatile2DMap(), PikeAero::CConfiguration::CConfiguration::tScaledMap2D::map, PikeAero::CConfiguration::CConfiguration::tScaledMap2D::scaleX, and PikeAero::CConfiguration::CConfiguration::tScaledMap2D::scaleY.
Referenced by commitVLD().
00436 { 00437 bool rc = commitVolatile2DMap( pp, &(map->map) ); 00438 if ( rc ) rc = commitVolatile1DMap( pp, &(map->scaleX) ); 00439 if ( rc ) rc = commitVolatile1DMap( pp, &(map->scaleY) ); 00440 return rc; 00441 }


| CConfiguration & PikeAero::CConfiguration::copy | ( | CConfiguration & | other | ) |
Copy from another configuration record.
| other | Another configuration record. |
number of cylinders
engine displacement
fuel pressure min 0
fuel pressure min 1
fuel pressure max 0
fuel pressure max 1
one shot prescaler A
one shot prescaler B
injector PWM frequency
injector PWM duty cycle
injector strategy
number of injectors
injector open delay
injector PWM time threshold
injector flow rate
FIXME - more assignements here...
Definition at line 48 of file cconfiguration.cpp.
References close(), getDisplacement(), getFlowRate(), getFuelPressureMax(), getFuelPressureMin(), getInjectorOpenDelay(), getInjectorPWMDutyCycle(), getInjectorPWMFrequency(), getInjectorStrategy(), getNumCylinders(), getNumInjectors(), getOneShotPrescaleA(), getOneShotPrescaleB(), getPWMTimeThreshold(), openWrite(), setDisplacement(), setFlowRate(), setFuelPressureMax(), setFuelPressureMin(), setInjectorOpenDelay(), setInjectorPWMDutyCycle(), setInjectorPWMFrequency(), setInjectorStrategy(), setNumCylinders(), setNumInjectors(), setOneShotPrescaleA(), setOneShotPrescaleB(), and setPWMTimeThreshold().
Referenced by CConfiguration(), and PikeAero::CCommandHandler::commandCOPY().
00049 { 00050 close(); 00051 other.close(); 00052 if ( openWrite() ) 00053 { 00054 setNumCylinders( other.getNumCylinders() ); /** number of cylinders */ 00055 setDisplacement( other.getDisplacement() ); /** engine displacement */ 00056 setFuelPressureMin( 0, other.getFuelPressureMin( 0 ) ); /** fuel pressure min 0 */ 00057 setFuelPressureMin( 1, other.getFuelPressureMin( 1 ) ); /** fuel pressure min 1 */ 00058 setFuelPressureMax( 0, other.getFuelPressureMax( 0 ) ); /** fuel pressure max 0 */ 00059 setFuelPressureMax( 1, other.getFuelPressureMax( 1 ) ); /** fuel pressure max 1 */ 00060 setOneShotPrescaleA( other.getOneShotPrescaleA() ); /** one shot prescaler A */ 00061 setOneShotPrescaleB( other.getOneShotPrescaleB() ); /** one shot prescaler B */ 00062 setInjectorPWMFrequency( other.getInjectorPWMFrequency() ); /** injector PWM frequency */ 00063 setInjectorPWMDutyCycle( other.getInjectorPWMDutyCycle() ); /** injector PWM duty cycle */ 00064 setInjectorStrategy( other.getInjectorStrategy() ); /** injector strategy */ 00065 setNumInjectors( other.getNumInjectors() ); /** number of injectors */ 00066 for( CMachine::ubit32 n=0; n < other.getNumInjectors(); n++ ) 00067 { 00068 setInjectorOpenDelay( n, other.getInjectorOpenDelay( n ) ); /** injector open delay */ 00069 setPWMTimeThreshold( n, other.getPWMTimeThreshold( n ) ); /** injector PWM time threshold */ 00070 setFlowRate( n, other.getFlowRate( n ) ); /** injector flow rate */ 00071 } 00072 /** FIXME - more assignements here... */ 00073 } 00074 return *this; 00075 }


| CMachine::ubit32 PikeAero::CConfiguration::crc32 | ( | ) |
Retrieve the current CRC from the configuration record.
Definition at line 550 of file cconfiguration.cpp.
References getUBit32(), and record().
Referenced by calculateCRC32(), and valid().
00551 { 00552 CMachine::ubit32 crc = getUBit32( &(record()->crc) ); 00553 return crc; 00554 }


Allocate and load a 1D map into RAM.
Allocate and load a 1D Scaled map into RAM.
| dst | The source record. | |
| dest | The destination source. |
allocate and copy a 2D map...
Definition at line 152 of file cconfiguration.cpp.
References PikeAero::CMemHeap::malloc(), PikeAero::CConfiguration::CConfiguration::tMap::map, memcpy(), and PikeAero::CConfiguration::CConfiguration::tMap::size.
Referenced by createVolatileScaled1DMap(), and createVolatileScaled2DMap().
00153 { 00154 bool rc = false; 00155 /** allocate and copy a 2D map... */ 00156 CMachine::ubit16 mapSize = src->size * sizeof( CMachine::ubit16 ); 00157 src->map = (CMachine::ubit16*)CMemHeap::malloc( mapSize ); 00158 if ( rc ) 00159 { 00160 memcpy( dst->map, src->map, mapSize ); 00161 dst->size = src->size; 00162 } 00163 return rc; 00164 }


Allocate and load a 2D Scaled map into RAM.
| dst | The source record. | |
| dest | The destination source. |
allocate and copy a 2D map...
Definition at line 184 of file cconfiguration.cpp.
References PikeAero::CMemHeap::malloc(), PikeAero::CConfiguration::CConfiguration::tMap2D::map, memcpy(), PikeAero::CConfiguration::CConfiguration::tMap2D::sizeX, and PikeAero::CConfiguration::CConfiguration::tMap2D::sizeY.
Referenced by createVolatileScaled2DMap().
00185 { 00186 bool rc = false; 00187 /** allocate and copy a 2D map... */ 00188 CMachine::ubit16 mapSize = (src->sizeX * src->sizeY) * sizeof( CMachine::ubit16 ); 00189 src->map = (CMachine::ubit16*)CMemHeap::malloc( mapSize ); 00190 if ( src->map != NULL ) 00191 { 00192 memcpy( dst->map, src->map, mapSize ); 00193 dst->sizeX = src->sizeX; 00194 dst->sizeY = src->sizeY; 00195 rc = true; 00196 } 00197 return rc; 00198 }


| bool PikeAero::CConfiguration::createVolatileRecord | ( | bool | copy = false |
) | [protected] |
Load configuration record into RAM.
Load configuration record into RAM if valid, else create an empty config record in RAM.
| valid | if valid, then read from EEPROM or FLASH, else just allocate and initialize a new record. |
| copy | if true, then read from EEPROM or FLASH, or else just allocate and initialize a new record. |
Definition at line 327 of file cconfiguration.cpp.
References createVolatileVLDRecord(), PikeAero::CMemHeap::free(), PikeAero::CMemHeap::malloc(), mConfigRecord, memcpy(), and memset.
Referenced by openWrite().
00328 { 00329 bool rc = false; 00330 tConfigRecord* volatileRecord = (tConfigRecord*)CMemHeap::malloc( sizeof( tConfigRecord ) ); 00331 if ( volatileRecord != NULL ) 00332 { 00333 if ( copy ) 00334 { 00335 memcpy( volatileRecord, (tConfigRecord*)mConfigRecord, sizeof( tConfigRecord ) ); /* read existing record. */ 00336 rc = createVolatileVLDRecord( volatileRecord ); 00337 if ( !rc ) 00338 { 00339 CMemHeap::free( volatileRecord ); /* something went wrong...back out. */ 00340 } 00341 } 00342 else 00343 { 00344 memset( volatileRecord, 0, sizeof( tConfigRecord ) ); /* initialize new record. */ 00345 rc = true; 00346 } 00347 } 00348 if ( rc ) 00349 { 00350 mConfigRecord = (CMachine::ubit32)volatileRecord; /* point config to volatile record */ 00351 } 00352 return rc; 00353 }


| bool PikeAero::CConfiguration::createVolatileScaled1DMap | ( | tScaledMap * | dst, | |
| tScaledMap * | src | |||
| ) | [protected] |
Allocate and load a 1D Scaled map into RAM.
| dst | The source record. | |
| dest | The destination source. |
Definition at line 228 of file cconfiguration.cpp.
References createVolatile1DMap(), PikeAero::CConfiguration::CConfiguration::tScaledMap::map, and PikeAero::CConfiguration::CConfiguration::tScaledMap::scale.
Referenced by createVolatileVLDRecord().
00229 { 00230 bool rc = false; 00231 rc = createVolatile1DMap( &(dst->scale), &(src->scale) ); 00232 if ( rc ) 00233 { 00234 rc = createVolatile1DMap( &(dst->map), &(src->map) ); 00235 } 00236 return rc; 00237 }


| bool PikeAero::CConfiguration::createVolatileScaled2DMap | ( | tScaledMap2D * | dst, | |
| tScaledMap2D * | src | |||
| ) | [protected] |
Allocate and load a 2D Scaled map into RAM.
| dst | The source record. | |
| dest | The destination source. |
allocate and copy a 2D map...
Definition at line 245 of file cconfiguration.cpp.
References createVolatile1DMap(), createVolatile2DMap(), disposeVolatileScaled2DMap(), PikeAero::CConfiguration::CConfiguration::tScaledMap2D::map, PikeAero::CConfiguration::CConfiguration::tScaledMap2D::scaleX, and PikeAero::CConfiguration::CConfiguration::tScaledMap2D::scaleY.
Referenced by createVolatileVLDRecord().
00246 { 00247 bool rc = false; 00248 /** allocate and copy a 2D map... */ 00249 rc = createVolatile2DMap( &(dst->map), &(src->map) ); 00250 if ( rc ) 00251 { 00252 rc = createVolatile1DMap( &(dst->scaleX), &(src->scaleX) ); 00253 if ( rc ) 00254 { 00255 rc = createVolatile1DMap( &(dst->scaleY), &(src->scaleY) ); 00256 } 00257 if ( !rc ) 00258 { 00259 disposeVolatileScaled2DMap( dst ); 00260 } 00261 } 00262 return rc; 00263 }


| bool PikeAero::CConfiguration::createVolatileVLDRecord | ( | tConfigRecord * | volatileRecord | ) | [protected] |
Load VLD record into RAM.
| volatileRecord | Pointer to the volatile record. |
true on success, else false
Fuel Maps...
allocate and copy the fuel map...
Fuel Injectors...
Definition at line 283 of file cconfiguration.cpp.
References createVolatileScaled1DMap(), createVolatileScaled2DMap(), fixedRecord(), PikeAero::CConfiguration::CConfiguration::tInjection::fuelMaps, PikeAero::CConfiguration::CConfiguration::tConfigRecord::injection, PikeAero::CConfiguration::CConfiguration::tInjection::injector, PikeAero::CConfiguration::CConfiguration::tInjection::mapFuel, and PikeAero::CConfiguration::CConfiguration::tInjector::voltageCompensation.
Referenced by createVolatileRecord().
00284 { 00285 bool rc = false; 00286 tConfigRecord* sourceRecord = fixedRecord(); /* get pointer to fixed record */ 00287 00288 /** Fuel Maps... */ 00289 for( CMachine::ubit32 n=0; n < sourceRecord->injection.fuelMaps; n++ ) 00290 { 00291 rc = createVolatileScaled2DMap( &(volatileRecord->injection.mapFuel[n]), &(sourceRecord->injection.mapFuel[n]) ); /** allocate and copy the fuel map... */ 00292 } 00293 00294 /** Fuel Injectors... */ 00295 for( CMachine::ubit32 i=0; i < 8; i++ ) 00296 { 00297 rc = createVolatileScaled1DMap( &(volatileRecord->injection.injector[i].voltageCompensation), &(sourceRecord->injection.injector[i].voltageCompensation) ); 00298 } 00299 00300 return rc; 00301 }


| void PikeAero::CConfiguration::disposeVolatile1DMap | ( | tMap * | src | ) | [protected] |
Dispose a 1D map.
Definition at line 169 of file cconfiguration.cpp.
References PikeAero::CMemHeap::free(), and PikeAero::CConfiguration::CConfiguration::tMap::map.
Referenced by disposeVolatileScaled1DMap(), and disposeVolatileScaled2DMap().
00170 { 00171 if ( src != NULL && src->map != NULL ) 00172 { 00173 CMemHeap::free( src->map ); 00174 src->map = NULL; 00175 } 00176 }


| void PikeAero::CConfiguration::disposeVolatile2DMap | ( | tMap2D * | src | ) | [protected] |
Dispose a 2D map.
| src | The source record. |
Definition at line 203 of file cconfiguration.cpp.
References PikeAero::CMemHeap::free(), and PikeAero::CConfiguration::CConfiguration::tMap2D::map.
Referenced by disposeVolatileScaled2DMap().
00204 { 00205 if ( src != NULL && src->map != NULL ) 00206 { 00207 CMemHeap::free( src->map ); 00208 src->map = NULL; 00209 } 00210 }


| void PikeAero::CConfiguration::disposeVolatileRecord | ( | ) | [protected] |
Dispose of RAM allocated by createVolatileRecord() method.
a pointer to the tConfigRecord in FLASH ro EEPROM.
Definition at line 359 of file cconfiguration.cpp.
References disposeVolatileVLDRecord(), fixedRecord(), PikeAero::CMemHeap::free(), mConfigRecord, record(), and writable().
Referenced by close().
00360 { 00361 if ( writable() ) 00362 { 00363 tConfigRecord* configRecord = record(); 00364 mConfigRecord = (CMachine::ubit32)fixedRecord(); 00365 disposeVolatileVLDRecord(configRecord); 00366 CMemHeap::free( configRecord ); 00367 } 00368 }


| void PikeAero::CConfiguration::disposeVolatileScaled1DMap | ( | tScaledMap * | src | ) | [protected] |
Dispose a 1D Scaled map from RAM.
| src | The source record. |
Definition at line 216 of file cconfiguration.cpp.
References disposeVolatile1DMap(), PikeAero::CConfiguration::CConfiguration::tScaledMap::map, and PikeAero::CConfiguration::CConfiguration::tScaledMap::scale.
Referenced by disposeVolatileVLDRecord().
00217 { 00218 disposeVolatile1DMap( &(src->scale) ); 00219 disposeVolatile1DMap( &(src->map) ); 00220 }


| void PikeAero::CConfiguration::disposeVolatileScaled2DMap | ( | tScaledMap2D * | src | ) | [protected] |
Dispose a 2D Scaled map from RAM.
Dispose a 2D Scaled map.
| src | The source record. |
Definition at line 269 of file cconfiguration.cpp.
References disposeVolatile1DMap(), disposeVolatile2DMap(), PikeAero::CConfiguration::CConfiguration::tScaledMap2D::map, PikeAero::CConfiguration::CConfiguration::tScaledMap2D::scaleX, and PikeAero::CConfiguration::CConfiguration::tScaledMap2D::scaleY.
Referenced by createVolatileScaled2DMap(), and disposeVolatileVLDRecord().
00270 { 00271 if ( src != NULL ) 00272 { 00273 disposeVolatile2DMap(&(src->map)); 00274 disposeVolatile1DMap(&(src->scaleX)); 00275 disposeVolatile1DMap(&(src->scaleY)); 00276 } 00277 }


| void PikeAero::CConfiguration::disposeVolatileVLDRecord | ( | tConfigRecord * | volatileRecord | ) | [protected] |
Dispose VLD record from RAM.
| volatileRecord | Pointer to the volatile record. |
Fuel Maps...
Fuel Injectors...
Definition at line 307 of file cconfiguration.cpp.
References disposeVolatileScaled1DMap(), disposeVolatileScaled2DMap(), PikeAero::CConfiguration::CConfiguration::tInjection::fuelMaps, PikeAero::CConfiguration::CConfiguration::tConfigRecord::injection, PikeAero::CConfiguration::CConfiguration::tInjection::injector, PikeAero::CConfiguration::CConfiguration::tInjection::mapFuel, and PikeAero::CConfiguration::CConfiguration::tInjector::voltageCompensation.
Referenced by disposeVolatileRecord().
00308 { 00309 /** Fuel Maps... */ 00310 for( CMachine::ubit32 n=0; n < volatileRecord->injection.fuelMaps; n++ ) 00311 { 00312 disposeVolatileScaled2DMap( &(volatileRecord->injection.mapFuel[n]) ); 00313 } 00314 00315 /** Fuel Injectors... */ 00316 for( CMachine::ubit32 i=0; i < 8; i++ ) 00317 { 00318 disposeVolatileScaled1DMap( &(volatileRecord->injection.injector[i].voltageCompensation) ); 00319 } 00320 }


| CConfiguration::tConfigRecord * PikeAero::CConfiguration::fixedRecord | ( | ) | [protected, virtual] |
Return a pointer to the fixed config record.
Reimplemented in PikeAero::CConfigurationAlternate.
Definition at line 95 of file cconfiguration.cpp.
References CONFIG_BASE.
Referenced by CConfiguration(), close(), commit(), commitVLD(), createVolatileVLDRecord(), and disposeVolatileRecord().
00096 { 00097 return (tConfigRecord*)CONFIG_BASE; 00098 }

| CMachine::ubit16 PikeAero::CConfiguration::get2DMapCell | ( | tMap2D * | map, | |
| CMachine::ubit32 | x, | |||
| CMachine::ubit32 | y | |||
| ) | [inline, protected] |
Get a cell value from a 2D map.
| map | Pointer to the 2D map object. | |
| x | The X coordinate (horizontal). | |
| y | The Y coordinate (vertical). |
Definition at line 707 of file cconfiguration.h.
References get2DMapSize(), getUBit16(), and PikeAero::CConfiguration::CConfiguration::tMap2D::map.
Referenced by getFuelMapCellValue().
00708 { 00709 CMachine::ubit32 sx; 00710 CMachine::ubit32 sy; 00711 get2DMapSize( map, &sx, &sy ); 00712 return getUBit16( &(map->map[(sy * y) + x]) ); 00713 }


| void PikeAero::CConfiguration::get2DMapSize | ( | tMap2D * | map, | |
| CMachine::ubit32 * | x, | |||
| CMachine::ubit32 * | y | |||
| ) | [inline, protected] |
Get size from a 2D map.
| map | Pointer to the 2D map object. | |
| x | The X coordinate (horizontal). | |
| y | The Y coordinate (vertical). |
Definition at line 681 of file cconfiguration.h.
References getUBit16(), PikeAero::CConfiguration::CConfiguration::tMap2D::sizeX, and PikeAero::CConfiguration::CConfiguration::tMap2D::sizeY.
Referenced by get2DMapCell(), getFuelMapSize(), and set2DMapCell().
00682 { 00683 *x = (CMachine::ubit32)(getUBit16( &(map->sizeX) ) & 0xFFFF); 00684 *y = (CMachine::ubit32)(getUBit16( &(map->sizeY) ) & 0xFFFF); 00685 }


| CMachine::ubit32 PikeAero::CConfiguration::getDisplacement | ( | ) | [inline] |
Get total displacement.
Definition at line 144 of file cconfiguration.h.
References getUBit32(), and record().
Referenced by copy().


| CMachine::ubit16 PikeAero::CConfiguration::getFlowRate | ( | CMachine::ubit16 | n | ) | [inline] |
Get an injector flow rate.
| n | injector number. |
Definition at line 263 of file cconfiguration.h.
References getUBit16(), and record().
Referenced by copy().


| CMachine::ubit32 PikeAero::CConfiguration::getFuelMapCellValue | ( | CMachine::ubit32 | x, | |
| CMachine::ubit32 | y, | |||
| CMachine::ubit32 | index = 1 | |||
| ) | [inline] |
Query fuel map cell value.
| x | == horizontal coord. | |
| y | == vertical coord. |
Definition at line 350 of file cconfiguration.h.
References get2DMapCell(), and record().
00350 { return get2DMapCell( &(record()->injection.mapFuel[index].map), x, y ); }

| void PikeAero::CConfiguration::getFuelMapSize | ( | CMachine::ubit32 * | fx, | |
| CMachine::ubit32 * | fy, | |||
| CMachine::ubit32 | index = 1 | |||
| ) | [inline] |
Get config record fuel map size.
| fx | == fuel map X size. | |
| fy | == fuel map Y size. |
Definition at line 334 of file cconfiguration.h.
References get2DMapSize(), and record().
Referenced by getSizes().
00334 { get2DMapSize( &(record()->injection.mapFuel[index].map), fx, fy ); }


| CMachine::ubit16 PikeAero::CConfiguration::getFuelPressureMax | ( | CMachine::ubit16 | sensor | ) | [inline] |
Determine the maximum fuel pressure setting in terms of A/D reading.
| sensor | Which sensor number (0 or 1) |
Definition at line 119 of file cconfiguration.h.
References getUBit16(), and record().
Referenced by copy().


| CMachine::ubit16 PikeAero::CConfiguration::getFuelPressureMin | ( | CMachine::ubit16 | sensor | ) | [inline] |
Determine the minimum fuel pressure setting in terms of A/D reading.
| sensor | Which sensor number (0 or 1) |
Definition at line 105 of file cconfiguration.h.
References getUBit16(), and record().
Referenced by copy().


| CMachine::ubit16 PikeAero::CConfiguration::getInjectorOpenDelay | ( | CMachine::ubit16 | n | ) | [inline] |
Get an injector open delay.
| n | injector number. |
Definition at line 233 of file cconfiguration.h.
References getUBit16(), and record().
Referenced by copy().


| CMachine::ubit16 PikeAero::CConfiguration::getInjectorPWMDutyCycle | ( | ) | [inline] |
Get injector PWM duty cycle.
Definition at line 196 of file cconfiguration.h.
References getUBit16(), and record().
Referenced by copy().


| CMachine::ubit16 PikeAero::CConfiguration::getInjectorPWMFrequency | ( | ) | [inline] |
Get injector PWM frequency.
Definition at line 184 of file cconfiguration.h.
References getUBit16(), and record().
Referenced by copy().


| CMachine::ubit16 PikeAero::CConfiguration::getInjectorStrategy | ( | ) | [inline] |
Get the injector strategy.
Definition at line 208 of file cconfiguration.h.
References getUBit16(), and record().
Referenced by copy().


| CMachine::ubit16 PikeAero::CConfiguration::getInjectorVoltageCompensation | ( | CMachine::ubit16 | n, | |
| CMachine::ubit16 | i | |||
| ) | [inline] |
Get an injector voltage correction.
| n | injector number. | |
| i | injector voltage correction table index. |
Definition at line 317 of file cconfiguration.h.
References getUBit16(), and record().

| CMachine::ubit16 PikeAero::CConfiguration::getInjectorVoltageCompensationScale | ( | CMachine::ubit16 | n, | |
| CMachine::ubit16 | i | |||
| ) | [inline] |
Get an injector voltage correction scale.
| n | injector number. | |
| i | injector voltage correction table index. |
Definition at line 300 of file cconfiguration.h.
References getUBit16(), and record().

| CMachine::ubit16 PikeAero::CConfiguration::getInjectorVoltageCompensationScaleSize | ( | CMachine::ubit16 | n | ) | [inline] |
Get an injector voltage correction scale size.
| n | injector number. |
Definition at line 278 of file cconfiguration.h.
References getUBit16(), and record().

| CMachine::ubit16 PikeAero::CConfiguration::getNumCylinders | ( | ) | [inline] |
Get number of cylinders.
Definition at line 132 of file cconfiguration.h.
References getUBit16(), and record().
Referenced by copy().


| CMachine::ubit16 PikeAero::CConfiguration::getNumInjectors | ( | ) | [inline] |
Get number of injectors.
Definition at line 220 of file cconfiguration.h.
References getUBit16(), and record().
Referenced by copy().


| CMachine::ubit16 PikeAero::CConfiguration::getOneShotPrescaleA | ( | ) | [inline] |
Definition at line 157 of file cconfiguration.h.
References getUBit16(), and record().
Referenced by copy().


| CMachine::ubit16 PikeAero::CConfiguration::getOneShotPrescaleB | ( | ) | [inline] |
Definition at line 171 of file cconfiguration.h.
References getUBit16(), and record().
Referenced by copy().


| CMachine::ubit16 PikeAero::CConfiguration::getPWMTimeThreshold | ( | CMachine::ubit16 | n | ) | [inline] |
Get an injector PWM time threshold.
| n | injector number. |
Definition at line 248 of file cconfiguration.h.
References getUBit16(), and record().
Referenced by copy().


| void PikeAero::CConfiguration::getSizes | ( | CMachine::ubit32 * | fx, | |
| CMachine::ubit32 * | fy | |||
| ) |
Get config record table and map sizes.
| fx | == fuel map X size. | |
| fy | == fuel map Y size. |
Definition at line 512 of file cconfiguration.cpp.
References getFuelMapSize().
00513 { 00514 getFuelMapSize( fx, fy ); 00515 }

| CMachine::ubit16 PikeAero::CConfiguration::getUBit16 | ( | CMachine::ubit16 * | mem | ) | [protected, virtual] |
Get an 16-bit word from memory location...
| mem | Pointer to memory location. |
Reimplemented in PikeAero::CConfigurationAlternate.
Definition at line 571 of file cconfiguration.cpp.
Referenced by get2DMapCell(), get2DMapSize(), getFlowRate(), getFuelPressureMax(), getFuelPressureMin(), getInjectorOpenDelay(), getInjectorPWMDutyCycle(), getInjectorPWMFrequency(), getInjectorStrategy(), getInjectorVoltageCompensation(), getInjectorVoltageCompensationScale(), getInjectorVoltageCompensationScaleSize(), getNumCylinders(), getNumInjectors(), getOneShotPrescaleA(), getOneShotPrescaleB(), and getPWMTimeThreshold().

| CMachine::ubit32 PikeAero::CConfiguration::getUBit32 | ( | CMachine::ubit32 * | mem | ) | [protected, virtual] |
Get an 16-bit word from memory location...
Get an 32-bit word from memory location...
| mem | Pointer to memory location. |
| mem | Pointer to memory location. |
Reimplemented in PikeAero::CConfigurationAlternate.
Definition at line 581 of file cconfiguration.cpp.
Referenced by crc32(), and getDisplacement().

| CMachine::ubit8 PikeAero::CConfiguration::getUBit8 | ( | CMachine::ubit8 * | mem | ) | [protected, virtual] |
Get an 8-bit word from memory location...
| mem | Pointer to memory location. |
Reimplemented in PikeAero::CConfigurationAlternate.
Definition at line 561 of file cconfiguration.cpp.
| bool PikeAero::CConfiguration::initializeStorage | ( | ) | [virtual] |
Initialize configuration storage.
Reimplemented in PikeAero::CConfigurationAlternate.
Definition at line 86 of file cconfiguration.cpp.
References CONFIG_SECTOR, and PikeAero::CFlash::erase().
Referenced by PikeAero::CCommandHandler::commandERASE(), and commit().
00087 { 00088 CFlash flash; 00089 return flash.erase(CONFIG_SECTOR) == 0x0; 00090 }


| void * PikeAero::CConfiguration::memcpy | ( | void * | dest, | |
| void * | src, | |||
| CMachine::ubit32 | size | |||
| ) | [protected] |
memory to memory copy using getters and setters.
| dest | destination. | |
| src | Source. |
Definition at line 495 of file cconfiguration.cpp.
References setUBit8().
Referenced by commit(), createVolatile1DMap(), createVolatile2DMap(), and createVolatileRecord().
00496 { 00497 CMachine::ubit8* pd = (CMachine::ubit8*)dest; 00498 CMachine::ubit8* ps = (CMachine::ubit8*)src; 00499 while ( size-- ) 00500 { 00501 setUBit8( pd++, *(ps++) ); 00502 } 00503 return dest; 00504 }


| bool PikeAero::CConfiguration::openRead | ( | ) |
Open configuration record for reading.
Definition at line 104 of file cconfiguration.cpp.
References close(), and valid().
Referenced by PikeAero::CCommandHandler::commandOPEN().


| bool PikeAero::CConfiguration::openWrite | ( | ) |
Open configuration record for writing.
Definition at line 114 of file cconfiguration.cpp.
References close(), createVolatileRecord(), mWritable, and valid().
Referenced by PikeAero::CCommandHandler::commandOPEN(), and copy().
00115 { 00116 close(); 00117 mWritable = createVolatileRecord( valid() ); 00118 return mWritable; 00119 }


| tConfigRecord* PikeAero::CConfiguration::record | ( | ) | [inline, protected] |
Return a pointer to the current configuration record. CAUTION: Do not reference the contents of the record directly, use the byte, word, and double word access methods ONLY, this is the mechanism that allows the off-chip EEPROM config records to work.
Definition at line 485 of file cconfiguration.h.
References mConfigRecord.
Referenced by calculateCRC32(), commit(), crc32(), disposeVolatileRecord(), getDisplacement(), getFlowRate(), getFuelMapCellValue(), getFuelMapSize(), getFuelPressureMax(), getFuelPressureMin(), getInjectorOpenDelay(), getInjectorPWMDutyCycle(), getInjectorPWMFrequency(), getInjectorStrategy(), getInjectorVoltageCompensation(), getInjectorVoltageCompensationScale(), getInjectorVoltageCompensationScaleSize(), getNumCylinders(), getNumInjectors(), getOneShotPrescaleA(), getOneShotPrescaleB(), getPWMTimeThreshold(), setDisplacement(), setFlowRate(), setFuelMapCellValue(), setFuelMapSize(), setFuelPressureMax(), setFuelPressureMin(), setInjectorOpenDelay(), setInjectorPWMDutyCycle(), setInjectorPWMFrequency(), setInjectorStrategy(), setInjectorVoltageCompensation(), setInjectorVoltageCompensationScale(), setInjectorVoltageCompensationScaleSize(), setNumCylinders(), setNumInjectors(), setOneShotPrescaleA(), setOneShotPrescaleB(), setPWMTimeThreshold(), and vld().
00485 { return (tConfigRecord*)mConfigRecord; }

| CMachine::ubit16 PikeAero::CConfiguration::set2DMapCell | ( | tMap2D * | map, | |
| CMachine::ubit32 | x, | |||
| CMachine::ubit32 | y, | |||
| CMachine::ubit16 | value | |||
| ) | [inline, protected] |
Get a cell value from a 2D map.
| map | Pointer to the 2D map object. | |
| x | The X coordinate (horizontal). | |
| y | The Y coordinate (vertical). |
Definition at line 722 of file cconfiguration.h.
References get2DMapSize(), PikeAero::CConfiguration::CConfiguration::tMap2D::map, and setUBit16().
Referenced by setFuelMapCellValue().
00723 { 00724 CMachine::ubit32 sx; 00725 CMachine::ubit32 sy; 00726 get2DMapSize( map, &sx, &sy ); 00727 return setUBit16( &(map->map[(sy * y) + x]), value ); 00728 }


| void PikeAero::CConfiguration::set2DMapSize | ( | tMap2D * | map, | |
| CMachine::ubit32 * | x, | |||
| CMachine::ubit32 * | y | |||
| ) | [inline, protected] |
Get size from a 2D map.
| map | Pointer to the 2D map object. | |
| x | The X coordinate (horizontal). | |
| y | The Y coordinate (vertical). |
Definition at line 694 of file cconfiguration.h.
References setUBit16(), PikeAero::CConfiguration::CConfiguration::tMap2D::sizeX, and PikeAero::CConfiguration::CConfiguration::tMap2D::sizeY.
Referenced by setFuelMapSize().
00695 { 00696 *x = (CMachine::ubit32)(setUBit16( &(map->sizeX), *x ) & 0xFFFF); 00697 *y = (CMachine::ubit32)(setUBit16( &(map->sizeY), *y ) & 0xFFFF); 00698 }


| CMachine::ubit32 PikeAero::CConfiguration::setDisplacement | ( | CMachine::ubit32 | n | ) | [inline] |
Store total displacement.
Definition at line 150 of file cconfiguration.h.
References record(), and setUBit32().
Referenced by copy().


| CMachine::ubit16 PikeAero::CConfiguration::setFlowRate | ( | CMachine::ubit16 | n, | |
| CMachine::ubit16 | r | |||
| ) | [inline] |
Set an injector flow rate.
| n | injector number. | |
| r | injector flow rate in cc/min. |
Definition at line 271 of file cconfiguration.h.
References record(), and setUBit16().
Referenced by copy().


| CMachine::ubit32 PikeAero::CConfiguration::setFuelMapCellValue | ( | CMachine::ubit32 | x, | |
| CMachine::ubit32 | y, | |||
| CMachine::ubit32 | v, | |||
| CMachine::ubit32 | index = 1 | |||
| ) | [inline] |
Set fuel map cell value.
| x | == horizontal coord. | |
| y | == vertical coord. | |
| v | == value. |
Definition at line 359 of file cconfiguration.h.
References record(), and set2DMapCell().
00359 { return set2DMapCell( &(record()->injection.mapFuel[index].map), x, y, v ); }

| void PikeAero::CConfiguration::setFuelMapSize | ( | CMachine::ubit32 * | fx, | |
| CMachine::ubit32 * | fy, | |||
| CMachine::ubit32 | index = 1 | |||
| ) | [inline] |
Put config record fuel map size.
| fx | == fuel map X size. | |
| fy | == fuel map Y size. |
Definition at line 342 of file cconfiguration.h.
References record(), and set2DMapSize().
Referenced by setSizes().
00342 { set2DMapSize( &(record()->injection.mapFuel[index].map), fx, fy ); }


| CMachine::ubit16 PikeAero::CConfiguration::setFuelPressureMax | ( | CMachine::ubit16 | sensor, | |
| CMachine::ubit16 | v | |||
| ) | [inline] |
Determine the maximum fuel pressure setting in terms of A/D reading.
| sensor | Which sensor number (0 or 1) |
Definition at line 126 of file cconfiguration.h.
References record(), and setUBit16().
Referenced by copy().


| CMachine::ubit16 PikeAero::CConfiguration::setFuelPressureMin | ( | CMachine::ubit16 | sensor, | |
| CMachine::ubit16 | v | |||
| ) | [inline] |
Determine the minimum fuel pressure setting in terms of A/D reading.
| sensor | Which sensor number (0 or 1) |
Definition at line 112 of file cconfiguration.h.
References record(), and setUBit16().
Referenced by copy().


| CMachine::ubit16 PikeAero::CConfiguration::setInjectorOpenDelay | ( | CMachine::ubit16 | n, | |
| CMachine::ubit16 | d | |||
| ) | [inline] |
Set an injector open delay.
| n | injector number. | |
| d | open delay in microseconds. |
Definition at line 241 of file cconfiguration.h.
References record(), and setUBit16().
Referenced by copy().


| CMachine::ubit16 PikeAero::CConfiguration::setInjectorPWMDutyCycle | ( | CMachine::ubit16 | n | ) | [inline] |
Store injector PWM duty cycle.
Definition at line 202 of file cconfiguration.h.
References record(), and setUBit16().
Referenced by copy().


| CMachine::ubit16 PikeAero::CConfiguration::setInjectorPWMFrequency | ( | CMachine::ubit16 | n | ) | [inline] |
Store injector PWM frequency.
Definition at line 190 of file cconfiguration.h.
References record(), and setUBit16().
Referenced by copy().


| CMachine::ubit16 PikeAero::CConfiguration::setInjectorStrategy | ( | CMachine::ubit16 | injectorStrategy | ) | [inline] |
Set the injector strategy.
Definition at line 214 of file cconfiguration.h.
References record(), and setUBit16().
Referenced by copy().


| CMachine::ubit16 PikeAero::CConfiguration::setInjectorVoltageCompensation | ( | CMachine::ubit16 | n, | |
| CMachine::ubit16 | i, | |||
| CMachine::ubit16 | c | |||
| ) | [inline] |
Set an injector voltage correction.
| n | injector number. | |
| i | injector voltage correction table index. | |
| c | voltage correction. |
Definition at line 326 of file cconfiguration.h.
References record(), and setUBit16().

| CMachine::ubit16 PikeAero::CConfiguration::setInjectorVoltageCompensationScale | ( | CMachine::ubit16 | n, | |
| CMachine::ubit16 | i, | |||
| CMachine::ubit16 | c | |||
| ) | [inline] |
Set an injector voltage correction scale.
| n | injector number. | |
| i | injector voltage correction table index. | |
| c | voltage correction scale. |
Definition at line 309 of file cconfiguration.h.
References record(), and setUBit16().
00309 { return setUBit16( &(record()->injection.injector[n].voltageCompensation.scale.map[i]), c ); }

| CMachine::ubit16 PikeAero::CConfiguration::setInjectorVoltageCompensationScaleSize | ( | CMachine::ubit16 | n, | |
| CMachine::ubit16 | s | |||
| ) | [inline] |
Set an injector voltage correction scale size.
| n | injector number. | |
| s | injector voltage correction scale size. |
Definition at line 286 of file cconfiguration.h.
References record(), and setUBit16().
00287 { 00288 CMachine::ubit16 sz; 00289 sz = setUBit16( &(record()->injection.injector[n].voltageCompensation.scale.size), s ); 00290 sz = setUBit16( &(record()->injection.injector[n].voltageCompensation.map.size), s ); 00291 return sz; 00292 }

| CMachine::ubit16 PikeAero::CConfiguration::setNumCylinders | ( | CMachine::ubit16 | n | ) | [inline] |
Store number of cylinders.
Definition at line 138 of file cconfiguration.h.
References record(), and setUBit16().
Referenced by copy().


| CMachine::ubit16 PikeAero::CConfiguration::setNumInjectors | ( | CMachine::ubit16 | n | ) | [inline] |
Store number of injectors.
Definition at line 226 of file cconfiguration.h.
References record(), and setUBit16().
Referenced by copy().


| CMachine::ubit16 PikeAero::CConfiguration::setOneShotPrescaleA | ( | CMachine::ubit16 | v | ) | [inline] |
Definition at line 164 of file cconfiguration.h.
References record(), and setUBit16().
Referenced by copy().


| CMachine::ubit16 PikeAero::CConfiguration::setOneShotPrescaleB | ( | CMachine::ubit16 | v | ) | [inline] |
Definition at line 178 of file cconfiguration.h.
References record(), and setUBit16().
Referenced by copy().


| CMachine::ubit16 PikeAero::CConfiguration::setPWMTimeThreshold | ( | CMachine::ubit16 | n, | |
| CMachine::ubit16 | d | |||
| ) | [inline] |
Set an injector PWM time threshold.
| n | injector number. | |
| d | PWM time threthold delay in microseconds. |
Definition at line 256 of file cconfiguration.h.
References record(), and setUBit16().
Referenced by copy().


| void PikeAero::CConfiguration::setSizes | ( | CMachine::ubit32 * | fx, | |
| CMachine::ubit32 * | fy | |||
| ) |
Set config record table and map sizes.
| fx | == fuel map X size. | |
| fy | == fuel map Y size. |
Definition at line 523 of file cconfiguration.cpp.
References setFuelMapSize().
00524 { 00525 setFuelMapSize( fx, fy ); 00526 }

| CMachine::ubit16 PikeAero::CConfiguration::setUBit16 | ( | CMachine::ubit16 * | mem, | |
| CMachine::ubit16 | data | |||
| ) | [protected, virtual] |
Store an 16-bit word to memory location...
| mem | Pointer to memory location. |
Reimplemented in PikeAero::CConfigurationAlternate.
Definition at line 601 of file cconfiguration.cpp.
Referenced by set2DMapCell(), set2DMapSize(), setFlowRate(), setFuelPressureMax(), setFuelPressureMin(), setInjectorOpenDelay(), setInjectorPWMDutyCycle(), setInjectorPWMFrequency(), setInjectorStrategy(), setInjectorVoltageCompensation(), setInjectorVoltageCompensationScale(), setInjectorVoltageCompensationScaleSize(), setNumCylinders(), setNumInjectors(), setOneShotPrescaleA(), setOneShotPrescaleB(), and setPWMTimeThreshold().

| CMachine::ubit32 PikeAero::CConfiguration::setUBit32 | ( | CMachine::ubit32 * | mem, | |
| CMachine::ubit32 | data | |||
| ) | [protected, virtual] |
Store an 32-bit word to memory location...
| mem | Pointer to memory location. |
Reimplemented in PikeAero::CConfigurationAlternate.
Definition at line 611 of file cconfiguration.cpp.
Referenced by commit32(), and setDisplacement().

| CMachine::ubit8 PikeAero::CConfiguration::setUBit8 | ( | CMachine::ubit8 * | mem, | |
| CMachine::ubit8 | data | |||
| ) | [protected, virtual] |
Store an 8-bit word to memory location...
| mem | Pointer to memory location. |
Reimplemented in PikeAero::CConfigurationAlternate.
Definition at line 591 of file cconfiguration.cpp.
Referenced by memcpy().

| void PikeAero::CConfiguration::setWritable | ( | bool | w | ) | [inline, protected] |
Set record as writable.
Definition at line 472 of file cconfiguration.h.
References mWritable.
00472 { mWritable = w; }
| bool PikeAero::CConfiguration::valid | ( | ) | [inline] |
Determine of the current record is valid by verifying the CRC.
Definition at line 92 of file cconfiguration.h.
References calculateCRC32(), and crc32().
Referenced by PikeAero::CCommandHandler::commandCOPY(), PikeAero::CCommandHandler::commandOPEN(), openRead(), and openWrite().
00092 { return calculateCRC32() == crc32(); }


| CMachine::ubit32 PikeAero::CConfiguration::vld | ( | ) | [inline, protected] |
Return a Variable Length Data (VLD) pointer to the storage area for variable length table data. The cofiguration record itself is a fixed size, so the variable length table data must be calculated and allocated separatly at the time the record is commited.
Definition at line 141 of file cconfiguration.cpp.
References record().
00142 { 00143 return ((CMachine::ubit32)record())+sizeof(tConfigRecord); 00144 }

| bool PikeAero::CConfiguration::writable | ( | ) | [inline] |
Query is record writable?
Definition at line 74 of file cconfiguration.h.
References mWritable.
Referenced by close(), commit(), and disposeVolatileRecord().
00074 {return mWritable;}

Definition at line 733 of file cconfiguration.h.
Referenced by CConfiguration(), close(), createVolatileRecord(), disposeVolatileRecord(), and record().
bool PikeAero::CConfiguration::mWritable [private] |
Definition at line 732 of file cconfiguration.h.
Referenced by close(), openWrite(), setWritable(), and writable().
1.5.8