Skip to content

RDKEMW-4056 : RFC overrides for BLE network config #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 45 additions & 1 deletion src/ble/ctrlm_ble_network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2403,7 +2403,51 @@ void ctrlm_obj_network_ble_t::power_state_change(gboolean waking_up) {
}

void ctrlm_obj_network_ble_t::rfc_retrieved_handler(const ctrlm_rfc_attr_t &attr) {
// TODO - No RFC parameters as of now
// Process timeout object
int timeout = -1;
attr.get_rfc_value(JSON_INT_NAME_NETWORK_BLE_TIMEOUTS_DISCOVERY, timeout, 0, 600000);
if(timeout > 0) {
XLOGD_INFO("discovery timeout set to <%d>", timeout);
//setTimeoutDiscovery(timeout);
}

timeout = -1;
attr.get_rfc_value(JSON_INT_NAME_NETWORK_BLE_TIMEOUTS_PAIR, timeout, 0, 600000);
if(timeout > 0) {
XLOGD_INFO("pair timeout set to <%d>", timeout);
//setTimeoutPair(timeout);
}

timeout = -1;
attr.get_rfc_value(JSON_INT_NAME_NETWORK_BLE_TIMEOUTS_SETUP, timeout, 0, 600000);
if(timeout > 0) {
XLOGD_INFO("setup timeout set to <%d>", timeout);
//setTimeoutSetup(timeout);
}

timeout = -1;
attr.get_rfc_value(JSON_INT_NAME_NETWORK_BLE_TIMEOUTS_UNPAIR, timeout, 0, 600000);
if(timeout > 0) {
XLOGD_INFO("unpair timeout set to <%d>", timeout);
//setTimeoutUnpair(timeout);
}

/* DO WE EVEN NEED THESE TIMEOUTS?
timeout = -1;
attr.get_rfc_value(JSON_INT_NAME_NETWORK_BLE_TIMEOUTS_HIDRAWPOLL, timeout, 0, 600000);
if(timeout > 0) {
XLOGD_INFO("hidrawpoll timeout set to <%d>", timeout);
setTimeoutHidrawpoll(timeout);
}

timeout = -1;
attr.get_rfc_value(JSON_INT_NAME_NETWORK_BLE_TIMEOUTS_HIDRAWLIMIT, timeout, 0, 600000);
if(timeout > 0) {
XLOGD_INFO("hidrawlimit timeout set to <%d>", timeout);
setTimeoutHidrawlimit(timeout);
}*/

//attr.get_rfc_value(JSON_INT_NAME_NETWORK_BLE_MODELS,class_inc_line_of_sight_,0,15);
}

std::vector<ctrlm_obj_controller_t *> ctrlm_obj_network_ble_t::get_controller_obj_list() const {
Expand Down