GCC Code Coverage Report


Directory: ./
File: pdserv/src/Signal.cpp
Date: 2025-08-17 04:10:43
Exec Total Coverage
Lines: 8 8 100.0%
Branches: 0 0 -%

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