CORDET Framework - C2 Implementation
CrDemoSlave1/CrDaTempMonitor.h File Reference

Temperature monitoring logic in the slave applications. More...

Go to the source code of this file.

Functions

void CrDaTempMonitoringEnable (FwSmDesc_t smDesc)
 Enable temperature monitoring. More...
 
void CrDaTempMonitoringDisable (FwSmDesc_t smDesc)
 Disable temperature monitoring. More...
 
void CrDaTempMonitoringSetTempLimit (FwSmDesc_t smDesc)
 Set the limit against the temperature is monitored. More...
 
void CrDaTempMonitoringExec (char temp, CrFwDestSrc_t appId)
 Execute a temperature monitoring action on the argument temperature. More...
 

Detailed Description

Temperature monitoring logic in the slave applications.

The slave applications are responsible for monitoring a temperature measurement. This module defines the functions through which:

  • Temperature monitoring is enabled
  • Temperature monitoring is disabled
  • The limit against which monitoring is performed is defined
  • Temperature monitoring is performed

Some of the functions defined in this module are used as progress actions for the commands which the Slave Applications receive from the Master Application (see customization of commands in CrFwInFactoryUserPar.h). They are therefore defined to comply with the CrFwInCmdProgressAction_t prototype.

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 CORDET Framework.

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 CrDemoSlave1/CrDaTempMonitor.h.

Function Documentation

void CrDaTempMonitoringDisable ( FwSmDesc_t  smDesc)

Disable temperature monitoring.

This function is intended to be used as progress action for the InCommand which disables temperature monitoring.

Parameters
smDescthe InCommand state machine descriptor (this argument is required for compatibility with the CrFwInCmdProgressAction_t prototype)

Definition at line 67 of file CrDemoMaster/CrDaTempMonitor.c.

void CrDaTempMonitoringEnable ( FwSmDesc_t  smDesc)

Enable temperature monitoring.

This function is intended to be used as progress action for the InCommand which enables temperature monitoring.

Parameters
smDescthe InCommand state machine descriptor (this argument is required for compatibility with the CrFwInCmdProgressAction_t prototype)

Definition at line 62 of file CrDemoMaster/CrDaTempMonitor.c.

void CrDaTempMonitoringExec ( char  temp,
CrFwDestSrc_t  appId 
)

Execute a temperature monitoring action on the argument temperature.

If temperature monitoring is disabled, this function returns without doing anything. If temperature monitoring is enabled, this function compares the argument temperature with its temperature limit and if it finds that the argument temperature exceeds its limit, it generates a "temperature limit violated" report to the Master Application.

This function would normally be called periodically by the host application.

Parameters
tempthe temperature to be monitored (an integer in the range 0 to 127)
appIdthe identifier of the application which is performing the monitoring (either Slave 1 or Slave 2)

Definition at line 78 of file CrDemoMaster/CrDaTempMonitor.c.

void CrDaTempMonitoringSetTempLimit ( FwSmDesc_t  smDesc)

Set the limit against the temperature is monitored.

This function is intended to be used as progress action for the InCommand which set the temperature monitoring limit.

Parameters
smDescthe InCommand state machine descriptor (this argument is required for compatibility with the CrFwInCmdProgressAction_t prototype)

Definition at line 72 of file CrDemoMaster/CrDaTempMonitor.c.

P&P Software GmbH, Copyright 2012-2013, All Rights Reserved