Classes | Public Member Functions | Private Attributes | List of all members
RTT::extras::IRQActivity Class Reference

#include <IRQActivity.hpp>

Inheritance diagram for RTT::extras::IRQActivity:
Inheritance graph
[legend]

Classes

struct  Provider
 

Public Member Functions

int getIRQ () const
 
 IRQActivity (int priority, base::RunnableInterface *_r=0, const std::string &name="IRQActivity")
 
 IRQActivity (int scheduler, int priority, base::RunnableInterface *_r=0, const std::string &name="IRQActivity")
 
void setIRQ (int irq)
 
virtual bool start ()
 
virtual ~IRQActivity ()
 
- Public Member Functions inherited from RTT::Activity
 Activity (base::RunnableInterface *r=0, const std::string &name="Activity")
 Create a not real-time Activity. This creates a not real-time, non-periodic thread, with priority equal to RTT::os::LowestPriority. More...
 
 Activity (int priority, base::RunnableInterface *r=0, const std::string &name="Activity")
 Create a real-time Activity with a given priority. The thread is run in the ORO_SCHED_RT scheduler. More...
 
 Activity (int priority, Seconds period, base::RunnableInterface *r=0, const std::string &name="Activity")
 Create a real-time Activity with a given priority and period. The thread is run in the ORO_SCHED_RT scheduler. More...
 
 Activity (int scheduler, int priority, base::RunnableInterface *r=0, const std::string &name="Activity")
 Create an Activity with a given scheduler type and priority. More...
 
 Activity (int scheduler, int priority, Seconds period, base::RunnableInterface *r=0, const std::string &name="Activity")
 Create an Activity with a given scheduler type, priority and period. More...
 
 Activity (int scheduler, int priority, Seconds period, unsigned cpu_affinity, base::RunnableInterface *r=0, const std::string &name="Activity")
 Create an Activity with a given scheduler type, priority, period and cpu affinity. More...
 
virtual bool breakLoop ()
 
virtual bool execute ()
 
virtual void finalize ()
 
virtual unsigned getCpuAffinity () const
 
virtual Seconds getPeriod () const
 
virtual bool initialize ()
 
virtual bool isActive () const
 
virtual bool isPeriodic () const
 
virtual bool isRunning () const
 
virtual void loop ()
 
virtual bool setCpuAffinity (unsigned cpu)
 
virtual bool setPeriod (Seconds period)
 
void setWaitPeriodPolicy (int p)
 
virtual void step ()
 
virtual bool stop ()
 
virtual os::ThreadInterfacethread ()
 
virtual bool timeout ()
 
virtual bool trigger ()
 
virtual void work (base::RunnableInterface::WorkReason reason)
 
virtual ~Activity ()
 
- Public Member Functions inherited from RTT::base::ActivityInterface
 ActivityInterface ()
 
 ActivityInterface (RunnableInterface *run)
 
virtual RunnableInterfacegetRunner () const
 
virtual bool run (RunnableInterface *r)
 
virtual ~ActivityInterface ()
 
- Public Member Functions inherited from RTT::os::Thread
virtual int getMaxOverrun () const
 
virtual const char * getName () const
 
void getPeriod (secs &s, nsecs &ns) const
 
virtual nsecs getPeriodNS () const
 
virtual unsigned int getPid () const
 
virtual int getPriority () const
 
virtual int getScheduler () const
 
Seconds getStopTimeout () const
 
virtual RTOS_TASKgetTask ()
 
virtual const RTOS_TASKgetTask () const
 
virtual void setMaxOverrun (int m)
 
bool setPeriod (Seconds s)
 
bool setPeriod (secs s, nsecs ns)
 
bool setPeriod (TIME_SPEC p)
 
virtual bool setPriority (int priority)
 
virtual bool setScheduler (int sched_type)
 
void setStopTimeout (Seconds s)
 
 Thread (int scheduler, int priority, double period, unsigned cpu_affinity, const std::string &name)
 
virtual void yield ()
 
virtual ~Thread ()
 
- Public Member Functions inherited from RTT::os::ThreadInterface
bool isSelf () const
 
 ThreadInterface ()
 
unsigned int threadNumber () const
 
