...
 
Commits (91)

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

......@@ -162,11 +162,6 @@ opensand-plugins/encapsulation/gse/debian/libopensand-gse-encap-plugin
opensand-plugins/encapsulation/gse/debian/libopensand-gse-encap-plugin-dbg
opensand-plugins/encapsulation/gse/debian/libopensand-gse-encap-plugin-manager
opensand-plugins/encapsulation/gse/debian/tmp
opensand-plugins/lan_adaptation/rohc/debian/files
opensand-plugins/lan_adaptation/rohc/debian/libopensand-rohc-lan-adapt-plugin
opensand-plugins/lan_adaptation/rohc/debian/libopensand-rohc-lan-adapt-plugin-dbg
opensand-plugins/lan_adaptation/rohc/debian/libopensand-rohc-lan-adapt-plugin-manager
opensand-plugins/lan_adaptation/rohc/debian/tmp
opensand-tests/tests/base/*/*/scenario*/
opensand-tests/tests/other/*/scenario*/
opensand-tests/tests/base/configs/enrich/saloha/scenario*/
......
......@@ -6,18 +6,7 @@ Thales Alenia Space
Contributors:
The following persons participated in the OpenSAND project:
Didier Barvaux Viveris Technologies didier.barvaux@toulouse.viveris.fr
Julien Bernard Viveris Technologies julien.bernard@toulouse.viveris.fr
Cédric Baudoin Thales Alenia Space cedric.baudoin@thalesaleniaspace.com
Emmanuel Dubois CNES emmanuel.dubois@cnes.fr
Fabrice Arnal Thales Alenia Space fabrice.arnal@thalesaleniaspace.com
Patrick Gelard CNES patrick.gelard@cnes.fr
Audric Schiltknecht Viveris Technologies audric.schiltknecht@toulouse.viveris.fr
David Pradas Viveris Technologies david.pradas@toulouse.viveris.fr
Fabrice Hobaya Viveris Technologies fabrice.hobaya@toulouse.viveris.fr
Bénédicte Motto Viveris Technologies bmotto@toulouse.viveris.com
Joaquin Muguerza Viveris Technologies jmuguerza@toulouse.viveris.fr
Aurélien Delrieu Viveris Technologies adelrieu@toulouse.viveris.com
Aurélien Delrieu Viveris Technologies aurelien.delrieu@viveris.fr
Old contributors:
Sylvie AQL
Matthieu Locussol Viveris Technologies matthieu.locussol@viveris.fr
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
......@@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
......@@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
<https://www.gnu.org/licenses/why-not-lgpl.html>.
################################################################################
# Name : Makefile
# Author : Julien BERNARD <jbernard@toulouse.viveris.com>
# Author : Aurélien DELRIEU <aurelien.delrieu@viveris.fr>
# Description: create the OpenSAND configuration library
################################################################################
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = \
src
......@@ -29,6 +31,7 @@ doc:
clean-doc:
$(RM) -r doc/html
$(RM) -r doc/latex
deb:
dpkg-buildpackage
......
......@@ -19,7 +19,7 @@ run()
rm -f config.cache
rm -f config.log
run aclocal
run aclocal -I m4 --install
run libtoolize --force
run autoconf
run autoheader
......
#!/bin/bash
# Process this file with autoconf to produce a configure script.
AC_INIT(opensand-conf, 5.2.0, [http://opensand.org])
AC_INIT(opensand-conf, 6.0.0, [http://opensand.org])
AC_CONFIG_SRCDIR([src])
AM_CONFIG_HEADER([config.h])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE
# Disable static libraries by default
......@@ -17,7 +18,8 @@ AC_PROG_LIBTOOL
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdio.h stdlib.h])
AC_CHECK_HEADER([stdio.h], [], [AC_MSG_ERROR([Missing header stdio.h])])
AC_CHECK_HEADER([stdlib.h], [], [AC_MSG_ERROR([Missing header stdlib.h])])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
......@@ -30,20 +32,21 @@ AC_PROG_GCC_TRADITIONAL
AC_CHECK_FUNCS([])
AC_SUBST([OPENSAND_CONF_REQ], ['libxml++-2.6 >= 2.10.0'])
PKG_CHECK_MODULES([LIBXMLXX], [$OPENSAND_CONF_REQ])
LIBS="$LIBXMLXX_LIBS $LIBS"
AC_SUBST(AM_CPPFLAGS, "$LIBXMLXX_CFLAGS")
# Check python3-dev dependency for Python module
AC_SUBST([PYTHON_VERSION], [3])
AX_PYTHON_DEVEL
# Check boost-python dependency for Python module
AX_BOOST_BASE([1.71], [], [AC_MSG_ERROR([Missing Boost])])
AX_BOOST_PYTHON
# check for pkg-config
PKG_PROG_PKG_CONFIG
CXXFLAGS="$CXXFLAGS -std=c++11"
# check for opensand-output library
PKG_CHECK_MODULES([OPENSAND_OUTPUT], [opensand_output = 5.2.0])
LIBS="$OPENSAND_OUTPUT_LIBS $LIBS"
AC_SUBST(AM_CPPFLAGS, "$OPENSAND_OUTPUT_CFLAGS $AM_CPPFLAGS")
CXXFLAGS="$CXXFLAGS -std=c++17"
# check if -Werror must be appended to CFLAGS
WERROR=""
......@@ -62,7 +65,9 @@ AM_DEP_TRACK
AC_CONFIG_FILES([Makefile \
src/Makefile \
src/test/Makefile \
src/tests/Makefile \
src/pymodule/Makefile \
src/pymodule/tests/Makefile \
opensand_conf.pc
])
......
This diff is collapsed.
# Model Documentation
**Contents**<br>
[General Idea](#general-idea)<br>
[UML Diagram](#uml-diagram)<br>
[Environment Class](#environment-class)<br>
[Model Class](#model-class)<br>
[List Class](#list-class)<br>
[Full Example](#full-example)<br>
[Python Module](#python-module)
## General Idea
The general idea is to allow the user to instantiate Environment and Model classes only. Regarding other classes, such as Component, Parameter or List all the instantiation work is encapsulated in the Model class. Same goes for the Type and Enum classes inside of the Environment class.
```
auto env = new Environment();
auto mm = new Model();
// ...
auto c = new Component(...); // NOT CORRECT
auto c = mm->addComponent(...); // CORRECT
// ...
delete mm;
delete env;
```
You can not access the constructor of the other classes (protected scope), everything is done internally so that you will not have to worry about memory management, **except regarding the Environment and Model classes : this is up to the developer to manage their creation and destruction.**
*Every Component/List/Parameter you will create have some common properties you can (**and you actually should**) set : ID (mandatory), name (optional) and description (optional). These properties will be displayed in the web HMI to help the people filling a configuration.*
## UML Diagram
![UML Diagram](images/diagram.png)
## Environment Class
The Environment class stores all the type-related datas.
It stores the primitives types (such as ```INT```, ```LONG```, ```STRING```...) and their informations which will be displayed on the web HMI.
It also stores the enumeration types. You can then add an enumeration to the environment and add its values list to it.
**Example :**
```
auto myEnum = environment->addEnumType("enumID", "enumName", "enumDescription");
myEnum->addValue("Easy");
myEnum->addValue("Normal");
myEnum->addValue("Hard");
```
The ```TypeID``` enumeration is defined in ```Type.h``` and defines all of the primitive types :
```
enum TypeID
{
BOOLEAN = 0,
BYTE,
CHAR,
DOUBLE,
FLOAT,
INT,
LONG,
LONGDOUBLE,
SHORT,
STRING,
COUNT
};
```
Regarding the used types, they are defined in the `Environment.h` file as follows :
```
typedef bool Boolean;
typedef unsigned char Byte;
typedef char Char;
typedef double Double;
typedef float Float;
typedef int Int;
typedef long Long;
typedef long double LongDouble;
typedef short Short;
typedef std::string String;
```
## Model Class
The `Model` class is linked to an `Environment` which will provide the Model with all the data types it might need.
**Example :**
```
Environment * env = new Environment();
[...]
Model * model = new Model("version", "id", "name", "description");
model->setEnvironment(env);
```
A Model stores a root component in which you will be able to add Lists, Components and/or Parameters.
**Example :**
```
auto l = model->addList("id", "name", "description", "descriptionPattern");
auto c = model->addComponent("id", "name", "description");
auto p = model->addParameter(TYPE, "id", "name", "description", "unit");
```
***When adding a parameter to an element, you should provide its type. The type can be either a primitive type or an enumeration type.***
**Example :**
```
auto p1 = metaModel->addParameter(FLOAT, "p1", "P1", "...");
metaModel->getEnvironment()->addEnumType("enumID", "enumName", "enumDescription");
auto p2 = metaModel->addParameter("enumID", "p2", "P2", "...");
```
## List Class
The `List` class defines a list of elements (items) which all follow the same pattern (i.e. all of its items have the same set of Lists/Components/Parameters). They have the same properties but are of course independent between each others.
For that purpose, a `Component` is internally created when you create a List : its *pattern*. That's why when you create a list you also have to specify a pattern description : it will be used as a common description for all of the List's items when rendered in the web HMI.
**Example :**
```
auto l = metaModel->addList("id", "name", "description", "descriptionPattern");
```
You can, at anytime, get the pattern component to change its attributes :
```