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 , crOutStreamConfigParInconsistent = 6 , crInStreamConfigParInconsistent = 7 , crInRegistryConfigParInconsistent = 8 ,
  crInManagerConfigParInconsistent = 9 , crOutManagerConfigParInconsistent = 10
}
 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 CrFwAuxOutStreamConfigCheck ()
 Check the configuration of the OutStream component. More...
 
CrFwBool_t CrFwAuxInStreamConfigCheck ()
 Check the configuration of the InStream 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...
 
CrFwBool_t CrFwAuxInRegistryConfigCheck ()
 Check the configuration of the InRegistry component. More...
 
CrFwBool_t CrFwAuxInManagerConfigCheck ()
 Check the configuration of the InManager component. More...
 
CrFwBool_t CrFwAuxOutManagerConfigCheck ()
 Check the configuration of the OutManager 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

◆ CrFwConfigCheckOutcome_t

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)

crOutStreamConfigParInconsistent 

OutStream configuration parameters are inconsistent (see CrFwAuxOutStreamConfigCheck.h)

crInStreamConfigParInconsistent 

InStream configuration parameters are inconsistent (see CrFwAuxInStreamConfigCheck.h)

crInRegistryConfigParInconsistent 

InRegistry configuration parameters are inconsistent (see CrFwAuxInRegistryConfigCheck.h)

crInManagerConfigParInconsistent 

InManager configuration parameters are inconsistent (see CrFwAuxInManagerConfigCheck.h)

crOutManagerConfigParInconsistent 

OutManager configuration parameters are inconsistent (see CrFwAuxOutManagerConfigCheck.h)

Definition at line 43 of file CrFwAux.h.

Function Documentation

◆ CrFwAuxConfigCheck()

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 67 of file CrFwAux.c.

◆ CrFwAuxInFactoryInCmdConfigCheck()

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 263 of file CrFwAux.c.

◆ CrFwAuxInFactoryInRepConfigCheck()

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 298 of file CrFwAux.c.

◆ CrFwAuxInManagerConfigCheck()

CrFwBool_t CrFwAuxInManagerConfigCheck ( )

Check the configuration of the InManager component.

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

  • The number of InManagers is greater than zero
  • The size of each PCRL is greater than zero
Returns
true if no errors are detected in the configuration data; false otherwise.

Definition at line 341 of file CrFwAux.c.

◆ CrFwAuxInRegistryConfigCheck()

CrFwBool_t CrFwAuxInRegistryConfigCheck ( )

Check the configuration of the InRegistry component.

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

  • The maximum number of trackable InCommands and InReports as given by parameter CR_FW_INREGISTRY_N is greater than zero.
Returns
true if no errors are detected in the configuration data; false otherwise.

Definition at line 333 of file CrFwAux.c.

◆ CrFwAuxInStreamConfigCheck()

CrFwBool_t CrFwAuxInStreamConfigCheck ( )

Check the configuration of the InStream component.

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

  • The inStream identifiers in array CR_FW_INSTREAM_SRC_PAIRS are smaller than CR_FW_NOF_INSTREAM
  • The source identifiers in array CR_FW_INSTREAM_SRC_PAIRS are greater than zero
  • The number of inStreams CR_FW_NOF_INSTREAM is greater than zero
  • The number of sources CR_FW_INSTREAM_NOF_SRC is greater than zero
  • The packet sizes in CR_FW_INSTREAM_PQSIZE are greater than zero
  • The number of groups CR_FW_INSTREAM_NOF_GROUPS is greater than zero
Returns
true if no errors are detected in the configuration data; false otherwise.

Definition at line 127 of file CrFwAux.c.

◆ CrFwAuxOutFactoryConfigCheck()

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 207 of file CrFwAux.c.

◆ CrFwAuxOutManagerConfigCheck()

CrFwBool_t CrFwAuxOutManagerConfigCheck ( )

Check the configuration of the OutManager component.

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

  • The number of OutManagers is greater than zero
  • The size of each POCL is greater than zero
Returns
true if no errors are detected in the configuration data; false otherwise.

Definition at line 355 of file CrFwAux.c.

◆ CrFwAuxOutRegistryConfigCheck()

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.
Returns
true if no errors are detected in the configuration data; false otherwise.

Definition at line 154 of file CrFwAux.c.

◆ CrFwAuxOutStreamConfigCheck()

CrFwBool_t CrFwAuxOutStreamConfigCheck ( )

Check the configuration of the OutStream component.

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

  • The outStream identifiers in array CR_FW_OUTSTREAM_DEST_PAIRS are smaller than CR_FW_NOF_OUTSTREAM
  • The destination identifiers in array CR_FW_OUTSTREAM_DEST_PAIRS are greater than zero
  • The number of outStreams CR_FW_NOF_OUTSTREAM is greater than zero
  • The number of destinations CR_FW_OUTSTREAM_NOF_DEST is greater than zero
  • The packet sizes in CR_FW_OUTSTREAM_PQSIZE are greater than zero
  • The number of groups CR_FW_OUTSTREAM_NOF_GROUPS is greater than zero
Returns
true if no errors are detected in the configuration data; false otherwise.

Definition at line 100 of file CrFwAux.c.

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