Skip to content

Commit

Permalink
Merge pull request ARMmbed#1837 from ARMmbed/llc_parent_synch
Browse files Browse the repository at this point in the history
Update brodcast synch when here data from primary parent.
  • Loading branch information
Juha Heiskanen authored Sep 27, 2018
2 parents 9e22831 + bf55180 commit fb07086
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions source/6LoWPAN/ws/ws_llc_data_service.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include "6LoWPAN/ws/ws_llc.h"
#include "6LoWPAN/ws/ws_mpx_header.h"
#include "Service_Libs/etx/etx.h"
#include "fhss_ws_extension.h"

#ifdef HAVE_WS

Expand Down Expand Up @@ -519,6 +520,11 @@ static void ws_llc_mac_indication_cb(const mac_api_t* api, const mcps_data_ind_t
ws_neighbor_class_neighbor_unicast_time_info_update(neighbor_info.ws_neighbor, &ws_utt, data->timestamp);
if (us_ie_inline) {
ws_neighbor_class_neighbor_unicast_schedule_set(neighbor_info.ws_neighbor, &us_ie);

if (neighbor_info.neighbor->link_role == PRIORITY_PARENT_NEIGHBOUR) {
// We have broadcast schedule set up set the broadcast parent schedule
ns_fhss_ws_set_parent(interface->ws_info->fhss_api, neighbor_info.neighbor->mac64, &neighbor_info.ws_neighbor->fhss_data.bc_timing_info);
}
}
//Update BT if it is part of message
ws_bt_ie_t ws_bt;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ TEST_SRC_FILES = \
../../stub/ws_neighbour_class_stub.c \
../../stub/mac_neighbor_table_stub.c \
../../stub/iphc_decompress_stub.c \
../../stub/fhss_config_stub.c \


include ../../MakefileWorker.mk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include "ws_neighbour_class_stub.h"
#include "ws_ie_lib_stub.h"
#include "address_stub.h"
#include "fhss_ws_extension.h"

static mcps_data_indication_ext *data_indication_cb;

Expand Down
5 changes: 5 additions & 0 deletions test/nanostack/unittest/stub/fhss_config_stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,8 @@ fhss_api_t *ns_fhss_create(const fhss_configuration_t *fhss_configuration, const
fhss_config_stub.fhss_api_ptr.init_callbacks = &fhss_init_callbacks_cb_stub;
return &fhss_config_stub.fhss_api_ptr;
}

int ns_fhss_ws_set_parent(const fhss_api_t *fhss_api, const uint8_t eui64[8], const broadcast_timing_info_t *bc_timing_info)
{
return 0;
}

0 comments on commit fb07086

Please sign in to comment.