Parsing Strings From a serial port

csharp , serial port , terminal , vt100 , parse string , data Newcastle upon Tyne, United Kingdom
  • 10 years ago

    Hi, thanks for taking the time to read my post. I am curently working on a project where I must capture serial port data which is usually displayed on a VT100 terminal from a Microcontroller, I have tried and failed using a regex to format the data correctly as I must get the name of the function and its value, idealy in to an array of object to utilies in the code. For the purpose of illustration please see the sample of data I am working with;

      :  0E                     1   IGBT Alarm #1     :  1E                     1   IGBT Alarm #2     :  1E                     0   IGBT Alarm #3     :  1E                     0   IGBT Alarm #4     :  1E                     0   IGBT Alarm #5     :  1E                     1   IGBT Alarm #6     :  1E                     1   IGBT Alarm #7     :  1E                     0   Digital Input #1  :  0EConfig Input #1   :  0   Digital Input #2  :  0EConfig Input #2   :  0   Digital Input #3  :  0EConfig Input #3   :  0   Digital Input #4  :  0EHardware Key #1   :  0   Digital Input #5  :  0EHardware Key #2   :  0   Digital Input #6  :  0EWatchdog Status   :  1   Digital Input #7  :  0ECard Type         :  1   Reverse Battery
    

    I am using C#.Net Famework 4, any advice, pointers etc would be very much appreciated.

    Thank you in advance.

    Robert.

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“I have always wished for my computer to be as easy to use as my telephone; my wish has come true because I can no longer figure out how to use my telephone” - Bjarne Stroustrup