FILE DESCRIPTIONS and COMPILATION SETTINGS

The following section briefly describes all the files that make up both the SRMS Service and the real-time task applications.  It also details the special linked libraries and compilation settings required to build their executables.  For now, the code files and the SRMS API files are compiled together during the building of the executables.  Ideally, the SRMS API functions would be located separately in a shared dynamic link library.   That way, the SRMS service and any task processes could link to this library dynamically instead of including the code files (taskapi.c and taskapi.h) in the compilation of each executable as it is now.  A shared DLL would also facilitate upgrading and versioning much more easily.  Due to time constraints, this feature will be implemented with a later version. 

WHERE TO FIND THE CODE:

The latest version of all files included in SRMS service are stored on the Windows NT cluster at the Boston University Computer Science Department, in the Graduate Lab at 111 Cummington Street, Boston, Massachusetts.  More specifically, they reside on the machine named 'SEVEN' at the path: C:\Program Files\SRMS-NT.  The compiled executable for the SRMS service can be found at C:\Program Files\SRMS-NT\Debug\srms.exe.  The compiled executables for the five sample task applications used in this project can be found on the same computer at C:\Program Files\SRMS-NT\task*\Debug\task*.exe, where the wildcard asterisk represents the numbers 1-5.  All information is dated as of July 26, 1999.


SRMS SERVICE FILES AND SETTINGS:

All files in the SRMS service application are coded in C using the Microsoft Win32 API and programmed in the Microsoft Visual C++ v. 5.0 environment. The application consists of the following fifteen files, and together, they make up the srms.exe executable file. 

mainapp.c
main application window, message loop, default message handler function, handles most interface controls
rt.c
SRMS scheduler and all related functions, QoS admission thread function, all SRMS related functions
calcsrms.c
All QoS negotiation functions to calculate QoS and allowance values
dialogs.c
all dialog box handler functions
systask.c
NT system task thread and worker functions (very similar to task.c)
taskapi.c
SRMS API functions used by systask.c
taskapi.h
Header file for taskapi.c
srms.h
Header file used by the SRMS application (included in funcs.h)
rt_task.h
Header file common to both the SRMS application and SRMS API
taskset.h
Header file containing path strings for task executables, task names, etc. (used in mainapp.c)
funcs.h
Header file for SRMS application
resource.rc
Resource file containing the main menu, all dialog boxes, application icon bitmap
resource.h
Header file for resource.rc used by SRMS application
errcodes.h
Special error codes specific to the handle_error() function found in mainapp.c
srmsicon.ico
SRMS icon bitmap file

Compilation: All fifteen files are included in the same project space in Visual C++. To enable support for the multimedia timer,  the winmm.lib multimedia library is included in the list of files that are linked during the building of the executable. The following preprocessor definitions are required for proper compilation:

_WIN32_WINNT=0x0400,WIN32,_DEBUG,_WINDOWS,SRMS


REAL-TIME TASK FILES AND SETTINGS:

The sample task applications consist of the following six files which are also coded in C using Win32 and programmed in Visual C++ 5.0. Together, they make up the task.exe executable file.

Task.c Task thread and periodic work function
Task.h Task-specific real time settings, like period, minimum QoS, size of sample execution array, etc.
Taskapi.c SRMS API functions used by task.c
Taskapi.h Header file for taskapi.c
Taskset.h Header file containing path strings for task set executables, task set names, etc. (used by task.c)
Rt_task.h Header file containing flags, strings, and structures common to both the SRMS application and SRMS API

Compilation: All six files are included in the same project space in Visual C++.   To enable support for the multimedia timer, the winmm.lib multimedia library is included in the list of files that are linked during the building of the executable.  The following preprocessor definitions are required for proper compilation of the task processes included in this project.

WIN32,_DEBUG,_CONSOLE,_MBCS,TASK1,SRMS_DEBUG

Since the five task processes used in this implementation are all Win32 Console applications, the Visual C++ compiler automatically includes the first four standard preprocessor definitions listed above. The last two definitions are specific to the task process. The 'TASK1' definition is used by the preprocessor in the taskset.h file to determine which header file to include for task.c. By design, all tasks used in the task set use the same task.c file so this preprocessor definition is used by taskset.h to determine which header file to include for task.c. Since the above definition list is an example copied from task1's compilation settings, the preprocessor will include task1's header file (as long as its relative path is listed in the taskset.h file). All of this is purely a matter of design choice and convenience for myself during creation of this project. Also, the SRMS_DEBUG definition is used if the user wants debugging statements to be printed to the task's console window.

< Back to the SRMS Service Home Page >