}
}
-string W1Device::get_name() {
+string Device::get_name() {
DeviceConfig *cfg;
if (name.empty() == true) {
return name;
}
-void W1Device::set_name(string name_param) {
+void Device::set_name(string name_param) {
DeviceConfig *cfg;
+ log_debug("set_name started\n");
if (name.compare(name_param) != 0) {
name = name_param;
cfg = DeviceConfig::get_device_config(id);
pthread_mutex_unlock(&plock);
}
-const DataReader *W1Device::get_device_data() {
+const DataReader *W1Device::get_datareader() {
return reader;
}
std::string device_type_param,
dirent *direntry_param);
~W1Device();
- std::string get_name();
- void set_name(std::string name_param);
void printout();
plp::Data *get_data();
- const plp::DataReader *get_device_data();
+ const plp::DataReader *get_datareader();
protected:
std::string dir_path;
std::string slave_file;
if (dev != NULL) {
device = dynamic_cast<SensorDevice *>(dev);
if (device != NULL) {
- reader = device->get_device_data();
+ reader = device->get_datareader();
+ device->get_name();
if (reader != NULL) {
dr = ((DataReader *)reader)->get_data_range();
if (dr != NULL) {
else {
log_debug("could not find devices.\n");
}
- log_debug("trying to start emptying list\n");
+ log_debug("trying to empty device list\n");
while (device_list.empty() == false) {
device = device_list.back();
device_list.pop_back();