Crinit -- Configurable Rootfs Init
confmap.h File Reference

(2023-08-02, commit: 9434b31)

Definitions related to mapping configuration options and their string representations. More...

#include "confhdl.h"
Include dependency graph for confmap.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  crinitConfigMapping_t
 

Typedefs

typedef struct crinitConfigMapping_t crinitConfigMapping_t
 

Functions

const crinitConfigMapping_tcrinitFindConfigMapping (const crinitConfigMapping_t *map, size_t mapSize, const char *keyStr)
 

Variables

const crinitConfigMapping_t crinitTaskCfgMap []
 
const size_t crinitTaskCfgMapSize
 
const crinitConfigMapping_t crinitSeriesCfgMap []
 
const size_t crinitSeriesCfgMapSize
 

Detailed Description

Definitions related to mapping configuration options and their string representations.

Typedef Documentation

◆ crinitConfigMapping_t

A structure defining a mapping between a configuration option, its string respresentation, and further properties.

Function Documentation

◆ crinitFindConfigMapping()

const crinitConfigMapping_t* crinitFindConfigMapping ( const crinitConfigMapping_t map,
size_t  mapSize,
const char *  keyStr 
)

Searches for an entry in an array of crinitConfigMapping_t by crinitConfigMapping_t::configKey.

Uses bsearch() with the assumption that the array is lexicographically ordered by crinitConfigMapping_t::configKey.

Parameters
mapThe array of crinitConfigMapping_t to search in.
mapSizeThe number of elements in the array to search.
keyStrThe name of the mapping to search for.

Variable Documentation

◆ crinitSeriesCfgMap

const crinitConfigMapping_t crinitSeriesCfgMap[]
extern

Constant (at compile-time) array of mappings between series/global configuration names and their indices and properties.

Must be lexicographically ordered (by crinitConfigMapping_t::configKey), so that crinitFindConfigMapping() works. This is tested by a unit/regression test.

◆ crinitSeriesCfgMapSize

const size_t crinitSeriesCfgMapSize
extern

Size of crinitSeriesCfgMap, known at compile-time.

◆ crinitTaskCfgMap

const crinitConfigMapping_t crinitTaskCfgMap[]
extern

Constant (at compile-time) array of mappings between task-specific configuration names and their indices and properties.

Must be lexicographically ordered (by crinitConfigMapping_t::configKey), so that crinitFindConfigMapping() works. This is tested by a unit/regression test.

◆ crinitTaskCfgMapSize

const size_t crinitTaskCfgMapSize
extern

Size of crinitTaskCfgMap, known at compile-time.