bre20::child Class Reference

List of all members.

Public Member Functions

 child (RomRep::HondaEcu *ecu, int filelen, String *filename, ParamPage *ppage)
 Constructor.
 ~child ()
 Destructor.
CheckBox * CreateCheckBox (int x, int y, String *caption, String *handler)
Button * CreateButton (int x, int y, int width, int height, String *caption, String *handler)
bre20::LabeledTextCreateText (int x, int y, String *caption, String *handler, String *tooltip, int width, int mode)
GroupBox * CreateGroupBox (int x, int y, String *caption, String *fullyQualClass, int width, int height, Control *controls[])
SimpleGrid::GridCreateGrid (int x, int y, String *handler, int columns, int rows)
MenuItem * AddMenuItem (String *mainMenu, String *caption, String *handler)
bool AddControlGroup (GroupBox *con)
bool subscribeToEvent (String *event, String *handler)
void addLoggerRule (bre20::Rule *r)
TabPage * getScriptTabPages ()[]
 returns the array of script tab pages.
AutoEditgetAutoEdit ()
void openAutoTuneOptions ()
void openLogAnalyzer (String *fname)
void addLogAnalyzerRule (bre20::Rule *r)
TabControl * getTabConrol ()
 gets the rom windows tabcontrol
int AddMapPair (String *fuelTabName, RomRep::MapLocs *flocs, String *ignTabName, RomRep::MapLocs *ignlocs, int x, int y, int copyIndex, bool copyContents)
GridPageAddMap (String *tabName, int columns, int rows, String *handler)
bool parseByteChanges (String *fname, bool makeChangeOnRight)
void changeColHeader (bool vtec, int col, String *header)
 changes a column header for the specified map. 0 for non vtec, 1 for vtec, etc...
void scaleFuelMaps (float multiplier)
 scales the entire fuel maps with the specified multiplier
void setAllColHeaders ()
 grabs the col headers from the ROM and resets the grid headers
int setChecksum ()
 sets and returns the checksum
String * getFileName ()
 gets the filename
String * getRomType ()
 gets the ROM type string
unsigned char getFile () __gc[]
 gets clean checksummed file
int getFileLength ()
 byte length of the file
void setFileName (String *filename)
 set the file name
RomRep::HondaEcugetRom ()
 gets the ROM object. holy power.
void setRom (RomRep::HondaEcu *romm)
void setFuelCell (int x, int y, float value, int index)
float getFuelCell (int x, int y, int index)
 index = 0 for non vtec, 1 for vtec
void addByteChange (RomRep::ByteChange *bc)
void setRomSaved ()
bool getWasEdited ()
void setCellColor (GridPage *page, int x, int y, float val, int mode)

Public Attributes

__event ScriptFunctionCallHandler * OnFunctionCalled
 event fired when a script function is called
__event System::EventHandler * OnAutotuneOptionsCreated
__event System::EventHandler * OnEmulationOptionsCreated
__event System::EventHandler * OnLoggerCreated
__event System::EventHandler * OnLoggerOpened
__event System::EventHandler * OnLogAnalyzerCreated
__event System::EventHandler * OnLogAnalyzerOpened
__event System::EventHandler * OnExtraTablesCreated

Static Public Attributes

static int FUELMODE = 0
 fuel mode
static int IGNMODE = 1
 ignition mode

Protected Member Functions

void Dispose (Boolean disposing)

Constructor & Destructor Documentation

bre20::child::child RomRep::HondaEcu ecu,
int  filelen,
String *  filename,
ParamPage ppage
 

Constructor.

bre20::child::~child  ) 
 

Destructor.


Member Function Documentation

void bre20::child::addByteChange RomRep::ByteChange bc  ) 
 

Adds a RomRep.ByteChange object to the emulation queue. Downloads if live edit and enqueues if manual

bool bre20::child::AddControlGroup GroupBox *  con  ) 
 

Adds a groupbox to the scripts tab.

Please see Control Creation notes.

void bre20::child::addLogAnalyzerRule bre20::Rule r  ) 
 

void bre20::child::addLoggerRule bre20::Rule r  ) 
 

add a Rule to the Logger. I recommend using subscribeToEvent() to subscribe to the OnDataloggerOpened event then call this in the handler function. After the Logger form is opened and closed, the Rule list is deleted, so if you do not use the event, your rule wont work properly.

See Datalogger Extension.

bre20::GridPage * bre20::child::AddMap String *  tabName,
int  columns,
int  rows,
String *  handler
 

