blob: 64424688e69cc892379a88c3e1bd4199fb7d626b [file] [log] [blame]
Brad Bishopf3df6b42017-01-06 10:14:09 -05001#pragma once
2
3class SensorSet;
4
5std::string getEnv(
6 const char* prefix, const SensorSet::key_type& sensor);
Tom Joseph1f8a9582017-06-12 20:10:59 +05307
8/** @brief Get the label for the sensor with a level of indirection.
9 *
10 * Read the sensor number from the <path>/<item><X>_label file.<item> & <X> is
11 * populated from the sensor key. The sensor label is read from the environment
12 * variable <prefix>_<item><sensorNum>.
13 *
14 * @param[in] prefix - Prefix of the environment variable.
15 * @param[in] path - Directory path of the label file.
16 * @param[in] sensor - Sensor details.
17 *
18 * @return On success return the sensor label, in case of failure return empty
19 * string.
20 */
21std::string getIndirectLabelEnv(
22 const char* prefix, std::string path, const SensorSet::key_type& sensor);