Coap Over TCP support for Tizen
authorAbhishek Sharma <ce.abhishek@samsung.com>
Thu, 18 Aug 2016 05:50:50 +0000 (11:20 +0530)
committerAshok Babu Channa <ashok.channa@samsung.com>
Fri, 2 Sep 2016 05:00:41 +0000 (05:00 +0000)
Change-Id: If1a7d61aa6499282182138d188b0e600133f49c1
Signed-off-by: Abhishek Sharma <ce.abhishek@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10583
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
resource/csdk/stack/samples/tizen/SimpleClientServer/packaging/com.oic.ri.sample.spec
resource/csdk/stack/samples/tizen/SimpleClientServer/scons/SConscript
resource/csdk/stack/samples/tizen/build/SConscript
resource/csdk/stack/samples/tizen/build/gbsbuild.sh
resource/csdk/stack/samples/tizen/build/packaging/com.oic.ri.spec
resource/csdk/stack/samples/tizen/build/scons/SConscript
tools/tizen/iotivity.spec

index 9aabba5..63b90e2 100644 (file)
@@ -31,7 +31,7 @@ OIC RIsample application
 %build
 
 scons TARGET_OS=tizen -c
-scons VERBOSE=%{VERBOSE} TARGET_OS=tizen TARGET_TRANSPORT=%{TARGET_TRANSPORT} SECURED=%{SECURED} RELEASE=%{RELEASE} ROUTING=%{ROUTING}
+scons TARGET_OS=tizen TARGET_TRANSPORT=%{TARGET_TRANSPORT} SECURED=%{SECURED} RELEASE=%{RELEASE} ROUTING=%{ROUTING} WITH_TCP=%{WITH_TCP}
 
 %install
 
index f4e7e59..5237143 100644 (file)
@@ -68,6 +68,11 @@ else:
        else:
                env.AppendUnique(CPPDEFINES = ['NO_IP_ADAPTER'])
 
+       if env.get('WITH_TCP'):
+               env.AppendUnique(CPPDEFINES = ['TCP_ADAPTER', 'WITH_TCP'])
+       else:
+               env.AppendUnique(CPPDEFINES = ['NO_TCP_ADAPTER'])
+
 #ri_sample_src = [sample_dir + '/occlient.cpp']
 
 #print " ri sample src %s" % ri_sample_src
index 1e3722a..e3c922b 100644 (file)
@@ -13,6 +13,7 @@ release_mode = env.get('RELEASE')
 secured = env.get('SECURED')
 logging = env.get('LOGGING')
 routing = env.get('ROUTING')
