Download presentation
Presentation is loading. Please wait.
1
Com Port API Karl Riehl http://compsci.snc.edu/cs460/riehkf
2
Project Definition Build a simple full featured serial port application interface.
3
Project Requirements Modules in the driver for the API will offer most all of the primary features for controlling the port including (but not limited to) functions that open, close, read, write, and allow buffered and event processing. Design simple test routines that users can easily check the com port in new environments. The API uses standard C procedural protocols.
4
Project Requirements cont. Test the API on the Visual 6 software development platform as well as the Visual.NET software development platform. Also, test the API using several USB to COM adaptors.
5
Solutions The API Functions affecting –Open –Close –Read –Write –Buffers –Properties
6
Solutions cont. Sample procedures to check in new environments API works in C++, VB6, and C# Able to incorporate the Serial to USB adapter
7
Exceptions Event Processing –Taken off as requirement
8
Methodology Main Structures Used –DCB –COMSTAT –COMMTIMEOUTS
9
Methodology cont. Created functions in a C program Compiled Often Continually Testing and Debugging Moved to dll Started moving into other languages Change data types as needed
10
Methodology cont. Event Include Statements Main { OpenPort StartThread Continue With Code } SomeFunction() { WaitCommEvent Read Deal With Data }
11
Demonstrations
12
Strategies Get Good Base –Start with Open and Close Built up the functions from there Trial and Error in New Languages MSDN – Best Friend Visual Studio Help Files Random Websites
13
Knowledge Data Structures Operating Systems Debugging Problem Solving
14
Extensions Event Processing Create class or object in.NET
15
Advice for Class of 2006 START EARLY!!!! Allow for extra time –rarely works correctly the first time Save Frequently in VB Keep an archive Meet with Professors
16
Questions?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.