RomRep::Engine Class Reference

List of all members.

Public Member Functions

 Engine ()

Static Public Member Functions

static unsigned char getFile (String *fname, int size) __gc[]
static bool doesFileExist (String *fname)
static HondaEcugetRom (String *fname, int size)
static bool saveFile (unsigned char rom __gc[], String *fname, int size)
static float voltsToPsi (float volts, int sensor)
static int voltsToInHg (float volts, int sensor)
static int psiToRaw (float psi, int sensor)
static int inHgToRaw (int inhg, int sensor)
static float rawToVolts (int raw)
static float rawToAfr (int raw, float volts __gc[], float afr __gc[])

Constructor & Destructor Documentation

RomRep::Engine::Engine  ) 
 


Member Function Documentation

bool RomRep::Engine::doesFileExist String *  fname  )  [static]
 

Parameters:
fname file name
Returns:
bool indicating whether the fiel exists

unsigned char RomRep::Engine::getFile String *  fname,
int  size
[static]
 

Parameters:
fname file name
size size to read in
Returns:
byte array containing the entire file

RomRep::HondaEcu * RomRep::Engine::getRom String *  fname,
int  size
[static]
 

Opens a the file then tries to determine if it is a known type of ROM. If so that type of ROM is instantiated and returned, otherwise a null is returned

Parameters:
fname file name
size number of bytes to read
Returns:
HondaEcu object or null

int RomRep::Engine::inHgToRaw int  inhg,
int  sensor
[static]
 

Converts InHg to raw byte

Parameters:
sensor type of map sensor

int RomRep::Engine::psiToRaw float  psi,
int  sensor
[static]
 

Converts PSI to raw byte

Parameters:
sensor type of map sensor

float RomRep::Engine::rawToAfr int  raw,
float volts  __gc[],
float afr  __gc[]
[static]
 

Converts raw byte to afr. Interpolates the AFR from the arrays passed in.

Parameters:
volts float array with voltages
afr float array with afrs that correspond to the voltages

float RomRep::Engine::rawToVolts int  raw  )  [static]
 

Converts byte to voltage

bool RomRep::Engine::saveFile unsigned char rom  __gc[],
String *  fname,
int  size
[static]
 

Parameters:
rom byte array containing the whole rom
fname file name
size number of bytes to save.
Returns:
true if successful, false otherwise

int RomRep::Engine::voltsToInHg float  volts,
int  sensor
[static]
 

Converts voltage to InHg

Parameters:
sensor type of map sensor

float RomRep::Engine::voltsToPsi float  volts,
int  sensor
[static]
 

Converts voltage to PSI

Parameters:
sensor type of map sensor



BRE Documentation Home