Commit bedcf2d7 authored by Yann Garcia's avatar Yann Garcia

Create project structure

parent dd4d8327
......@@ -62,6 +62,8 @@ then
export PATH_DEV_ITS=${HOME}/dev/etsi_its
# Emergency Communication support
export PATH_DEV_EMCOM=${HOME}/dev/etsi_emcom
# Mobile-Edge Computing support
export PATH_DEV_MEC=${HOME}/dev/etsi_mec
# Validation folder
export VALIDATION_DIR=${HOME}
fi
......
......@@ -52,25 +52,6 @@ find .. -type f -name "*.bak" -exec rm {} \;
find .. -type f -name "*.log" -exec rm {} \;
# Build JSON files if any and put them in objs directory
#JSON_PATH=${PATH_DEV_MEC}/src/LibSip/json
JSON_PATH=${PATH_DEV_MEC}/null # Do not use json2ttcn for now, need to fix issues first
if [ -d ${JSON_PATH} ]
then
JSON_FILES=`find ${JSON_PATH} -name '*.json'`
if [ "${OSTYPE}" == "cygwin" ]
then
json2ttcn.exe ${JSON_FILES}
else
json2ttcn ${JSON_FILES}
fi
if [ "$?" != "0" ]
then
f_exit "Failed to generate JSON source code" 2
fi
JSON_FILES=`find . -name '*.ttcn'`
fi
REFERENCES="LibCommon LibHttp LibMec LibMec/LocationAPI"
for i in ${REFERENCES}
do
......
......@@ -51,36 +51,16 @@ find .. -type f -name "*~" -exec rm {} \;
find .. -type f -name "*.bak" -exec rm {} \;
find .. -type f -name "*.log" -exec rm {} \;
# Build XSD files if any and put them in objs directory
#XSD_PATH=${PATH_DEV_EMCOM}/xsd
XSD_PATH=${PATH_DEV_EMCOM}/null # Do not use xsd2ttcn for now, need to fix issues first
if [ -d ${XSD_PATH} ]
then
XSD_FILES=`find ${XSD_PATH} -name '*.xsd'`
if [ "${OSTYPE}" == "cygwin" ]
then
xsd2ttcn.exe ${XSD_FILES}
else
xsd2ttcn ${XSD_FILES}
fi
if [ "$?" != "0" ]
then
f_exit "Failed to generate XSD source code" 2
fi
XSD_FILES=`find . -name '*.ttcn'`
fi
REFERENCES="LibCommon LibHttp LibEmcom/LibNg112 LibSip LibIms"
REFERENCES="LibCommon LibHttp LibMec LibMec/LocationAPI"
for i in ${REFERENCES}
do
# TTCN code
for j in `find ${PATH_DEV_EMCOM}/src/$i/ttcn -type f -name "*.ttcn"`;
for j in `find ${PATH_DEV_MEC}/src/$i/ttcn -type f -name "*.ttcn"`;
do
ln -sf $j ../ttcn/`basename $j`
done
# Include source code
files=`find ${PATH_DEV_EMCOM}/src/$i/include -type f`
files=`find ${PATH_DEV_MEC}/src/$i/include -type f`
if [ "${files}" != " " ]
then
for j in ${files};
......@@ -89,7 +69,7 @@ do
done
fi
# CC source code
files=`find ${PATH_DEV_EMCOM}/src/$i/src -type f`
files=`find ${PATH_DEV_MEC}/src/$i/src -type f`
if [ "${files}" != " " ]
then
for j in ${files};
......@@ -106,13 +86,13 @@ TTCN_FILES=`find .. -name '*.ttcn*'`
if [ "${OSTYPE}" == "cygwin" ]
then
rm ../bin/*.exe ../lib/*.dll
compiler.exe -e -f -g -l -L -M -n -O -t -R -U none ${TTCN_FILES} 2>&1 3>&1 | tee build.log
compiler.exe -b -e -f -g -l -L -M -n -O -t -r -R -U none -X ${TTCN_FILES} 2>&1 3>&1 | tee build.log
if [ "$?" == "1" ]
then
f_exit "Failed to compile ATS" 4
fi
else
compiler -e -f -g -l -L -M -n -O -t -R -U none ${TTCN_FILES} 2>&1 3>&1 | tee build.log
compiler -b -e -f -g -l -L -M -n -O -t -r -R -U none -X ${TTCN_FILES} 2>&1 3>&1 | tee build.log
if [ "$?" == "1" ]
then
f_exit "Failed to generate ATS source code" 6
......@@ -122,7 +102,7 @@ fi
# Sart ATS generation - Step 2
# Create working variables
CC_FILES=`find ../src -name '*.c*'`
FWK_FILES=`find ${PATH_DEV_EMCOM}/framework/ -name '*.c*'`
FWK_FILES=`find ${PATH_DEV_MEC}/framework/ -name '*.c*'`
CFG_FILES=`find ../etc -name '*.cfg'`
# Sart ATS generation - Step 3
......@@ -141,13 +121,6 @@ else
fi
fi
# Bug xsd2ttcn
for i in ${XSD_FILES}
do
VARIANT='s/ variant (\[\-\]) ;//g'
sed --in-place "${VARIANT}" $i
done
# Remove port skeletons to use src/<port skeletons>
for i in `ls ../include/*.hh`
do
......@@ -192,7 +165,7 @@ else
fi
LDFLAGS_DEBUG_MODE='s/LDFLAGS = /LDFLAGS = -g -pthread -fPIC -fstack-check -fstack-protector -fsanitize=address -fno-omit-frame-pointer -fsanitize=leak -fsanitize=address -fno-omit-frame-pointer/g'
fi
ADD_INCLUDE='/CPPFLAGS = /a\\CPPFLAGS += -I/usr/local/share -I$(PATH_DEV_EMCOM)/include -I$(PATH_DEV_EMCOM)/framework/include -I../include -I../../LibEmcom/Common/include -I../../LibEmcom/LibNg112/include -I$(HOME_FRAMEWORKS)/osip/include -I$(HOME_INC) -I.'
ADD_INCLUDE='/CPPFLAGS = /a\\CPPFLAGS += -I/usr/local/share -I$(PATH_DEV_MEC)/include -I$(PATH_DEV_MEC)/framework/include -I../include -I../../LibEmcom/Common/include -I../../LibEmcom/LibNg112/include -I$(HOME_FRAMEWORKS)/osip/include -I$(HOME_INC) -I.'
ADD_LIBRARIES='s/LINUX_LIBS = -lxml2/LINUX_LIBS = -lrt -lxml2 -lpcap -lstdc++fs -lssl -L\$\(HOME_FRAMEWORKS\)\/osip\/src\/osipparser2\/\.libs -losipparser2/g'
sed --in-place "${CXXFLAGS_DEBUG_MODE}" ./Makefile
sed --in-place "${LDFLAGS_DEBUG_MODE}" ./Makefile
......
......@@ -49,7 +49,6 @@ echo 'Updating JSON files'
JSON_SRC_PATH=${SRC_MEC_PATH}/json
JSON_DST_PATH=${PATH_DEV_MEC}/json
cp ${JSON_SRC_PATH}/*.json ${JSON_DST_PATH}
cp ${JSON_SRC_PATH}/*.dtd ${JSON_DST_PATH}
# Update ETSI Framework files
echo 'Updating ETSI Framework files'
......@@ -135,7 +134,11 @@ do
fi
cp ${TTCN_3_ORG_PATH}/$i/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn
# Update files
if [ "$i" == "LibMec/LocationAPI" ]
if [ "$i" == "LibMec" ]
then
cp ${TTCN_3_ORG_PATH}/$i/ttcn/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn
cp ${TTCN_3_ORG_PATH}/$i/json/*.json ${TTCN_3_DST_PATH}/$i/json
elif [ "$i" == "LibMec/LocationAPI" ]
then
cp ${TTCN_3_ORG_PATH}/$i/ttcn/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn
cp ${TTCN_3_ORG_PATH}/$i/json/*.json ${TTCN_3_DST_PATH}/$i/json
......
/**
* @author ETSI / STF545
* @version $URL$
* $ID:$
* @desc This module provides the test system used by ITS HTTP based protocols.
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
* @see ETSI TS 103 478
*/
module LibItsHttp_TestSystem {
// LibCommon
import from LibCommon_Sync all;
import from LibCommon_Time all;
// LibItsHttp
import from LibItsHttp_TypesAndValues all;
type port HttpPort message {
inout HttpMessage;
}
type component HttpComponent extends SelfSyncComp { // FIXME To be rename into HttpTest
port HttpPort httpPort;
timer tc_ac := PX_TAC;
timer tc_noac := PX_TNOAC;
} // End of component HttpComponent
type component HttpTestAdapter { // FIXME To be rename into HttpTestSystem
port HttpPort httpPort;
} // End of component TestAdapter
} // End of module LibItsHttp_TestSystem
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment