System configuration information management functions maintain and manage various information related to system configuration.
A part of system configuration information including the information on the maximum number of tasks, timer interrupt intervals, etc. are defined as the standard definition. Other than these, any information arbitrarily defined in applications, subsystems, or device drivers can be used by adding it to the system configuration information.
The format of system configuration information consists of a name and defined data as a pair.
The name is a string of up to 16 characters. A character encoding is US-ASCII.
Characters that can be used (UB) are a to z, A to Z, 0 to 9 and '_' (underscore).
Data consists of numbers (integers) or character strings.
Characters that can be used (UB) are any characters other than 0x00 to 0x1F, 0x7F, or 0xFF (in character code).
How the system configuration information is to be stored is not specified here, but it is generally put in memory (ROM/RAM). This functionality is therefore not intended for storing large amounts of information.
System configuration information can be retrieved by tk_get_cfn and tk_get_cfs.
However, system configuration information cannot be added or changed during system execution.
There are tk_get_cfn and tk_get_cfs as API to retrieve system configuration information. These are callable from applications, subsystems, device drivers, etc. and are also used internally in the μT-Kernel.
Only when all the service profile items below are set to be effective, this API can be used.
Gets numeric information from system configuration information. This function gets up to max
items of numerical information defined for the name specified in the name
parameter and stores the acquired information in val
. The number of defined numeric information is passed in the return code. If return code > max
, this indicates that not all the information could be stored. By specifying max
= 0, the number of defined numeric values can be found out without actually storing them in val
.
E_NOEXS is returned if no information is defined for the name specified in the name
parameter. The behavior if the information defined for name
is a character string is indeterminate.
This function can be invoked from any protection level, without being limited to the protection level from which μT-Kernel/OS system call can be invoked.
Only when all the service profile items below are set to be effective, this API can be used.
Gets character string information from system configuration information. This function gets up to max
characters of character string information defined for the name specified in the name
parameter and stores the acquired information in buf
. If the acquired character string is shorter than max
characters, it is terminated by '\0' when stored. The length of the defined character string information (not including '\0') is passed in the return code. If return code > max
, this indicates that not all the information could be stored. By specifying max
= 0, the character string length can be found out without actually storing anything in buf
.
E_NOEXS is returned if no information is defined for the name specified in the name
parameter. The behavior if the information defined for name
is a numeric string is indeterminate.
This function can be invoked from any protection level, without being limited to the protection level from which μT-Kernel/OS system call can be invoked.
The following information is defined as standard system configuration information. A standard information name is prefixed by T.
Product information
Maximum number of objects
character string | Name of standard definition | Summary description |
---|---|---|
N | TMaxTskId | Maximum number of tasks |
N | TMaxSemId | Maximum number of semaphores |
N | TMaxFlgId | Maximum number of event flags |
N | TMaxMbxId | Maximum number of mailboxes |
N | TMaxMtxId | Maximum number of mutexes |
N | TMaxMbfId | Maximum number of message buffers |
N | TMaxMpfId | Maximum number of fixed-size memory pools |
N | TMaxMplId | Maximum number of variable-size memory pools |
N | TMaxCycId | Maximum number of cyclic handlers |
N | TMaxAlmId | Maximum number of alarm handlers |
N | TMaxSsyId | Maximum number of subsystems |
N | TMaxSsyPri | Maximum number of subsystem priorities |
Other
character string | Name of standard definition | Summary description |
---|---|---|
N | TSysStkSz | Default system stack size (in bytes) |
N | TSVCLimit | Lowest protection level for system call invoking |
N | TTimPeriod | Timer interrupt interval (in milliseconds) Timer interrupt interval (in microseconds) |
The actual length of timer interrupt interval is a sum of time in milliseconds and time in microseconds. The interval in microseconds is assumed to be 0 when omitted.
For example, when timer interrupt interval should be 5 milliseconds, describe as "TTimPeriod 5" or "TTimPeriod 0 5000". When timer interrupt interval should be 1.5 milliseconds (1,500 microseconds), describe as "TTimPeriod 1 500" or "TTimPeriod 0 1500".
device management function
character string | Name of standard definition | Summary description |
---|---|---|
N | TMaxRegDev | Maximum number of device registrations |
N | TMaxOpnDev | Maximum device open count |
N | TMaxReqDev | Maximum number of device requests |
N | TDEvtMbfSz | Event notification message buffer size (in bytes) Maximum event notification message length (in bytes) |
If TDEvtMbfSz is not defined or if the message buffer size is a negative value, an event notification message buffer is not used.
When multiple values are defined for any of the above numeric strings, they are stored in the same order as in the explanation.