Ejemplo n.º 1
0
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;

}
Ejemplo 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;
}
Ejemplo 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;
}