SAE Teensy ECU
IIT SAE Microcontroller programming
Loading...
Searching...
No Matches
activeModule.hpp
1
#pragma once
2
3
#include "mainModule.hpp"
4
5
namespace
Module {
6
7
static
const
int
DEFAULT_STACK_SIZE = 4096;
8
9
class
ActiveModule_t
:
public
Module::Module_t
{
10
private
:
11
std::mutex vMux;
12
int
threadID = -1;
13
const
int
stackSize = 0;
14
15
void
start();
16
void
stop();
17
18
static
void
_runner(
ActiveModule_t
*m);
19
20
friend
Manager_t
;
21
22
protected
:
23
virtual
void
run();
24
25
public
:
26
static
const
int
classID = 1;
27
28
virtual
int
getClassID()
const
{
return
classID; }
29
30
template
<
typename
... T>
31
ActiveModule_t
(
const
int
stackSize) : stackSize(stackSize),
Module_t
(){};
32
template
<
typename
... T>
33
ActiveModule_t
(
const
int
stackSize, T *...mods) : stackSize(stackSize),
Module_t
(mods...){};
34
// ActiveModule_t(int stackSize, T *...mods) : stackSize(stackSize), count(sizeof...(mods)), dependents{static_cast<Module_t *>(mods)...}, id(1 << s_id++) { };
35
};
36
37
}
// namespace Module
Module::ActiveModule_t
Definition
activeModule.hpp:9
Module::Manager_t
Definition
manager.hpp:5
Module::Module_t
Module_t should be used for major components of a framework, it is used to isolate,...
Definition
mainModule.hpp:64
libraries
module
activeModule.hpp
Generated by
1.9.8