Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • the standard OpenMI.Standard
  • the source development kit Oatc.OpenMI.Sdk.*
  • the dlls and executables Oatc.OpenMI.Gui.* for running OpenMI in the configuration editor with GUIs or from command line. 

2. Technical prerequisites

...

  • workstation with an Intel Xeon processor
  • 64bit openSUSE 11.0

    2.2. Mono

  • Mono v. 1.9.1. for openSUSE 11.0 in 64 bit mode. V. 1.9.1. is also referred to as Mono 2.0.
  • The standard and the sdk sources should be compilable with previous versions. But the GUIs require Windows.Forms, which has been shipped with v. 1.9.1. in Oct. 2009.

...

3. How to compile and execute a Mono application

3.1. Commands

Command for generating a dll:

...

Panel
bgColor#F7D6C1
borderStyledashed

mono Oatc.OpenMI.GUI.ConfigurationEditor.exe

...

3

...

.

...

2. Mono and Grapical User Interfaces GUIs

The GUI sources use Windows.Forms, that works with resource files in order to design the graphical elements. The Windows resource files (*.resx) are generated automatically in the Microsoft Visual Studio IDE. Linux applications do not process them and create a "resource not found" exception during runtime. Thus, the resources have to be converted with the Mono tool resgen / resgen2. The following command generates a Linux readable resource <name>.resource:
resgen <name>.resx generates a Linux readable resource <name>.resource .
Visual Studio assigns a resource file to a C# file occurs automatically. On a linux Linux machine naming conventions guarantee the correct assignment. On linux systems C# and resource file must have the same prefix. This first part of the prefix must be the namespace.

Panel
bgColor#F7D6C1
borderStyledashed

Example for ElementSetViewer

...


namespace: Oatc.OpenMI.Gui.Controls:

...

Linux source name: Oatc.OpenMI.Gui.Controls.ElementSetViewer.cs

...

Linux resource name: Oatc.OpenMI.Gui.Controls.ElementSetViewer.resources

The original Windows resources contained *.bmp graphics with a 24bit colour depth. Linux could not process them. The solution was to convert the BMPs externally to 8bit GIFs, before adding them to the resource in the Visual Studio IDE.

Mono can not process all type of GUIs Not all resources can be processed by Mono. Mono 2.0 has nearly the full functionality of Windows.Forms. It does not support the WindowsPresentationFoundation WPF, shipped since .NET 3.0, which generates resources in XAML style or logical resources. Thus, it is highly recommended to leave out any WPF use Forms elements in future OpenMI GUIs instead of WPF elements.
Mono uses the

3.3. Help for Developers

Mono Forums are very helpful: http://www.go-mono.com/forums/
A part of the error messages are the same as in Microsoft Windows .NET. same error message as Windows. You look them up on the MSDN homepage.

4.

...

OpenMI on Mono in five steps

4.1. Download from SourceForge

Image Added

Fig. 1: Directory structure

After this step you should have a copy of the OpenMI sources on your machine with the directory structure displayed in Fig. 1. OpenMI-Version-1-Trunk is in this examples the name for the starting directory $OPENMI_DIR. There are two new subdirectories:

  • ./Oatc/src/csharp/bin: linux dlls / exe files
  • ./Oatc/src/csharp/Linux: shell scripts for building dlls / exe files and running UnitTests; *.pc files

Use Subversion (svn) for download of the C# sources:

create $OPENMI_DIR/Oatc/src/csharp and $OPENMI_DIR/OpenMI.Standard/src/csharp.

3.3.1. CommandLine
no changes
3.3.2. ConfigurationEditor
• Individual cursors (Source, Target) can't be displayed, but connecting models works
• ConnectionDialog:
todo:
"Apply" a connection
-> runtime error
listLinks.SelectedIndex = selectedIndex; // = -2;
3.3.3. Control
• ExchangeItemSelector
Filters for ElementSet and Dimension
Collapse of treeViews
3.3.4. Core
no changes

5.1 The Simple River Wrapper

...

Fig. 13 Simple River wrapper classes

Filters for ElementSet and Dimension