The AbstractLayer package
defines classes that describe basic operations and entities used by
the operating system, including the following:
- OMOSThread provides basic threading
features. It provides two create thread methods so you can create
either a simple thread or a wrapper thread.
- OMOSMessageQueue allows independent
but cooperating tasks (active classes) within a single CPU to communicate
with each other.
- OMOSTimer acts a building block
for OMTimerManager, which provides basic timing services for the execution
framework.
- OMOSMutex protects critical sections
within a thread using binary mutual exclusion. Mutexes are used to
implement protected objects.
- OMOSEventFlag synchronizes threads.
Threads can wait on an event flag by calling wait.
When some other thread signals the flag, the waiting threads proceed
with their execution.
- OMOSSemaphore allows a limited
number of threads in one or more processes to access a resource. The
semaphore maintains a count of the number of threads currently accessing
the resource.
- OMOSSocket represents the socket
through which data is passed between IBM® Rational® Rhapsody® and
an instrumented application.
- OMOSConnectionPort used for interprocess
communication between instrumented applications and Rational Rhapsody.
- OMOSFactory provides abstract
methods to create each type of operating system entity. Because the
created classes are abstract, the factory hides the concrete class
and returns its abstract representation. The factory is implemented
as a static global variable to ensure that only one instance of a
given OSFactory can exist.
The operating-specific header files implement
the abstract classes defined by AbstractLayer package
for the target system. See the OSAL methods for
a list of all methods and their definitions.