MCPcopy Create free account
hub / github.com/OpenKinect/libfreenect2 / deviceClose

Method deviceClose

src/openni2/DeviceDriver.cpp:521–540  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

519 }
520
521 void deviceClose(oni::driver::DeviceBase* pDevice)
522 {
523 for (OniDeviceMap::iterator iter = devices.begin(); iter != devices.end(); iter++)
524 {
525 if (iter->second == pDevice)
526 {
527 WriteMessage("Closing device " + std::string(iter->first.uri));
528 //int id = uri_to_devid(iter->first.uri);
529
530 DeviceImpl* device = (DeviceImpl*)iter->second;
531 device->stop();
532 device->close();
533
534 devices.erase(iter);
535 return;
536 }
537 }
538
539 LogError("Could not close unrecognized device");
540 }
541
542 OniStatus tryDevice(const char* uri)
543 {

Callers

nothing calls this directly

Calls 5

stringFunction · 0.85
beginMethod · 0.80
endMethod · 0.80
stopMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected