This class gives access to HopsanCore for model and externalLib loading as well as component creation and simulation.
More...
|
| HopsanEssentials () |
| HopsanEssentials Constructor.
|
|
| ~HopsanEssentials () |
| HopsanEssentials Destructor.
|
|
const char * | getCoreVersion () const |
| Returns the HopsanCore version as a string.
|
|
const char * | getCoreBuildTime () const |
| Returns the HopsanCore build date and time.
|
|
const char * | getCoreCompiler () const |
| Get compiler info from core.
|
|
bool | isCore64Bit () const |
| Check if core is compiled 64-bit.
|
|
bool | isCoreDebugCompiled () const |
|
Component * | createComponent (const HString &rTypeName) |
| Creates a component with the specified key-value and returns a pointer to this component.
|
|
ComponentSystem * | createComponentSystem () |
| Creates a ComponentSystem.
|
|
ConditionalComponentSystem * | createConditionalComponentSystem () |
| Creates a ConditionalComponentSystem.
|
|
void | removeComponent (Component *pComponent) |
|
void | removeNode (Node *pNode) |
|
bool | hasComponent (const HString &rType) const |
| Check if a component with given typename exist in the ComponentFactory.
|
|
bool | reserveComponentTypeName (const HString &rTypeName) |
| Reserves a component TypeName in the component factory map.
|
|
const std::vector< HString > | getRegisteredComponentTypes () const |
| Returns a vector containing all registered component types.
|
|
Node * | createNode (const HString &rNodeType) |
| Creates a Node of given node type.
|
|
const std::vector< HString > | getRegisteredNodeTypes () const |
| Returns a vector containing all registered node types.
|
|
bool | haveQuantity (const HString &rQuantity) const |
| Check if a quantity name is registered.
|
|
HopsanCoreMessageHandler * | getCoreMessageHandler () |
| Returns a pointer to the core message handler, do NOT use this function to get messages.
|
|
void | getMessage (HString &rMessage, HString &rType, HString &rTag) |
| Get the message waiting on the message queue.
|
|
size_t | checkMessage () |
| Check if there are any messages waiting in the queue.
|
|
size_t | getNumInfoMessages () const |
| Returns the number of waiting info messages on the message queue.
|
|
size_t | getNumWarningMessages () const |
| Returns the number of waiting warning messages on the message queue.
|
|
size_t | getNumErrorMessages () const |
| Returns the number of waiting error messages on the message queue.
|
|
size_t | getNumFatalMessages () const |
| Returns the number of waiting fatal messages on the message queue.
|
|
size_t | getNumDebugMessages () const |
| Returns the number of waiting debug messages on the message queue.
|
|
bool | openCoreLogFile (const char *absoluteFilePath) |
| Opens the HopsanCore runtime log file, if not already opened.
|
|
bool | loadExternalComponentLib (const char *path) |
| Loads an external component library.
|
|
bool | unLoadExternalComponentLib (const char *path) |
| Unloads an external component library.
|
|
void | getExternalComponentLibNames (std::vector< HString > &rLibNames) |
| Get the libNames of the currently loaded libs (the names compiled into libs)
|
|
void | getExternalLibraryContents (const char *libPath, std::vector< HString > &rComponents, std::vector< HString > &rNodes) |
| Get the contents (components and nodes) registered by an external library.
|
|
void | getLibPathForComponentType (const HString &rTypeName, HString &rLibPath) |
| Returns the path to the library file from where specified component is loaded.
|
|
ComponentSystem * | loadHMFModelFile (const char *filePath, double &rStartTime, double &rStopTime) |
| This function is used to load a HMF file.
|
|
ComponentSystem * | loadHMFModel (const std::vector< unsigned char > xmlVector) |
|
ComponentSystem * | loadHMFModel (const char *xmlString, double &rStartTime, double &rStopTime) |
| This function is used to load a HMF model from a string.
|
|
SimulationHandler * | getSimulationHandler () |
|
This class gives access to HopsanCore for model and externalLib loading as well as component creation and simulation.