summaryrefslogtreecommitdiff
path: root/source/LCDriverThread.h
blob: 3bb2e738947651ad8e621be769c62b664f2683bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*******************************************************************************
*
*    File name: LCDriverThread.h
*     Language: Visual C++
*  Description: Active Thread Object class declarations
*
*
* Copyright (C) ST-Ericsson SA 2011
* License terms: 3-clause BSD license
*
*******************************************************************************/

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//                                                                                                 File LCDriverThread.h

#ifndef _LCDRIVERTHREAD_H_
#define _LCDRIVERTHREAD_H_

#include "CaptiveThreadObject.h"
#include "Timer.h"
#include "Logger.h"
#include "t_communication_service.h"

class CLCDriverMethods;

class CLCDriverThread: public CCaptiveThreadObject
{
public:
    CLCDriverThread(CLCDriverMethods *lcdriverMethods);

    void ResumeThread() {
        Thread.ResumeThread();
    }

    ErrorCode_e SetLcmFamily(Family_t family, Do_CEH_Call_t CEHCallback);

    void TimerOn();
    void TimerOff();
private:
    void InitializeCaptiveThreadObject() {}
    void MainExecutionLoop();
    void SignalDeath();
private:
    CLCDriverMethods *lcdriverMethods_;

    bool timerOn_;
    bool shutdown_;

    CCriticalSectionObject  LCMPollCS;
};

#endif // _LCDRIVERTHREAD_H_

//                                                                                          End of file LCDriverThread.h
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////