NuSMV/code/nusmv/core/utils/watchdog_util.h File Reference

#include "nusmv/core/cinit/NuSMVEnv.h"
#include "nusmv/core/utils/error.h"

Go to the source code of this file.

Defines

#define WATCHDOG_GET_STATUS(env, name, status)   -1
 Returns the status of the watchdog.
#define WATCHDOG_INIT(env, name, period, action, options)
 Initialize the watchdog "name" in the watchdog library.
#define WATCHDOG_PAUSE(env, name)
 Pause the watchdog named "name".
#define WATCHDOG_START(env, name)
 Starts the watchdog named "name".

Functions

void watchdog_action (void *env)
 Callback function when the watchdog expires.

Define Documentation

#define WATCHDOG_GET_STATUS ( env,
name,
status   )     -1

Returns the status of the watchdog.

Returns the macro of the watchdog. env is a NuSMVENV_ptr, name is the name of the watchdog (char*) and status is a pointer to a boolean variable (bool* status).

The macro sets status to true if the watchdog is enabled, and to false otherwise. The macro returns -1 if the watchdog with the given name does not exists while returns a positive number (unsigned long long int) that contains the current value of the watchdog's timer.

The function to retrieve the status does not exist in the watchdog library.

If the library is not linked the macro returns -1.

#define WATCHDOG_INIT ( env,
name,
period,
action,
options   ) 

Initialize the watchdog "name" in the watchdog library.

The macro intializes the watchdog library. The macro takes as input a NuSMVEnv_ptr pointer, the name of the watchdog (const char*), the period of the watchdog (the timeout?), the action performed when the period expires (?), and the options used to set the timeout (?)

If the library is not linked the macro will do nothing.

#define WATCHDOG_PAUSE ( env,
name   ) 

Pause the watchdog named "name".

The macro pause the decrement the watchdog named "name". The macro takes as input the current environment (NuSMVEnv_ptr) and the name of the watchdog (const char*). The watchdog has to be already declared with the function WATCHDOG_INIT.

If the library is not linked the macro will do nothing.

#define WATCHDOG_START ( env,
name   ) 

Starts the watchdog named "name".

The macro starts the decrement the watchdog named "name". The macro takes as input the current environment (NuSMVEnv_ptr) and the name of the watchdog (const char*). The watchdog has to be already declared with the function WATCHDOG_INIT.

If the library is not linked the macro will do nothing.


Function Documentation

void watchdog_action ( void *  env  ) 

Callback function when the watchdog expires.

AutomaticStart

Callback function when the watchdog expires.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on 14 Oct 2015 for NuSMV Developers Manual by  doxygen 1.6.1