nds2-client - Developer 0.16.7
Loading...
Searching...
No Matches
nds_channel_cache.hh
Go to the documentation of this file.
1#ifndef NDS_INTERNAL_CHANNEL_CACHE_HH
2#define NDS_INTERNAL_CHANNEL_CACHE_HH
3
4#include <cstdint>
5#include <vector>
6#include <array>
7
8#include "nds_connection.hh"
9
10namespace NDS
11{
12
13 namespace detail
14 {
15 class daq_accessor;
16
18 {
19 double rate;
20 uint32_t tpnum;
21 float gain;
22 float slope;
23 float offset;
24 channel::channel_type channel_type;
25 channel::data_type data_type;
26 std::array< char, 64 + 60 + 1 > name;
27 std::array< char, 40 + 1 > units;
28 };
29
31 {
32 public:
34 typedef std::vector< cache_entry_type > cache_type;
35
37
38 size_t count_channels( std::string channel_glob,
39 channel::channel_type channel_type_mask,
40 channel::data_type data_type_mask,
41 channel::sample_rate_type min_sample_rate,
42 channel::sample_rate_type max_sample_rate );
43
45 find_channels( std::string channel_glob,
46 channel::channel_type channel_type_mask,
47 channel::data_type data_type_mask,
48 channel::sample_rate_type min_sample_rate,
49 channel::sample_rate_type max_sample_rate );
50
51 private:
52 void update_cache( );
53
56 };
57 }
58}
59
60#endif // NDS_INTERNAL_CHANNEL_CACHE_HH
Definition nds_channel_cache.hh:31
detail::daq_accessor & server_
Definition nds_channel_cache.hh:54
std::vector< cache_entry_type > cache_type
Definition nds_channel_cache.hh:34
channels_type find_channels(std::string channel_glob, channel::channel_type channel_type_mask, channel::data_type data_type_mask, channel::sample_rate_type min_sample_rate, channel::sample_rate_type max_sample_rate)
Definition nds_channel_cache.cc:390
void update_cache()
Definition nds_channel_cache.cc:427
cache_type cache_
Definition nds_channel_cache.hh:55
detail::nds1_cached_channel cache_entry_type
Definition nds_channel_cache.hh:33
A functor that counts the number of calls.
Definition nds_connection_ptype.hh:88
Definition nds_connection_ptype.hh:131
std::vector< channel > channels_type
Definition nds_channel.hh:298
The NDS client namespace.
Definition debug_stream.cc:18
Definition nds_channel_cache.hh:18
std::array< char, 40+1 > units
Definition nds_channel_cache.hh:27
std::array< char, 64+60+1 > name
Definition nds_channel_cache.hh:26
channel::channel_type channel_type
Definition nds_channel_cache.hh:24
float gain
Definition nds_channel_cache.hh:21
float offset
Definition nds_channel_cache.hh:23
float slope
Definition nds_channel_cache.hh:22
uint32_t tpnum
Definition nds_channel_cache.hh:20
channel::data_type data_type
Definition nds_channel_cache.hh:25
double rate
Definition nds_channel_cache.hh:19