Change the name of soft sensor sample bundle
authorMinji Park <minjii.park@samsung.com>
Mon, 6 Jul 2015 07:15:31 +0000 (16:15 +0900)
committerUze Choi <uzchoi@samsung.com>
Tue, 7 Jul 2015 08:52:40 +0000 (08:52 +0000)
change files and folder name of soft sensor sample bundle

Change-Id: I615a127d7f538b93895700a3cc3ad9a396fb5816
Signed-off-by: Minji Park <minjii.park@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1531
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Hun-je Yeon <hunje.yeon@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
service/resource-manipulation/modules/resourceContainer/SConscript
service/resource-manipulation/modules/resourceContainer/examples/SoftSensorSampleBundle/include/DiscomfortIndexSensor.h [moved from service/resource-manipulation/modules/resourceContainer/examples/SampleBundle/include/DiscomfortIndexSensor.h with 100% similarity]
service/resource-manipulation/modules/resourceContainer/examples/SoftSensorSampleBundle/include/DiscomfortIndexSensorResource.h [moved from service/resource-manipulation/modules/resourceContainer/examples/SampleBundle/include/DiscomfortIndexSensorResource.h with 100% similarity]
service/resource-manipulation/modules/resourceContainer/examples/SoftSensorSampleBundle/include/SoftSensorBundleActivator.h [moved from service/resource-manipulation/modules/resourceContainer/examples/SampleBundle/include/SampleBundle.h with 85% similarity]
service/resource-manipulation/modules/resourceContainer/examples/SoftSensorSampleBundle/include/SysTimer.h [moved from service/resource-manipulation/modules/resourceContainer/examples/SampleBundle/include/SysTimer.h with 100% similarity]
service/resource-manipulation/modules/resourceContainer/examples/SoftSensorSampleBundle/src/DiscomfortIndexSensor.cpp [moved from service/resource-manipulation/modules/resourceContainer/examples/SampleBundle/src/DiscomfortIndexSensor.cpp with 100% similarity]
service/resource-manipulation/modules/resourceContainer/examples/SoftSensorSampleBundle/src/DiscomfortIndexSensorResource.cpp [moved from service/resource-manipulation/modules/resourceContainer/examples/SampleBundle/src/DiscomfortIndexSensorResource.cpp with 100% similarity]
service/resource-manipulation/modules/resourceContainer/examples/SoftSensorSampleBundle/src/SoftSensorBundleActivator.cpp [moved from service/resource-manipulation/modules/resourceContainer/examples/SampleBundle/src/SampleBundle.cpp with 75% similarity]
service/resource-manipulation/modules/resourceContainer/examples/SoftSensorSampleBundle/src/SysTimer.cpp [moved from service/resource-manipulation/modules/resourceContainer/examples/SampleBundle/src/SysTimer.cpp with 100% similarity]

