Skip to content

Commit a881580

Browse files
author
Jarkko Paso
committed
FHSS: Added ws handler for FHSS state set
1 parent f7ab36c commit a881580

File tree

6 files changed

+72
-1
lines changed

6 files changed

+72
-1
lines changed

source/Service_Libs/fhss/fhss_mac_interface.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "fhss_config.h"
2222
#include "Service_Libs/fhss/fhss_common.h"
2323
#include "Service_Libs/fhss/fhss.h"
24+
#include "Service_Libs/fhss/fhss_ws.h"
2425
#include "Service_Libs/fhss/fhss_channel.h"
2526
#include "Service_Libs/fhss/fhss_beacon.h"
2627
#include "platform/arm_hal_interrupt.h"
@@ -200,7 +201,7 @@ void fhss_synch_state_set_cb(const fhss_api_t *api, fhss_states fhss_state, uint
200201
if (fhss_structure->mode == MODE_FHSS) {
201202
fhss_handle_state_set(fhss_structure, fhss_state, pan_id);
202203
} else if (fhss_structure->mode == MODE_W_S) {
203-
204+
fhss_ws_handle_state_set(fhss_structure, fhss_state);
204205
}
205206
fhss_structure->fhss_state = fhss_state;
206207
}

source/Service_Libs/fhss/fhss_ws.c

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright (c) 2015-2017, Arm Limited and affiliates.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
#include "nsconfig.h"
18+
#include "ns_types.h"
19+
#include "fhss_api.h"
20+
#include "fhss_config.h"
21+
#include "fhss_common.h"
22+
23+
int fhss_ws_handle_state_set(fhss_structure_t *fhss_structure, fhss_states fhss_state)
24+
{
25+
return 0;
26+
}

source/Service_Libs/fhss/fhss_ws.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* Copyright (c) 2015-2017, Arm Limited and affiliates.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
int fhss_ws_handle_state_set(fhss_structure_t *fhss_structure, fhss_states fhss_state);

sources.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ SRCS += \
9191
source/Service_Libs/fhss/fhss_configuration_interface.c \
9292
source/Service_Libs/fhss/fhss_statistics.c \
9393
source/Service_Libs/fhss/fhss.c \
94+
source/Service_Libs/fhss/fhss_ws.c \
9495
source/Service_Libs/fhss/fhss_common.c \
9596
source/Service_Libs/fhss/channel_list.c \
9697
source/Service_Libs/fnv_hash/fnv_hash.c \

test/nanostack/unittest/service_libs/fhss_mac_interface/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ TEST_SRC_FILES = \
1414
../../stub/mbed_trace_stub.c \
1515
../../stub/nsdynmemLIB_stub.c \
1616
../../stub/fhss_stub.c \
17+
../../stub/fhss_ws_stub.c \
1718
../../stub/fhss_channel_stub.c \
1819
../../stub/fhss_platform_stub.c \
1920
../../stub/fhss_callbacks_stub.c \
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* Copyright (c) 2016-2017, Arm Limited and affiliates.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
#include "nsconfig.h"
18+
#include <string.h>
19+
#include "nsdynmemLIB.h"
20+
#include "fhss_api.h"
21+
#include "fhss_config.h"
22+
#include "Service_Libs/fhss/fhss_common.h"
23+
#include "Service_Libs/fhss/fhss.h"
24+
#include "Service_Libs/fhss/fhss_beacon.h"

0 commit comments

Comments
 (0)