9

How to do a serial port programming in Visual Studio C ++ that is portable betwe...

 3 years ago
source link: https://www.codesd.com/item/how-to-do-a-serial-port-programming-in-visual-studio-c-that-is-portable-between-windows-linux.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

How to do a serial port programming in Visual Studio C ++ that is portable between Windows & Linux?

advertisements

I'm writing a test program that need to access serial port. I'm doing it in Visual studio 2012 now, but I want to port to Linux later. (For using in my Pandaboard)
Can you suggest me a way to access serial port that has almost the same interface between Win & Linux?
I used to do it in Labview, but now I want to turn to C++
Thank you so much for your help!


Boost.ASIO is well-documented, well-tested, has been peer reviewed by thousands of people, and fully supports serial port communication in a cross-platform manner. Specific documentation can be found here.

That being said, it does assume a moderate skill level in modern C++, so if you're new to the language then the learning curve may be a bit steep.

Related Articles

How to debug a C # .NET application in Visual Studio 2010 that starts from another process

I have a .NET GUI application written in C# and a PDF printer. The PDF printer has a field where you can set a command to start an external application. In this case, I can print a document with this printer and the printer starts my EXE file with th

VB6 Serial Port Programming

I'm not much experienced in VB6 serial port programming. I need to control another circuit through serial port. (I have heard that pin 4 and pin 7 are used for that purpose. If these pins are incorrect please tell me what pins are used for such purpo

Writing to a serial port (Com) in Visual C ++

I have a device that is connected on port COM4, (115200 baud, 8-N-1). Based on examples I found here I'm opening the port with: Keyboard_Handle=CreateFile("\\\\.\\COM4",GENERIC_WRITE,0,NULL,OPEN_EXISTING,FILE_FLAG_OVERLAPPED,NULL); if(GetLastErr

How can I debug a program with Visual Studio 2010?

Windows offers me the possibility do debug a program with Visual Studio 2010 when an "unhandled exception" or another program fault occurs. However, I would like to debug a program I have written in VB6 with Visual Studio 2010, even when it does

& Ldquo; Step over & rdquo; When debugging multithreaded programs in Visual Studio

One thing that annoys me when debugging programs in Visual Studio (2005 in my case) is that when I use "step over" (by pressing F10) to execute to the next line of code, I often end up reaching that particular line of code in a totally different

How to compile, build, and debug MASM using Visual Studios Standard 2005

I am trying to compile, build and debug 16-bit assembly programs using Visual Studio 2005 Standard but can't figure out how to do this. I am running MASM 6.14.8444 version and I have found some helpful links which do not seem to work at least not for

How to read SQL Server table columns in Visual Studio?

In Microsoft Access functions like DLookup - DMax or Dcount help the programmer to read a column from a table of a SQL Server database. How do you do the same task in Visual Studio? For example how can I find the ID of a user (John) in tblUsers table

How to configure Vim to compile using the Visual Studio 2010 C ++ compiler?

I can compile from the command line by running vcvarsall.bat, then running cl.exe with my source file as the only argument. The problem is that just running cl.exe without first setting up the environment using the aforementioned batch file causes er

How to run the c # visual studio project created in ubuntu in Windows 10

I've got a problem with Visual Studio console application created in Ubuntu 15.04. When I try to run c# program in Visual Studio in Windows 10 my project doesn't load. How to fix that? I created from hand csproj: http://pastebin.com/NmLMK0hDIt would

How to publish to multiple Web sites in Visual Studio in a batch

How can I deploy multiple websites in a visual studio in a batch on single click; either using GUI or command line Update: I think some people have misunderstood my question. Let me try again. I want to publish my website to multiple subdomains(nearl

How do I script the deployment of a Visual Studio database project?

How can I script the deployment of a Visual Studio database project? I have a DB project in visual studio and I would like to use it in order to deploy on remote machines via a script. I notice that when I 'deploy' from visual studio, it generates a

How to enable the C ++ 11 compiler on Visual Studio 2010 express edition?

I am using tbb::parallel_for function which make use of lambdas. I am getting syntax errors with the following code: void parallel_relax( Class object, std::vector<Vertex *> verList ) { tbb::parallel_for (blocked_range<int>(0, verList.size()),

How do I get Silverlight Add-On for Visual Studio 2010 and a sample code?

How do I get the Silverlight Add-On for Visual Studio 2010? And where can I find lots of example code? When the interent and html was new, one could find examples of how to build a website on a few trusted web sites. The same web sites might not be t

How do I connect to a database in Visual Studio

How can I connect to a database in Visual Studio with Entity Framework? I have a database: But in visual studio I don't know what I must enter. I have a window: Can You say what I must write there? I tried many times and I still have error.A dot (aka

Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK