Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AUV error management #9

Draft
wants to merge 36 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
84d8f29
AUV e SV module
alessiaortile May 29, 2023
385851f
AUV error application + simulation
alessiaortile May 29, 2023
c4ab409
add error tx period + plot trajectories
alessiaortile May 29, 2023
6e3dd90
log-error sending-error reception correction
alessiaortile Jun 2, 2023
1a26c47
branch correction
Jun 6, 2023
0677513
name correction + plot update
Jun 7, 2023
d1cd7b4
new mobility model with error management
Jun 9, 2023
00bffb8
correction alarm mode(static)
Jun 9, 2023
9684565
waypoints queue
Jun 11, 2023
62a9441
added control validity pkt rcv
Jun 23, 2023
63aaee5
waypoints
Jun 23, 2023
fd3ae9a
noisy error management
Jun 27, 2023
be0f558
add basic version
Jul 3, 2023
9e7817e
uwsme correction
Jul 3, 2023
38a9ecb
simulation correction
Jul 3, 2023
e20ac56
log msg fixed
Jul 7, 2023
b7b1dc5
simulation analysis
Jul 7, 2023
c50cc96
sim fixed
Jul 7, 2023
da3bed6
double tx correction
Jul 22, 2023
f76bca7
simulation parameters update
Jul 22, 2023
97c9eba
power computation
Jul 22, 2023
61cc8ad
tp counter correction + last err correction
Aug 28, 2023
f4fc526
review correction p1
Sep 13, 2023
933885d
review correction p2
Sep 17, 2023
a027250
review correction p3
Oct 19, 2023
9c97862
spaces to tab conversion
Oct 22, 2023
3df744c
added rov immersion to the simulation
Oct 23, 2023
23623a4
added rover immersion to the simulation
Oct 23, 2023
c757443
postion log correction
Oct 24, 2023
5ef0a6c
range ctr correction
Oct 24, 2023
aaabfd8
dyoxigen corrections
Mar 26, 2024
91f02b2
indentation correction
Mar 29, 2024
8b8122e
blank to tab
Mar 30, 2024
645162b
blank to tab
Mar 30, 2024
ed5df9e
blank to tab
Mar 30, 2024
a0cb4a4
blanks to tab
Mar 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions DESERT_Addons/uwauv/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#
# Copyright (c) 2007 Regents of the SIGNET lab, University of Padova.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are trying to begin to be consistent on this, so i would put 2023 here. I know we never updated it, but we should start

# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. Neither the name of the University of Padova (SIGNET lab) nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS ProvIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

AM_CXXFLAGS = -Wall -ggdb3

lib_LTLIBRARIES = libuwauv.la

libuwauv_la_SOURCES = uwauv-module.cc uwauverror-module.cc uwauverror-simple-module.cc uwauvctr-module.cc uwauvctrer-module.cc uwauvctrer-simple-module.cc uwauv-packet.h initlib.cc

libuwauv_la_CPPFLAGS = @NS_CPPFLAGS@ @NSMIRACLE_CPPFLAGS@ @DESERT_CPPFLAGS@
libuwauv_la_LDFLAGS = @NS_LDFLAGS@ @NSMIRACLE_LDFLAGS@ @DESERT_LDFLAGS@ @DESERT_LDFLAGS_BUILD@
libuwauv_la_LIBADD = @NS_LIBADD@ @NSMIRACLE_LIBADD@ @DESERT_LIBADD@

nodist_libuwauv_la_SOURCES = initTcl.cc

BUILT_SOURCES = initTcl.cc

CLEANFILES = initTcl.cc

TCL_FILES = uwauv-init.tcl

initTcl.cc: Makefile $(TCL_FILES)
cat $(VPATH)/$(TCL_FILES) | @TCL2CPP@ UwauvTclCode > initTcl.cc

