sensord: rename option to pause policy 97/75597/1
authorkibak.yoon <kibak.yoon@samsung.com>
Wed, 8 Jun 2016 04:42:44 +0000 (13:42 +0900)
committerkibak.yoon <kibak.yoon@samsung.com>
Mon, 20 Jun 2016 13:27:03 +0000 (22:27 +0900)
Change-Id: I2bcb62312af65f693aa83a1071bac1eee3d3a4a5
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
18 files changed:
src/client/client.cpp
src/client/client_common.cpp
src/client/command_channel.cpp
src/client/command_channel.h
src/client/sensor_client_info.cpp
src/client/sensor_client_info.h
src/client/sensor_event_listener.cpp
src/client/sensor_handle_info.cpp
src/client/sensor_handle_info.h
src/server/client_info_manager.cpp
src/server/client_info_manager.h
src/server/client_sensor_record.cpp
src/server/client_sensor_record.h
src/server/command_worker.cpp
src/server/command_worker.h
src/server/sensor_usage.cpp
src/server/sensor_usage.h
src/shared/command_common.h

index 99b96d0..7effcda 100644 (file)
@@ -224,7 +224,7 @@ void restore_session(void)
 
                sensor_rep prev_rep, cur_rep;
                prev_rep.active = false;
-               prev_rep.option = SENSOR_OPTION_DEFAULT;
+               prev_rep.pause_policy = SENSORD_PAUSE_ALL;
                prev_rep.interval = 0;
 
                sensor_client_info::get_instance().get_sensor_rep(*it_sensor, cur_rep);
@@ -273,9 +273,9 @@ static bool change_sensor_rep(sensor_id_t sensor_id, sensor_rep &prev_rep, senso
        get_events_diff(prev_rep.event_types, cur_rep.event_types, add_event_types, del_event_types);
 
        if (cur_rep.active) {
-               if (prev_rep.option != cur_rep.option) {
-                       if (!cmd_channel->cmd_set_option(cur_rep.option)) {
-                               _E("Sending cmd_set_option(%d, %s, %d) failed for %s", client_id, get_sensor_name(sensor_id), cur_rep.option, get_client_name());
+               if (prev_rep.pause_policy != cur_rep.pause_policy) {
+                       if (!cmd_channel->cmd_set_pause_policy(cur_rep.pause_policy)) {
+                               _E("Sending cmd_set_pause_policy(%d, %s, %d) failed for %s", client_id, get_sensor_name(sensor_id), cur_rep.pause_policy, get_client_name());
                                return false;
                        }
                }
@@ -832,7 +832,7 @@ API bool sensord_start(int handle, int option)
        sensor_id_t sensor_id;
        sensor_rep prev_rep, cur_rep;
        bool ret;
-       int prev_state, prev_option;
+       int prev_state, prev_pause;
        int pause;
 
        AUTOLOCK(lock);
@@ -856,14 +856,14 @@ API bool sensord_start(int handle, int option)
        }
 
        sensor_client_info::get_instance().get_sensor_rep(sensor_id, prev_rep);
-       sensor_client_info::get_instance().get_sensor_params(handle, prev_state, prev_option);
+       sensor_client_info::get_instance().get_sensor_params(handle, prev_state, prev_pause);
        sensor_client_info::get_instance().set_sensor_params(handle, SENSOR_STATE_STARTED, pause);
        sensor_client_info::get_instance().get_sensor_rep(sensor_id, cur_rep);
 
        ret = change_sensor_rep(sensor_id, prev_rep, cur_rep);
 
        if (!ret)
-               sensor_client_info::get_instance().set_sensor_params(handle, prev_state, prev_option);
+               sensor_client_info::get_instance().set_sensor_params(handle, prev_state, prev_pause);
 
        return ret;
 }
@@ -873,7 +873,7 @@ API bool sensord_stop(int handle)
        sensor_id_t sensor_id;
        int sensor_state;
        bool ret;
-       int prev_state, prev_option;
+       int prev_state, prev_pause;
 
        sensor_rep prev_rep, cur_rep;
 
@@ -891,14 +891,14 @@ API bool sensord_stop(int handle)
        _I("%s stops sensor %s[%d]", get_client_name(), get_sensor_name(sensor_id), handle);
 
        sensor_client_info::get_instance().get_sensor_rep(sensor_id, prev_rep);
-       sensor_client_info::get_instance().get_sensor_params(handle, prev_state, prev_option);
+       sensor_client_info::get_instance().get_sensor_params(handle, prev_state, prev_pause);
        sensor_client_info::get_instance().set_sensor_state(handle, SENSOR_STATE_STOPPED);
        sensor_client_info::get_instance().get_sensor_rep(sensor_id, cur_rep);
 
        ret = change_sensor_rep(sensor_id, prev_rep, cur_rep);
 
        if (!ret)
-               sensor_client_info::get_instance().set_sensor_params(handle, prev_state, prev_option);
+               sensor_client_info::get_instance().set_sensor_params(handle, prev_state, prev_pause);
 
        return ret;
 }
@@ -1004,13 +1004,13 @@ static int change_pause_policy(int handle, int pause)
                else if (!(pause & g_power_save_state) && (sensor_state == SENSOR_STATE_PAUSED))
                        sensor_client_info::get_instance().set_sensor_state(handle, SENSOR_STATE_STARTED);
        }