Creates a vanilla map with nothing in the headers. Handler happens when user changes a cell in the map

Please see Control Creation notes.

int bre20::child::AddMapPair String *  fuelTabName,
RomRep::MapLocs flocs,
String *  ignTabName,
RomRep::MapLocs ignlocs,
int  x,
int  y,
int  copyIndex,
bool  copyContents
 

Adds a map pair to the romWindow

Please see Control Creation notes.

Parameters:
fuelTabName name of the fuel tab
fuelloc ROM location of the fuel map
fRevScalarLoc ROM location of the fuel rev scalar (1 past the LAST byte in the scalar array for OBD0 VTEC)
ignTabName name of the ignition tab
ignloc ROM location of the ign map
iRevScalarLoc ROM location of the ign rev scalar (1 past the LAST byte in the scalar array for OBD0 VTEC)
x width of the maps
y height of the maps
copyIndex the index of the map to copy (really just for the rpm calc)
copyContents boolean indicating whether BRE should copy the contents of the map

MenuItem * bre20::child::AddMenuItem String *  mainMenu,
String *  caption,
String *  handler
 

Adds a menu item to the menu item of choice. You can effectively add a menu under ANY menu item in BRE (including functional items) by using its name in the mainMenu variable. BRE searches left to right and top to bottom on each menu item. So if there are duplicate names, the name to the left or higher at the top of some menu will be picked as the parent.

The handler cannot be null even if the caption is "-" (for a separator) or the menu being created is a top level menu. If this is the case you must pass the namespace and classname in.

Separators cannot be top level menus.

If mainMenu == "" or null, the menu item will be added as a top level menu If the menu item you want to be under has text with an underlined letter then the mainMenu string must have a '&' in front of that letter: &Edit for the edit menu.

Please see Control Creation notes.

void bre20::child::changeColHeader bool  vtec,
int  col,
String *  header
 

changes a column header for the specified map. 0 for non vtec, 1 for vtec, etc...

Button * bre20::child::CreateButton int  x,
int  y,
int  width,
int  height,
String *  caption,
String *  handler
 

Returns a button. The handler is called when the button is clicked.

Please see Control Creation notes.

CheckBox * bre20::child::CreateCheckBox int  x,
int  y,
String *  caption,
String *  handler
 

Returns a checkbox. The handler is called when the check box is clicked.

Please see Control Creation notes.

SimpleGrid::Grid * bre20::child::CreateGrid int  x,
int  y,
String *  handler,
int  columns,
int  rows
 

This creates a grid object. The handler is called when a user changes a value in the grid. Handler event object is SimpleGrid.CellEvent

Please see Control Creation notes.

GroupBox * bre20::child::CreateGroupBox int  x,
int  y,
String *  caption,
String *  fullyQualClass,
int  width,
int  height,
Control *  controls[]
 

This creates a group box. USE THEM. Its the only object that should be added to BRE directly. These ae to be an alternative to the dialog boxes, which you can create but this is easier. This function adds the controls you have created to the group box then returns the group box to you.

Please see Control Creation notes.

Parameters:
fullyQualClass is in the format "Namespace.Class"

bre20::LabeledText * bre20::child::CreateText int  x,
int  y,
String *  caption,
String *  handler,
String *  tooltip,
int  width,
int  mode
 

Returns a LabeletText, which is a textbox with a caption. Its really a Panel object. The handler happens when the user changes the text (either presses enter or leaves focus)

Specify the proper mode, it has dumb-user handling.

TextBox modes (these ensure the user enters proper input):
LabeledText.LTMODEINT <- nothing other than ints
LabeledText.LTMODEDOUBLE <- nothing other than decimal values
LabeledText.LTMODETEXT <- anything

Please see Control Creation notes.

void bre20::child::Dispose Boolean  disposing  )  [protected]
 

AutoEdit* bre20::child::getAutoEdit  ) 
 

Returns:
the AutoEdit object. If the logger or autotune options has not been opened the object will be created when this is called.

unsigned char bre20::child::getFile  ) 
 

gets clean checksummed file

int bre20::child::getFileLength  ) 
 

byte length of the file

String* bre20::child::getFileName  ) 
 

gets the filename

float bre20::child::getFuelCell int  x,
int  y,
int  index
 

index = 0 for non vtec, 1 for vtec

Sets the value in the fuel map. Maps indexed from left of tab order. base index = 0

RomRep::HondaEcu* bre20::child::getRom  ) 
 

gets the ROM object. holy power.

