source: flair-src/trunk/lib/FlairSimulator/src/SimuUs.cpp@ 227

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

maj for armv5te

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 "SimuUs.h"
18#include <SharedMem.h>
19#include <sstream>
20
21using std::string;
22using std::ostringstream;
23using namespace flair::core;
24
25namespace flair {
26namespace sensor {
27
28SimuUs::SimuUs(const IODevice *parent, string name,uint32_t modelId,uint32_t deviceId)
29 : IODevice(parent,name) {
30
31 shmem = new SharedMem(this, ShMemName(modelId, deviceId), sizeof(float));
32
33 SetIsReady(true);
34}
35
36SimuUs::~SimuUs() {
37}
38
39string SimuUs::ShMemName(uint32_t modelId,uint32_t deviceId) {
40 ostringstream dev_name;
41 dev_name << "simu" << modelId << "_us_" << deviceId;
42 return dev_name.str().c_str();
43}
44
45
46} // end namespace sensor
47} // end namespace flair
Note: See TracBrowser for help on using the repository browser.