-       sensor_client_info::get_instance().set_sensor_option(handle, pause);
+       sensor_client_info::get_instance().set_sensor_pause_policy(handle, pause);
 
        sensor_client_info::get_instance().get_sensor_rep(sensor_id, cur_rep);
        ret =  change_sensor_rep(sensor_id, prev_rep, cur_rep);
 
        if (!ret)
-               sensor_client_info::get_instance().set_sensor_option(handle, prev_pause);
+               sensor_client_info::get_instance().set_sensor_pause_policy(handle, prev_pause);
 
        return (ret ? OP_SUCCESS : OP_ERROR);
 }
index a91dbb0..ec17a1f 100644 (file)
@@ -95,9 +95,9 @@ void print_event_occurrence_log(sensor_handle_info &info)
        if ((count != 1) && (count % log_per_count != 0))
                return;
 
-       _D("%s receives %s[%d][state: %d, option: %d, count: %d]", get_client_name(),
+       _D("%s receives %s[%d][state: %d, pause policy: %d, count: %d]", get_client_name(),
                        get_sensor_name(info.m_sensor_id), info.m_handle,
-                       info.m_sensor_state, info.m_sensor_option, count);
+                       info.m_sensor_state, info.m_pause_policy, count);
 }
 
 /*
index ff49a54..39c3d4d 100644 (file)
@@ -339,33 +339,33 @@ bool command_channel::cmd_stop(void)
        return true;
 }
 
-bool command_channel::cmd_set_option(int option)
+bool command_channel::cmd_set_pause_policy(int pause_policy)
 {
        cpacket *packet;
-       cmd_set_option_t *cmd_set_option;
+       cmd_set_pause_policy_t *cmd_set_pause_policy;
        cmd_done_t *cmd_done;
 
-       packet = new(std::nothrow) cpacket(sizeof(cmd_set_option_t));
+       packet = new(std::nothrow) cpacket(sizeof(cmd_set_pause_policy_t));
        retvm_if(!packet, false, "Failed to allocate memory");
 
-       packet->set_cmd(CMD_SET_OPTION);
+       packet->set_cmd(CMD_SET_PAUSE_POLICY);
 
-       cmd_set_option = (cmd_set_option_t*)packet->data();
-       cmd_set_option->option = option;
+       cmd_set_pause_policy = (cmd_set_pause_policy_t*)packet->data();
+       cmd_set_pause_policy->pause_policy = pause_policy;
 
-       _I("%s send cmd_set_option(client_id=%d, %s, option=%d)",
-               get_client_name(), m_client_id, get_sensor_name(m_sensor_id), option);
+       _I("%s send cmd_set_pause_policy(client_id=%d, %s, pause_policy=%d)",
+               get_client_name(), m_client_id, get_sensor_name(m_sensor_id), pause_policy);
 
        if (!command_handler(packet, (void **)&cmd_done)) {
-               _E("Client %s failed to send/receive command for sensor[%s] with client_id [%d], option[%d]",
-                       get_client_name(), get_sensor_name(m_sensor_id), m_client_id, option);
+               _E("Client %s failed to send/receive command for sensor[%s] with client_id [%d], pause_policy[%d]",
+                       get_client_name(), get_sensor_name(m_sensor_id), m_client_id, pause_policy);
                delete packet;
                return false;
        }
 
        if (cmd_done->value < 0) {
-               _E("Client %s got error[%d] from server for sensor[%s] with client_id [%d], option[%d]",
-                       get_client_name(), cmd_done->value, get_sensor_name(m_sensor_id), m_client_id, option);
+               _E("Client %s got error[%d] from server for sensor[%s] with client_id [%d], pause_policy[%d]",
+                       get_client_name(), cmd_done->value, get_sensor_name(m_sensor_id), m_client_id, pause_policy);
 
                delete[] (char *)cmd_done;
                delete packet;
index 15b579e..2dd3589 100644 (file)
@@ -39,7 +39,7 @@ public:
        bool cmd_byebye(void);
        bool cmd_start(void);
        bool cmd_stop(void);
-       bool cmd_set_option(int option);
+       bool cmd_set_pause_policy(int pause_policy);
        bool cmd_register_event(unsigned int event_type);
        bool cmd_register_events(event_type_vector &event_vec);
        bool cmd_unregister_event(unsigned int event_type);
index ecb453e..6ac154c 100644 (file)
@@ -59,7 +59,7 @@ int sensor_client_info::create_handle(sensor_id_t sensor)
 
        handle_info.m_sensor_id = sensor;
        handle_info.m_sensor_state = SENSOR_STATE_STOPPED;
-       handle_info.m_sensor_option = SENSOR_OPTION_DEFAULT;
+       handle_info.m_pause_policy = SENSORD_PAUSE_ALL;
        handle_info.m_handle = handle;
        handle_info.m_accuracy = -1;
        handle_info.m_accuracy_cb = NULL;
@@ -163,7 +163,7 @@ bool sensor_client_info::unregister_accuracy_cb(int handle)
        return true;
 }
 
-bool sensor_client_info::set_sensor_params(int handle, int sensor_state, int sensor_option)
+bool sensor_client_info::set_sensor_params(int handle, int sensor_state, int pause_policy)
 {
        AUTOLOCK(m_handle_info_lock);
 
@@ -175,12 +175,12 @@ bool sensor_client_info::set_sensor_params(int handle, int sensor_state, int sen
        }
 
        it_handle->second.m_sensor_state = sensor_state;
-       it_handle->second.m_sensor_option = sensor_option;
+       it_handle->second.m_pause_policy = pause_policy;
 
        return true;
 }
 
-bool sensor_client_info::get_sensor_params(int handle, int &sensor_state, int &sensor_option)
+bool sensor_client_info::get_sensor_params(int handle, int &sensor_state, int &pause_policy)
 {
        AUTOLOCK(m_handle_info_lock);
 
@@ -192,7 +192,7 @@ bool sensor_client_info::get_sensor_params(int handle, int &sensor_state, int &s
        }
 
        sensor_state = it_handle->second.m_sensor_state;
-       sensor_option = it_handle->second.m_sensor_option;
+       pause_policy = it_handle->second.m_pause_policy;
 
        return true;
 }
@@ -213,7 +213,7 @@ bool sensor_client_info::set_sensor_state(int handle, int sensor_state)
        return true;
 }
 
-bool sensor_client_info::set_sensor_option(int handle, int sensor_option)
+bool sensor_client_info::set_sensor_pause_policy(int handle, int pause_policy)
 {
        AUTOLOCK(m_handle_info_lock);
 
@@ -224,7 +224,7 @@ bool sensor_client_info::set_sensor_option(int handle, int sensor_option)
                return false;
        }
 
-       it_handle->second.m_sensor_option = sensor_option;
+       it_handle->second.m_pause_policy = pause_policy;
 
        return true;
 }
@@ -323,7 +323,7 @@ void sensor_client_info::get_sensor_rep(sensor_id_t sensor, sensor_rep& rep) {
        const unsigned int INVALID_BATCH_VALUE = std::numeric_limits<unsigned int>::max();
 
        rep.active = is_sensor_active(sensor);
-       rep.option = get_active_option(sensor);
+       rep.pause_policy = get_active_pause_policy(sensor);
        if (!get_active_batch(sensor, rep.interval, rep.latency)) {
                rep.interval = INVALID_BATCH_VALUE;
                rep.latency = INVALID_BATCH_VALUE;
@@ -441,11 +441,11 @@ bool sensor_client_info::get_active_batch(sensor_id_t sensor, unsigned int &inte
        return true;
 }
 
-unsigned int sensor_client_info::get_active_option(sensor_id_t sensor)
+unsigned int sensor_client_info::get_active_pause_policy(sensor_id_t sensor)
 {
-       int active_option = SENSOR_OPTION_DEFAULT;
+       int active_pause = SENSORD_PAUSE_ALL;
        bool active_sensor_found = false;
-       int option;
+       int pause;
 
        AUTOLOCK(m_handle_info_lock);
 
@@ -455,8 +455,8 @@ unsigned int sensor_client_info::get_active_option(sensor_id_t sensor)
                if ((it_handle->second.m_sensor_id == sensor) &&
                        (it_handle->second.m_sensor_state == SENSOR_STATE_STARTED)) {
                                active_sensor_found = true;
-                               option = it_handle->second.m_sensor_option;
-                               active_option = (option > active_option) ? option : active_option;
+                               pause = it_handle->second.m_pause_policy;
+                               active_pause = (pause < active_pause) ? pause: active_pause;
                }
 
                ++it_handle;
@@ -465,7 +465,7 @@ unsigned int sensor_client_info::get_active_option(sensor_id_t sensor)
        if (!active_sensor_found)
                _D("Active sensor[%#llx] is not found for client %s", sensor, get_client_name());
 
-       return active_option;
+       return active_pause;
 }
 
 bool sensor_client_info::get_sensor_id(int handle, sensor_id_t &sensor)
index 275e674..ac3a56f 100644 (file)
@@ -53,7 +53,7 @@ typedef unordered_map<sensor_id_t, command_channel *> sensor_command_channel_map
 
 typedef struct sensor_rep {
        bool active;
-       int option;
+       int pause_policy;
        unsigned int interval;
        unsigned int latency;
        event_type_vector event_types;
@@ -71,10 +71,10 @@ public:
        bool register_accuracy_cb(int handle, sensor_accuracy_changed_cb_t cb, void* user_data);
        bool unregister_accuracy_cb(int handle);
 
-       bool set_sensor_params(int handle, int sensor_state, int sensor_option);
-       bool get_sensor_params(int handle, int &sensor_state, int &sensor_option);
+       bool set_sensor_params(int handle, int sensor_state, int sensor_pause_policy);
+       bool get_sensor_params(int handle, int &sensor_state, int &sensor_pause_policy);
        bool set_sensor_state(int handle, int sensor_state);
-       bool set_sensor_option(int handle, int sensor_option);
+       bool set_sensor_pause_policy(int handle, int pause_policy);
        bool set_event_batch(int handle, unsigned int event_type, unsigned int interval, unsigned int latency);
        bool set_accuracy(int handle, int accuracy);
        bool set_bad_accuracy(int handle, int bad_accuracy);
@@ -83,7 +83,7 @@ public:
        void get_sensor_rep(sensor_id_t sensor, sensor_rep& rep);
 
        bool get_active_batch(sensor_id_t sensor, unsigned int &interval, unsigned int &latency);
-       unsigned int get_active_option(sensor_id_t sensor_id);
+       unsigned int get_active_pause_policy(sensor_id_t sensor_id);
        void get_active_event_types(sensor_id_t sensor_id, event_type_vector &active_event_types);
 
        bool get_sensor_id(int handle, sensor_id_t &sensor_id);
index 3182b78..1b9cd07 100644 (file)
@@ -82,12 +82,12 @@ void sensor_event_listener::operate_sensor(sensor_id_t sensor, int power_save_st
 
                if ((it_handle->second.m_sensor_state == SENSOR_STATE_STARTED) &&
                        power_save_state &&
-                       !(it_handle->second.m_sensor_option & power_save_state)) {
+                       (it_handle->second.m_pause_policy & power_save_state)) {
                        m_client_info.set_sensor_state(it_handle->first, SENSOR_STATE_PAUSED);
                        _I("%s's %s[%d] is paused", get_client_name(), get_sensor_name(sensor), it_handle->first);
 
                } else if ((it_handle->second.m_sensor_state == SENSOR_STATE_PAUSED) &&
-                       (!power_save_state || (it_handle->second.m_sensor_option & power_save_state))) {
+                       (!power_save_state || !(it_handle->second.m_pause_policy & power_save_state))) {
                        m_client_info.set_sensor_state(it_handle->first, SENSOR_STATE_STARTED);
                        _I("%s's %s[%d] is resumed", get_client_name(), get_sensor_name(sensor), it_handle->first);
                }
index 6dc1984..175c567 100644 (file)
@@ -29,7 +29,7 @@ sensor_handle_info::sensor_handle_info()
 : m_handle(0)
 , m_sensor_id(UNKNOWN_SENSOR)
 , m_sensor_state(SENSOR_STATE_UNKNOWN)
-, m_sensor_option(SENSOR_OPTION_DEFAULT)
+, m_pause_policy(SENSORD_PAUSE_ALL)
 , m_bad_accuracy(false)
 , m_accuracy(-1)
 , m_accuracy_cb(NULL)
index 00eba28..f64b2a6 100644 (file)
@@ -33,7 +33,7 @@ public:
        int m_handle;
        sensor_id_t m_sensor_id;
        int m_sensor_state;
-       int m_sensor_option;
+       int m_pause_policy;
        int m_bad_accuracy;
        int m_accuracy;
        sensor_accuracy_changed_cb_t m_accuracy_cb;
index efdaec0..4a72308 100644 (file)
@@ -131,7 +131,7 @@ bool client_info_manager::get_batch(int client_id, sensor_id_t sensor_id, unsign
        return it_record->second.get_batch(sensor_id, interval, latency);
 }
 
-bool client_info_manager::set_option(int client_id, sensor_id_t sensor_id, int option)
+bool client_info_manager::set_pause_policy(int client_id, sensor_id_t sensor_id, int pause_policy)
 {
        AUTOLOCK(m_mutex);
 
@@ -144,7 +144,7 @@ bool client_info_manager::set_option(int client_id, sensor_id_t sensor_id, int o
                return false;
        }
 
-       if (!it_record->second.set_option(sensor_id, option))
+       if (!it_record->second.set_pause_policy(sensor_id, pause_policy))
                return false;
 
        return true;
index b65c4bf..ad7add8 100644 (file)
@@ -52,7 +52,7 @@ public:
 
        bool set_batch(int client_id, sensor_id_t sensor_id, unsigned int interval, unsigned int latency);
        bool get_batch(int client_id, sensor_id_t sensor_id, unsigned int &interval, unsigned int &latency);
-       bool set_option(int client_id, sensor_id_t sensor_id, int option);
+       bool set_pause_policy(int client_id, sensor_id_t sensor_id, int pause_policy);
 
        bool set_start(int client_id, sensor_id_t sensor_id, bool start);
        bool is_started(int client_id, sensor_id_t sensor_id);
index e2e647e..8eeafca 100644 (file)
@@ -72,16 +72,16 @@ bool client_sensor_record::unregister_event(sensor_id_t sensor_id, unsigned int
        return true;
 }
 
-bool client_sensor_record::set_option(sensor_id_t sensor_id, int option)
+bool client_sensor_record::set_pause_policy(sensor_id_t sensor_id, int pause_policy)
 {
        auto it_usage = m_sensor_usages.find(sensor_id);
 
        if (it_usage == m_sensor_usages.end()) {
                sensor_usage usage;
-               usage.m_option = option;
+               usage.m_pause_policy = pause_policy;
                m_sensor_usages.insert(pair<sensor_id_t, sensor_usage>(sensor_id, usage));
        } else {
-               it_usage->second.m_option = option;
+               it_usage->second.m_pause_policy = pause_policy;
        }
 
        return true;
index defc3d9..ad4835c 100644 (file)
@@ -47,7 +47,7 @@ public:
 
        bool set_batch(sensor_id_t sensor_id, unsigned int interval, unsigned int latency);
        bool get_batch(sensor_id_t sensor_id, unsigned int &interval, unsigned int &latency);
-       bool set_option(sensor_id_t sensor_id, int option);
+       bool set_pause_policy(sensor_id_t sensor_id, int pause_policy);
 
        bool set_start(sensor_id_t sensor_id, bool start);
        bool is_started(sensor_id_t sensor_id);
index 13c8260..f8a6075 100644 (file)
@@ -82,7 +82,7 @@ void command_worker::init_cmd_handlers(void)
        m_cmd_handlers[CMD_STOP]                                = &command_worker::cmd_stop;
        m_cmd_handlers[CMD_REG]                                 = &command_worker::cmd_register_event;
        m_cmd_handlers[CMD_UNREG]                               = &command_worker::cmd_unregister_event;
-       m_cmd_handlers[CMD_SET_OPTION]                  = &command_worker::cmd_set_option;
+       m_cmd_handlers[CMD_SET_PAUSE_POLICY]    = &command_worker::cmd_set_pause_policy;
        m_cmd_handlers[CMD_SET_BATCH]                   = &command_worker::cmd_set_batch;
        m_cmd_handlers[CMD_UNSET_BATCH]                 = &command_worker::cmd_unset_batch;
        m_cmd_handlers[CMD_GET_DATA]                    = &command_worker::cmd_get_data;
@@ -658,23 +658,23 @@ out:
        return true;
 }
 
-bool command_worker::cmd_set_option(void *payload)
+bool command_worker::cmd_set_pause_policy(void *payload)
 {
-       cmd_set_option_t *cmd;
+       cmd_set_pause_policy_t *cmd;
        long ret_value = OP_ERROR;
 
-       cmd = (cmd_set_option_t*)payload;
+       cmd = (cmd_set_pause_policy_t*)payload;
 
        if (!is_permission_allowed()) {
-               _E("Permission denied to set interval for client [%d], for sensor [%#llx] with option [%d] to client info manager",
-                       m_client_id, m_sensor_id, cmd->option);
+               _E("Permission denied to set interval for client [%d], for sensor [%#llx] with pause_policy [%d] to client info manager",
+                       m_client_id, m_sensor_id, cmd->pause_policy);
                ret_value = OP_ERROR;
                goto out;
        }
 
-       if (!get_client_info_manager().set_option(m_client_id, m_sensor_id, cmd->option)) {
-               _E("Failed to set option for client [%d], for sensor [%#llx] with option [%d] to client info manager",
-                       m_client_id, m_sensor_id, cmd->option);
+       if (!get_client_info_manager().set_pause_policy(m_client_id, m_sensor_id, cmd->pause_policy)) {
+               _E("Failed to set pause_policy for client [%d], for sensor [%#llx] with pause_policy [%d] to client info manager",
+                       m_client_id, m_sensor_id, cmd->pause_policy);
                ret_value = OP_ERROR;
                goto out;
        }
index 78661ad..3e1b62c 100644 (file)
@@ -69,7 +69,7 @@ private:
        bool cmd_unregister_event(void *payload);
        bool cmd_set_batch(void *payload);
        bool cmd_unset_batch(void *payload);
-       bool cmd_set_option(void *payload);
+       bool cmd_set_pause_policy(void *payload);
        bool cmd_get_data(void *payload);
        bool cmd_set_attribute_int(void *payload);
        bool cmd_set_attribute_str(void *payload);
index 780bdff..e4f0ffc 100644 (file)
@@ -25,7 +25,7 @@
 sensor_usage::sensor_usage()
 : m_interval(POLL_1HZ_MS)
 , m_latency(0)
-, m_option(SENSOR_OPTION_DEFAULT)
+, m_pause_policy(SENSORD_PAUSE_ALL)
 , m_start(false)
 {
 }
index 91c4571..e3fd247 100644 (file)
@@ -29,7 +29,7 @@ class sensor_usage {
 public:
        unsigned int m_interval;
        unsigned int m_latency;
-       int m_option;
+       int m_pause_policy;
        reg_event_vector m_reg_events;
        bool m_start;
 
index 3973a92..2afb3bd 100644 (file)
@@ -42,7 +42,7 @@ enum packet_type_t {
        CMD_STOP,
        CMD_REG,
        CMD_UNREG,
-       CMD_SET_OPTION,
+       CMD_SET_PAUSE_POLICY,
        CMD_SET_BATCH,
        CMD_UNSET_BATCH,
        CMD_GET_DATA,
@@ -122,8 +122,8 @@ typedef struct {
 } cmd_unset_batch_t;
 
 typedef struct {
-       int option;
-} cmd_set_option_t;
+       int pause_policy;
+} cmd_set_pause_policy_t;
 
 typedef struct  {
        int attribute;