CORDET Framework - C2 Implementation
CrFwAux.h File Reference

Auxiliary module to check the static part of an application's configuration. More...

Go to the source code of this file.

Enumerations

enum  CrFwConfigCheckOutcome_t {
  crConsistencyCheckSuccess = 1, crOutRegistryConfigParInconsistent = 2, crOutFactoryConfigParInconsistent = 3, crInFactoryInCmdConfigParInconsistent = 4,
  crInFactoryInRepConfigParInconsistent = 5
}
 Type for the outcome of the consistency check on the configuration parameters. More...
 

Functions

CrFwConfigCheckOutcome_t CrFwAuxConfigCheck ()
 Check the configuration of an application. More...
 
CrFwBool_t CrFwAuxOutRegistryConfigCheck ()
 Check the configuration of the OutRegistry component. More...
 
CrFwBool_t CrFwAuxOutFactoryConfigCheck ()
 Check the configuration of the OutFactory component. More...
 
CrFwBool_t CrFwAuxInFactoryInCmdConfigCheck ()
 Check the configuration of the InCommand part of the InFactory component. More...
 
CrFwBool_t CrFwAuxInFactoryInRepConfigCheck ()
 Check the configuration of the InReport part of the InFactory component. More...
 

Detailed Description

Auxiliary module to check the static part of an application's configuration.

The configuration of an application instantiated from the CORDET Framework is, for the most part, defined statically in files with names like: CrFwXxxUserPar where "Xxx" is the name of the framework component to which the configuration information applies. This module defines a set of functions which check the consistency of the configuration information in these configuration files. A function is defined for each configuration file and, additionally, function CrFwAuxConfigCheck checks all the configuration files.

Mode of Use of the Aux Module

Applications would normally use the functions in this module during the application development phase to verify the correctness of the information in the configuration files. Once this correctness has been confirmed, the configuration checks can be omitted. It is therefore not expected that this module will be included in the final executable for an application.

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 CrFwAux.h.

Enumeration Type Documentation

Type for the outcome of the consistency check on the configuration parameters.

Enumerator
crConsistencyCheckSuccess 

All configuration consistency checks have been passed.

crOutRegistryConfigParInconsistent 

OutRegistry configuration parameters are inconsistent (see CrFwAuxOutRegistryConfigCheck.h)

crOutFactoryConfigParInconsistent 

OutFactory configuration parameters are inconsistent (see CrFwAuxOutFactoryConfigCheck.h)

crInFactoryInCmdConfigParInconsistent 

InFactory configuration parameters for InCommands are inconsistent (see CrFwAuxInFactoryInCmdConfigCheck.h)

crInFactoryInRepConfigParInconsistent 

InFactory configuration parameters for InReports are inconsistent (see CrFwAuxInFactoryInRepConfigCheck.h)

Definition at line 43 of file CrFwAux.h.

Function Documentation

CrFwConfigCheckOutcome_t CrFwAuxConfigCheck ( )

Check the configuration of an application.

This function calls all the configuration check functions and verifies that they all return true (to signify: "no configuration error detected"). The function returns false as soon as it encounters a configuration check function which returns false.

Returns
a value from CrFwConfigCheckOutcome_t indicating which configuration check has failed.

Definition at line 55 of file CrFwAux.c.

CrFwBool_t CrFwAuxInFactoryInCmdConfigCheck ( )

Check the configuration of the InCommand part of the InFactory component.

The following checks are performed on the configuration data in CrFwInFactoryUserPar.h:

  • CR_FW_INFACTORY_MAX_NOF_INCMD is greater than zero if CR_FW_INCMD_NKINDS is greater than zero
  • The service types are listed in increasing order in the service descriptor initializer (CR_FW_INCMD_INIT_KIND_DESC)
  • The service sub-types within a type are listed in increasing order in the service descriptor initializer (CR_FW_INCMD_INIT_KIND_DESC)
  • The discriminant values within a type/sub-type are listed in increasing order in the service descriptor initializer (CR_FW_INCMD_INIT_KIND_DESC)
  • The values of the service types, sub-types and discriminant are lower than CR_FW_MAX_SERV_TYPE, CR_FW_MAX_SERV_SUBTYPE and CR_FW_MAX_DISCRIMINANT.
