Removed a few more warnings, switched the way CAN callbacks work.

This commit is contained in:
Collin Kidder
2016-12-30 14:24:17 -05:00
parent 7222870b1e
commit 2758fa8a09
10 changed files with 96 additions and 66 deletions
+10 -6
View File
@@ -39,27 +39,31 @@ public:
/**
* @brief Add a new filter for the targetted frames. If a frame matches it will immediately be sent via the targettedFrameReceived signal
* @param pBusId - Which bus to bond to. -1 for any, otherwise a bitfield of buses (but 0 = first bus, etc)
* @param target - The filter to use for selected targetted frames
* @param ID - 11 or 29 bit ID to match against
* @param mask - 11 or 29 bit mask used for filter
* @param receiver - Pointer to a QObject that wants to receive notification when filter is matched
* @return true if filter was able to be added, false otherwise.
*/
bool addTargettedFrame(int pBusId, const CANFlt &target);
bool addTargettedFrame(int pBusId, uint32_t ID, uint32_t mask, QObject *receiver);
/**
* @brief Try to find a matching filter in the list and remove it, no longer targetting those frames
* @param pBusId - Which bus to bond to. Doesn't have to match the call to addTargettedFrame exactly. You could disconnect just one bus for instance.
* @param target - The filter that was set
* @param ID - 11 or 29 bit ID to match against
* @param mask - 11 or 29 bit mask used for filter
* @param receiver - Pointer to a QObject that wants to receive notification when filter is matched
* @return true if filter was found and deleted, false otherwise.
*/
bool removeTargettedFrame(int pBusId, const CANFlt &target);
bool removeTargettedFrame(int pBusId, uint32_t ID, uint32_t mask, QObject *receiver);
bool removeAllTargettedFrames(QObject *receiver);
signals:
void framesReceived(CANConnection* pConn_p, QVector<CANFrame>& pFrames);
void targettedFrameReceived(CANFrame frame);
void connectionStatusUpdated(int conns);
private slots:
void refreshCanList();
void gotTargettedFrame(CANFrame frame);
private:
explicit CANConManager(QObject *parent = 0);