Sergei G / Mbed OS Borsch

Dependencies:   DataStore JobScheduler NetworkServices W5500Interface nanopb protocol

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers jobFakeADC.h Source File

jobFakeADC.h

00001 #pragma once
00002 
00003 #include "mbed.h"
00004 #include "lceProxy.h"
00005 
00006 /** JobFakeADC is a job that simulates ADC data uploads to HE. */
00007 class JobFakeADC {
00008     public:
00009     
00010     /** RunAdapter is scheduler callback function. 
00011     @param thisPointer provides job context, which is this class's instance.
00012     */
00013     static void RunAdapter(void *thisPointer) {
00014         JobFakeADC *self = static_cast<JobFakeADC*>(thisPointer);
00015         self->Run();
00016     }
00017 
00018     /** JobFakeADC constructor takes services as dependencies. */
00019     JobFakeADC(LceProxy& lce): _lce(lce), _next(1) {}
00020     
00021     void Run();
00022     
00023     private:
00024     
00025     LceProxy& _lce;
00026     int _next;
00027     
00028 };