Line |
Branch |
Exec |
Source |
1 |
|
|
/***************************************************************************** |
2 |
|
|
* |
3 |
|
|
* $Id$ |
4 |
|
|
* |
5 |
|
|
* Copyright 2010 Richard Hacker (lerichi at gmx dot net) |
6 |
|
|
* |
7 |
|
|
* This file is part of the pdserv library. |
8 |
|
|
* |
9 |
|
|
* The pdserv library is free software: you can redistribute it and/or modify |
10 |
|
|
* it under the terms of the GNU Lesser General Public License as published |
11 |
|
|
* by the Free Software Foundation, either version 3 of the License, or (at |
12 |
|
|
* your option) any later version. |
13 |
|
|
* |
14 |
|
|
* The pdserv library is distributed in the hope that it will be useful, but |
15 |
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
16 |
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public |
17 |
|
|
* License for more details. |
18 |
|
|
* |
19 |
|
|
* You should have received a copy of the GNU Lesser General Public License |
20 |
|
|
* along with the pdserv library. If not, see <http://www.gnu.org/licenses/>. |
21 |
|
|
* |
22 |
|
|
*****************************************************************************/ |
23 |
|
|
|
24 |
|
|
#include "Signal.h" |
25 |
|
|
#include "Task.h" |
26 |
|
|
|
27 |
|
|
using namespace PdServ; |
28 |
|
|
|
29 |
|
|
////////////////////////////////////////////////////////////////////// |
30 |
|
2174 |
Signal::Signal( |
31 |
|
|
const std::string& path, |
32 |
|
|
const Task* task, |
33 |
|
|
unsigned int decimation, |
34 |
|
|
const DataType& dtype, |
35 |
|
|
size_t ndims, |
36 |
|
2174 |
const size_t *dim): |
37 |
|
|
Variable(path, dtype, ndims, dim), |
38 |
|
2174 |
task(task), decimation(decimation) |
39 |
|
|
{ |
40 |
|
2174 |
} |
41 |
|
|
|
42 |
|
|
////////////////////////////////////////////////////////////////////// |
43 |
|
2174 |
Signal::~Signal() |
44 |
|
|
{ |
45 |
|
2174 |
} |
46 |
|
|
|
47 |
|
|
////////////////////////////////////////////////////////////////////// |
48 |
|
154 |
double Signal::sampleTime() const |
49 |
|
|
{ |
50 |
|
154 |
return task->sampleTime * decimation; |
51 |
|
|
} |
52 |
|
|
|