qf_act.c File Reference

QF_active_[], QF_getVersion(), and QF_add_()/QF_remove_() implementation. More...

#include "qf_pkg.h"
#include "qassert.h"

Go to the source code of this file.

Functions

const char Q_ROM *Q_ROM_VAR QF_getVersion (void)
 Returns the QF version.
void QF_add_ (QActive *a)
 Register an active object to be managed by the framework.
void QF_remove_ (QActive const *a)
 Remove the active object from the framework.

Variables

QActiveQF_active_ [63+1]
 array of registered active objects
uint8_t QF_intLockNest_
 interrupt-lock nesting level

Detailed Description

QF_active_[], QF_getVersion(), and QF_add_()/QF_remove_() implementation.

Definition in file qf_act.c.


Function Documentation

void QF_add_ ( QActive a  ) 

Register an active object to be managed by the framework.

This function should not be called by the application directly, only through the function QActive_start(). The priority of the active object a should be set before calling this function.

Note:
This function raises an assertion if the priority of the active object exceeds the maximum value QF_MAX_ACTIVE. Also, this function raises an assertion if the priority of the active object is already in use. (QF requires each active object to have a UNIQUE priority.)

Definition at line 59 of file qf_act.c.

References QActive::prio, Q_REQUIRE, QF_active_, QS_aoObj_, QS_BEGIN_NOLOCK_, QS_END_NOLOCK_, QS_OBJ_, QS_QF_ACTIVE_ADD, and QS_U8_.

Referenced by QActive_start().

const char Q_ROM* Q_ROM_VAR QF_getVersion ( void   ) 

Returns the QF version.

This function returns constant version string in the format x.y.zz, where x (one digit) is the major version, y (one digit) is the minor version, and zz (two digits) is the maintenance release version. An example of the version string is "3.1.03".

The following example illustrates the usage of this function:

    printf("Quantum DPP\nQEP %s\nQF  %s, QF port %s\n"
           "Press ESC to quit...\n",
           QEP_getVersion(),
           QF_getVersion(), QF_getPortVersion());

Definition at line 46 of file qf_act.c.

References Q_ROM, Q_ROM_VAR, and QP_VERSION.

void QF_remove_ ( QActive const *  a  ) 

Remove the active object from the framework.

This function should not be called by the application directly, only inside the QF port. The priority level occupied by the active object is freed-up and can be reused for another active object.

The active object that is removed from the framework can no longer participate in the publish-subscribe event exchange.

Note:
This function raises an assertion if the priority of the active object exceeds the maximum value QF_MAX_ACTIVE or is not used.

Definition at line 79 of file qf_act.c.

References QActive::prio, Q_REQUIRE, QF_active_, QS_aoObj_, QS_BEGIN_NOLOCK_, QS_END_NOLOCK_, QS_OBJ_, QS_QF_ACTIVE_REMOVE, and QS_U8_.

Referenced by QActive_stop().


Variable Documentation

array of registered active objects

Note:
Not to be used by Clients directly, only in ports of QF

Definition at line 41 of file qf_act.c.

Referenced by QActive_subscribe(), QActive_unsubscribe(), QActive_unsubscribeAll(), QF_add_(), QF_getQueueMargin(), QF_publish(), QF_remove_(), and QF_run().

interrupt-lock nesting level

Note:
Not to be used by Clients directly, only in ports of QF

Definition at line 42 of file qf_act.c.

Generated on Tue Mar 16 19:38:10 2010 for QP/C by  doxygen 1.6.3