EXTRA_DIST = $(TCL_FILES)
33 changes: 33 additions & 0 deletions DESERT_Addons/uwauv/autogen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/sh
#
# Copyright (c) 2013 Regents of the SIGNET lab, University of Padova.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. Neither the name of the University of Padova (SIGNET lab) nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#


aclocal -I m4 --force && libtoolize --force && automake --foreign --add-missing && autoconf
69 changes: 69 additions & 0 deletions DESERT_Addons/uwauv/configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#
# Copyright (c) 2014 Regents of the SIGNET lab, University of Padova.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. Neither the name of the University of Padova (SIGNET lab) nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

AC_INIT(uwauv, 1.0.0)
AM_INIT_AUTOMAKE
AM_PROG_AR

AC_CONFIG_MACRO_DIR([m4])

AC_PROG_CXX
AC_PROG_MAKE_SET

AC_DISABLE_STATIC

AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL

AC_PATH_NS_ALLINONE

AC_ARG_WITH_NSMIRACLE

AC_CHECK_NSMIRACLE([have_nsmiracle=yes],[have_nsmiracle=no])
if test x$have_nsmiracle != xyes ; then
AC_MSG_ERROR([Could not find nsmiracle, is --with-nsmiracle set correctly?])
fi

AC_ARG_WITH_DESERT
AC_ARG_WITH_DESERT_BUILD

AC_CHECK_DESERT([have_desert=yes],[have_desert=no])
if test x$have_desert != xyes ; then
AC_MSG_ERROR([Could not find desert, is --with-desert set correctly?])
fi


AC_DEFINE(CPP_NAMESPACE,std)

AC_CONFIG_FILES([
m4/Makefile
Makefile
])

AC_OUTPUT
89 changes: 89 additions & 0 deletions DESERT_Addons/uwauv/initlib.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
//
// Copyright (c) 2017 Regents of the SIGNET lab, University of Padova.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3. Neither the name of the University of Padova (SIGNET lab) nor the
// names of its contributors may be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

/**
* @file initlib.cc
* @author Alessia Ortile
* @version 1.0.0
*
* \brief Provides the initialization of uwauv libraries.
*
* Provides the initialization of uwauv libraries. In addition,
* it provides both <i>UWAUV</i> monitoring and control packets header description.
*
*/

#include <tclcl.h>
#include <sap.h>

#include "uwauv-packet.h"
extern EmbeddedTcl UwauvTclCode;

packet_t PT_UWAUV;
packet_t PT_UWAUV_CTR;
packet_t PT_UWAUV_ERROR;

static class UwAUVMonPktClass : public PacketHeaderClass {
public:

UwAUVMonPktClass() : PacketHeaderClass("PacketHeader/UWAUV", sizeof (hdr_uwAUV_monitoring)) {
this->bind();
bind_offset(&hdr_uwAUV_monitoring::offset_);
}
} class_uwAUV_pkt;
/**
* Adds the header for <i>hdr_uwAUV</i> packets in ns2.
*/
static class UwAUVCtrPktClass : public PacketHeaderClass {
public:

UwAUVCtrPktClass() : PacketHeaderClass("PacketHeader/UWAUVCtr", sizeof (hdr_uwAUV_ctr)) {
this->bind();
bind_offset(&hdr_uwAUV_ctr::offset_);
}
} class_uwAUVCtr_pkt;

static class UwAUVErrorPktClass : public PacketHeaderClass {
public:

UwAUVErrorPktClass() : PacketHeaderClass("PacketHeader/UWAUVError", sizeof (hdr_uwAUV_error)) {
this->bind();
bind_offset(&hdr_uwAUV_error::offset_);
}
} class_uwAUVError_pkt;



extern "C" int Uwauv_Init() {
PT_UWAUV = p_info::addPacket("UWAUV");
PT_UWAUV_CTR = p_info::addPacket("UWAUVCtr");
PT_UWAUV_ERROR = p_info::addPacket("UWAUVError");
UwauvTclCode.load();
return 0;
}

