Greet 2014
Documentation for the GREET 2014 API
|
An interface that defines what methods and events can be used in order to interact with the GREET software More...
Public Member Functions | |
void | Compress (Stream inp, Stream outp) |
Uses an input stream and compresses it using deflate More... | |
void | Decompress (Stream inp, Stream outp) |
Uses an input stream and decompresses it More... | |
string | DownloadDatabaseFromServer (int revNumber=0) |
Orders the software to download a specific version of the database from the webservice More... | |
string | FormatValue (double valueSIUnit, string SIUnitOrGroup, int format=-1, bool scaleIfSelected=true, int scientificFigures=4) |
Formats a value according to the options chosen by the user in the main form More... | |
string | GetDefaultFolder () |
Get the default folder used by GREET to store data, by default the MyDocument/Greet folder More... | |
int | GetModelYear () |
Returns the current modeling year chosen by the user More... | |
IProject | LoadProjectFile (string filename) |
Loads a project file and returns the project object with the data. More... | |
void | OpenProject (string fileName, bool rememberLastDatabase) |
Orders the main GUI to open a specific file as the current project Warning this will simply discard the currently loaded data and all changes that are not saved to a real file When the new file is loaded into the main form, the onDatabaseLoaded method will be called for all plugins More... | |
void | RunSimalation (bool textMinMaxMonitors) |
Asks GREET to run the simulation and computes the model More... | |
void | RunSimalationAsync () |
Asks GREET to run the simulation and computes the model More... | |
string | SaveProject (IProject project, string fileName) |
Saves the given project to a file More... | |
Properties | |
IProject | CurrentProject [get] |
Returns the project currently in use More... | |
Dictionary< string, IQuantity > | UnitGroupsAvailable [get] |
Returns a dictionary with unit groups available in GREET More... | |
Dictionary< string, IUnit > | UnitsAvailable [get] |
Returns a dictionary with units available in GREET More... | |
Events | |
EventHandler | CalculationFinished |
When the calculations are done, this event fires up to warn any plugin that we are going to have some results available now. More... | |
An interface that defines what methods and events can be used in order to interact with the GREET software
void Greet.Model.Interfaces.IGREETController.Compress | ( | Stream | inp, |
Stream | outp | ||
) |
Uses an input stream and compresses it using deflate
inp | Not compressed stream |
outp | Compressed stream |
Implemented in Greet.Model.ModelControler.
void Greet.Model.Interfaces.IGREETController.Decompress | ( | Stream | inp, |
Stream | outp | ||
) |
Uses an input stream and decompresses it
inp | Compressed input stream to be compressed |
outp | Decompressed stream using deflate |
Implemented in Greet.Model.ModelControler.
string Greet.Model.Interfaces.IGREETController.DownloadDatabaseFromServer | ( | int | revNumber = 0 | ) |
Orders the software to download a specific version of the database from the webservice
revNumber |
Implemented in Greet.Model.ModelControler.
string Greet.Model.Interfaces.IGREETController.FormatValue | ( | double | valueSIUnit, |
string | SIUnitOrGroup, | ||
int | format = -1 , |
||
bool | scaleIfSelected = true , |
||
int | scientificFigures = 4 |
||
) |
Formats a value according to the options chosen by the user in the main form
valueSIUnit | The numerical value to be formated |
SIUnitOrGroup | The unit or unit group in which this value is represented |
format | Format: -1 GUI user preference, 0 unit specific, 1 scientific notation, 2 all digits |
scaleIfSelected | If format is different than -1, scaling is selected in the options the method will use prefixes like k for kilo, M for mega... |
scientificFigures | If format is 1, then this parameter set how many digits are displayed for scientific notation |
Implemented in Greet.Model.ModelControler.
string Greet.Model.Interfaces.IGREETController.GetDefaultFolder | ( | ) |
Get the default folder used by GREET to store data, by default the MyDocument/Greet folder
Implemented in Greet.Model.ModelControler.
int Greet.Model.Interfaces.IGREETController.GetModelYear | ( | ) |
Returns the current modeling year chosen by the user
Implemented in Greet.Model.ModelControler.
IProject Greet.Model.Interfaces.IGREETController.LoadProjectFile | ( | string | filename | ) |
Loads a project file and returns the project object with the data.
filename |
Implemented in Greet.Model.ModelControler.
void Greet.Model.Interfaces.IGREETController.OpenProject | ( | string | fileName, |
bool | rememberLastDatabase | ||
) |
Orders the main GUI to open a specific file as the current project Warning this will simply discard the currently loaded data and all changes that are not saved to a real file When the new file is loaded into the main form, the onDatabaseLoaded method will be called for all plugins
fileName | Full file path + name for the database to be opened |
rememberLastDatabase | If set to true, next time GREET opens this file will be loaded automatically |
Implemented in Greet.Model.ModelControler.
void Greet.Model.Interfaces.IGREETController.RunSimalation | ( | bool | textMinMaxMonitors | ) |
Asks GREET to run the simulation and computes the model
Implemented in Greet.Model.ModelControler.
void Greet.Model.Interfaces.IGREETController.RunSimalationAsync | ( | ) |
Asks GREET to run the simulation and computes the model
Implemented in Greet.Model.ModelControler.
string Greet.Model.Interfaces.IGREETController.SaveProject | ( | IProject | project, |
string | fileName | ||
) |
Saves the given project to a file
project | The project to save, can be the current project |
fileName | Filename to be used to create the data file |
Implemented in Greet.Model.ModelControler.
|
get |
Returns the project currently in use
|
get |
Returns a dictionary with unit groups available in GREET
|
get |
Returns a dictionary with units available in GREET
EventHandler Greet.Model.Interfaces.IGREETController.CalculationFinished |
When the calculations are done, this event fires up to warn any plugin that we are going to have some results available now.