Pattern Services

Classes

class  ApparatusFramework::ApXML
class  ApparatusFramework::ApXmlElement
class  ApparatusFramework::DynamicState
class  ApparatusFramework::DynamicStateMachine
class  ApparatusFramework::HuffmanCodingStringCompression
class  ApparatusFramework::KernelSimpleObservable
class  ApparatusFramework::KernelMultipleObservable
class  ApparatusFramework::MD5
class  ApparatusFramework::Observable< Event >
class  ApparatusFramework::SimpleObservable< Event >
class  ApparatusFramework::MultipleObservable< Event >
class  ApparatusFramework::CodingServices
class  ApparatusFramework::Registrator
class  ApparatusFramework::SHA1
class  ApparatusFramework::SHA2
class  ApparatusFramework::Singleton< T >
class  ApparatusFramework::SingletonHandle< T >
class  ApparatusFramework::SupervisedTask
class  ApparatusFramework::StartupHandler
class  ApparatusFramework::StartupIf
class  ApparatusFramework::State
class  ApparatusFramework::StateMachine
class  ApparatusFramework::TimerMsg
class  ApparatusFramework::TimerMgr
class  ApparatusFramework::TaskWakeUpMsg
class  ApparatusFramework::WatchdogTaskSupervisor

Typedefs

typedef int(* ApparatusFramework::IntFuncPtr )()
typedef void(* ApparatusFramework::VoidFuncPtr )()

Functions

void ApparatusFramework::watch ()
int ApparatusFramework::wasWatchdogReset ()
void ApparatusFramework::dumpWatchdogInfo ()
void ApparatusFramework::handleWatchdogReset ()
int ApparatusFramework::isInitialized ()
void ApparatusFramework::installInitializedCallback (VoidFuncPtr pCallback)

Detailed Description

Dynamic State Machine

The DynamicStateMachine pattern provides the base class for a dynamic state machine, creating the single active state always in the same memory location. It is useful to save RAM, but not suitable to fulfill hard realtime requirements.

Observer Pattern

The observer pattern implements the observer concept of the Java standard Library and uses the same terminology. The implementation supplies the following classes:

Polynomical Coding Services

The class provides a set of static methods to compute CRC codes according to ITU (formally CCITT) standards. The alorithms use lookup tables for short execution times. Information about CRCs and the used polynoms can be found in the corresponding ITU standards.

Startup Handler

The Startup Handler controls the startup and shutdown of software components using the Registrator and the StartupIf helper classes.

The StartIf provides the methods initialize, startup, shutdown and cleanup. These methods are called by the StartupHandler in an organized manner to make sure that all subsystems are called in the right order to guarantee proper function of the device.

State Machine

This pattern provides the two basic classes State and StateMachine to realize hierarchical state machines.

State Machine Features

Timer Manager

All our projects need to set up various timers to detect the end of an internal state or to find out that a message was lost during a transmission. This situation arises especially when implementing user interface or communication protocol state machines. Timers are also part of the formal definition of Harel state machines. We decided to simplify the implementation of such mechanisms by providing a timer manager. Our timer manager provides services to create a timer which should fire at the end of the defined time interval. An existing timer can naturally be canceled. If the timer fires, a message is sent to the creator of the timer. Such a message contains an unique message Id which is the same for all timer messages and an id with the timer that has run out. We require the creator of a timer to be a task. This restriction avoids that the processing activities associated with the timeout is done under the resources of the timer manager.

The timer manager provides the following operations:

The timer manager uses the functions provided by the KernelServices. It inherits from the Monitor class and from the Task class. The monitor services serialize the accesses to the timer manager. The task services allow the timer manager to regularly verify if some timers have elapsed. The timer manager sends a message to the creator of a timer if it elapsed. The message object has the value m_theTimerId as the class identification and a field timer identification. This returned identifier is the same as the one returned when the timer was created. Applications using our timer manager must therefore support our message structure. Please read the kernel services documentation for a detailed description how to create your own message styles. We provide the required declarations in the standard kernel services configuration.

Watchdog Supervisor

The watchdog wupervisor pattern builds the link between the hardware watchdog one or more tasks. Tasks derived from SupervisedTask register to the WatchdogTaskSupervisor. The WatchdogTaskSupervisor checks periodically all tasks for activity and kicks the hardware watchdog when all supervised tasks are fine. When one or more tasks are 'dead' the hardware watchdog kick is suppressed and the hardware watchdog is going to reset the device (probably by a hardware reset).


Typedef Documentation

C function pointer for the watchdog condition function.

Definition at line 85 of file WDogSprv.h.

C function pointer for the watchdog kick function.

Definition at line 89 of file WDogSprv.h.


Function Documentation

void ApparatusFramework::dumpWatchdogInfo (  ) 

C function interface for WatchdogTaskSupervisor::dumpWatchdogInfo().

void ApparatusFramework::handleWatchdogReset (  ) 
void ApparatusFramework::installInitializedCallback ( VoidFuncPtr  pCallback  ) 
int ApparatusFramework::isInitialized (  ) 

C function interface for WatchdogTaskSupervisor::isInitialized().

int ApparatusFramework::wasWatchdogReset (  ) 

C function interface for WatchdogTaskSupervisor::wasWatchdogReset().

void ApparatusFramework::watch (  ) 

C function interface for WatchdogTaskSupervisor::watch().

© 2004-2010 bbv Software Services AG / Apparatus Services