otsdaq_components  v2_05_02_indev
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  // ,
18  : SlowControlsVInterface(
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  return {};
54 }
55 
56 std::vector<std::vector<std::string>> OtsSlowControlsInterface::getLastAlarms(
57  const std::string& /*Name*/)
58 {
59  return {};
60 }
61 
62 std::vector<std::vector<std::string>> OtsSlowControlsInterface::getAlarmsLog(
63  const std::string& /*Name*/)
64 {
65  return {};
66 }
67 
68 std::array<std::string, 9> OtsSlowControlsInterface::getSettings(const std::string& /*Name*/)
69 {
70  return {"a", "b", "c", "d", "e", "f", "g", "h", "i"};
71 }
72 
73 std::vector<std::vector<std::string>> OtsSlowControlsInterface::checkAlarmNotifications(
74  void)
75 {
76  return {};
77 }
78 
79 DEFINE_OTS_SLOW_CONTROLS(OtsSlowControlsInterface)