+with_tcp = env.get('WITH_TCP')
 
 env.PrependUnique(CPPPATH = [
                '../../../../logger/include',
@@ -33,7 +34,7 @@ print "Given Transport is %s" % transport
 print "Given OS is %s" % target_os
 
 if target_os == 'tizen':
-       command = "sh resource/csdk/stack/samples/tizen/build/gbsbuild.sh %s %s %s %s %s %s" % (transport, secured, buildsample, release_mode, logging, routing)
+       command = "sh resource/csdk/stack/samples/tizen/build/gbsbuild.sh %s %s %s %s %s %s %s" % (transport, secured, buildsample, release_mode, logging, routing, with_tcp)
        print "Created Command is %s" % command
        gbs_script = env.Command('gbs_build', None, command)
        AlwaysBuild ('gbs_script')
\ No newline at end of file
index b4906c9..af03a20 100644 (file)
@@ -26,6 +26,9 @@ export LOGGING=$5
 echo $6
 export ROUTING=$6
 
+echo $7
+export WITH_TCP=$7
+
 echo $TARGET_TRANSPORT
 echo $BUILD_SAMPLE
 
@@ -89,7 +92,7 @@ if [ ! -d .git ]; then
 fi
 
 echo "Calling core gbs build command"
-gbscommand="gbs build -A armv7l -B ~/GBS-ROOT-RI-OIC --include-all --repository ./ --define 'TARGET_TRANSPORT $1' --define 'SECURED $2' --define 'RELEASE $4' --define 'LOGGING $5' --define 'ROUTING $6'"
+gbscommand="gbs build -A armv7l -B ~/GBS-ROOT-RI-OIC --include-all --repository ./ --define 'TARGET_TRANSPORT $1' --define 'SECURED $2' --define 'RELEASE $4' --define 'LOGGING $5' --define 'ROUTING $6' --define 'WITH_TCP $7'"
 echo $gbscommand
 if eval $gbscommand; then
    echo "Core build is successful"
@@ -112,7 +115,7 @@ if echo $BUILD_SAMPLE|grep -qi '^ON$'; then
       git commit -m "Initial commit"
    fi
    echo "Calling sample gbs build command"
-   gbscommand="gbs build -A armv7l -B ~/GBS-ROOT-RI-OIC --include-all --repository ./ --define 'TARGET_TRANSPORT $1' --define 'SECURED $2' --define 'RELEASE $4' --define 'LOGGING $5' --define 'ROUTING $6'"
+   gbscommand="gbs build -A armv7l -B ~/GBS-ROOT-RI-OIC --include-all --repository ./ --define 'TARGET_TRANSPORT $1' --define 'SECURED $2' --define 'RELEASE $4' --define 'LOGGING $5' --define 'ROUTING $6' --define 'WITH_TCP $7'"
    echo $gbscommand
    if eval $gbscommand; then
       echo "Sample build is successful"
index 4802499..2bc78f8 100644 (file)
@@ -37,7 +37,7 @@ SLP oicri application
 echo %{ROOTDIR}
 
 scons TARGET_OS=tizen -c
-scons VERBOSE=%{VERBOSE} TARGET_OS=tizen TARGET_TRANSPORT=%{TARGET_TRANSPORT} SECURED=%{SECURED} RELEASE=%{RELEASE} LOGGING=%{LOGGING} ROUTING=%{ROUTING}
+scons TARGET_OS=tizen TARGET_TRANSPORT=%{TARGET_TRANSPORT} SECURED=%{SECURED} RELEASE=%{RELEASE} LOGGING=%{LOGGING} ROUTING=%{ROUTING} WITH_TCP=%{WITH_TCP}
 
 %install
 mkdir -p %{DEST_INC_DIR}
index 914db6f..b9d0bd4 100644 (file)
@@ -42,4 +42,9 @@ else:
        else:
                env.AppendUnique(CPPDEFINES = ['NO_WIFI_ADAPTER'])
 
+       if env.get('WITH_TCP'):
+               env.AppendUnique(CPPDEFINES = ['TCP_ADAPTER', 'WITH_TCP'])
+       else:
+               env.AppendUnique(CPPDEFINES = ['NO_TCP_ADAPTER'])
+
 env.SConscript(['../resource/SConscript'])
index 1c042c3..9a82719 100644 (file)
@@ -1,7 +1,7 @@
 Name: iotivity
 Version: 1.1.1
 Release: 0
-Summary: IoT Connectivity sponsored by the OIC
+Summary: IoT Connectivity sponsored by the OCF
 Group: Network & Connectivity/Other
 License: Apache-2.0
 URL: https://www.iotivity.org/
@@ -38,6 +38,7 @@ Requires(post): /sbin/ldconfig
 %{!?SECURED: %define SECURED 1}
 %{!?LOGGING: %define LOGGING True}
 %{!?ROUTING: %define ROUTING EP}
+%{!?WITH_TCP: %define WITH_TCP true}
 %{!?ES_TARGET_ENROLLEE: %define ES_TARGET_ENROLLEE tizen}
 %{!?VERBOSE: %define VERBOSE 1}
 
@@ -112,6 +113,7 @@ scons -j2 --prefix=%{_prefix} \
        ES_TARGET_ENROLLEE=%{ES_TARGET_ENROLLEE} LIB_INSTALL_DIR=%{_libdir}
 
 
+
 %install
 rm -rf %{buildroot}
 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ;
@@ -121,6 +123,7 @@ scons install --install-sandbox=%{buildroot} --prefix=%{_prefix} \
        ES_TARGET_ENROLLEE=%{ES_TARGET_ENROLLEE} LIB_INSTALL_DIR=%{_libdir}
 
 
+
 # For Example
 %if %{RELEASE} == "True"
 %define build_mode release