Directory: | ./ |
---|---|
File: | pdcom5/src/msrproto/Channel.h |
Date: | 2024-11-17 04:08:36 |
Exec | Total | Coverage | |
---|---|---|---|
Lines: | 6 | 6 | 100.0% |
Branches: | 1 | 2 | 50.0% |
Line | Branch | Exec | Source |
---|---|---|---|
1 | /***************************************************************************** | ||
2 | * | ||
3 | * Copyright (C) 2015-2016 Richard Hacker (lerichi at gmx dot net) | ||
4 | * | ||
5 | * This file is part of the PdCom library. | ||
6 | * | ||
7 | * The PdCom 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 by | ||
9 | * the Free Software Foundation, either version 3 of the License, or (at your | ||
10 | * option) any later version. | ||
11 | * | ||
12 | * The PdCom 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 PdCom library. If not, see <http://www.gnu.org/licenses/>. | ||
19 | * | ||
20 | *****************************************************************************/ | ||
21 | |||
22 | #ifndef MSR_CHANNEL_H | ||
23 | #define MSR_CHANNEL_H | ||
24 | |||
25 | #include "Variable.h" | ||
26 | |||
27 | #include <queue> | ||
28 | #include <unordered_set> | ||
29 | |||
30 | namespace PdCom { namespace impl { namespace MsrProto { | ||
31 | struct Request; | ||
32 | |||
33 | 203 | class Channel : public Variable | |
34 | { | ||
35 | public: | ||
36 | 203 | Channel(SizeInfo size_info, | |
37 | const TypeInfo *type_info, | ||
38 | std::weak_ptr<impl::Process> process, | ||
39 | unsigned int index, | ||
40 | size_t taskId, | ||
41 | double sampleTime, | ||
42 | const char *alias, | ||
43 | unsigned int bufsize, | ||
44 | 203 | bool isDir) : | |
45 | Variable( | ||
46 | 203 | std::move(size_info), | |
47 | type_info, | ||
48 | process, | ||
49 | index, | ||
50 | taskId, | ||
51 | false, | ||
52 | sampleTime, | ||
53 | alias, | ||
54 | isDir, | ||
55 | false), | ||
56 | bufsize(bufsize), | ||
57 | sampleTime(sampleTime), | ||
58 |
1/2✓ Branch 7 taken 203 times.
✗ Branch 8 not taken.
|
406 | task(taskId) |
59 | 203 | {} | |
60 | PdCom::Variable::SetValueFuture setValue( | ||
61 | const void * /* data */, | ||
62 | TypeInfo::DataType /* t */, | ||
63 | size_t /* idx */, | ||
64 | size_t /* n */) const override; | ||
65 | const unsigned int bufsize; | ||
66 | const double sampleTime; | ||
67 | size_t task; | ||
68 | }; | ||
69 | |||
70 | }}} // namespace PdCom::impl::MsrProto | ||
71 | |||
72 | #endif // MSR_CHANNEL_H | ||
73 |