SatCat5
satcat5::irq::ControllerNull Class Referencefinal

Detailed Description

A do-nothing placeholder implementation of irq::Controller .

SatCat5 interrupt-API concepts.

Instantiate this class if interrupts are handled outside of SatCat5 infrastructure and no other hardware abstraction is available.

Definition at line 145 of file satcat5/interrupts.h.

#include <interrupts.h>

Inheritance diagram for satcat5::irq::ControllerNull:
[legend]
Collaboration diagram for satcat5::irq::ControllerNull:
[legend]

Public Member Functions

 ControllerNull (satcat5::util::TimeRef *timer=0)
 Constructor accepts an optional Timer pointer, if available.
 
void service_all ()
 User should call one of the "service" methods whenever a SatCat5-related interrupt occurs.
 
void service_one (satcat5::irq::Handler *obj)
 
void init (satcat5::util::TimeRef *timer=0)
 Start the interrupt controller. More...
 
void stop ()
 Unregister ALL interrupt handlers. More...
 

Static Public Member Functions

static bool is_initialized ()
 Has init() been called?
 
static bool is_irq_context ()
 Are we currently servicing an interrupt?
 
static bool is_irq_or_locked ()
 Are we currently in a critical-section?
 

Protected Member Functions

void irq_pause () override
 Prevent preemption from "pause" until "resume". More...
 
void irq_resume () override
 Disable hardware interrupts.
 
void irq_register (satcat5::irq::Handler *obj) override
 Re-enable hardware interrupts. More...
 
void irq_unregister (satcat5::irq::Handler *obj) override
 Un-register the callback for an interrupt handler. More...
 
void irq_acknowledge (satcat5::irq::Handler *obj) override
 Post-handler acknowledgement, notification, and cleanup. More...
 

Static Protected Member Functions

static void interrupt_static (satcat5::irq::Handler *obj)
 Static interrupt service routine. More...
 

Member Function Documentation

◆ init()

void satcat5::irq::Controller::init ( satcat5::util::TimeRef timer = 0)
inherited

Start the interrupt controller.

Link all registered irq::Handler objects (see below). The timer argument is optional but allows collection of statistics about time spent in each interrupt handler. If none is provided, statistics use SATCAT5_CLOCK. The platform-specific implementation MUST call this function exactly once, when it is ready to begin servicing interrupts.

Definition at line 83 of file satcat5/interrupts.cc.

◆ interrupt_static()

void satcat5::irq::Controller::interrupt_static ( satcat5::irq::Handler obj)
staticprotectedinherited

Static interrupt service routine.

Child MUST call this method whenever an interrupt occurs.

Definition at line 125 of file satcat5/interrupts.cc.

◆ irq_acknowledge()

void satcat5::irq::ControllerNull::irq_acknowledge ( satcat5::irq::Handler obj)
inlineoverrideprotectedvirtual

Post-handler acknowledgement, notification, and cleanup.

Child SHOULD override this method if such action is required.

Reimplemented from satcat5::irq::Controller.

Definition at line 164 of file satcat5/interrupts.h.

◆ irq_pause()

void satcat5::irq::ControllerNull::irq_pause ( )
inlineoverrideprotectedvirtual

Prevent preemption from "pause" until "resume".

May be implemented by mutex, disabling interrupts, etc. Child MUST override these two methods.

Implements satcat5::irq::Controller.

Definition at line 160 of file satcat5/interrupts.h.

◆ irq_register()

void satcat5::irq::ControllerNull::irq_register ( satcat5::irq::Handler obj)
inlineoverrideprotectedvirtual

Re-enable hardware interrupts.

Register the callback for an interrupt-handler. Child MUST override this method.

Implements satcat5::irq::Controller.

Definition at line 162 of file satcat5/interrupts.h.

◆ irq_unregister()

void satcat5::irq::ControllerNull::irq_unregister ( satcat5::irq::Handler obj)
inlineoverrideprotectedvirtual

Un-register the callback for an interrupt handler.

Child MUST override this method.

Implements satcat5::irq::Controller.

Definition at line 163 of file satcat5/interrupts.h.

◆ stop()

void satcat5::irq::Controller::stop ( )
inherited

Unregister ALL interrupt handlers.

(For safety, this must be called before the destructor, since cleanup may require the use of various virtual methods.)

Definition at line 65 of file satcat5/interrupts.cc.


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