Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. RS232 Comms with WideTrack

RS232 Comms with WideTrack

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++data-structuresquestionworkspace
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    Dear Sirs, I must receive serial bytes in a MFC proyect using a WideTrack buffer (as Greenleaf Comms lib calls it); with every byte I must receive its error status (parity error, frame error) so that I can discard it. The proyect is a propietary protocols monitor in a noisy environment (radio comunications). I've tried to use alternative techniques as to use the error message that comes every time an erroneous byte arrives, but the problem is I'm unable to identificate which one in the waiting queue is the bad one. Can you help me? T.I.A.

    J 1 Reply Last reply
    0
    • L Lost User

      Dear Sirs, I must receive serial bytes in a MFC proyect using a WideTrack buffer (as Greenleaf Comms lib calls it); with every byte I must receive its error status (parity error, frame error) so that I can discard it. The proyect is a propietary protocols monitor in a noisy environment (radio comunications). I've tried to use alternative techniques as to use the error message that comes every time an erroneous byte arrives, but the problem is I'm unable to identificate which one in the waiting queue is the bad one. Can you help me? T.I.A.

      J Offline
      J Offline
      Joaquin M Lopez Munoz
      wrote on last edited by
      #2

      Haven't checked this, but maybe you can set the size of input buffer to 1 (with SetupComm) to make it easier to sync bytes received and error messages. Also, the UART has an internal buffer of its own (see Control Panel->System->your COM port->Properties->Configuration->Advanced) that you might want to set down to the minimum. Tell us back if something along this line works. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

      M 1 Reply Last reply
      0
      • J Joaquin M Lopez Munoz

        Haven't checked this, but maybe you can set the size of input buffer to 1 (with SetupComm) to make it easier to sync bytes received and error messages. Also, the UART has an internal buffer of its own (see Control Panel->System->your COM port->Properties->Configuration->Advanced) that you might want to set down to the minimum. Tell us back if something along this line works. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

        M Offline
        M Offline
        Mark Terrano
        wrote on last edited by
        #3

        Not sure if I understand the original question exactly or not, but etting the UART to the minimum might be a problem if he can't service the comm before the next character comes in - with Windows this is probably a fairly likely thing and the reason there is a buffer there - it will just be overwritten. You can probably get away with it if the speeds are low - but it seems like you are asking for compatibility problems (i.e. it fails a lot with Winmodems or Cable Modems) if you do this. Can you read the bytes into an intermediate buffer, throw your error if and when you need to, and only pass clean (that pass your test) bytes on to the application? --Mark Terrano www.ensemblestudios.com (Creators of the Age of Empires series)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups