MIRA
|
Previous: Installation | Next: Concepts |
---|
After you successfully finished installing and building MIRA by following the Installation you will have a fully operational middleware consisting of the following parts.
You can now try and start to implement your first Unit. Units are modules that form simple or complex, reusable parts of a large and complex applications.
You should first create your own project where you put all your software components. Projects are just directories that contain a build environment for building MIRA components.
We use the MIRAWizard to create our own project:
You have successfully created your own project. You can now go into your project directory and type make
(linux) or nmake -f Makefile.nmake
(windows).
To create your first unit you need to decide in which domain your unit will reside. Domains are represented via the directory structure in the domains directory. So you will be able to change the domain of your unit later by moving it into a different one.
We use the MIRAWizard to create our unit:
Now you have successfully created your first Unit. You can build your domain by running make
or nmake -f Makefile.nmake
in your project directory.
If your Unit is not being built you may need to give CMake a hint that there is something new to be built. On linux type touch CMakeList.txt
in your project folder followed by make
.
Building your domain creates a shared library "libMyFirstUnit.so" or "MyFirstUnit.dll" containing your unit's class "MyFirstUnit". To use your unit in an application you need to include it in a configuration file.
A minimal configuration for an application that uses your unit could look like this:
You can save that file as MyFirstUnit.xml in the "etc" directory of your domain. To start an application with this config file you can either use mira or miracenter.
Type
in your project directory.
At this stage your unit will do nothing. You need to fill it with life. You can edit the source file of your unit to fill in some functionality. The source file can be found in the "src" folder of your domain directory e.g. "MyFirstProject/domains/MyFirstDomain/src/MyFirstUnit.C" See UnitCodeExplainedPage for an explanation of the unit's source code.
From here on it would be good to make yourself more familiar with the Concepts of MIRA.
Have fun!
Next: Concepts |
---|