Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

rk_stubby.c File Reference


Detailed Description

A simple tool for simulating real-time processes using rk_stub.

Definition in file rk_stubby.c.

Include dependency graph for rk_stubby.c:

Include dependency graph

Go to the source code of this file.

Enumerations

enum  rk_stubby_verbosity_t { VERBOSITY_NONE, VERBOSITY_DELEGATE }
 Enumeration of the different verbosity levels.

Functions

int parse_boolean (char *str)
 Interpret a string as a boolean value.
rk_stub_precall_retval_t c1_pre (void *data)
 The function that will be called by the simulator when a new data period is started.
void c1_post (void *data)
 The function that will be called by the simulator when a data period is finished.
int main (int argc, char *argv[])

Variables

rk_stubby_verbosity_t verbosity = VERBOSITY_NONE
 The current verbosity level.
cpu_reserve_attr cra
 The object that holds the CPU reservation parameters.
char * test_name = "test"
 The name of the resource set that will be created.
int drop_all = 0
 Flag that indicates that all data should be dropped.
int drop_behind = 0
 Flag that indicates that data should be dropped when the process is behind.
timespec run_end = { 4, 0 }
 The ending time for the simulation run.
struct {
   timespec   start
   int   data_period
   int   time_period
c1_data
 The fake process' data.


Function Documentation

void c1_post void *  data  ) 
 

The function that will be called by the simulator when a data period is finished.

Parameters:
data The process' data.

Definition at line 178 of file rk_stubby.c.

References c1_data, clock_gettime, and verbosity.

rk_stub_precall_retval_t c1_pre void *  data  )  [static]
 

The function that will be called by the simulator when a new data period is started.

Parameters:
data The process' data.
Returns:
RKSP_OK if drop_all == false and drop_behind == false or the process is making its deadlines. Otherwise, it returns RKSP_DROP.

Definition at line 122 of file rk_stubby.c.

References c1_data, clock_gettime, cra, drop_behind, cpu_reserve_attr::period, rk_stub_precall_retval_t, timespec_to_microsec(), and verbosity.

Here is the call graph for this function:

int parse_boolean char *  str  )  [static]
 

Interpret a string as a boolean value.

Parameters:
str The string to interpret.
Returns:
True if the string case insensitively matches one of the following values: true, yes, 1, on. Otherwise, the function returns false.

Definition at line 85 of file rk_stubby.c.


Variable Documentation

struct cpu_reserve_attr cra [static]
 

Initial value:

 {
    { 1, 0 },
    { 2, 0 },
    { 2, 0 },
    { 0, 0 },
    { 0, 0 },
    { RSV_SOFT, RSV_SOFT, RSV_SOFT },
    RK_ANY_CPU,
}
The object that holds the CPU reservation parameters.

Definition at line 48 of file rk_stubby.c.

Referenced by c1_pre().


Generated on Fri Oct 22 07:50:47 2004 for CPU Broker by  doxygen 1.3.9.1