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"
37 INTERFACE_DECLSPEC void InitializeContext(ICtxDelegate *pDelegate);
43 namespace DiscomfortIndexSensorName
47 typedef struct _physicalInput_
56 SUCCESS = 0, ERROR, ALL_DISCOMPORT, HALF_DISCOMPORT, LITTLE_DISCOMPORT, ALL_COMPORT
59 class DiscomfortIndexSensor: public ICtxEvent
63 static physicalInput s_PHYSICAL_SOFTSENSORs[PHYSICAL_EA];
68 std::string m_timestamp; // .
69 std::string m_discomfortIndex; // Discomfort Index. ( 2 ~ 5 )
70 std::string m_humidity; // relative humidity.
71 std::string m_temperature; // celsius temperature.
74 InValue m_DI[PHYSICAL_EA];
77 int runLogic(std::vector< ContextData > &contextDataList);
80 DiscomfortIndexSensor();
82 void onCtxEvent(enum CTX_EVENT_TYPE eventType, std::vector< ContextData > contextDataList);
84 DIResult getInput(std::vector< ContextData > &contextDataList, InValue *data);
85 DIResult makeDiscomfortIndex(InValue *data);
86 ContextData setOutput(int property_count, InValue *data);
88 friend void INTERFACE_DECLSPEC initializeContext(ICtxDelegate *pDelegate);
93 #endif /* DISCOMFORTINDEXSENSOR_H_ */