Classes | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
icl_hardware::can::tCanFilterMessages Class Reference

#include <tCanFilterMessages.h>

Classes

struct  DataWrapper
 

Public Member Functions

bool checkMessage (const tCanMessage &msg) const
 
bool getStatus () const
 function returns true if message data changed because of human interaction More...
 
void Open (const std::string identifer)
 
 tCanFilterMessages ()
 
 ~tCanFilterMessages ()
 

Protected Member Functions

bool byteIsChangingConstantly (unsigned int i, unsigned int id) const
 
const boost::filesystem::path & getDataFileName () const
 
void mapContentOfFile ()
 
int PrepareFiles ()
 
void setDataFileName (const boost::filesystem::path &file_name)
 
void StringToCanMsg (icl_hardware::can::tCanMessage &msg, std::string str)
 

Private Attributes

bool is_initialized
 
std::ifstream m_data_file
 File handler for data file. More...
 
boost::filesystem::path * m_data_file_name
 
DataWrapper m_message_data
 
std::multimap< unsigned int, unsigned int > m_table_id_to_changing_bytes
 
std::map< unsigned int, DataWrapperm_table_id_to_data
 

Detailed Description

This class opens a CAN message file and constructs a map of known CAN message IDs and a multimap in which it tracks all those message bytes which change without extraneous cause. This map is used in the function checkMessage() when called with a tCanMessage.

Definition at line 44 of file tCanFilterMessages.h.

Constructor & Destructor Documentation

icl_hardware::can::tCanFilterMessages::tCanFilterMessages ( )

Constructor

Definition at line 33 of file tCanFilterMessages.cpp.

icl_hardware::can::tCanFilterMessages::~tCanFilterMessages ( )

Destructor

Definition at line 39 of file tCanFilterMessages.cpp.

Member Function Documentation

bool icl_hardware::can::tCanFilterMessages::byteIsChangingConstantly ( unsigned int  i,
unsigned int  id 
) const
protected

Definition at line 100 of file tCanFilterMessages.cpp.

bool icl_hardware::can::tCanFilterMessages::checkMessage ( const tCanMessage msg) const

check if data is different and actual byte is not known as changing byte

< id hasn't been listed before

Definition at line 77 of file tCanFilterMessages.cpp.

const boost::filesystem::path & icl_hardware::can::tCanFilterMessages::getDataFileName ( ) const
protected

Definition at line 255 of file tCanFilterMessages.cpp.

bool icl_hardware::can::tCanFilterMessages::getStatus ( ) const

function returns true if message data changed because of human interaction

Definition at line 260 of file tCanFilterMessages.cpp.

void icl_hardware::can::tCanFilterMessages::mapContentOfFile ( )
protected

< id is not known up to this point, save its id and data in map

id is known, analyse if there has been a change in bytes

< check if data is not the same as saved data

check if actual byte is allready known as changing byte otherwise register it

Definition at line 117 of file tCanFilterMessages.cpp.

void icl_hardware::can::tCanFilterMessages::Open ( const std::string  identifer)

Definition at line 48 of file tCanFilterMessages.cpp.

int icl_hardware::can::tCanFilterMessages::PrepareFiles ( )
protected

Definition at line 232 of file tCanFilterMessages.cpp.

void icl_hardware::can::tCanFilterMessages::setDataFileName ( const boost::filesystem::path &  file_name)
protected

Definition at line 246 of file tCanFilterMessages.cpp.

void icl_hardware::can::tCanFilterMessages::StringToCanMsg ( icl_hardware::can::tCanMessage msg,
std::string  str 
)
protected

Definition at line 179 of file tCanFilterMessages.cpp.

Member Data Documentation

bool icl_hardware::can::tCanFilterMessages::is_initialized
private

Definition at line 88 of file tCanFilterMessages.h.

std::ifstream icl_hardware::can::tCanFilterMessages::m_data_file
private

File handler for data file.

Definition at line 82 of file tCanFilterMessages.h.

boost::filesystem::path* icl_hardware::can::tCanFilterMessages::m_data_file_name
private

Definition at line 84 of file tCanFilterMessages.h.

DataWrapper icl_hardware::can::tCanFilterMessages::m_message_data
private

Definition at line 86 of file tCanFilterMessages.h.

std::multimap<unsigned int, unsigned int> icl_hardware::can::tCanFilterMessages::m_table_id_to_changing_bytes
private

Definition at line 79 of file tCanFilterMessages.h.

std::map<unsigned int, DataWrapper> icl_hardware::can::tCanFilterMessages::m_table_id_to_data
private

Definition at line 78 of file tCanFilterMessages.h.


The documentation for this class was generated from the following files:


fzi_icl_can
Author(s):
autogenerated on Mon Jun 10 2019 13:17:02