From 705dc1ada6cd94a8f76c4fd4c35b48dfe4e42c40 Mon Sep 17 00:00:00 2001 From: Minji Park Date: Mon, 6 Jul 2015 16:15:31 +0900 Subject: [PATCH] Change the name of soft sensor sample bundle change files and folder name of soft sensor sample bundle Change-Id: I615a127d7f538b93895700a3cc3ad9a396fb5816 Signed-off-by: Minji Park Reviewed-on: https://gerrit.iotivity.org/gerrit/1531 Tested-by: jenkins-iotivity Reviewed-by: Hun-je Yeon Reviewed-by: Uze Choi --- .../modules/resourceContainer/SConscript | 18 ++++++------ .../include/DiscomfortIndexSensor.h | 0 .../include/DiscomfortIndexSensorResource.h | 0 .../include/SoftSensorBundleActivator.h} | 12 ++++---- .../include/SysTimer.h | 0 .../src/DiscomfortIndexSensor.cpp | 0 .../src/DiscomfortIndexSensorResource.cpp | 0 .../src/SoftSensorBundleActivator.cpp} | 32 +++++++++++----------- .../src/SysTimer.cpp | 0 9 files changed, 31 insertions(+), 31 deletions(-) rename service/resource-manipulation/modules/resourceContainer/examples/{SampleBundle => SoftSensorSampleBundle}/include/DiscomfortIndexSensor.h (100%) rename service/resource-manipulation/modules/resourceContainer/examples/{SampleBundle => SoftSensorSampleBundle}/include/DiscomfortIndexSensorResource.h (100%) rename service/resource-manipulation/modules/resourceContainer/examples/{SampleBundle/include/SampleBundle.h => SoftSensorSampleBundle/include/SoftSensorBundleActivator.h} (85%) rename service/resource-manipulation/modules/resourceContainer/examples/{SampleBundle => SoftSensorSampleBundle}/include/SysTimer.h (100%) rename service/resource-manipulation/modules/resourceContainer/examples/{SampleBundle => SoftSensorSampleBundle}/src/DiscomfortIndexSensor.cpp (100%) rename service/resource-manipulation/modules/resourceContainer/examples/{SampleBundle => SoftSensorSampleBundle}/src/DiscomfortIndexSensorResource.cpp (100%) rename service/resource-manipulation/modules/resourceContainer/examples/{SampleBundle/src/SampleBundle.cpp => SoftSensorSampleBundle/src/SoftSensorBundleActivator.cpp} (75%) rename service/resource-manipulation/modules/resourceContainer/examples/{SampleBundle => SoftSensorSampleBundle}/src/SysTimer.cpp (100%) diff --git a/service/resource-manipulation/modules/resourceContainer/SConscript b/service/resource-manipulation/modules/resourceContainer/SConscript index 6bd2641..71afb5d 100644 --- a/service/resource-manipulation/modules/resourceContainer/SConscript +++ b/service/resource-manipulation/modules/resourceContainer/SConscript @@ -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 diff --git a/service/resource-manipulation/modules/resourceContainer/examples/SampleBundle/include/DiscomfortIndexSensor.h b/service/resource-manipulation/modules/resourceContainer/examples/SoftSensorSampleBundle/include/DiscomfortIndexSensor.h similarity index 100% rename from service/resource-manipulation/modules/resourceContainer/examples/SampleBundle/include/DiscomfortIndexSensor.h rename to service/resource-manipulation/modules/resourceContainer/examples/SoftSensorSampleBundle/include/DiscomfortIndexSensor.h diff --git a/service/resource-manipulation/modules/resourceContainer/examples/SampleBundle/include/DiscomfortIndexSensorResource.h b/service/resource-manipulation/modules/resourceContainer/examples/SoftSensorSampleBundle/include/DiscomfortIndexSensorResource.h similarity index 100% rename from service/resource-manipulation/modules/resourceContainer/examples/SampleBundle/include/DiscomfortIndexSensorResource.h rename to service/resource-manipulation/modules/resourceContainer/examples/SoftSensorSampleBundle/include/DiscomfortIndexSensorResource.h diff --git a/service/resource-manipulation/modules/resourceContainer/examples/SampleBundle/include/SampleBundle.h b/service/resource-manipulation/modules/resourceContainer/examples/SoftSensorSampleBundle/include/SoftSensorBundleActivator.h similarity index 85% rename from service/resource-manipulation/modules/resourceContainer/examples/SampleBundle/include/SampleBundle.h rename to service/resource-manipulation/modules/resourceContainer/examples/SoftSensorSampleBundle/include/SoftSensorBundleActivator.h index 6ae3507..5448f27 100644 --- a/service/resource-manipulation/modules/resourceContainer/examples/SampleBundle/include/SampleBundle.h +++ b/service/resource-manipulation/modules/resourceContainer/examples/SoftSensorSampleBundle/include/SoftSensorBundleActivator.h @@ -18,8 +18,8 @@ // //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -#ifndef SAMPLEBUNDLE_H_ -#define SAMPLEBUNDLE_H_ +#ifndef SOFTSENSOR_SAMPLEBUNDLE_H_ +#define SOFTSENSOR_SAMPLEBUNDLE_H_ #include #include @@ -30,11 +30,11 @@ 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 m_vecResources; }; -#endif /* SAMPLEBUNDLE_H_ */ +#endif /* SOFTSENSOR_SAMPLEBUNDLE_H_ */ diff --git a/service/resource-manipulation/modules/resourceContainer/examples/SampleBundle/include/SysTimer.h b/service/resource-manipulation/modules/resourceContainer/examples/SoftSensorSampleBundle/include/SysTimer.h similarity index 100% rename from service/resource-manipulation/modules/resourceContainer/examples/SampleBundle/include/SysTimer.h rename to service/resource-manipulation/modules/resourceContainer/examples/SoftSensorSampleBundle/include/SysTimer.h diff --git a/service/resource-manipulation/modules/resourceContainer/examples/SampleBundle/src/DiscomfortIndexSensor.cpp b/service/resource-manipulation/modules/resourceContainer/examples/SoftSensorSampleBundle/src/DiscomfortIndexSensor.cpp similarity index 100% rename from service/resource-manipulation/modules/resourceContainer/examples/SampleBundle/src/DiscomfortIndexSensor.cpp rename to service/resource-manipulation/modules/resourceContainer/examples/SoftSensorSampleBundle/src/DiscomfortIndexSensor.cpp diff --git a/service/resource-manipulation/modules/resourceContainer/examples/SampleBundle/src/DiscomfortIndexSensorResource.cpp b/service/resource-manipulation/modules/resourceContainer/examples/SoftSensorSampleBundle/src/DiscomfortIndexSensorResource.cpp similarity index 100% rename from service/resource-manipulation/modules/resourceContainer/examples/SampleBundle/src/DiscomfortIndexSensorResource.cpp rename to service/resource-manipulation/modules/resourceContainer/examples/SoftSensorSampleBundle/src/DiscomfortIndexSensorResource.cpp diff --git a/service/resource-manipulation/modules/resourceContainer/examples/SampleBundle/src/SampleBundle.cpp b/service/resource-manipulation/modules/resourceContainer/examples/SoftSensorSampleBundle/src/SoftSensorBundleActivator.cpp similarity index 75% rename from service/resource-manipulation/modules/resourceContainer/examples/SampleBundle/src/SampleBundle.cpp rename to service/resource-manipulation/modules/resourceContainer/examples/SoftSensorSampleBundle/src/SoftSensorBundleActivator.cpp index 9d7677f..b9d0785 100644 --- a/service/resource-manipulation/modules/resourceContainer/examples/SampleBundle/src/SampleBundle.cpp +++ b/service/resource-manipulation/modules/resourceContainer/examples/SoftSensorSampleBundle/src/SoftSensorBundleActivator.cpp @@ -18,23 +18,23 @@ // //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -#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::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 ::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); } diff --git a/service/resource-manipulation/modules/resourceContainer/examples/SampleBundle/src/SysTimer.cpp b/service/resource-manipulation/modules/resourceContainer/examples/SoftSensorSampleBundle/src/SysTimer.cpp similarity index 100% rename from service/resource-manipulation/modules/resourceContainer/examples/SampleBundle/src/SysTimer.cpp rename to service/resource-manipulation/modules/resourceContainer/examples/SoftSensorSampleBundle/src/SysTimer.cpp -- 2.7.4