X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=src%2FDevice.cc;h=714e830e13bcbafdda786fa10522e6339f544220;hb=860d8c023b82eeca9833d4a3f534c6d11a9523f3;hp=8923ff83e4023ff7a3e934a5617b3e02ced7de01;hpb=063ec715601bf9662797725cb39732bea0572d26;p=libplp.git diff --git a/src/Device.cc b/src/Device.cc index 8923ff8..714e830 100644 --- a/src/Device.cc +++ b/src/Device.cc @@ -1,19 +1,53 @@ /* * Device.cc * - * Created on: Mar 5, 2011 + * Created on: Mar 4, 2011 * Author: lamikr */ -#include +#include "log.h" #include "Device.hh" -#include "DeviceConfig.hh" using namespace std; using namespace plp; -Device::Device(string id_param, string type_param) : plp::DeviceData(id_param, type_param) { +Device::Device(string id_param, + string type_param) { + id = id_param; + type = type_param; + lifecycle_status = LIFECYCLE_STATUS__UNAVAILABLE; } -Device::Device(string id_param, string type_param, string name_param, EnumDeviceLifeCycleStatus status_param) : plp::DeviceData(id_param, type_param, name_param, status_param) { +Device::Device(std::string id_param, + string type_param, + string name_param, + plp::EnumDeviceLifeCycleStatus status_param) { + id = id_param; + type = type_param; + name = name_param; + lifecycle_status = status_param; +} + +//Device::~Device() { +// log_debug("Device: constructor\n"); +//} + +string Device::get_id() { + return id; +} + +string Device::get_name() { + return name; +} + +void Device::set_name(string name_param) { + name = name_param; +} + +EnumDeviceLifeCycleStatus Device::get_lifecycle_state() { + return lifecycle_status; +} + +string Device::get_type() { + return type; }