Each RTOS adapter consists of a concrete
operating system factory, which implements the abstract operating
system factory. To create the concrete factory for a new target:
Procedure
Create a specification file and an implementation
file, each prefixed by the operating system (environment) name using
the convention <env>OS,
where <env> is an abbreviation
for the environment name. For example, the adapter source files for
VxWorks are named VxOS.h and VxOS.cpp.
The concrete factory for the VxWorks environment is implemented in
these files.
Note: Use an existing implementation
as a starting point for the adapter. For example, if VxWorks is the
closest existing environment to the new target, copy and rename the VxOS.h and VxOS.cpp files
to use as a template. Make sure that all the adapter implementation
classes in these files are prefixed in a consistent manner. For example,
the concrete factory for VxWorks is named VxOSFactory.
Rename all environment-specific prefixes
in the copied files from the old to the new environment name. Using the operating system as a prefix for operating system
wrapper classes is an IBM® Rational® Rhapsody® convention;
you can create your own naming scheme.