64 lines
1.4 KiB
C++
64 lines
1.4 KiB
C++
//****************************************************************************
|
|
// Copyright (C) 2007
|
|
// Nissan North America
|
|
// All Rights Reserved. Proprietary and Confidential.
|
|
//============================================================================
|
|
|
|
/* prevent multiple inclusions */
|
|
#ifndef __CanDatabase__
|
|
#define __CanDatabase__
|
|
|
|
/* includes *****************************************************************/
|
|
|
|
#include <sys/types.h>
|
|
#include <vector>
|
|
|
|
#include "CanSignal.h"
|
|
#include "CanSocket.h"
|
|
#include "DbcParser.h"
|
|
|
|
/* defines ******************************************************************/
|
|
|
|
/* macros *******************************************************************/
|
|
|
|
/* structs & typedefs *******************************************************/
|
|
|
|
/* c class definitions ******************************************************/
|
|
|
|
/**
|
|
* CAN class to handle database of CAN signals from DBC (.dbc) file
|
|
*/
|
|
class CanDatabase : public DbcParser {
|
|
// public data
|
|
public:
|
|
|
|
// private data
|
|
private:
|
|
|
|
// static data
|
|
|
|
// public methods
|
|
public:
|
|
// constructors
|
|
CanDatabase();
|
|
|
|
// destructor
|
|
virtual ~CanDatabase();
|
|
|
|
// virtual functions
|
|
|
|
// public methods
|
|
int FormatHeader( char *buf, int max );
|
|
int FormatMessage( char *buf, int max );
|
|
|
|
int SubscribeCan( CanSocket *pCan );
|
|
int ReadCan( CanSocket *pCan );
|
|
|
|
// static methods
|
|
|
|
// private methods
|
|
private:
|
|
};
|
|
|
|
#endif
|