Apollo  6.0
Open source self driving car software
Classes | Typedefs | Enumerations | Functions | Variables
apollo::cyber::croutine Namespace Reference

Classes

class  CRoutine
 
struct  RoutineContext
 
class  RoutineFactory
 

Typedefs

using RoutineFunc = std::function< void()>
 
using Duration = std::chrono::microseconds
 
typedef void(* func) (void *)
 

Enumerations

enum  RoutineState {
  RoutineState::READY, RoutineState::FINISHED, RoutineState::SLEEP, RoutineState::IO_WAIT,
  RoutineState::DATA_WAIT
}
 

Functions

void MakeContext (const func &f1, const void *arg, RoutineContext *ctx)
 
void SwapContext (char **src_sp, char **dest_sp)
 
template<typename M0 , typename F >
RoutineFactory CreateRoutineFactory (F &&f, const std::shared_ptr< data::DataVisitor< M0 >> &dv)
 
template<typename M0 , typename M1 , typename F >
RoutineFactory CreateRoutineFactory (F &&f, const std::shared_ptr< data::DataVisitor< M0, M1 >> &dv)
 
template<typename M0 , typename M1 , typename M2 , typename F >
RoutineFactory CreateRoutineFactory (F &&f, const std::shared_ptr< data::DataVisitor< M0, M1, M2 >> &dv)
 
template<typename M0 , typename M1 , typename M2 , typename M3 , typename F >
RoutineFactory CreateRoutineFactory (F &&f, const std::shared_ptr< data::DataVisitor< M0, M1, M2, M3 >> &dv)
 
template<typename Function >
RoutineFactory CreateRoutineFactory (Function &&f)
 

Variables

constexpr size_t STACK_SIZE = 2 * 1024 * 1024
 
constexpr size_t REGISTERS_SIZE = 56
 

Typedef Documentation

◆ Duration

using apollo::cyber::croutine::Duration = typedef std::chrono::microseconds

◆ func

typedef void(* apollo::cyber::croutine::func) (void *)

◆ RoutineFunc

using apollo::cyber::croutine::RoutineFunc = typedef std::function<void()>

Enumeration Type Documentation

◆ RoutineState

Enumerator
READY 
FINISHED 
SLEEP 
IO_WAIT 
DATA_WAIT 

Function Documentation

◆ CreateRoutineFactory() [1/5]

template<typename M0 , typename F >
RoutineFactory apollo::cyber::croutine::CreateRoutineFactory ( F &&  f,
const std::shared_ptr< data::DataVisitor< M0 >> &  dv 
)

◆ CreateRoutineFactory() [2/5]

template<typename M0 , typename M1 , typename F >
RoutineFactory apollo::cyber::croutine::CreateRoutineFactory ( F &&  f,
const std::shared_ptr< data::DataVisitor< M0, M1 >> &  dv 
)

◆ CreateRoutineFactory() [3/5]

template<typename M0 , typename M1 , typename M2 , typename F >
RoutineFactory apollo::cyber::croutine::CreateRoutineFactory ( F &&  f,
const std::shared_ptr< data::DataVisitor< M0, M1, M2 >> &  dv 
)

◆ CreateRoutineFactory() [4/5]

template<typename M0 , typename M1 , typename M2 , typename M3 , typename F >
RoutineFactory apollo::cyber::croutine::CreateRoutineFactory ( F &&  f,
const std::shared_ptr< data::DataVisitor< M0, M1, M2, M3 >> &  dv 
)

◆ CreateRoutineFactory() [5/5]

template<typename Function >
RoutineFactory apollo::cyber::croutine::CreateRoutineFactory ( Function &&  f)

◆ MakeContext()

void apollo::cyber::croutine::MakeContext ( const func f1,
const void *  arg,
RoutineContext ctx 
)

◆ SwapContext()

void apollo::cyber::croutine::SwapContext ( char **  src_sp,
char **  dest_sp 
)
inline

Variable Documentation

◆ REGISTERS_SIZE

constexpr size_t apollo::cyber::croutine::REGISTERS_SIZE = 56

◆ STACK_SIZE

constexpr size_t apollo::cyber::croutine::STACK_SIZE = 2 * 1024 * 1024