F´ Flight Software - C/C++ Documentation
devel
A framework for building embedded system applications to NASA flight quality standards.
LinuxTimerComponentImplTaskDelay.cpp
Go to the documentation of this file.
1
// ======================================================================
2
// \title LinuxTimerImpl.cpp
3
// \author tim
4
// \brief cpp file for LinuxTimer component implementation class
5
//
6
// \copyright
7
// Copyright 2009-2015, by the California Institute of Technology.
8
// ALL RIGHTS RESERVED. United States Government Sponsorship
9
// acknowledged.
10
//
11
// ======================================================================
12
13
14
#include <
Svc/LinuxTimer/LinuxTimerComponentImpl.hpp
>
15
#include <
FpConfig.hpp
>
16
#include <
Os/Task.hpp
>
17
18
namespace
Svc
{
19
20
void
LinuxTimerComponentImpl::startTimer
(
NATIVE_INT_TYPE
interval) {
21
while
(
true
) {
22
Os::Task::delay
(interval);
23
this->m_mutex.
lock
();
24
bool
quit
= this->m_quit;
25
this->m_mutex.
unLock
();
26
if
(
quit
) {
27
return
;
28
}
29
this->m_timer.
take
();
30
this->
CycleOut_out
(0,this->m_timer);
31
}
32
}
33
34
}
// end namespace Svc
NATIVE_INT_TYPE
PlatformIntType NATIVE_INT_TYPE
Definition:
BasicTypes.h:51
FpConfig.hpp
C++-compatible configuration header for fprime configuration.
LinuxTimerComponentImpl.hpp
Task.hpp
Os::Mutex::unLock
void unLock()
unlock the mutex
Definition:
Mutex.cpp:13
Os::Mutex::lock
void lock()
lock the mutex
Definition:
Mutex.cpp:12
Os::Task::delay
static TaskStatus delay(NATIVE_UINT_TYPE msecs)
delay the task
Definition:
Task.cpp:43
Svc::LinuxTimerComponentBase::CycleOut_out
void CycleOut_out(NATIVE_INT_TYPE portNum, Svc::TimerVal &cycleStart)
Invoke output port CycleOut.
Definition:
LinuxTimerComponentAc.cpp:142
Svc::LinuxTimerComponentImpl::quit
void quit()
Quit timer.
Definition:
LinuxTimerComponentImplCommon.cpp:46
Svc::LinuxTimerComponentImpl::startTimer
void startTimer(NATIVE_INT_TYPE interval)
Start timer.
Definition:
LinuxTimerComponentImplTaskDelay.cpp:20
Svc::TimerVal::take
void take()
Function to store a timer value.
Definition:
TimerVal.cpp:38
Svc
Definition:
ActiveRateGroupCfg.hpp:18
Svc
LinuxTimer
LinuxTimerComponentImplTaskDelay.cpp
Generated by
1.9.1