1 / 16

Com Port API

Com Port API. Karl Riehl http://compsci.snc.edu/cs460/riehkf. Project Definition. Build a simple full featured serial port application interface. Project Requirements.

whitney
Download Presentation

Com Port API

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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?

More Related