28set_value(AL::ALPtr<AL::DCMProxy> &dcm,
29 const std::string & device,
30 const std::string & kind,
34 AL::ALValue cmd, actcmd, actpos;
36 cmd.arrayPush(device);
38 actpos.arrayPush(value);
39 actpos.arrayPush(time);
40 actcmd.arrayPush(actpos);
41 cmd.arrayPush(actcmd);
46std::vector<std::string>
47get_devices(AL::ALPtr<AL::DCMProxy> & dcm,
48 AL::ALPtr<AL::ALMemoryProxy> &almem,
49 const std::string & type)
51 AL::ALValue names = almem->getDataListName();
52 std::string subd_prefix = dcm->getPrefix()[0];
54 std::vector<std::string> rv;
57 for (
unsigned int i = 0; i < names.getSize(); ++i) {
58 std::string name = names[i];
59 if (name.compare(0, subd_prefix.length(), subd_prefix) == 0) {
60 if (name.compare(name.length() - 5, 5,
"/Type") == 0) {
61 std::string dtype = almem->getData(name, 0);
62 std::string base_path = name.substr(0, name.length() - 5);
64 rv.push_back(base_path);