Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Using SerialPort from org.eclipse.cdt.native.serial


From: <cdt-dev-bounces@xxxxxxxxxxx> on behalf of "Alexiev, Dobrin" <dalexiev@xxxxxx>
Reply-To: "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
Date: Tuesday, November 24, 2015 at 11:19 AM
To: "cdt-dev@xxxxxxxxxxx" <cdt-dev@xxxxxxxxxxx>
Subject: [cdt-dev] Using SerialPort from org.eclipse.cdt.native.serial

Hello,

 

I was wandering if the public methods of class SerialPort from the plugin org.eclipse.cdt.native.serial is a public API, than can be used by other plugins?


Yes they are.

 

If this class is an API:

Are the Strings retuned by list() to be used directly to open the COM ports?


Yes.

In the Windows implementation, It works for COM1 and COM3, but for COM40 it failed.

Looks like there is some path massaging that needs to be: instead of “COM40” I need to pass “\\.\COM40”.

Here is a bit info on this: http://stackoverflow.com/questions/11775185/open-a-com-port-in-c-with-number-higher-that-9


Interesting. I did’t know that. So far I’ve only used it with COM ports up to about 6.

 

Is this something that the clients should do, or it should be inside the class implementation?


If it’s the standard way of handling these ports, they should be returned in the list that way. As you mention, the strings are supposed to be fed back to the open call as is. Please raise a bug against cdt-core and if you have a chance to work on a patch, be appreciated :).

Thanks for finding this Dobrin!

 

Thanks

Dobrin

 


Back to the top