source: flair-src/trunk/lib/FlairSimulator/src/SimuCamera.cpp@ 225

Last change on this file since 225 was 224, checked in by Sanahuja Guillaume, 7 years ago

maj for armv5te

File size: 1.3 KB
Line 
1// %flair:license{
2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
4// %flair:license}
5// created: 2014/03/06
6// filename: SimuCamera.cpp
7//
8// author: Guillaume Sanahuja
9// Copyright Heudiasyc UMR UTC/CNRS 7253
10//
11// version: $Id: $
12//
13// purpose: Class for a simulation camera
14//
15//
16/*********************************************************************/
17
18#include "SimuCamera.h"
19#include <SharedMem.h>
20#include <sstream>
21
22using std::string;
23using std::ostringstream;
24using namespace flair::core;
25
26namespace flair {
27namespace sensor {
28
29
30SimuCamera::SimuCamera(const IODevice *parent, string name, uint16_t width,
31 uint16_t height, uint8_t channels, uint32_t modelId,uint32_t deviceId)
32 : IODevice(parent,name) {
33
34 size_t buf_size = width * height * channels+sizeof(Time);
35
36 shmem = new SharedMem(this,ShMemName(modelId, deviceId),
37 buf_size, SharedMem::Type::producerConsumer);
38
39 SetIsReady(true);
40}
41
42SimuCamera::~SimuCamera() {
43
44}
45
46string SimuCamera::ShMemName(uint32_t modelId,uint32_t deviceId) {
47 ostringstream dev_name;
48 dev_name << "simu" << modelId << "_cam_" << deviceId;
49 return dev_name.str().c_str();
50}
51
52
53
54} // end namespace sensor
55} // end namespace flair
Note: See TracBrowser for help on using the repository browser.