Inheritance diagram for RomRep::Map:
Public Member Functions | |
void | SendByteChangeRequest (int loc, unsigned char byte) |
void | SendByteChangeRequest (ByteChange *ch) |
void | SendByteChangeRequest (ByteChange *changes[]) |
Map () | |
Map (int x, int y, unsigned int locale, int ind, int mode) | |
Map (int x, int y, unsigned int locale, unsigned char fil __gc[], int ind, int mode) | |
Normal Constructor. | |
virtual | ~Map () |
useless destructor | |
float | getMap () __gc[ |
float virtual float | getVal (int x, int y) |
Gets the RealWorld value at a location in the map. Indexed from 0. | |
virtual RomRep::ByteChange * | setVal (int x, int y, float val) |
Sets a value in the map. | |
virtual float | calculate (int x, int y, int intval)=0 |
virtual int | calculate (int x, int y, float mapval)=0 |
virtual void | populate (unsigned char mapp __gc[,]) |
populates the map with the byte array | |
virtual int | getX () |
Returns map width. | |
virtual int | getY () |
Returns map height. | |
virtual int | getIndex () |
Index is for distinguishing between vtec/non boost/non, etc. | |
virtual int | getMode () |
Mode is for distinguishing between fuel and ign. | |
virtual bool | isVtec () |
Returns whether the map is vtec (true) or not (false). | |
virtual unsigned int | getMapLocation () |
Returns the integer ROM location of the map. | |
virtual void | setMapLocation (unsigned int loc) |
Sets the ROM location of the map. | |
virtual unsigned int | getCellLocation (int x, int y) |
Returns the ROM location of a cell in the map. | |
virtual RomRep::ByteChange * | setMultiplier (int column, int val)=0 |
Sets a multiplier (if fuel map; ign maps return null). | |
virtual int | getMultiplierLocation (int column)=0 |
Returns the ROM location of the multiplier. | |
virtual int | getRowScalarLoc () |
Returns the Row Scalar ROM location. | |
virtual int | getColumnScalarLoc () |
Returns the Column scalar ROM location. | |
virtual void | setRowScalarLoc (int val) |
Sets the Row Scalar ROM location. | |
virtual void | setColumnScalarLoc (int val) |
Sets the Column scalar ROM location. | |
virtual String * | getRowHeader (int row) |
Returns the header text for the specified row. | |
virtual String * | getColumnHeader (int col) |
Returns the header text for the specified column. | |
virtual String * | getName () |
Returns the name of the map. | |
virtual void | setName (String *n) |
Sets the map's name. | |
virtual void | byteChangeNotify (ByteChange *bc) |
virtual void | setRowHeaderCalculator (HeaderCalculator *he) |
virtual void | setColumnHeaderCalculator (HeaderCalculator *he) |
virtual HeaderCalculator * | getRowHeaderCalculator () |
virtual HeaderCalculator * | getColumnHeaderCalculator () |
virtual bool | canEditHeader (bool column, int columnOrRow) |
Returns true if the column or row can be edited. Calls to the HeaderEditors. | |
virtual void | setRowHeader (int row, String *val) |
Calls the corresponding function in all of the HeaderEditors. | |
virtual void | setColumnHeader (int col, String *val) |
Calls the corresponding function in all of the HeaderEditors. | |
virtual void | mapHeaderChanged (Object *sender, MapHeaderChangeArgs *args) |
void | notifyHeaderChanged (Object *sender, MapHeaderChangeArgs *args) |
Static Public Member Functions | |
static unsigned int | getCellLocation (int x, int y, int cols, int loc) |
Returns the ROM location of a cell in the map (static). | |
Public Attributes | |
__event MapByteChangeRequest * | OnByteChangeRequest |
__event MapChangeHandler * | OnMapChanged |
__event RealMapChangeHandler * | OnRealMapChanged |
__event MapHeaderChangeHandler * | OnMapHeaderChanged |
__event MapHeaderEnableChangeHandler * | OnMapHeaderEnableChanged |
Static Public Attributes | |
static const int | MODE_IGNITION = 1 |
static const int | MODE_FUEL = 0 |
static const int | HEADER_EVENT_ALL = -2 |
static const int | HEADER_EVENT_NONE = -1 |
Protected Member Functions | |
void | MapHeaderChanged (int xx, int yy, String *realval[]) |
void | MapHeaderChanged (MapHeaderChangeArgs *args) |
void | MapHeaderEnableChanged (int xx, int yy, bool enabled) |
void | MapChanged (int xx, int yy, int byte) |
void | RealMapChanged (int xx, int yy, int byte) |
Protected Attributes | |
unsigned char thefile | __gc [] |
unsigned char map | __gc [,] |
String * | vac [] |
the column headers | |
String * | rpm [] |
the row headers | |
int | revscalarloc |
int | pressscalarloc |
int | x |
int | y |
unsigned int | location |
int | index |
int | mode |
bool | vtec |
String * | name |
HeaderCalculatorPair * | headerCalculators |
Concrete derived Maps will get passed an integer representation of the map (from the raw file) then will convert the map and store it in this class' 2D array.
The basics of the Map event structure and the way they are used are as follows:
|
The Map class |
|
|
|
Normal Constructor.
|
|
useless destructor
|
|
For each inherited class, this will see if the byte location applies to their object and then make the appropriate updates. Reimplemented from RomRep::ByteChangeNotify. Reimplemented in RomRep::FuelMap, RomRep::Obd0IgnMap, RomRep::Obd0FuelMap, RomRep::VT0IgnMap, and RomRep::VT0FuelMap. |
|
Takes real world value and returns an integer (0-255 byte) This must be overridden so this base class can properly convert between bytes and real world values. Implemented in RomRep::AfrMap, RomRep::FuelMap, RomRep::Obd0IgnMap, RomRep::Obd0FuelMap, and RomRep::VT0FuelMap. |
|
Takes byte (an integer) and returns real world value This must be overridden so this base class can properly convert between bytes and real world values. Implemented in RomRep::AfrMap, RomRep::FuelMap, RomRep::Obd0IgnMap, RomRep::Obd0FuelMap, and RomRep::VT0FuelMap. |
|
Returns true if the column or row can be edited. Calls to the HeaderEditors.
|
|
Returns the ROM location of a cell in the map (static).
|
|
Returns the ROM location of a cell in the map.
|
|
Returns the header text for the specified column.
|
|
|
|
Returns the Column scalar ROM location.
|
|
Index is for distinguishing between vtec/non boost/non, etc.
|
|
Gets the real world values of the map.
|
|
Returns the integer ROM location of the map.
|
|
Mode is for distinguishing between fuel and ign.
|
|
Returns the ROM location of the multiplier.
Implemented in RomRep::AfrMap, RomRep::FuelMap, and RomRep::Obd0IgnMap. |
|
Returns the name of the map.
|
|
Returns the header text for the specified row.
|
|
|
|
Returns the Row Scalar ROM location.
|
|
Gets the RealWorld value at a location in the map. Indexed from 0.
|
|
Returns map width.
|
|
Returns map height.
|
|
Returns whether the map is vtec (true) or not (false).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
populates the map with the byte array
|
|
|
|
|
|
|
|
|
|
Calls the corresponding function in all of the HeaderEditors.
|
|
|
|
Sets the Column scalar ROM location.
|
|
Sets the ROM location of the map.
|
|
Sets a multiplier (if fuel map; ign maps return null).
Implemented in RomRep::AfrMap, RomRep::FuelMap, and RomRep::Obd0IgnMap. |
|
Sets the map's name.
|
|
Calls the corresponding function in all of the HeaderEditors.
|
|
|
|
Sets the Row Scalar ROM location.
|
|
Sets a value in the map.
Reimplemented in RomRep::FuelMap. |
|
Reimplemented in RomRep::FuelMap. |
|
Reimplemented in RomRep::FuelMap. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Sent when the map wants to change a byte in the rom. It is assumed that the HondaEcu object containing this map is subscribed to the event. The special maps call this when a map header is changed. |
|
Event fired when this map is Changed in that something called setVal(). So really this is just issuing a byte change request to the HondaEcu object. |
|
Called when a header in the map has been changed. In the resulting MapHeaderChangeArgs, you will receive both the row or column that this change took place in and the data (string) to use in that area. For instance say column header 14 is changed to "1.3psi". The column variable would have 14, the row variable would have Map::HEADER_EVENT_NONE, and the data would be a string array with "1.3psi" as its only element. Additionally, it is possible to receive a Map::HEADER_EVENT_ALL in place of the row or column. The data would then have a string array with all of the headers. |
|
Called when the editable state of a header has changed. i.e. Only the TPS portion of an ITB map is editable and the user changes the xover column. In that case, OnMapHeaderEnableChanged would be called for each column that changed from map->tps or vice versa with Map::HEADER_EVENT_NONE as the y component. A situation like that is sort of a rarity, as most of the maps are all or nothing with no changes that will ever happen. |
|
This works in conjunction with OnMapChanged event. OnMapChanged will send a byte requst to the HondaEcu object, which will set the byte then notify all of its maps of the byte change (via the byteChangeNotify method). If the byte change is within the map, the map will fire the OnRealMapChanged event with the real value of the map to signal that a byte change has taken place. |
|
|
|
|
|
the row headers
|
|
the column headers
|
|
|
|
|
|
|