Rev 1914 | Rev 1916 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1914 | Rev 1915 | ||
|---|---|---|---|
| Line 314... | Line 314... | ||
| 314 | unsigned int id = 0; |
314 | unsigned int id = 0; |
| 315 | std::string command_name = ""; |
315 | std::string command_name = ""; |
| 316 | 316 | ||
| 317 | std::string PKTstring = "PKT "+atom::common::ToHex8bit((unsigned int)this->buffer_[3])+atom::common::ToHex8bit((unsigned int)this->buffer_[2])+atom::common::ToHex8bit((unsigned int)this->buffer_[1])+atom::common::ToHex8bit((unsigned int)this->buffer_[0])+ " "+atom::common::ToHex4bit((unsigned int)this->buffer_[4])+ " "+atom::common::ToHex4bit((unsigned int)this->buffer_[5]); |
317 | std::string PKTstring = "PKT "+atom::common::ToHex8bit((unsigned int)this->buffer_[3])+atom::common::ToHex8bit((unsigned int)this->buffer_[2])+atom::common::ToHex8bit((unsigned int)this->buffer_[1])+atom::common::ToHex8bit((unsigned int)this->buffer_[0])+ " "+atom::common::ToHex4bit((unsigned int)this->buffer_[4])+ " "+atom::common::ToHex4bit((unsigned int)this->buffer_[5]); |
| 318 | for (id=7;id< 7+(unsigned int)this->buffer_[6] ;id++) { |
318 | for (id=7;id< 7+(unsigned int)this->buffer_[6] ;id++) { |
| 319 | //PKTstring += "" + boost::lexical_cast<std::string>((unsigned int)this->buffer_[id]) + " "; |
- | |
| 320 | PKTstring += " " + atom::common::ToHex8bit((unsigned int)this->buffer_[id]) ; |
319 | PKTstring += " " + atom::common::ToHex8bit((unsigned int)this->buffer_[id]) ; |
| 321 | } |
320 | } |
| 322 | //const int length = PKTstring.length(); |
- | |
| 323 | //for(int i=0; i!=length; ++i) |
- | |
| 324 | //{ |
- | |
| 325 | // PKTstring[i] = std::tolower(PKTstring[i]); |
- | |
| 326 | //} |
- | |
| 327 | //PKTstring = "PKT "+PKTstring; |
- | |
| 328 | PKTstring += "\n"; |
321 | PKTstring += "\n"; |
| 329 | LOG. |
322 | //LOG.Info(PKTstring); |
| 330 | std::string* payload_str = new std::string(PKTstring); |
323 | std::string* payload_str = new std::string(PKTstring); |
| 331 | broker::Manager::Instance()->Post(broker::Message::Pointer(new broker::Message(broker::Message::CAN_RAW_MESSAGE, broker::Message::PayloadPointer(payload_str), this))); |
324 | broker::Manager::Instance()->Post(broker::Message::Pointer(new broker::Message(broker::Message::CAN_RAW_MESSAGE, broker::Message::PayloadPointer(payload_str), this))); |
| 332 | id = 0; |
325 | id = 0; |
| 333 | 326 | ||
| 334 | unsigned int class_id = (this->buffer_[3] >> 1) & 0x0F; |
327 | unsigned int class_id = (this->buffer_[3] >> 1) & 0x0F; |