sbsSet provides a method to set certain parameters of the scheduler as well as user-defined parameters. The PBO/RT parameters that are provided by default include the module frequency (SBS_FREQ), the module period as a function of the number of heartbeats (SBS_NTICKS), and the number of missed deadlines the module has experienced since it was spawned (SBS_MISSED). A call to sbsSet using the SBS_MISSED type resets the number of misses to zero. You cannot set modules misses to an arbitrary value.
The calling convention of sbsSet is:
int sbsSet(char procID, int16_t type, int16_t arg, void *vptr);where procID is an index to a module returned by sbsSpawn(), type is a constant indicating the intent of the sbsSet operation, arg is an index or value of relevance to the specified type, and vptr is a pointer to the values of relevance to the specified type. The return value is one of the pre-defined values I_OK or I_ERROR.
If only the pre-defined types -- SBS_FREQ, SBS_NTICKS, and SBS_MISSED -- are used, no further action by the module programmer is needed. If user-defined types are needed, the module programmer must create an xxx_set() routine, as indicated in the module example. The calling convention for xxx_set() is the same as sbsSet():
char xxx_set(uint8_t index, int16_t type, int16_t arg, void *vptr)but the xxx_set() function is never called by the programmer directly. It is only called indirectly through sbsSet().
Copyright: © 2010 by Richard Voyles. All rights reserved.
Department of Electrical and Computer Engineering,
University of Denver.
Maintained by Richard Voyles
Last modified: Apr. 24, 2010