tk_ref_ver
Reference Version Information
ER ercd = tk_ref_ver ( T_RVER *pk_rver ) ;
T_VER* pk_rver Start address of version information packet
[Return Parameters]
ER ercd Error code
pk_rver detail:
UH maker T-Kernel maker code
UH prid T-Kernel ID
UH spver Speci.cation version
UH prver T-Kernel version
UH prno4 T-Kernel products management information
E_OK Normal completion
E_PAR Parameter error (the return parameter packet address cannot be used)
Gets information about the T-Kernel version in use, returning that information in the packet specified
in pk_rver. The following information can be obtained.
maker is the maker code of the T-Kernel implementing vendor. The maker .eld has the format shown
in Figure 4.11.
Figure 4.11: maker Field Format
prid is a number indicating the T-Kernel type. The prid format is shown in Figure 4.12.
Assignment of values to prid is left up to the vendor implementing T-Kernel. Note, however, that this is the only number distinguishing product types, and that vendors should give careful thought to how they assign these numbers, doing so in a systematic way. In that way the combination of maker code and prid becomes a unique identifier of the T-Kernel type.
Figure 4.12: prid Field Format
The upper 4 bits of spver give the TRON speci.cation series. The low 12 bits indicate the T-Kernel speci.cation version implemented. The format of spver is shown in Figure 4.13.
If, for example, a product conforms to the T-Kernel speci.cation Ver 1.02.xx, spver is as follows.
MAGIC = 0×7 (T-Kernel)
SpecVerS = 0×102 (Ver 1.02)
Spver = 0×7102
If a product implements the T-Kernel speci.cation draft version Ver 1.B0.xx, spver is as follows.
MAGIC = 0×7 (T-Kernel)
SpecVerS = 0×1B0 (Ver 1.B0)
Spver = 0×71B0
MAGIC: A number identifying the TRON speci.cation series
0×0 TRON common (TAD, etc.)
0×1 ITRON1, ITRON2
0×2 BTRON
0×3 CTRON
0×4 reserved
0×5 µITRON
0×6 µBTRON
0×7 T-Kernel
SpecVer: The version of the TRON speci.cation on which the product is based. This is given as a three-digit packed-format BCD code. In the case of a draft version, the letter A, B, or C may appear in the second digit. In this case the corresponding hexadecimal form of A, B, or C is inserted.
Figure 4.13: spver Field Format
prver is the version number of the T-Kernel implementation. The specific values assigned to prver are left to the T-Kernel implementing vendor to decide. prno is a return parameter for use in indicating T-Kernel product management information, product number or the like. The specific meaning of values set in prno is left to the T-Kernel implementing vendor to decide.
The format of the packet and structure members for getting version information is mostly uniform across the various TRON specifications, but the CPU information and variation descriptors are not specified. The value obtained by tk_ref_ver in SpecVer is the .rst three digits of the speci.cation version number. The numbers after that indicate minor revisions such as those issued to correct misprints and the like, and are not obtained by tk_ref_ver. For the purpose of matching to the speci.cation contents, the .rst three numbers of the speci.cation version are suffcient.
An OS implementing a draft version may have A, B, or C as the second number of SpecVer. It must be noted that in such cases the speci.cation order of release may not correspond exactly to higher and lower SpecVer values. For example, specifications may be released in the following order:
Ver 1.A1 ( Ver 1.A2 ( Ver 1.B1 ( Ver 1.C1 ( Ver 1.00 ( Ver 1.01 ( …
In this example, when going from Ver 1.Cx to Ver 1.00, SpecVer goes from a higher to a lower value.

Comments