Changeset 158 in flair-src for trunk/lib/FlairSensorActuator/src/SimuCamera.cpp
- Timestamp:
- Mar 5, 2017, 10:50:56 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairSensorActuator/src/SimuCamera.cpp
r157 r158 33 33 SimuCamera::SimuCamera(string name, 34 34 uint16_t width, uint16_t height, uint8_t channels, 35 uint32_t dev_id, uint8_t priority)35 uint32_t modelId,uint32_t deviceId, uint8_t priority) 36 36 : Thread(getFrameworkManager(), name, priority), 37 37 Camera(name, width, height, cvimage::Type::Format::BGR) { … … 43 43 44 44 ostringstream dev_name; 45 dev_name << "simu _cam_" << dev_id;46 shmem = new SharedMem((Thread *)this, dev_name.str().c_str(), buf_size, SharedMem::Type::producerConsumer);45 dev_name << "simu" << modelId << "_cam_" << deviceId; 46 shmem = new SharedMem((Thread *)this,ShMemName(modelId, deviceId), buf_size, SharedMem::Type::producerConsumer); 47 47 48 48 SetIsReady(true); … … 51 51 //simulation part 52 52 SimuCamera::SimuCamera(const IODevice *parent, string name, uint16_t width, 53 uint16_t height, uint8_t channels, uint32_t dev_id)53 uint16_t height, uint8_t channels, uint32_t modelId,uint32_t deviceId) 54 54 : Thread(parent, name, 0), Camera(parent,name) { 55 55 56 56 buf_size = width * height * channels+sizeof(Time); 57 57 58 ostringstream dev_name; 59 dev_name << "simu_cam_" << dev_id; 60 shmem = new SharedMem((Thread *)this, dev_name.str().c_str(), 58 shmem = new SharedMem((Thread *)this,ShMemName(modelId, deviceId), 61 59 buf_size, SharedMem::Type::producerConsumer); 62 60 shmemReadBuf=NULL; … … 69 67 Join(); 70 68 if(shmemReadBuf!=NULL) delete shmemReadBuf; 69 } 70 71 string SimuCamera::ShMemName(uint32_t modelId,uint32_t deviceId) { 72 ostringstream dev_name; 73 dev_name << "simu" << modelId << "_cam_" << deviceId; 74 return dev_name.str().c_str(); 71 75 } 72 76
Note:
See TracChangeset
for help on using the changeset viewer.