Slide 1 Slide 2 Slide 3 Slide 4 Slide 5 Slide 6 Slide 7 Slide 8 Slide 9 Slide 10 Slide 11 Slide 12 Slide 13 Slide 14 Product List
SYS/BIOS: Introduction to Real-Time Operating Systems Slide 8

As mentioned before the BIOS is delivered as a set of RTSC packages. RTSC provides naming conventions for packages. This is beneficial because it aids in the readability of the source code that reference these packages and what the packages define. So a person reading the code can easily tell what is a configuration parameter versus a constant and so forth. It also avoids the occurrence of name-space collisions, in which packages from different providers name something identically, leading to build or runtime issues. The most conspicuous part of this is RTSC’s use of a name hierarchy separated by dots. A typical application of this is to have the names for the vendor, product, module and submodule all present. This may all be pretty familiar to developers who have worked in the Java programming environment. This slide shows some examples. The name ti.sysbios.knl has been defined and by beginning the name with the vendor (which in this case is TI), it has all but eliminated the chance of someone else coming in with the same name for a package. Package names are lower case. Below that the knl package contains a module called Clock. Module names all begin with an uppercase letter. Type names are title cased, constants start with their module name and an underscore and then uppercase for the rest. Camel case is used where needed to delimit multiword names. One additional benefit of the RTSC naming convention is that it is used to reflect how components are installed on a file system. For example, if the SYS/BIOS in the default directory is installed, the user would be able to find the knl package under the BIOS packages folder \ti\sysbios\knl. This makes things a lot easier to find.

PTM Published on: 2012-09-20