153 changes: 153 additions & 0 deletions DESERT_Addons/uwauv/m4/desert.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
#
# Copyright (c) 2014 Regents of the SIGNET lab, University of Padova.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. Neither the name of the University of Padova (SIGNET lab) nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.




AC_DEFUN([AC_ARG_WITH_DESERT],[

DESERT_PATH=''
DESERT_CPPLAGS=''
DESERT_LDFLAGS=''
DESERT_LIBADD=''

AC_ARG_WITH([desert],
[AS_HELP_STRING([--with-desert=<directory>],
[use desert installation in <directory>])],
[
if test "x$withval" != "xno" ; then
if test -d $withval ; then
DESERT_PATH="${withval}"
if test ! -d "${DESERT_PATH}" ; then
AC_MSG_ERROR([could not find ${withval}, is --with-desert=${withval} correct?])
fi

for dir in \
application/uwcbr \
fedefava86 marked this conversation as resolved.
Show resolved Hide resolved
network/uwip \
transport/uwudp \
mobility/uwsmposition \
mobility/uwsmwpposition
do
echo "considering dir \"$dir\""
DESERT_CPPFLAGS="$DESERT_CPPFLAGS -I${DESERT_PATH}/${dir}"
DESERT_LDFLAGS="$DESERT_LDFLAGS -L${DESERT_PATH}/${dir}"
done

for lib in \
uwcbr \
uwip \
uwudp \
uwsmposition \
uwsmwpposition
do
DESERT_LIBADD="$DESERT_LIBADD -l${lib}"
done

DESERT_DISTCHECK_CONFIGURE_FLAGS="--with-desert=$withval"
AC_SUBST(DESERT_DISTCHECK_CONFIGURE_FLAGS)

else
AC_MSG_ERROR([desert path $withval is not a directory])
fi
fi
])

AC_SUBST(DESERT_CPPFLAGS)
AC_SUBST(DESERT_LDFLAGS)
AC_SUBST(DESERT_LIBADD)
])

AC_DEFUN([AC_ARG_WITH_DESERT_BUILD],[

DESERT_PATH_BUILD=''
DESERT_LDFLAGS_BUILD=''

AC_ARG_WITH([desert-build],
[AS_HELP_STRING([--with-desert-build=<directory>],
[use desert installation in <directory>])],
[
if test "x$withval" != "xno" ; then
if test -d $withval ; then
DESERT_PATH_BUILD="${withval}"
if test ! -d "${DESERT_PATH_BUILD}" ; then
AC_MSG_ERROR([could not find ${withval}, is --with-desert-build=${withval} correct?])
fi

for dir in \
application/uwcbr \
network/uwip \
transport/uwudp \
mobility/uwsmposition \
mobility/uwsmwpposition
do
echo "considering dir \"$dir\""
DESERT_LDFLAGS_BUILD="$DESERT_LDFLAGS_BUILD -L${DESERT_PATH_BUILD}/${dir}"
done

else
AC_MSG_ERROR([desert path $withval is not a directory])
fi
fi
])

#AC_SUBST(DESERT_CPPFLAGS)
AC_SUBST(DESERT_LDFLAGS_BUILD)
])

AC_DEFUN([AC_CHECK_DESERT],[
# temporarily add NS_CPPFLAGS and NSMIRACLE_CPPFLAGS to CPPFLAGS
BACKUP_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $NS_CPPFLAGS $NSMIRACLE_CPPFLAGS"

AC_LANG_PUSH(C++)

AC_MSG_CHECKING([for desert headers])

AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
#include<cltracer.h>
ClMessageTracer* t;
]],[[
]] )],
[AC_MSG_RESULT([yes])
found_desert=yes
[$1]
],
[AC_MSG_RESULT([no])
found_desert=no
[$2]
])


AM_CONDITIONAL([HAVE_DESERT], [test x$found_desert = xyes])

# Restoring to the initial value
CPPFLAGS="$BACKUP_CPPFLAGS"

AC_LANG_POP(C++)
])
Loading