SensorManager mutex?



  • Do I need to use a mutex when using the SensorManager singleton or calling any of its functions? I get "device or resource busy" when I call any of the "get sensor" functions on the singleton. Could you also give a simple example that shows how to access a sensor by ID from within a plugin? The online documentation doesn't have one.



  • @rr And a clarification/follow up: should I expect the sensor to be locked when I use SensorManager to access it from inside its own Update() function? E.g.:

    MySensor::Update(dt) {
    SensorManager &sm = ...
    sm.GetSensor(m_specializedSensorID); // I get an exception here ("device or resource busy")
    }

    or:

    MySensor::Update(dt) {
    SensorManager &sm = ...
    vector<Sensor*> sensors = sm.GetAllSensors(); // I get an exception here ("device or resource busy")
    }



  • @rr,

    We apologize for the long delay. As you noticed, part of the issue here is that there needs to be additional documentation created for the sensor plugin sample code. We have that logged and are planning on addressing that documentation shortcoming in the near future. If your question is related to a certain Army program, a new support resource to address issues specifically for that program is coming online soon – please stay tuned!

    Regards,
    ANVEL Support


Log in to reply
 

Looks like your connection to ANVEL Forum was lost, please wait while we try to reconnect.