Serial Communications A C++ Developers Guide 2nd Edition

July 7, 2009 at 12:00 am Leave a comment

 

Serial Communications:
A C++ Developers Guide,
2nd Edition
by Mark Nelson
IDG Books Worldwide, May 2000
ISBN 0-76454-570-1
864 pages.
List price in the US is $49.99

First Edition

The page for the first edition is still on line. You can read it at this link. The first edition has been out of print for some time, so you probably wont find this page much use. 

Availability

Unfortunately, this book is out of print. However, you can frequently find used copies available on Amazon.com for reasonable prices. Be sure to order the second edition. If you use the link posted here, you will be helping me with the costs of keeping this web site up and running. Thanks!    

Errata

The 32 bit code in this book was developed for the most part with Visual C++ 5. Readers have run into a few compiler glitches with Visual C++ 6. If you use VC++ 6, please be sure to apply all of Microsofts service packs. At this time, the latest is SP3. You can download these from the Microsoft web site. (Id provide a link, but Microsoft changes their web page often enough to make this an exercise in frustration. 

Chapter 1

Figure 1-5 on Page 10 has an extra 0 bit in the middle of the world. There should be a string of 5, not six. Heres an improved version of the image:
 

Chapter 11

Win32Port.h 
If you are developing for a Windows 2000 target, or for NT 4 with SP3 or later, you will need to modify a single line in Win32Port.h. Around line 76 of this file, you will find a line of code that looks like this: 

C++:

  • enum { EV_RINGTE = 0x2000 }
  •  
    Change it to look like this: 

    C++:

    1. enum { EV_RINGTE = 0 }

     
    This flag is used to get the serial driver to report changes on the input RLSD (ringer) control line under Windows 9X. This undocumented feature allows things to work properly in that environment, but breaks things under Windows 2000. 
    Keep in mind that if you make this change, your program wont respond to incoming rings under Win32, unless you watch for “RING” messages coming from your modem. (Watching for messages is probably a better way to do it in general, so maybe its time to change!) 

    If you are deploying your code on both Windows 2K and Windows 9X, you might want to create a more general purpose solution by determining whether or not to use the EV_RINGTE mask at runtime, based on detection of the O/S type. 

    Win32Port.cpp

    I botched the definition of a loop in this code, and despite the compiler warning, I failed to note the problem until alerted by several readers. 
    The loop in output_worker() used to start like this: 

    C++:
    1. for ( bool done = false ; ; !done ) {

    Now it starts like this: 

    C++:

    1. for ( bool done = false ; !done ; ) {

    Chapter 12

    For some reason, the publisher decided to leave this chapters executable off the CD-ROM. This shouldnt be a big deal, since you ought to be able to build it with the included project file. But, just in case you cant, here is the executable. Note that this is built with debug options turned off. 

    Chapter 13

    There are a few errors that showed up in this project in Visual C++ 6. They are all related to minor changes in header files or the way the compiler parses them. 
    Win32Term.cpp 
    In Win32Term::Paint(), a call to SelectObject() needed a cast of the return type before it could be assigned to hOldFont. The line was: 

    C++:

    1. HFONT hOldFont = SelectObject( hDC, m_hFont ) ;

    It is now 

    C++:

    1. HFONT hOldFont = (HFONT) SelectObject( hDC, m_hFont );

    Win32Term.h 
    I use a pragma in this header file to turn off compiler warnings for error C4786, which are unavoidable, and are really pointing to problems in the compiler, not in my code. In VC++ 6, the pragma has to be moved to be ahead of the #include for header file vector. The resulting code now looks like this: 

    C++:

    1. //
    2. // The vector<vector<>> variables in this class
    3. // end up with incredibly long expanded names. This
  • // pragma disables the associated warnings
  • //
  • #pragma warning( disable : 4786 )
  •  
  • #include <windows.h>
  • #include <vector>
  • using namespace std;
  •  

    Download changed files

    Win32Term.cpp
    Win32Term.h
    Win32Port.cpp
    Win32Port.h 
    You should be able to build the new executable by coping these files to the correct locations. 

    Chapter 16

    Bill Jacques noticed that the SendSingleFile() function in Zmodem.cpp gets stuck in an infinite loop if the remote end has an allocation problem. He sends an update of the function (as a Word Doc.) Bill wrote a Win32-specific version of the function, so dont try to include this code if you are running in some other environment. 
    You will have to replace the existing function in Zmodem.cpp.

    Entry filed under: Communications. Tags: .

    A-301 High Voltage Amplifier/ Piezo Driver and Modulator2

    Leave a Reply

    Fill in your details below or click an icon to log in:

    WordPress.com Logo

    You are commenting using your WordPress.com account. Log Out / Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out / Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out / Change )

    Google+ photo

    You are commenting using your Google+ account. Log Out / Change )

    Connecting to %s

    Trackback this post  |  Subscribe to the comments via RSS Feed


    Stats

    • 40,944 hits

    من محتويات الموقع

    كثرت إصدارات الماسنجر وتبعثرت بتشاتها وبرامجها .. فالبعض يبحث عن جديد الماسنجر .. والبحض يبحث عن ماسنجر 7.5 .. ماسنجر هوتميل والبعض يبحث عن ماسنجر 7 نحن نوجهك إلى تحميل برنامج ماسنجر بلس مسنجر 9 برنامج الماسنجر الجديد هوتميل تسعة ... برنامج ماسنجر هوتميل بلس لاصدار ماسنجر لايف 9 ماسنجر,ماسنجر بلص,تحميل الماسنجر,ماسنجر 8,صور ماسنجر,اصدارات الماسنجر و ما قبله من اصدارات.. تحميل مسنجر مسنجر بلس مسنجر 9 مسنجر ياهو مسنجر لايف تنزيل مسنجر messenger اقلاع سوفت messenger + msn + hotmail download msn messenger hotmail msn web messenger hotmail msn messenger without hotmail msn messenger und hotmail telecharger msn messenger hotmail msn hotmail messenger mac Internet turbo 2009 ,جديد البرامج و الإنترنات ,1waw.com ,Download parameg FOR MOBILE TORRENT ,كشف الملفات التالفه في الويندوز ,فضل برنامج للصور المتحركة عربي ,فتح محطات ART الفضائية ,Firefox ,برامج تشغيل الملفات ,تحميل أقوى مشغل ملفات flv ,تحميل برنامج مجانا internet download manager ,Fotos+do+sound+forge ,NLite ,كول اديت ,Free arc لفك الضغط ,تنزيل ساعة على سطح مكتب الكمبيوتر ,برنامج تحويل الفيديو يوتيوب الى 3gp ,تنزيل برنامج لفتح الاناشيد ,Fotos+do+sound+forge ,برامج كمبيوتر للفيروسات ,Six free mp3 ,تحويل pdf الي word ,نوع الفيديو للبرو جولد ,تحميل برنامج Passware Kit Enterprise ليش نسخة Demo ,Ares+tube ,Image banner maker ,Kmp 2007 ,تنزيل برنامج لتشغيل اناشيد mp3 ,برنامج مشاهدة القنوات الفضائية ,موقع تحميل الانتي فايروس 2010 ,تنزيل المتصفحات الجديدة ,Download free Revo Uninstaller 2.1.5.0 ,تشغيل كاميرا nokia pc suite ,Zib password remova l برنامج ,تحميل برامج تشغيل الفيديو ,تحميل برنامج عن طريق الجوال لمشاهده التلفزيون ,افلام يوتيوب للهاتف المحمول مجانا ,تسريع الانترنت ,Ares+tube ,برامج حماية من الفيروسات مجانية ,Antivir free download ,برامج نت ,كيفية التعامل مع الملفات المضغوطة ,كول اديت ,Kis 9.0.0.459 key ,برنامج الالة الحاسبة ,برنامج تغيير الأصوات للكمبيوتر من برامج نت ,برامج مشغلات الفيدبو كمبيوتر ,برنامج youtube لنوكيا 73

    %d bloggers like this: