26 #include <boost/filesystem.hpp> 34 : m_data_file_name(NULL),
83 for (
unsigned int i=0; i < 8; i++)
105 while (
id == iter_multi->first)
107 if (iter_multi->second == i)
125 if (line.length() == 0)
135 if (message.
id != 0 || message.
dlc != 0 || message.
rtr != 0)
148 for (
unsigned int i=0; i < 8; i++)
150 if (iter->second.data[i] != message.
data[i])
153 bool known_byte =
false;
158 while(iter_multi->first == message.
id && !known_byte)
160 if (iter_multi->second == i)
181 unsigned int pos = 0;
184 if (str.substr(0,1) ==
"#")
191 for (
int i=0; i < 11; i++)
193 size_t position = str.find(
' ', pos);
194 if (position == std::string::npos)
196 word_length = str.size() - pos;
200 word_length = position - pos;
212 message.
id = atoi((str.substr(pos, word_length)).data());
217 message.
dlc = atoi((str.substr(pos, word_length)).data());
223 message.
data[i-3] = (
unsigned char)(strtol((str.substr(pos, word_length)).data(), NULL, 16));
228 pos += word_length+1;
boost::filesystem::path * m_data_file_name
Implements a struct representing a can message.
void * memcpy(void *dest, void *src, size_t count)
#define LOGGING_DEBUG(streamname, arg)
DataWrapper m_message_data
std::multimap< unsigned int, unsigned int > m_table_id_to_changing_bytes
std::map< unsigned int, DataWrapper > m_table_id_to_data
#define LOGGING_ERROR(streamname, arg)
bool getStatus() const
function returns true if message data changed because of human interaction
void setDataFileName(const boost::filesystem::path &file_name)
ThreadStream & endl(ThreadStream &stream)
bool byteIsChangingConstantly(unsigned int i, unsigned int id) const
void StringToCanMsg(icl_hardware::can::tCanMessage &msg, std::string str)
void Open(const std::string identifer)
std::ifstream m_data_file
File handler for data file.
#define LOGGING_TRACE(streamname, arg)
const boost::filesystem::path & getDataFileName() const
bool checkMessage(const tCanMessage &msg) const