otsdaq-components  3.01.00
OtsSlowControlsInterface_slowcontrols.cc
1 #include "otsdaq-components/SlowControlsInterfacePlugins/OtsSlowControlsInterface.h"
2 #include "otsdaq/Macros/SlowControlsPluginMacros.h"
3 
4 using namespace ots;
5 
6 OtsSlowControlsInterface::OtsSlowControlsInterface(
7  const std::string& pluginType,
8  const std::string& interfaceUID,
9  const ConfigurationTree& theXDAQContextConfigTree,
10  const std::string& controlsConfigurationPath)
11  // TODO -- listen on a socket for data
12  // or read from disk
13  // :Socket (
14  // theXDAQContextConfigTree.getNode(interfaceConfigurationPath).getNode("HostIPAddress").getValue<std::string>()
15  // ,theXDAQContextConfigTree.getNode(interfaceConfigurationPath).getNode("HostPort").getValue<unsigned
16  // int>())
17  // ,
19  pluginType, interfaceUID, theXDAQContextConfigTree, controlsConfigurationPath)
20 {
21 }
22 
23 OtsSlowControlsInterface::~OtsSlowControlsInterface() { destroy(); }
24 
25 void OtsSlowControlsInterface::initialize() {}
26 
27 void OtsSlowControlsInterface::destroy() {}
28 
29 std::vector<std::string> OtsSlowControlsInterface::getChannelList() { return {}; }
30 
31 std::string OtsSlowControlsInterface::getList(const std::string& /*format*/)
32 {
33  //__COUT__ <<
34  // theXDAQContextConfigTree.getNode(controlsConfigurationPath).getValue <<
35  // std::endl;
36  return (std::string) "list";
37 }
38 void OtsSlowControlsInterface::subscribe(const std::string& /*Name*/) {}
39 
40 void OtsSlowControlsInterface::subscribeJSON(const std::string& /*List*/) {}
41 
42 void OtsSlowControlsInterface::unsubscribe(const std::string& /*Name*/) {}
43 
44 std::array<std::string, 4> OtsSlowControlsInterface::getCurrentValue(
45  const std::string& /*Name*/)
46 {
47  return {"a", "b", "c", "d"};
48 }
49 
50 std::vector<std::vector<std::string>> OtsSlowControlsInterface::getChannelHistory(
51  const std::string& /*Name*/
52  ,
53  int /*start time*/
54  ,
55  int /* end time*/)
56 {
57  return {};
58 }
59 
60 std::vector<std::vector<std::string>> OtsSlowControlsInterface::getLastAlarms(
61  const std::string& /*Name*/)
62 {
63  return {};
64 }
65 
66 std::vector<std::vector<std::string>> OtsSlowControlsInterface::getAlarmsLog(
67  const std::string& /*Name*/)
68 {
69  return {};
70 }
71 
72 std::array<std::string, 9> OtsSlowControlsInterface::getSettings(
73  const std::string& /*Name*/)
74 {
75  return {"a", "b", "c", "d", "e", "f", "g", "h", "i"};
76 }
77 
78 std::vector<std::vector<std::string>> OtsSlowControlsInterface::checkAlarmNotifications(
79  void)
80 {
81  return {};
82 }
83 
84 DEFINE_OTS_SLOW_CONTROLS(OtsSlowControlsInterface)