opencpn:socketcan

Last commit made on 2022-10-11
Get this branch:
git clone -b socketcan https://git.launchpad.net/opencpn

Branch merges

Branch information

Name:
socketcan
Repository:
lp:opencpn

Recent commits

4c3aa0d... by Alec Leamas <email address hidden>

comm_drv_n0183_serial: wxThread -> std::thread

19d9007... by Alec Leamas <email address hidden>

tests: Add test of registry.CloseAllDrivers().

a9a7945... by Alec Leamas <email address hidden>

CommDriverN2KSocketCAN: Avoid recursive Close()

Close() might indirectly invoke the driver DTOR if the shared_ptr
in th registry is the last and only reference. Avoid the loop
Close() -> registry.Deactivate -> DTOR -> Close() in this case.

0111dae... by Alec Leamas <email address hidden>

registry: Deactivate drivers before clearing driver list.

2f57197... by Alec Leamas <email address hidden>

comm_drv_n2k_socketcan.cpp: Use std::vector to clean up.

794a79d... by Alec Leamas <email address hidden>

comm_drv_n2k_socketcan: Hide default constructor.

The comm_drv_n2k_socketcan uses std::enable_shared_from_this. This
means that all instances if this driver must be managed by a
shared_ptr, if not the behaviour is undefined.

Sooner or later this will bite us, so hide the default ctor and export
a static Create() factory function instead which returns a shared_ptr.

3ba4707... by Alec Leamas <email address hidden>

comm_drv_n2k_socketcan: Unregister on close.

70846ba... by Alec Leamas <email address hidden>

tests: Add new n2k test framework

1edd0cd... by Alec Leamas <email address hidden>

comm_drv_n2k_socketcan.cpp: wxThread -> std::thread

Using wxThread is inconsistent with other parts of this driver which
uses std::thread. It also turns out that wxThread causes all sorts of
problems in a unit test context. Ergo: replace wxThread with
std::thread.

While on it, clean up the header somewhat.

30dbf18... by Alec Leamas <email address hidden>

comm_drv_n2k_socketcan.cpp: Avoid buffer heap allocation.