devicesrv_pub/sensor_definitions_api/inc/sensrvilluminationsensor.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 14 Sep 2010 23:45:36 +0300
branchRCL_3
changeset 23 c26be94c8889
parent 0 4e1aa6a622a0
permissions -rw-r--r--
Revision: 201033 Kit: 201035

/*
* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  Channel data types definitions
*
*/



#ifndef SENSRVILLUMINATIONSENSOR_H
#define SENSRVILLUMINATIONSENSOR_H

//  INCLUDES
#include <e32base.h>
#include <sensrvtypes.h> 


// ILLUMINATION RELATED CHANNELS

/**
* - Name:          Ambient light event channel type
* - Type:          Event
* - Datatype:      TSensrvAmbientLightData
* - Description:   Ambient light events
*/
const TSensrvChannelTypeId KSensrvChannelTypeIdAmbientLightData = 0x2000BF16;


// ILLUMINATION RELATED DATATYPES

class TSensrvAmbientLightData
    {
public:

    /**
    * Brighness constants for ambien light sensor data channel.
    */
    static const TUint8 KAmbientLightVeryDark 	= 0;
    static const TUint8 KAmbientLightDark 	= 20;
    static const TUint8 KAmbientLightTwilight 	= 40;
    static const TUint8 KAmbientLightLight      = 60;
    static const TUint8 KAmbientLightBright     = 80;
    static const TUint8 KAmbientLightCloudy     = 85;
    static const TUint8 KAmbientLightCloudySunny= 90;
    static const TUint8 KAmbientLightSunny      = 100;




    /**
    * Channel data type Id number
    */
    static const TSensrvChannelDataTypeId KDataTypeId = 0x2000BF16;

	/**
    * Channel data type index numbers
    */
	enum TSensrvAmbientLightDataIndexes
        {
        ETimeStamp = 0,
        EAmbientLight
        };

public:

    /**
    * - Item name:   Sampling time
    * - Item Index:  0
    * - Description: Timestamp for a sample
    */
    TTime iTimeStamp;

    /**
    * - Item name:   Ambient light
    * - Item Index:  1
    * - Description: Percentage value (0..100) of Ambient light sensor's brightness.
    */
    TUint8 iAmbientLight;
    };


#endif //SENSRVILLUMINATIONSENSOR_H

// End of File