FW Profile - C1 Implementation
FwRtMakeTest.c File Reference

Implementation of test RT Containers for FW RT Container Module. More...

Go to the source code of this file.

Functions

FwRtDesc_t FwRtMakeTestRT1 (unsigned int i)
 This function resets the i-th instance of the Test RT Container RT1 and returns a pointer to its descriptor. More...
 
FwRtDesc_t FwRtMakeTestRT2 (unsigned int i)
 This function resets the i-th instance of the Test RT Container RT2 and returns a pointer to its descriptor. More...
 
FwRtDesc_t FwRtMakeTestRT3 (unsigned int i)
 This function resets the i-th instance of the Test RT Container RT3 and returns a pointer to its descriptor. More...
 
FwRtDesc_t FwRtMakeTestRT4 (unsigned int i)
 This function resets the i-th instance of the Test RT Container RT4 and returns a pointer to its descriptor. More...
 
FwRtDesc_t FwRtMakeTestRT5 (unsigned int i)
 This function resets the i-th instance of the Test RT Container RT5 and returns a pointer to its descriptor. More...
 

Variables

struct FwRtDesc rt1Desc [MAX_RT_INDEX]
 The array of RT Container descriptors for RT1 containers.
 
struct FwRtDesc rt2Desc [MAX_RT_INDEX]
 The array of RT Container descriptors for RT2 containers.
 
struct FwRtDesc rt3Desc [MAX_RT_INDEX]
 The array of RT Container descriptors for RT3 containers.
 
struct FwRtDesc rt4Desc [MAX_RT_INDEX]
 The array of RT Container descriptors for RT4 containers.
 
struct FwRtDesc rt5Desc [MAX_RT_INDEX]
 The array of RT Container descriptors for RT5 containers.
 

Detailed Description

Implementation of test RT Containers for FW RT Container Module.

Author
Vaclav Cechticky vacla.nosp@m.v.ce.nosp@m.chtic.nosp@m.ky@p.nosp@m.np-so.nosp@m.ftwa.nosp@m.re.co.nosp@m.m
Alessandro Pasetti paset.nosp@m.ti@p.nosp@m.np-so.nosp@m.ftwa.nosp@m.re.co.nosp@m.m

This file is part of the FW Profile.

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

For information on alternative licensing, please contact P&P Software GmbH.

Definition in file FwRtMakeTest.c.

Function Documentation

FwRtDesc_t FwRtMakeTestRT1 ( unsigned int  i)

This function resets the i-th instance of the Test RT Container RT1 and returns a pointer to its descriptor.

The Test RT Container RT1 has the following characteristics:

  • Each action in one of the container procedures increments the associated counter in the TestRtData data structure.
  • The outcome of the actions in the container procedures is determined by the flags in the TestRtData data structure.
  • Default values are used for the Activation Thread, mutex and condition variable attributes.

The function returns the RT Container with its counters set to zero and its flags set to false.

Parameters
ithe index of the RT Container instance (an integer in the range 1 to MAX_RT_INDEX).
Returns
the descriptor of the created RT Container or NULL if the argument is out-of-range.

Definition at line 233 of file FwRtMakeTest.c.

FwRtDesc_t FwRtMakeTestRT2 ( unsigned int  i)

This function resets the i-th instance of the Test RT Container RT2 and returns a pointer to its descriptor.

The Test RT Container RT2 has the following characteristics:

  • Each action in one of the container procedures increments the associated counter in the TestRtData data structure.
  • The Execute Functional Behaviour action, in addition to incrementing a counter, also waits 1 millisecond before returning.
  • The outcome of the actions in the container procedures is determined by the flags in the TestRtData data structure.
  • Default values are used for the Activation Thread, mutex and condition variable attributes.

The wait in the functional behaviour action is useful to simulate the case of a container with a "long" execution time potentially giving rise to an accumulation of unhandled notification requests.

This function returns the RT Container with its counters set to zero and its flags set to false.

Parameters
ithe index of the RT Container instance (an integer in the range 1 to MAX_RT_INDEX).
Returns
the descriptor of the created RT Container or NULL if the argument is out-of-range.

Definition at line 275 of file FwRtMakeTest.c.

FwRtDesc_t FwRtMakeTestRT3 ( unsigned int  i)

This function resets the i-th instance of the Test RT Container RT3 and returns a pointer to its descriptor.

The Test RT Container RT3 has the following characteristics:

  • The initialization and finalization actions increment the associated counter in the TestRtData data structure.
  • The Implement Notification Logic action either (with probability 50%) returns zero or (with probability 50%) it returns 1 and increments its associated counter.
  • The Implement Activation Logic action increments its counter and then either returns zero (with probability 50%) or it returns one (with probability 50%).
  • The Implement Functional Behaviour action increments its counter, then it may wait 1 ms (with probability 50%), and then it returns zero.
  • Default values are used for the Activation Thread, mutex and condition variable attributes.

This function returns the RT Container with its counters set to zero and its flags set to false.

Parameters
ithe index of the RT Container instance (an integer in the range 1 to MAX_RT_INDEX).
Returns
the descriptor of the created RT Container or NULL if the argument is out-of-range.

Definition at line 317 of file FwRtMakeTest.c.

FwRtDesc_t FwRtMakeTestRT4 ( unsigned int  i)

This function resets the i-th instance of the Test RT Container RT4 and returns a pointer to its descriptor.

The Test RT Container RT4 has the following characteristics:

  • The initialization and finalization actions increment the associated counter in the TestRtData data structure.
  • The Implement Notification Logic action either (with probability 50%) returns zero or (with probability 50%) it returns 1 and increments its associated counter.
  • The Implement Activation Logic action increments its counter and then either returns zero (with probability 50%) or it returns one (with probability 50%).
  • The Implement Functional Behaviour action increments its counter, then it may wait 1 ms (with probability 50%), and then it either returns zero (with probability 99%) or it returns one (with probability 1%).
  • Default values are used for the Activation Thread, mutex and condition variable attributes.

This function returns the RT Container with its counters set to zero and its flags set to false.

Parameters
ithe index of the RT Container instance (an integer in the range 1 to MAX_RT_INDEX).
Returns
the descriptor of the created RT Container or NULL if the argument is out-of-range.

Definition at line 359 of file FwRtMakeTest.c.

FwRtDesc_t FwRtMakeTestRT5 ( unsigned int  i)

This function resets the i-th instance of the Test RT Container RT5 and returns a pointer to its descriptor.

The Test RT Container RT2 has the following characteristics:

  • The initialization and finalization actions increment the associated counter in the TestRtData data structure.
  • The Implement Notification Logic increments its associated counter and returns the value of its associated flag.
  • The Implement Notification Logic increments its associated counter and returns the value of its associated flag.
  • The Implement Functional Behaviour action increments its counter, then it may wait 1 ms (with probability 50%), and then it either returns zero (with probability 99%) or it returns one (with probability 1%).
  • Default values are used for the Activation Thread, mutex and condition variable attributes.

This function returns the RT Container with its counters set to zero and its flags set to false.

Parameters
ithe index of the RT Container instance (an integer in the range 1 to MAX_RT_INDEX).
Returns
the descriptor of the created RT Container or NULL if the argument is out-of-range.

Definition at line 401 of file FwRtMakeTest.c.

P&P Software GmbH, Copyright 2011, All Rights Reserved