CS 395 Project: Integrating New Code
802.11 MAC Implementation
Overview
For the final phase of the project, you must incorporate new versions of rf.c
and the the I/O routines. Follow this link for copies of all the new code.
New RF Code
There are two key improvements in the RF layer code. First, it's integrated with the new I/O code so that an indicator is automatically displayed when the channel is in use. Second, it's been modified to improve the response time of RF_InUse
. These modifications make it incompatible with the previous RF layer, so your code won't communicate correctly with applications using an earlier version. The interface is unchanged though, so it should be a drop-in replacement.
New I/O Code
The dialog.c package has been split into two independent components: console.c
, which implements the scrolling text window and WriteText
, and dialog.c
which now just provides the collection of dialog boxes. The code in console.c
is enhanced in a number of ways. It now supports a non-scrolling status line and an in-use indicator in addition to the main scrolling text window. The performance of the code that manages scrolling has been significnatly improved as well. Switching over to the new code requires the following changes:
- Add an #include for console.h in all files that use the output routines.
- Replace the call to
Dialog_Scroll
inmain.c
withConsole_Scroll
. - Replace
Init_Dialogs
with a call toDialogs_Init
andConsole_Init
. - Replace
Dest_Dialogs
with calls toDialogs_Dest
andConsole_Dest
. (If you weren't calling the destructor in your code, make sure you add these destructor calls just before your application exits.) - Edit the makefile so that
console.o
is added to the project. - Copy
filer.list
,on.pic
, andoff.pic
into the res subdirectory.
You can display text on the single status line by calling WriteStatus. It takes the same arguments as WriteText
, but truncates the output at 25 characters.
Brad Richards 2002