|
Critical Link MityCam SoC Firmware
1.0
Critical Link MityCam SoC Firmware
|
Go to the documentation of this file. 1 #ifndef PERIODICJOBTHREAD_H
2 #define PERIODICJOBTHREAD_H
45 void recomputeTimes();
47 void computeNextWakeup();
48 uint64 timespecToMs(
const struct timespec arT)
const {
return (
uint64)(arT.tv_sec) * 1000
49 + (arT.tv_nsec) / 1000000 ; }
50 bool msToTimespec(
uint64 anMs,
struct timespec& arT);
51 void sendSimpleMsg(
uint32 anVal);
52 std::ostream& printTime(
const struct timespec& arT, std::ostream& strm=std::cout)
const;
53 std::ostream& printTime(
uint64 anMs, std::ostream& strm=std::cout)
const;
54 static const uint32 cnMsgQuit=0xDEADBEEF;
55 static const uint32 cnMsgRecompute=0xFACE0001;
59 struct timespec msLastTime;
60 struct timespec msNextTime;
62 char maMqName[NAME_MAX];
67 std::ostream&
operator <<(std::ostream& arS,
const struct tcJobSchedule& arJS);
69 #endif // PERIODICJOBTHREAD_H
uint64_t uint64
Definition: Types.h:13
int addJob(tcJob *apJob)
Add a job.
Definition: PeriodicJobThread.cpp:46
void * run()
Definition: PeriodicJobThread.cpp:92
void printScheduledJobs()
print list of jobs
Definition: PeriodicJobThread.cpp:268
Definition: PeriodicJobThread.h:18
int removeJob(tcJob *apJob)
Remove a job.
Definition: PeriodicJobThread.cpp:70
~tcPeriodicJobThread()
Definition: PeriodicJobThread.cpp:34
std::ostream & operator<<(std::ostream &arS, const struct tcJobSchedule &arJS)
std::list< tcJob * > tlJobList
Definition: PeriodicJobThread.h:42
uint32_t uint32
Definition: Types.h:11
tcPeriodicJobThread()
Definition: PeriodicJobThread.cpp:27
void stop()
terminate job thread processing
Definition: PeriodicJobThread.cpp:247
The tcJob class is the base class for jobs that get added to the tcPeriodicJobThread.
Definition: Job.h:14