| |
libFAUDES
Sections
Index
|
faudes::HioModule Class Reference |
Public Member Functions | |
HioModule (void) | |
constructror | |
HioModule (const HioModule &rOtherHioModule) | |
copy constructror | |
virtual | ~HioModule (void) |
virtual destructor | |
void | Clear () |
Clear all mebers of the HioModule. | |
void | Name (const std::string &rName) |
Set name of HioModule. | |
std::string | Name () const |
Return name of HioModule. | |
void | Index (const Idx Index) |
Set index of HioModule. | |
Idx | Index () const |
Return index of HioModule. | |
void | OpConstr (const HioConstraint &rOpConstr) |
Set Operator-Constraint of HioModule. | |
HioConstraint | OpConstr () const |
Return Operator-Constraint of HioModule. | |
void | Plant (const HioPlant &rHioPlant) |
Set HioPlant of HioModule. | |
HioPlant | Plant () const |
Return HioPlant of HioModule. | |
void | Controller (const HioController &rHioController) |
Set HioController of HioModule. | |
HioController | Controller () const |
Return HioController of HioModule. | |
std::vector< HioModule * > | Children () const |
Return Children of HioModule. | |
void | Children (const std::vector< HioModule * > &rChildren) |
Set Children of HioModule. | |
void | Environment (const HioEnvironment &rHioEnvironment) |
Set HioEnvironment of HioModule. | |
HioEnvironment | Environment () const |
Return HioEnvironment of HioModule. | |
void | EnvConstr (const HioConstraint &rEnvConstr) |
Set Environment-Constraint of HioModule. | |
HioConstraint | EnvConstr () const |
Return Environment-Constraint of HioModule. | |
void | InsChild (HioModule *rChild) |
Insert HioModule to list of children. | |
void | Position (const int Xpos, const int Ypos) |
This is a function to set the x and y position of the HioModule. | |
void | TypeHioModule (int type[5]) |
This is a function to set the type of the HioModule; by type we mean an array of lenght 5 where each position has a specific semnification:. | |
void | ReadHioPlant (const std::string path) |
This function reads the model from the given library and sets the following private variables of the HioModule. | |
void | ReadHioEnv (const std::string path) |
This function reads the model describing the interaction of IO-Plants with the environment and sets the private variable mIOEnvironment. | |
void | AdjustGenerator (const Generator &rOldGen, const int i, Generator &rResGen) |
This function converts a generator by renaming all events from "CBx_..." to "CBi_...";. | |
void | AdjustHioPlant (const HioPlant &rOldHioPlant, const int i, HioPlant &rResult) |
AdjustHioPlant(): convenience function (derived from AdjustGenerator())to allow also the conversion of HioPlants. | |
void | AdjustAlphabet (const EventSet &rOldAlph, const int i, EventSet &rResAlph) |
Ahis function converts an alphabet by renaming all events from "CBx_..." to "CBi_..."; as a standard all events used in this plugin have the following name format: "CBx_..."; Warning: This function does not preserves the attributes of the events! | |
void | AdjustHioEnvironment (const HioEnvironment &rHioEnvX, const HioModule *rHioModule1, const HioModule *rHioModule2, HioEnvironment &rResEnv) |
AdjustEnvironmet(): In order to describe the interaction between two IO-Plants we use the IO-Environment. | |
void | AdjustHioController (const HioController &rHioController, const HioModule *HioModule1, const HioModule *HioModule2, HioController &rResCont) |
AdjustHioController: convenience function derived from AdjustHioEnvironment() in order to adjust an IOController to any two IO-Plants which must enforce a well-defined specification. | |
void | RenameHioModule (const int i) |
this function renames all relevant member of the HioModule. | |
std::vector< std::string > | ChooseSpec (const std::string path) |
chooseSpec: this function searches thru an apappropriate folder (based on the maximal capacity resulting from the ChildList) for available specifications and allows the user to choose one of the found specifications; After the user has chosen a specification, this function sets the IO-Plant, the constraints and the alphabets of the actual HioModule. | |
void | Compute () |
Compute: this function prepares the data required for HioSynth() function. | |
bool | FindController () |
FindController(): this function searches in the folder of a choosen specification for an already computed IO-controller which enforces this specification. | |
void | SaveController () |
Save: this function saves the computed controller in the same folder with the specification that this controller enforces. | |
std::string | MyPath () |
MyPath(): based on the type of the HioModule, this is a convenience function to establish the local path where to Write/Read from. | |
int | Xpos () const |
function to call the x-Position of the HioModule | |
int | Ypos () const |
function to call the y-Position of the HioModule | |
int * | TypeHioModule () const |
function to call the Type of the HioModule | |
void | EncodeType (const std::string type) |
function to encode to Type of the HioModule (function has only an informational character). | |
Private Attributes | |
std::string | mName |
Idx | mIndex |
HioConstraint | mOpConstr |
HioPlant | mPlant |
HioController | mController |
std::vector< HioModule * > | mChildren |
HioEnvironment | mEnvironment |
HioConstraint | mEnvConstr |
int | mType [5] |
int | mXpos |
int | mYpos |
faudes::HioModule::HioModule | ( | void | ) |
constructror
faudes::HioModule::HioModule | ( | const HioModule & | rOtherHioModule | ) |
copy constructror
virtual faudes::HioModule::~HioModule | ( | void | ) | [inline, virtual] |
virtual destructor
void faudes::HioModule::Clear | ( | void | ) |
Clear all mebers of the HioModule.
void faudes::HioModule::Name | ( | const std::string & | rName | ) |
void faudes::HioModule::Index | ( | const Idx | Index | ) |
void faudes::HioModule::OpConstr | ( | const HioConstraint & | rOpConstr | ) |
HioConstraint faudes::HioModule::OpConstr | ( | ) | const |
void faudes::HioModule::Plant | ( | const HioPlant & | rHioPlant | ) |
HioPlant faudes::HioModule::Plant | ( | ) | const |
void faudes::HioModule::Controller | ( | const HioController & | rHioController | ) |
HioController faudes::HioModule::Controller | ( | ) | const |
std::vector< HioModule * > faudes::HioModule::Children | ( | ) | const |
void faudes::HioModule::Children | ( | const std::vector< HioModule * > & | rChildren | ) |
void faudes::HioModule::Environment | ( | const HioEnvironment & | rHioEnvironment | ) |
HioEnvironment faudes::HioModule::Environment | ( | ) | const |
void faudes::HioModule::EnvConstr | ( | const HioConstraint & | rEnvConstr | ) |
HioConstraint faudes::HioModule::EnvConstr | ( | ) | const |
void faudes::HioModule::InsChild | ( | HioModule * | rChild | ) |
void faudes::HioModule::Position | ( | const int | Xpos, | |
const int | Ypos | |||
) |
This is a function to set the x and y position of the HioModule.
Xpos | Position at the X-Axis of an x0y-System | |
Ypos | Position at the Y-Axis of an x0y-System |
void faudes::HioModule::TypeHioModule | ( | int | type[5] | ) |
This is a function to set the type of the HioModule; by type we mean an array of lenght 5 where each position has a specific semnification:.
*************** Interpretation of mType[] ******* ************* Capacity: mType[0] ********* ************* Take from left: mType[1] ********* ************* Take from right: mType[2] ********* ************* Deliver to left: mType[3] ********* ************* Deliver to left: mType[4] ********* *************************************************
type | type of the HioModule |
void faudes::HioModule::ReadHioPlant | ( | const std::string | path | ) |
This function reads the model from the given library and sets the following private variables of the HioModule.
The library must contain the following files:
plantCBx.gen - IO-Plant model of the simulated work unit (to set mIOPlant); constrP_CBx.gen - Operator constraints of the IO Plant model (if the model doesn't require any operator constraints at least an empty generator must be available) (mLcConstr) constrE_CBx.gen - Environment constraints of the IO Plant model (at least an empty generator must be available) (mLeConstr)
for GUI purpose: symbolic picture of the work unit in *.png format
The file names must be given as described above, and the events respect the following format: "CBx_..." (e.g.: CBx_rdy, CBx_full, CBx_stby,...)
path | string path indicating to the folder of the library to load; (required format: ../CBx/) |
void faudes::HioModule::ReadHioEnv | ( | const std::string | path | ) |
This function reads the model describing the interaction of IO-Plants with the environment and sets the private variable mIOEnvironment.
As a next logical step this generator must be adapted to the IO-Plants that interact with each other.
path | string path indicating to the folder of the library to load; |
void faudes::HioModule::AdjustGenerator | ( | const Generator & | rOldGen, | |
const int | i, | |||
Generator & | rResGen | |||
) |
This function converts a generator by renaming all events from "CBx_..." to "CBi_...";.
all properties of the input generator are inherited by the output generator; as a standard all events used in this plugin have the following name format: "CBx_..."
rOldGen | generator to convert | |
i | new parameter to replace x | |
rResGen | Reference to the resulting converted generator (result) |
void faudes::HioModule::AdjustHioPlant | ( | const HioPlant & | rOldHioPlant, | |
const int | i, | |||
HioPlant & | rResult | |||
) |
AdjustHioPlant(): convenience function (derived from AdjustGenerator())to allow also the conversion of HioPlants.
rOldHioPlant | HioPlant to convert | |
i | new parameter to replace x | |
rResult | Reference to the resulting converted HioPlant (result) |
void faudes::HioModule::AdjustAlphabet | ( | const EventSet & | rOldAlph, | |
const int | i, | |||
EventSet & | rResAlph | |||
) |
Ahis function converts an alphabet by renaming all events from "CBx_..." to "CBi_..."; as a standard all events used in this plugin have the following name format: "CBx_..."; Warning: This function does not preserves the attributes of the events!
rOldAlph | Alphabet to convert | |
i | new parameter to replace x | |
rResAlph | Reference to the resulting converted alphabet (result) |
void faudes::HioModule::AdjustHioEnvironment | ( | const HioEnvironment & | rHioEnvX, | |
const HioModule * | rHioModule1, | |||
const HioModule * | rHioModule2, | |||
HioEnvironment & | rResEnv | |||
) |
AdjustEnvironmet(): In order to describe the interaction between two IO-Plants we use the IO-Environment.
This function adjusts the master copy (IOEnviromntX) to the two IO-Plants. The position of the plants to each other must be set.
void faudes::HioModule::AdjustHioController | ( | const HioController & | rHioController, | |
const HioModule * | HioModule1, | |||
const HioModule * | HioModule2, | |||
HioController & | rResCont | |||
) |
AdjustHioController: convenience function derived from AdjustHioEnvironment() in order to adjust an IOController to any two IO-Plants which must enforce a well-defined specification.
void faudes::HioModule::RenameHioModule | ( | const int | i | ) |
std::vector< std::string > faudes::HioModule::ChooseSpec | ( | const std::string | path | ) |
chooseSpec: this function searches thru an apappropriate folder (based on the maximal capacity resulting from the ChildList) for available specifications and allows the user to choose one of the found specifications; After the user has chosen a specification, this function sets the IO-Plant, the constraints and the alphabets of the actual HioModule.
The path must have the following format: "../Spec/"
Warning: The computation of the IO-Controller is not triggered by this function, it must be started separately!
path | Path to the folder containing the specifications |
void faudes::HioModule::Compute | ( | ) |
Compute: this function prepares the data required for HioSynth() function.
If all data is available, HioSynth() is called and the resulting generator is the IOController for the given specification.
bool faudes::HioModule::FindController | ( | ) |
FindController(): this function searches in the folder of a choosen specification for an already computed IO-controller which enforces this specification.
Furthermore must the IO-controller only be adjusted to the IO-Modules that we need to control. (to adjust call ajustController())
void faudes::HioModule::SaveController | ( | ) |
Save: this function saves the computed controller in the same folder with the specification that this controller enforces.
std::string faudes::HioModule::MyPath | ( | ) |
MyPath(): based on the type of the HioModule, this is a convenience function to establish the local path where to Write/Read from.
(This function is used up to now only by FindController() and SaveController())
int faudes::HioModule::Xpos | ( | ) | const |
int faudes::HioModule::Ypos | ( | ) | const |
int * faudes::HioModule::TypeHioModule | ( | ) | const |
void faudes::HioModule::EncodeType | ( | const std::string | type | ) |
function to encode to Type of the HioModule (function has only an informational character).
*************** Interpretation of mType[] ******* ************* Capacity: mType[0] ********* ************* Take from left: mType[1] ********* ************* Take from right: mType[2] ********* ************* Deliver to left: mType[3] ********* ************* Deliver to left: mType[4] ********* *************************************************
type | the type to be encoded |
std::string faudes::HioModule::mName [private] |
Idx faudes::HioModule::mIndex [private] |
HioConstraint faudes::HioModule::mOpConstr [private] |
HioPlant faudes::HioModule::mPlant [private] |
HioController faudes::HioModule::mController [private] |
std::vector<HioModule*> faudes::HioModule::mChildren [private] |
HioConstraint faudes::HioModule::mEnvConstr [private] |
int faudes::HioModule::mType[5] [private] |
int faudes::HioModule::mXpos [private] |
int faudes::HioModule::mYpos [private] |
libFAUDES 2.13a c++ source docu by doxygen 1.5.6