//**************************************************************************** // Copyright (C) 2007 // Nissan North America // All Rights Reserved. Proprietary and Confidential. //============================================================================ /* prevent multiple inclusions */ #ifndef __CanMessage__ #define __CanMessage__ /* includes *****************************************************************/ #include #include #include #include "CanSignal.h" #include "CanSocket.h" /* defines ******************************************************************/ /* macros *******************************************************************/ /* structs & typedefs *******************************************************/ // based on .dbc data /* c class definitions ******************************************************/ // // Uses the Peak Systems CAN Linux driver and Nissan CAN data // class CanMessage { // public data public: std::string Name; // Signal Name std::string Module; // Module Name u_int32_t Address; // 29 bits (standard or extended) u_int8_t Data[64]; // Data u_int Size; // DLC (CAN-FD > 8) // list of signals in the message std::vector Signals; // private data private: // static data // public methods public: // constructors CanMessage(); // destructor virtual ~CanMessage(); // virtual functions // public methods int Read(CanFrame *frame); int Write(CanFrame *frame); int Convert(CanFrame *frame) {return Read(frame);}; int Subscribe(void); int Unsubscribe(void); // static methods // private methods private: }; #endif