bool GripperMessage::init(industrial::simple_message::SimpleMessage & msg)
{
  bool rtn = false;
  ByteArray data = msg.getData();

  this->setMessageType(LonghornMsgTypes::GRIPPER);
  this->unload(&msg.getData());
  return rtn;

}
Esempio n. 2
0
bool JointMessage::init(industrial::simple_message::SimpleMessage & msg)
{
  bool rtn = false;
  ByteArray data = msg.getData();

  this->setMessageType(StandardMsgTypes::JOINT_POSITION);

  if (data.unload(this->joints_))
  {
    if (data.unload(this->sequence_))
    {
      rtn = true;
    }
    else
    {
      rtn = false;
      LOG_ERROR("Failed to unload sequence data");
    }
  }
  else
  {
    LOG_ERROR("Failed to unload joint data");
  }
  return rtn;
}
Esempio n. 3
0
bool InputHandler::internalCB(industrial::simple_message::SimpleMessage & in)
{
  bool rtn = false;
  bool unloadStat = false;
  shared_int temp;
  int i = 0;
  SimpleMessage msg;
  
  do
  {
    unloadStat = in.getData().unload(temp);
    LOG_DEBUG("Message data item[%d] = %d", i, temp);
    i++;
  }
  while(unloadStat);
  
  //msg.init(StandardMsgTypes::READ_INPUT, CommTypes::SERVICE_REPLY, ReplyTypes::SUCCESS);
  //rtn = this->getConnection()->sendMsg(msg);
  rtn = true;
  
  return rtn;
}