source: flair-src/branches/sanscv/lib/FlairSimulator/src/SimuLaser.cpp@ 428

Last change on this file since 428 was 324, checked in by Sanahuja Guillaume, 5 years ago

removing opencv dependency

File size: 1.1 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/02/07
6// filename: SimuUs.cpp
7//
8// author: Guillaume Sanahuja
9// Copyright Heudiasyc UMR UTC/CNRS 7253
10//
11// version: $Id: $
12//
13// purpose: Class for a simulation us
14//
15//
16/*********************************************************************/
17#include "SimuLaser.h"
18#include <SharedMem.h>
19#include <sstream>
20
21using std::string;
22using std::ostringstream;
23using namespace flair::core;
24using namespace flair::gui;
25
26namespace flair {
27namespace sensor {
28
29
30SimuLaser::SimuLaser(const IODevice *parent, string name, uint32_t modelId,uint32_t deviceId)
31 : IODevice(parent, name) {
32
33 shmem = new SharedMem((Thread *)this, ShMemName(modelId, deviceId),
34 360 * sizeof(float));
35 SetIsReady(true);
36}
37
38SimuLaser::~SimuLaser() {
39}
40
41string SimuLaser::ShMemName(uint32_t modelId,uint32_t deviceId) {
42 ostringstream dev_name;
43 dev_name << "simu" << modelId << "_laser_" << deviceId;
44 return dev_name.str().c_str();
45}
46
47
48} // end namespace sensor
49} // end namespace flair
Note: See TracBrowser for help on using the repository browser.