mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 19:03:33 +08:00
Refactored SocketCAN select() call; fixes #83
Features: - The driver will throw if it's fed a non-existing or malfunctioning interface during initialization - When an interface becomes down/disconnected while the node is running, the driver will silently exclude it from the IO loop and continue to run on the remaining interfaces. - When all interfaces become down/disconnected, the driver will throw AllIfacesDownException() from SocketCanDriver::select().
This commit is contained in:
@@ -29,4 +29,13 @@ public:
|
||||
int getErrno() const { return errno_; }
|
||||
};
|
||||
|
||||
/**
|
||||
* This exception is thrown when all available interfaces become down.
|
||||
*/
|
||||
class AllIfacesDownException : public Exception
|
||||
{
|
||||
public:
|
||||
AllIfacesDownException() : Exception("All ifaces are down") { }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user