String* bre20::child::getRomType  ) 
 

gets the ROM type string

TabPage* bre20::child::getScriptTabPages  ) 
 

returns the array of script tab pages.

TabControl* bre20::child::getTabConrol  ) 
 

gets the rom windows tabcontrol

bool bre20::child::getWasEdited  ) 
 

void bre20::child::openAutoTuneOptions  ) 
 

void bre20::child::openLogAnalyzer String *  fname  ) 
 

bool bre20::child::parseByteChanges String *  fname,
bool  makeChangeOnRight
 

this opens and parses a 'byte changes' type text file these can be generated by winhex. BRE will parse generic winhex comparison files. comments can be used in the files where ever the user pleases using the '//!' at the beginning of the comment.

All bytes changed from this function will be sent to the ostrich.

Parameters:
fname the file name
makeChangeOnRight specifies which byte to change to: true is right byte, false is left byte

void bre20::child::scaleFuelMaps float  multiplier  ) 
 

scales the entire fuel maps with the specified multiplier

void bre20::child::setAllColHeaders  ) 
 

grabs the col headers from the ROM and resets the grid headers

void bre20::child::setCellColor GridPage page,
int  x,
int  y,
float  val,
int  mode
 

int bre20::child::setChecksum  ) 
 

sets and returns the checksum

void bre20::child::setFileName String *  filename  ) 
 

set the file name

void bre20::child::setFuelCell int  x,
int  y,
float  value,
int  index
 

Sets the value in the fuel map. Maps indexed from left of tab order. base index = 0. index = 0 for non vtec, 1 for vtec

void bre20::child::setRom RomRep::HondaEcu romm  ) 
 

void bre20::child::setRomSaved  ) 
 

bool bre20::child::subscribeToEvent String *  event,
String *  handler
 

This will allow you to subscribe to an event in BRE.

Events to subscribe to are (the event param string):

  • "OnAddControl" - happens when a script adds a control returns new EventArgs

  • "OnChangeMapCell" - when one of the maps has a cell changed called AFTER BRE handles the event. returns SimpleGrid.CellEvent

  • "OnChangeByte" - when any byte in the rom is changed called AFTER BRE handles the event (after the byte goes to the ostrich) returns RomRep.ByteChangeArgs

  • "OnChildClosing" - when the child object is closing returns System.ComponentModel.CancelEventArgs

  • "OnColumnHeaderChanged" - When a grid page's (i.e. fuel map) column header is changed this is fired. The sender object is the grid page which fired the event, and the EventArgs object is a SimpleGrid.CellEvent object with the column index in the CellEvent.Column property.

  • "OnRowHeaderChanged" - When a grid page's (i.e. fuel map) row header is changed this is fired. The sender object is the grid page which fired the event, and the EventArgs object is a SimpleGrid.CellEvent object with the row index in the CellEvent.Row property.

  • "OnDataloggerCreated" - when the Logger form is actually CREATED. Returns a System.EventArgs and the Logger object as the sender. This event is for any extra processing that needs a valid logger (such as adding a new o2 type).

Please see Control Creation notes.

Parameters:
event the string name of the event
handler the handler function in your script


Member Data Documentation

int bre20::child::FUELMODE = 0 [static]
 

fuel mode

int bre20::child::IGNMODE = 1 [static]
 

ignition mode

__event System::EventHandler* bre20::child::OnAutotuneOptionsCreated
 

event fired when the AutotuneOptions dialog is created. The sender object is the AutotuneOptions object

__event System::EventHandler* bre20::child::OnEmulationOptionsCreated
 

event fired when the RtpOptions dialog is created. The sender object is the RtpOptions object

__event System::EventHandler* bre20::child::OnExtraTablesCreated
 

event fired when the ExtraTables object is actually created. The sender object is the child object

__event ScriptFunctionCallHandler* bre20::child::OnFunctionCalled
 

event fired when a script function is called

__event System::EventHandler* bre20::child::OnLogAnalyzerCreated
 

event fired when the LogAnalyzer object is actually created The sender object is the LogAnalyzer object

__event System::EventHandler* bre20::child::OnLogAnalyzerOpened
 

event fired when the LogAnalyzer object is opened, before being created. The sender object is the child object

__event System::EventHandler* bre20::child::OnLoggerCreated
 

event fired when the Logger object is actually created. The sender object is the Logger object

__event System::EventHandler* bre20::child::OnLoggerOpened
 

event fired when the Logger object is opened, before being created. The sender object is the child object




BRE Documentation Home