index 6bd2641..71afb5d 100644 (file)
@@ -70,23 +70,23 @@ res_container_shared = resource_container_env.SharedLibrary('ResContainerLib', r
 resource_container_env.InstallTarget([res_container_static,res_container_shared], 'libResContainer')
 
 ######################################################################
-# build Sample Resource Bundle
+# build soft sensor sample bundle
 ######################################################################
 
-sample_resource_bundle_env = resource_container_env.Clone()
-sample_resource_bundle_env.AppendUnique(CCFLAGS = ['-fPIC'])
+ss_resource_bundle_env = resource_container_env.Clone()
+ss_resource_bundle_env.AppendUnique(CCFLAGS = ['-fPIC'])
 
-SAMPLE_RESOURCE_BUNDLE_DIR = 'examples/SampleBundle/'
-sample_resource_bundle_env.AppendUnique(CPPPATH = [
-               SAMPLE_RESOURCE_BUNDLE_DIR + 'include',
+SS_RESOURCE_BUNDLE_DIR = 'examples/SoftSensorSampleBundle/'
+ss_resource_bundle_env.AppendUnique(CPPPATH = [
+               SS_RESOURCE_BUNDLE_DIR + 'include',
                'include/'
                ])              
                
 
-sample_resource_bundle_src = [ Glob(SAMPLE_RESOURCE_BUNDLE_DIR + 'src/*.cpp'), Glob('src/*.cpp')]
+ss_resource_bundle_src = [ Glob(SS_RESOURCE_BUNDLE_DIR + 'src/*.cpp'), Glob('src/*.cpp')]
 
-SampleBundle = sample_resource_bundle_env.SharedLibrary('SampleBundle', sample_resource_bundle_src)
-sample_resource_bundle_env.InstallTarget(SampleBundle, 'libSampleBundle')
+SoftSensorBundle = ss_resource_bundle_env.SharedLibrary('SoftSensorBundle', ss_resource_bundle_src)
+ss_resource_bundle_env.InstallTarget(SoftSensorBundle, 'libSoftSensorBundle')
 
 ######################################################################
 # build hue sample bundle
@@ -18,8 +18,8 @@
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-#ifndef SAMPLEBUNDLE_H_
-#define SAMPLEBUNDLE_H_
+#ifndef SOFTSENSOR_SAMPLEBUNDLE_H_
+#define SOFTSENSOR_SAMPLEBUNDLE_H_
 
 #include <algorithm>
 #include <vector>
 
 using namespace OIC::Service;
 
-class SampleBundle: public BundleActivator
+class SoftSensorBundleActivator : public BundleActivator
 {
     public:
-        SampleBundle();
-        ~SampleBundle();
+        SoftSensorBundleActivator();
+        ~SoftSensorBundleActivator();
 
         void activateBundle(ResourceContainerBundleAPI *resourceContainer, std::string bundleId);
         void deactivateBundle();
@@ -47,4 +47,4 @@ class SampleBundle: public BundleActivator
         std::vector<BundleResource *> m_vecResources;
 };
 
-#endif /* SAMPLEBUNDLE_H_ */
+#endif /* SOFTSENSOR_SAMPLEBUNDLE_H_ */
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-#include "SampleBundle.h"
+#include "SoftSensorBundleActivator.h"
 #include "DiscomfortIndexSensorResource.h"
 
-SampleBundle *bundle;
+SoftSensorBundleActivator *bundle;
 
-SampleBundle::SampleBundle()
+SoftSensorBundleActivator::SoftSensorBundleActivator()
 {
 }
 
-SampleBundle::~SampleBundle()
+SoftSensorBundleActivator::~SoftSensorBundleActivator()
 {
 }
 
-void SampleBundle::activateBundle(ResourceContainerBundleAPI *resourceContainer,
-                                  std::string bundleId)
+void SoftSensorBundleActivator::activateBundle(ResourceContainerBundleAPI *resourceContainer,
+        std::string bundleId)
 {
-    std::cout << "SampleBundle::activateBundle called" << std::endl;
+    std::cout << "SoftSensorSampleBundle::activateBundle called" << std::endl;
 
     m_pResourceContainer = resourceContainer;
     m_bundleId = bundleId;
@@ -50,9 +50,9 @@ void SampleBundle::activateBundle(ResourceContainerBundleAPI *resourceContainer,
     }
 }
 
-void SampleBundle::deactivateBundle()
+void SoftSensorBundleActivator::deactivateBundle()
 {
-    std::cout << "SampleBundle::deactivateBundle called" << std::endl;
+    std::cout << "SoftSensorSampleBundle::deactivateBundle called" << std::endl;
 
     for (std::vector<BundleResource *>::iterator itor = m_vecResources.begin();
          itor != m_vecResources.end(); itor++)
@@ -61,9 +61,9 @@ void SampleBundle::deactivateBundle()
     }
 }
 
-void SampleBundle::createResource(resourceInfo resourceInfo)
+void SoftSensorBundleActivator::createResource(resourceInfo resourceInfo)
 {
-    std::cout << "SampleBundle::createResource called" << std::endl;
+    std::cout << "SoftSensorSampleBundle::createResource called" << std::endl;
 
     static int discomfortIndexSensorCount = 0;
 
@@ -79,11 +79,11 @@ void SampleBundle::createResource(resourceInfo resourceInfo)
             inputs.push_back(itor_map->second);
         }
     }
-    std::cout << "SampleBundle::creating new discomfort index sensor " << std::endl;
+    std::cout << "SoftSensorSampleBundle::creating new discomfort index sensor " << std::endl;
     // create DISensor resource
     DiscomfortIndexSensorResource *newResource = new DiscomfortIndexSensorResource(inputs);
 
-    newResource->m_uri = "/sampleBundle/discomfortIndex/" + std::to_string(
+    newResource->m_uri = "/softsensor/discomfortIndex/" + std::to_string(
                              discomfortIndexSensorCount++);
     newResource->m_resourceType = resourceInfo.resourceType;
     newResource->m_mapResourceProperty = resourceInfo.resourceProperty;
@@ -95,9 +95,9 @@ void SampleBundle::createResource(resourceInfo resourceInfo)
     m_vecResources.push_back(newResource);
 }
 
-void SampleBundle::destroyResource(BundleResource *resource)
+void SoftSensorBundleActivator::destroyResource(BundleResource *resource)
 {
-    std::cout << "SampleBundle::destroyResource called" << std::endl;
+    std::cout << "SoftSensorSampleBundle::destroyResource called" << std::endl;
 
     std::vector <BundleResource *>::iterator itor;
 
@@ -115,7 +115,7 @@ void SampleBundle::destroyResource(BundleResource *resource)
 extern "C" void externalActivateBundle(ResourceContainerBundleAPI *resourceContainer,
                                        std::string bundleId)
 {
-    bundle = new SampleBundle();
+    bundle = new SoftSensorBundleActivator();
     bundle->activateBundle(resourceContainer, bundleId);
 }