Returns
true if no errors are detected in the configuration data; false otherwise.

Definition at line 198 of file CrFwAux.c.

CrFwBool_t CrFwAuxInFactoryInRepConfigCheck ( )

Check the configuration of the InReport part of the InFactory component.

The following checks are performed on the configuration data in CrFwInFactoryUserPar.h:

  • CR_FW_INFACTORY_MAX_NOF_INREP is greater than zero if CR_FW_INREP_NKINDS is greater than zero
  • The service types are listed in increasing order in the service descriptor initializer (CR_FW_INREP_INIT_KIND_DESC)
  • The service sub-types within a type are listed in increasing order in the service descriptor initializer (CR_FW_INREP_INIT_KIND_DESC)
  • The discriminant values within a type/sub-type are listed in increasing order in the service descriptor initializer (CR_FW_INREP_INIT_KIND_DESC)
  • The values of the service types, sub-types and discriminant are lower than CR_FW_MAX_SERV_TYPE, CR_FW_MAX_SERV_SUBTYPE and CR_FW_MAX_DISCRIMINANT.
Returns
true if no errors are detected in the configuration data; false otherwise.

Definition at line 233 of file CrFwAux.c.

CrFwBool_t CrFwAuxOutFactoryConfigCheck ( )

Check the configuration of the OutFactory component.

The following checks are performed on the configuration data in CrFwOutFactoryUserPar.h:

  • CR_FW_OUTFACTORY_MAX_NOF_OUTCMP is greater than zero if CR_FW_OUTCMP_NKINDS is greater than zero
  • The service types are listed in increasing order in the service descriptor initializer (CR_FW_OUTCMP_INIT_KIND_DESC)
  • The service sub-types within a type are listed in increasing order in the service descriptor initializer (CR_FW_OUTCMP_INIT_KIND_DESC)
  • The discriminant values within a type/sub-type are listed in increasing order in the service descriptor initializer (CR_FW_OUTCMP_INIT_KIND_DESC)
  • The service types, sub-types and discriminant values defined in the CR_FW_OUTCMP_INIT_KIND_DESC initializer are consistent with service type, sub-types and discriminant values defined in the CR_FW_OUTREGISTRY_INIT_SERV_DESC.
  • The packet lengths specified in CR_FW_OUTCMP_INIT_KIND_DESC are greater than zero.
Returns
true if no errors are detected in the configuration data; false otherwise.

Definition at line 142 of file CrFwAux.c.

CrFwBool_t CrFwAuxOutRegistryConfigCheck ( )

Check the configuration of the OutRegistry component.

The following checks are performed on the configuration data in CrFwOutRegistryUserPar.h:

  • CR_FW_OUTREGISTRY_N is greater than zero
  • The service types are listed in increasing order in the service descriptor initializer (CR_FW_OUTREGISTRY_INIT_SERV_DESC)
  • The service sub-types within a type are listed in increasing order in the service descriptor initializer (CR_FW_OUTREGISTRY_INIT_SERV_DESC)
  • The service types, sub-types and discriminant values defined in the CR_FW_OUTREGISTRY_INIT_SERV_DESC initializer are consistent with service type, sub-types and discriminant values defined in the CR_FW_OUTCMP_INIT_KIND_DESC.
  • The lower bound of a range of discriminant values in CR_FW_OUTREGISTRY_INIT_SERV_DESC is smaller than or equal to the upper bound.
  • The size of the InStream packet queue is greater than zero.
  • The size of the OutStream packet queue is greater than zero.
  • The size of the Pending OutComponent List (POCL) is greater than zero.
Returns
true if no errors are detected in the configuration data; false otherwise.

Definition at line 73 of file CrFwAux.c.

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