virtual ~ThreadInterface ()
 

Private Attributes

RT_INTR m_handle
 
int m_irq
 
base::RunnableInterfacem_runner
 

Additional Inherited Members

- Public Types inherited from RTT::base::ActivityInterface
typedef boost::shared_ptr< ActivityInterfaceshared_ptr
 
- Static Public Member Functions inherited from RTT::os::Thread
static void setLockTimeoutNoPeriod (double timeout_in_s)
 
static void setLockTimeoutPeriodFactor (double factor)
 
static void setStackSize (unsigned int ssize)
 
- Protected Member Functions inherited from RTT::base::ActivityInterface
void disableRun (RunnableInterface *caller)
 
- Protected Member Functions inherited from RTT::os::Thread
void emergencyStop ()
 
void terminate ()
 
- Protected Attributes inherited from RTT::Activity
os::Condition msg_cond
 
os::Mutex msg_lock
 
bool mstopRequested
 
bool mtimeout
 
int mwaitpolicy
 
double update_period
 
- Protected Attributes inherited from RTT::base::ActivityInterface
RunnableInterfacerunner
 
- Protected Attributes inherited from RTT::os::Thread
bool active
 
MutexRecursive breaker
 
bool inloop
 
int maxOverRun
 
int msched_type
 
NANO_TIME period
 
bool prepareForExit
 
RTOS_TASK rtos_task
 
bool running
 
rt_sem_t sem
 
double stopTimeout
 
- Protected Attributes inherited from RTT::os::ThreadInterface
int threadnb
 
- Static Protected Attributes inherited from RTT::os::Thread
static unsigned int default_stack_size = 0
 
static double lock_timeout_no_period_in_s = 1.0
 
static double lock_timeout_period_factor = 10.0
 

Detailed Description

An activity which is triggered by an IRQ edge. This activity is only available on xenomai

The IRQ line can be given by two means:

Definition at line 73 of file IRQActivity.hpp.

Constructor & Destructor Documentation

IRQActivity::IRQActivity ( int  priority,
base::RunnableInterface _r = 0,
const std::string &  name = "IRQActivity" 
)

Create a IRQActivity with a given priority and base::RunnableInterface instance. The default scheduler for IRQActivity objects is ORO_SCHED_RT.

Parameters
priorityThe priority of the underlying thread.
_rThe optional runner, if none, this->loop() is called.

Definition at line 50 of file IRQActivity.cpp.

IRQActivity::IRQActivity ( int  scheduler,
int  priority,
base::RunnableInterface _r = 0,
const std::string &  name = "IRQActivity" 
)

Create a IRQActivity with a given scheduler type, priority and base::RunnableInterface instance.

Parameters
schedulerThe scheduler in which the activitie's thread must run. Use ORO_SCHED_OTHER or ORO_SCHED_RT.
priorityThe priority of the underlying thread.
_rThe optional runner, if none, this->loop() is called.

Definition at line 55 of file IRQActivity.cpp.

IRQActivity::~IRQActivity ( )
virtual

Definition at line 60 of file IRQActivity.cpp.

Member Function Documentation

int IRQActivity::getIRQ ( ) const

Definition at line 65 of file IRQActivity.cpp.

void IRQActivity::setIRQ ( int  irq)

Definition at line 66 of file IRQActivity.cpp.

bool IRQActivity::start ( )
virtual

Start the activity. This will call RunnableInterface::initialize() and upon success, effectively start the activity, by running the RunnableInterface::step() or RunnableInterface::loop() in a thread.

See also
isPeriodic()
Returns
true if the activity is started, false otherwise

Reimplemented from RTT::Activity.

Definition at line 69 of file IRQActivity.cpp.

Member Data Documentation

RT_INTR RTT::extras::IRQActivity::m_handle
private

Definition at line 76 of file IRQActivity.hpp.

int RTT::extras::IRQActivity::m_irq
private

Definition at line 75 of file IRQActivity.hpp.

base::RunnableInterface* RTT::extras::IRQActivity::m_runner
private

Definition at line 77 of file IRQActivity.hpp.


The documentation for this class was generated from the following files:


rtt
Author(s): RTT Developers
autogenerated on Tue Jun 25 2019 19:33:43