Hi all,
 

I'm trying to write a driver which implements an opaque interface. I also have a driver implementing a power interface, which sends some requests to the first opaque driver and publishes the data received to the player server. My problem is that when I run both drivers and try to get some data using a PowerProxy on the client side, all the messages received after request are empty. The player server logs this message each time a request is done:

warning : Unhandled message for driver device=16777343:6665:opaque:0 type=request subtype=1 len=4
 

I use the CVS version of player, so as I can see in the documentation, requests to opaque interfaces are supported. Here you have some of the code I wrote and I think might be useful. This is the request I do in the main loop of my batterydriver (which implements the power interface):
 

    Message* msg = (Message*)malloc(sizeof(player_opaque_data_t));
    printf("BatteryDriver: Sending request to candriver\n");
    player_opaque_data_t data;
    msg = this->can_dev->Request(this->InQueue,
                                 PLAYER_MSGTYPE_REQ,
                                 PLAYER_OPAQUE_REQ,
                                 (void*)&data, sizeof(player_opaque_data_t), NULL, true);

I always get that msg == NULL. Here you have the other driver, the one which implements an opaque interfaze. I only put the ProcessMessage method, since the main loop calls only to ProcessMessages and pthread_testcancel:

int CanDriver::ProcessMessage(QueuePointer* resp_queue,
                              player_msghdr * hdr,
                              void * data)
{

  printf("CanDriver: A message arrived\n");

  if(Message::MatchMessage(hdr, PLAYER_MSGTYPE_REQ,
                           PLAYER_OPAQUE_REQ,
                           this->device_addr))
    {
      printf("CanDriver: Request received\n");
      this->mData.data_count = sizeof(BatteryCharge);
      this->bc = reinterpret_cast<BatteryCharge*>(mData.data); 
      this->bc->driverTag = 0;
      this->bc->structTag = 0;
      this->bc->batteryVoltage = 24.9;
   
      Publish(device_addr,
              PLAYER_MSGTYPE_RESP_ACK, PLAYER_OPAQUE_REQ,
              reinterpret_cast<void*>(&mData), sizeof(player_opaque_data_t), NULL);   
      printf("Data served\n");
       
      return 0;
    }
  else
    {
      printf("CanDriver: Unknown message arrived\n");
      return -1;
    }
 
}

The annoying thing here is that the first printf doesn't write on the screen, from what we know that we don't even enter the ProcessMessage method. I would bet I have no subscription problems between these two drivers so I cannot get the point. Could anyone help me please? Thanks in advance!

gazkune