1 /******************************************************************
3 * Copyright 2014 Samsung Electronics All Rights Reserved.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
19 ******************************************************************/
22 * DiscomfortIndexSensor.h
25 #ifndef DISCOMFORTINDEXSENSOR_H_
26 #define DISCOMFORTINDEXSENSOR_H_
29 * This header file is included to define _EXPORT_.
31 #include "SSMModelDefinition.h"
39 void _EXPORT_ InitializeContext(ICtxDelegate *pDelegate);
46 namespace DiscomfortIndexSensorName
50 typedef struct _physicalInput_
59 SUCCESS = 0, ERROR, ALL_DISCOMPORT, HALF_DISCOMPORT, LITTLE_DISCOMPORT, ALL_COMPORT
62 class DiscomfortIndexSensor: public ICtxEvent
66 static physicalInput s_PHYSICAL_SOFTSENSORs[PHYSICAL_EA];
71 std::string m_timestamp; // .
72 std::string m_discomfortIndex; // Discomfort Index. ( 2 ~ 5 )
73 std::string m_humidity; // relative humidity.
74 std::string m_temperature; // celsius temperature.
77 InValue m_DI[PHYSICAL_EA];
80 int runLogic(std::vector< ContextData > &contextDataList);
83 DiscomfortIndexSensor();
85 void onCtxEvent(enum CTX_EVENT_TYPE eventType, std::vector< ContextData > contextDataList);
87 DIResult getInput(std::vector< ContextData > &contextDataList, InValue *data);
88 DIResult makeDiscomfortIndex(InValue *data);
89 ContextData setOutput(int property_count, InValue *data);
91 friend void _EXPORT_ initializeContext(ICtxDelegate *pDelegate);
96 #endif /* DISCOMFORTINDEXSENSOR_H_ */