[Development] [qtserialbus]PeakCAN plugin support for macOS

André Hartmann aha_1980 at gmx.de
Wed Jul 4 22:21:47 CEST 2018


Hi Miklos,

thanks for your interest in QtSerialBus!

 > - Are there any interest of upstreaming such a patch?

Of course. We don't have any macOS support for now, so this would 
greatly improve the situation.

 > - The library named differently (PCBUSB vs. pcanbasic). This issue can
 > be easily resolved by a simple ifdefs. I have consulted with the
 > author an he said he is not planning to change the name to pcanbasic
 > (since it is a different library).

That would be fine with me.

 > - The official pcanbasic API uses some non fixed sized types (DWORD,
 > long etc.) and the same types were used in the PCBUSB too. The ID
 > fields of the CAN messages (and another data fields int the API)
 > defined as DWORD which is unsigned long in the PCBUSB headers. This
 > type is compiled to 64 bit wide integer on 64 bit macOS
 > 
<https://developer.apple.com/library/archive/documentation/Darwin/Conceptual/64bitPorting/transition/transition.html>, 

 > while in the peakcan_symbols_p.h
 > 
<https://github.com/qt/qtserialbus/blob/5.11/src/plugins/canbus/peakcan/peakcan_symbols_p.h#L251> 

 > it is defined as a quint32. This could be also workarounded by some
 > ifdefs.

Maybe we can introduce a special type for this, that maps to the 
different OS specific types - could be best decided when we have actual 
code to discuss (in Gerrit).

Are you already familiar with code submission to Qt? If not, please read 
http://wiki.qt.io/Gerrit_Introduction first and ask here if you have 
further questions.

If you have specific questions to QtSerialBus you can mail me directly. 
It may just take some time as I'm in vacation, and I can't support you 
with macOS specific issues, but otherwise I'm glad to help.

Regards,
André

Am 04.07.2018 um 22:11 schrieb Miklos Marton:
> Hello all,
> 
> We are using the qtserialbus for developing some internal tools 
> communicating with devices via PEAK CAN adapters and there were some 
> interest of getting it working on macOS.
> 
> The PEAK Systems does not offer official API for their products on MAC, 
> however there is a 3rd party developer who builds an API which is 
> --nearly-- compatible with the pcanbasic API:
> 
> http://www.mac-can.com/
> 
> I would like to raise some discussion on them before submitting a patch.
> 
> - Are there any interest of upstreaming such a patch?
> 
> I have came over the following issues with getting it working on MAC:
> 
> - The library named differently (PCBUSB vs. pcanbasic). This issue can 
> be easily resolved by a simple ifdefs. I have consulted with the author 
> an he said he is not planning to change the name to pcanbasic (since it 
> is a different library).
> 
> - The official pcanbasic API uses some non fixed sized types (DWORD, 
> long etc.) and the same types were used in the PCBUSB too. The ID fields 
> of the CAN messages (and another data fields int the API) defined as 
> DWORD which is unsigned long in the PCBUSB headers. This type is 
> compiled to 64 bit wide integer on 64 bit macOS 
> <https://developer.apple.com/library/archive/documentation/Darwin/Conceptual/64bitPorting/transition/transition.html>, 
> while in the peakcan_symbols_p.h 
> <https://github.com/qt/qtserialbus/blob/5.11/src/plugins/canbus/peakcan/peakcan_symbols_p.h#L251> 
> it is defined as a quint32. This could be also workarounded by some ifdefs.
> 
> Thank you for your feedback in advance!
> 
> -- 
> Best regards,
> Miklos Marton
> 
> 
> 
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
> 




More information about the Development mailing list