Switch ISOTP and UDS handlers to no longer be static.

Now each can be instantiated multiple times with each instance handling
a different ISOTP or UDS stream. This should streamline some upcoming
code
This commit is contained in:
Collin Kidder
2017-08-20 21:34:05 -04:00
parent 0fd4ca9b3f
commit d869b6a126
7 changed files with 46 additions and 52 deletions
+4 -1
View File
@@ -7,6 +7,8 @@
#include "can_structs.h"
#include "isotp_message.h"
class ISOTP_HANDLER;
namespace UDS_SERVICES
{
enum
@@ -85,6 +87,7 @@ class UDS_HANDLER : public QObject
public:
UDS_HANDLER();
~UDS_HANDLER();
void setExtendedAddressing(bool mode);
static UDS_HANDLER* getInstance();
void setReception(bool mode); //set whether to accept and forward frames or not
@@ -113,7 +116,7 @@ private:
void processFrame(const CANFrame &frame);
static UDS_HANDLER* mInstance;
ISOTP_HANDLER *isoHandler;
};