Merge pull request #5602 from artokin/nanostack_release_v704

Nanostack release v704
pull/5536/merge
Martin Kojtal 2017-11-30 18:26:45 +00:00 committed by GitHub
commit 41591eb83b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
820 changed files with 1057 additions and 61180 deletions

View File

@ -1,114 +0,0 @@
#!/bin/bash
#
# Export FEATURE_NANOSTACK libraries into mbed OS
#
# Usage:
#
# To remove all repositories call: ./clone_client.sh clean
# To replace all with clone repositores: ./clone_client.sh clone
# To export from cloned repositories: ./clone_client.sh export
#
# For developers:
# Use "clone" functionality to get master repositories to work with.
#
# For maintainers: Creating a release
# Use "clone" to get master repositories.
# For every directory checkout the release branch.
# Now use "export" function to flatten the git repositories into bare directories
# Now you can "git add" each directory and do "git commit"
#
# Note "clone" does implicit "clean" so you lose all changes done into directories.
# REPOSITORIES and DIRECTORIES are array of repositories where to clone
# and directories where to clone
# these arrays MUST be in sync
# * Same number of elements
# * Same order. Each line should have maching pair in same index at other array
REPOSITORIES=(
git@github.com:ARMmbed/sal-stack-nanostack.git
)
DIRECTORIES=(
sal-stack-nanostack
)
# Exit immediately on fail, thread unset variables as error
set -eu
# Count number of repositories (minus one)
N=0
print_usage() {
echo -e "Usage: $0 [clean | clone | export ]"
echo -e "\tclean : Remove all repositories"
echo -e "\tclone : Replace repositories with Git cone"
echo -e "\texport : Export cloned Git repositories"
}
clean() {
for dir in ${DIRECTORIES[*]}; do
rm -rf $dir
done
clean_nanostack_binaries
clean_nanostack_licenses
}
clone() {
for i in $(seq 0 $N); do
git clone ${REPOSITORIES[$i]} ${DIRECTORIES[$i]}
done
}
export_repos() {
for i in $(seq 0 $N); do
echo "Exporting ${DIRECTORIES[$i]}"
cd ${DIRECTORIES[$i]}
git archive HEAD -o ../${DIRECTORIES[$i]}.tar.gz
cd ..
rm -rf ${DIRECTORIES[$i]}
mkdir ${DIRECTORIES[$i]}
tar xzf ${DIRECTORIES[$i]}.tar.gz -C ${DIRECTORIES[$i]}
rm ${DIRECTORIES[$i]}.tar.gz
done
}
copy_nanostack_binaries() {
mv sal-stack-nanostack/FEATURE_* ../
}
clean_nanostack_binaries() {
for binaries in ../FEATURE_*; do
if [ "$binaries" != "../FEATURE_NANOSTACK" ]; then
rm -rf $binaries
fi
done
}
copy_nanostack_licenses() {
mv sal-stack-nanostack/LICENSE* ../
}
clean_nanostack_licenses() {
rm -rf ../LICENSE*
}
case "${1-}" in
clean)
clean
;;
clone)
clean
clone
;;
export)
export_repos
copy_nanostack_binaries
copy_nanostack_licenses
;;
*)
print_usage
exit 1
;;
esac

View File

@ -1,3 +1,17 @@
# Copyright (c) 2015-2017, Arm Limited and affiliates.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Makefile for combined CoAP Service library
#
@ -35,6 +49,10 @@ COAPSERVICE_DIR := ../coap-service
override CFLAGS += -I$(COAPSERVICE_DIR)/coap-service/
override CFLAGS += -I$(COAPSERVICE_DIR)/source/include/
ifeq (Linux,$(shell uname))
override CFLAGS += -DHAVE_DEBUG
endif
LIB = libcoap-service.a
SRCS := \

View File

@ -1,3 +1,17 @@
# Copyright (c) 2015-2017, Arm Limited and affiliates.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Makefile.test for COAP service unit tests
#

View File

@ -1,17 +1,16 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
*
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@ -1,15 +1,17 @@
#!/bin/bash
# Copyright (c) 2015-2017 ARM Limited. All rights reserved.
#
# Copyright (c) 2015-2017, Arm Limited and affiliates.
# SPDX-License-Identifier: Apache-2.0
# Licensed under the Apache License, Version 2.0 (the License); you may
# not use this file except in compliance with the License.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# * http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an AS IS BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <string.h>

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <string.h>

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <string.h>

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@ -1,17 +1,16 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
*
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@ -1,17 +1,16 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
*
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@ -1,17 +1,16 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
*
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@ -1,17 +1,16 @@
/*
* Copyright (c) 2016 ARM Limited. All Rights Reserved.
*
* Copyright (c) 2016, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@ -1,3 +1,18 @@
# Copyright (c) 2015-2017, Arm Limited and affiliates.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#scan for folders having "Makefile" in them and remove 'this' to prevent loop
ifeq ($(OS),Windows_NT)
all:

View File

@ -1,3 +1,18 @@
# Copyright (c) 2015-2017, Arm Limited and affiliates.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#---------
#
# MakefileWorker.mk

View File

@ -1,3 +1,18 @@
# Copyright (c) 2015-2017, Arm Limited and affiliates.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include ../makefile_defines.txt
COMPONENT_NAME = coap_connection_handler_unit

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015-2017 ARM. All rights reserved.
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "CppUTest/TestHarness.h"
#include "test_coap_connection_handler.h"

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015-2017 ARM. All rights reserved.
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "CppUTest/CommandLineTestRunner.h"

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "test_coap_connection_handler.h"
#include <string.h>

View File

@ -1,17 +1,16 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
*
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@ -1,3 +1,18 @@
# Copyright (c) 2015-2017, Arm Limited and affiliates.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include ../makefile_defines.txt
COMPONENT_NAME = coap_message_handler_unit

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015-2017 ARM. All rights reserved.
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "CppUTest/TestHarness.h"
#include "test_coap_message_handler.h"

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015-2017 ARM. All rights reserved.
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "CppUTest/CommandLineTestRunner.h"

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "test_coap_message_handler.h"
#include <string.h>

View File

@ -1,17 +1,16 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
*
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@ -1,3 +1,18 @@
# Copyright (c) 2015-2017, Arm Limited and affiliates.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include ../makefile_defines.txt
COMPONENT_NAME = coap_security_handler_unit

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015-2017 ARM. All rights reserved.
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "CppUTest/TestHarness.h"
#include "test_coap_security_handler.h"

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015-2017 ARM. All rights reserved.
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "CppUTest/CommandLineTestRunner.h"

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "test_coap_security_handler.h"
#include "coap_security_handler.h"

View File

@ -1,17 +1,16 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
*
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@ -1,3 +1,18 @@
# Copyright (c) 2015-2017, Arm Limited and affiliates.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include ../makefile_defines.txt
COMPONENT_NAME = coap_service_api_unit

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015-2017 ARM. All rights reserved.
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "CppUTest/TestHarness.h"
#include "test_coap_service_api.h"

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015-2017 ARM. All rights reserved.
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "CppUTest/CommandLineTestRunner.h"

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "test_coap_service_api.h"
#include <string.h>

View File

@ -1,17 +1,16 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
*
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@ -1,3 +1,17 @@
# Copyright (c) 2015-2017, Arm Limited and affiliates.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#--- Inputs ----#
CPPUTEST_HOME = /usr
CPPUTEST_USE_EXTENSIONS = Y

View File

@ -1,4 +1,19 @@
#!/bin/bash
# Copyright (c) 2015-2017, Arm Limited and affiliates.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
echo
echo Build Coap-service unit tests
echo

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <string.h>

View File

@ -1,17 +1,16 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
*
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "coap_message_handler_stub.h"

View File

@ -1,17 +1,16 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
*
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <string.h>

View File

@ -1,17 +1,16 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
*
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <string.h>

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2016 ARM Limited. All rights reserved.
* Copyright (c) 2016, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <stdio.h>
#include <stdint.h>

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <string.h>

View File

@ -1,17 +1,16 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
*
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@ -1,15 +1,16 @@
/*
* Copyright (c) 2014-2017 ARM Limited. All rights reserved.
* Copyright (c) 2014-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
* Licensed under the Apache License, Version 2.0 (the License); you may
* not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "mbedtls_stub.h"

View File

@ -1,17 +1,16 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
*
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#define NS_LIST_FN extern

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2014-2017 ARM Limited. All Rights Reserved.
* Copyright (c) 2014-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "ns_types.h"
#include "ns_list.h"

View File

@ -1,17 +1,16 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
*
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2014-2017 ARM Limited. All Rights Reserved.
* Copyright (c) 2014-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "nsdynmemLIB_stub.h"
#include <stdint.h>

View File

@ -1,17 +1,16 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
*
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2014-2017 ARM Limited. All Rights Reserved.
* Copyright (c) 2014-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <stdint.h>
#include <stdlib.h>

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2011-2017 ARM Limited. All Rights Reserved.
* Copyright (c) 2011-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**

View File

@ -1,17 +1,16 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
*
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2011-2017 ARM Limited. All Rights Reserved.
* Copyright (c) 2011-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**

View File

@ -1,17 +1,16 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
*
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2011-2017 ARM Limited. All Rights Reserved.
* Copyright (c) 2011-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@ -1,17 +1,16 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
*
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "socket_api.h"
#include "socket_api_stub.h"

View File

@ -1,17 +1,16 @@
/*
* Copyright (c) 2015-2017 ARM Limited. All Rights Reserved.
*
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2014-2017 ARM Limited. All Rights Reserved.
* Copyright (c) 2014-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "ns_types.h"
#include "timer_sys.h"

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2016 ARM Limited. All Rights Reserved.
* Copyright (c) 2016, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "eventOS_event_timer.h"

View File

@ -1,16 +1,17 @@
#!/bin/bash
# Copyright (c) 2015-2017 ARM Limited. All rights reserved.
# Copyright (c) 2015-2017, Arm Limited and affiliates.
# SPDX-License-Identifier: Apache-2.0
# Licensed under the Apache License, Version 2.0 (the License); you may
# not use this file except in compliance with the License.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# * http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an AS IS BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
@ -32,4 +33,4 @@ echo '</list>' >> lcov/index.xml
echo
echo "Report created to lcov/index.xml (outputs html)"
echo
echo

View File

@ -1,88 +0,0 @@
# Example how to connect to mesh network
This application establishes connection to mbed 6LoWPAN gateway. After successful
connection tahe application disconnects from the network.
## Pre-requisites
To build and run this example the requirements below are necessary:
* A computer with the following software installed
* CMake
* yotta
* python
* arm gcc toolchain
* a serial terminal emulator (e.g. screen, pyserial, cu)
* optionally, for debugging, pyOCD and pyUSB
* A frdm-k64f development board
* A mbed 6LoWPAN shield
* A mbed 6LoWPAN Gateway
* A micro-USB cable
* A micro-USB charger for mbed 6LoWPAN Gateway
## Getting Started
1. Connect the frdm-k64f and 6LoWPAN RF shield together
2. Flash mbed 6LoWPAN gateway.
3. Open a terminal in the root mbed-mesh-api directory
4. Check that there are no missing dependencies
```
$ yt ls
```
5. Build the examples. This will take a long time if it is the first time that the examples have been built.
```
$ yt target frdm-k64f-gcc
$ yt build
```
6. Start the mbed 6LoWPAN Gateway by connecting USB charger
7. Copy `build/frdm-k64f-gcc/test/mbed-mesh-api.bin` to your mbed board and wait until the LED next to the USB port stops blinking.
8. Start the serial terminal emulator and connect to the virtual serial port presented by frdm-k64f. For settings, use 9600 baud, 8N1, no flow control.
9. Press the reset button on the board.
10. The output in the serial terminal emulator window should indicate a log that network is established.
## Using a debugger
Optionally, connect using a debugger to set breakpoints and follow program flow. Proceed normally up to and including step 7, then:
1. Open a new terminal window, then start the pyOCD GDB server.
```
$ python pyOCD/test/gdb_server.py
```
The output should look like this:
```
Welcome to the PyOCD GDB Server Beta Version
INFO:root:new board id detected: 02400201B1130E4E4CXXXXXX
id => usbinfo | boardname
0 => MB MBED CM (0xd28, 0x204) [k64f]
INFO:root:DAP SWD MODE initialised
INFO:root:IDCODE: 0x2BA01477
INFO:root:K64F not in secure state
INFO:root:6 hardware breakpoints, 4 literal comparators
INFO:root:4 hardware watchpoints
INFO:root:CPU core is Cortex-M4
INFO:root:FPU present
INFO:root:GDB server started at port:3333
```
2. Open a new terminal window, go to the root directory of your copy of mbed-6lowpan-adapter, then start GDB and connect to the GDB server.
```
$ arm-none-eabi-gdb -ex "target remote localhost:3333" -ex load ./build/frdm-k64f-gcc/test/mbed-mesh-api-test-6lowpan_nd
```
3. In a third terminal window, start the serial terminal emulator and connect to the virtual serial port presented by frdm-k64f.
4. Once the program has loaded, start it.
```
(gdb) mon reset halt
(gdb) c
```

View File

@ -1,97 +0,0 @@
/*
* Copyright (c) 2015 ARM Limited. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
* Licensed under the Apache License, Version 2.0 (the License); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <stdio.h>
#include "mbed-drivers/test_env.h"
#include "atmel-rf-driver/driverRFPhy.h" // rf_device_register
#include "mbed-mesh-api/MeshInterfaceFactory.h"
#include "mbed-mesh-api/Mesh6LoWPAN_ND.h"
#include "mbed-mesh-api/MeshThread.h"
// For tracing we need to define flag, have include and define group
#define HAVE_DEBUG 1
#include "ns_trace.h"
#define TRACE_GROUP "mesh_appl"
// Bootstrap mode, if undefined then 6LoWPAN-ND mode is used
#define BOOTSTRAP_MODE_THREAD
// mesh network state
static mesh_connection_status_t mesh_network_state = MESH_DISCONNECTED;
static AbstractMesh *meshApi;
// mesh network callback, called when network state changes
void mesh_network_callback(mesh_connection_status_t mesh_state)
{
tr_info("mesh_network_callback() %d", mesh_state);
mesh_network_state = mesh_state;
if (mesh_network_state == MESH_CONNECTED) {
tr_info("Connected to mesh network!");
// Once connected, disconnect from network
meshApi->disconnect();
} else if (mesh_network_state == MESH_DISCONNECTED) {
tr_info("Disconnected from mesh network!");
delete meshApi;
tr_info("Mesh networking done!");
} else {
tr_error("Networking error!");
}
}
void app_start(int, char **)
{
mesh_error_t status;
// set tracing baud rate
static Serial &pc = get_stdio_serial();
pc.baud(115200);
// create 6LoWPAN_ND interface
#ifdef BOOTSTRAP_MODE_THREAD
meshApi = MeshInterfaceFactory::createInterface(MESH_TYPE_THREAD);
uint8_t eui64[8];
int8_t rf_device = rf_device_register();
rf_read_mac_address(eui64);
char *pskd = (char *)"Secret password";
// Use tr_info traces and RF interface after MeshAPi has been created.
// as interface initializes mesh system that RF device is using
tr_info("Mesh API test application - Thread mode");
// initialize the interface with registered device and callback
status = ((MeshThread *)meshApi)->init(rf_device, mesh_network_callback, eui64, pskd);
#else
meshApi = (Mesh6LoWPAN_ND *)MeshInterfaceFactory::createInterface(MESH_TYPE_6LOWPAN_ND);
// Use tr_info traces and RF interface after MeshAPi has been created.
// as interface initializes mesh system that RF device is using
tr_info("Mesh API test application - 6LoWPAN-ND mode");
// initialize the interface with registered device and callback
status = ((Mesh6LoWPAN_ND *)meshApi)->init(rf_device_register(), mesh_network_callback);
#endif
// Set ns_trace configuration level
// set_trace_config(TRACE_ACTIVE_LEVEL_INFO|TRACE_MODE_COLOR|TRACE_CARRIAGE_RETURN);
if (status != MESH_ERROR_NONE) {
tr_error("Can't initialize mesh network");
return;
}
// connect interface to the network
status = meshApi->connect();
if (status != MESH_ERROR_NONE) {
tr_error("Can't connect to Mesh network!");
return;
}
}

View File

@ -1,157 +0,0 @@
/*
* Copyright (c) 2015 ARM Limited. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
* Licensed under the Apache License, Version 2.0 (the License); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "mbed.h"
#include "mbed-mesh-api/Mesh6LoWPAN_ND.h"
#include "mbed-mesh-api/MeshThread.h"
#include "mbed-mesh-api/MeshInterfaceFactory.h"
#include "atmel-rf-driver/driverRFPhy.h" // rf_device_register
#include "test_cases.h"
#include "mbed-drivers/test_env.h"
#include "core-util/FunctionPointer.h"
#define HAVE_DEBUG 1
#include "ns_trace.h"
#define TRACE_GROUP "main" // for traces
using namespace mbed::util;
/**
* Test with 6LoWPAN ND or Thread bootstrap
* If TEST_THREAD_BOOTSTRAP is not defined then 6LoWPAN ND bootstrap is used.
*/
#define TEST_THREAD_BOOTSTRAP
class TestMeshApi;
TestMeshApi *testMeshApi;
static int8_t rf_device_id = -1;
class TestMeshApi
{
private:
int testId;
int tests_pass;
int loopCount;
public:
TestMeshApi() : testId(0), tests_pass(1), loopCount(0) {
tr_info("TestMeshApi");
}
void runTests() {
switch (testId) {
case 0:
test_mesh_api_init(rf_device_id);
break;
case 1:
test_mesh_api_init_thread(rf_device_id);
break;
case 2:
test_mesh_api_disconnect(rf_device_id, MESH_TYPE_6LOWPAN_ND);
break;
case 3:
test_mesh_api_disconnect(rf_device_id, MESH_TYPE_THREAD);
break;
#ifndef TEST_THREAD_BOOTSTRAP
case 4:
test_mesh_api_connect(rf_device_id, MESH_TYPE_6LOWPAN_ND);
break;
case 5:
test_mesh_api_delete_connected(rf_device_id, MESH_TYPE_6LOWPAN_ND);
break;
case 6:
test_mesh_api_connect_disconnect(rf_device_id, MESH_TYPE_6LOWPAN_ND);
break;
#else // TEST_THREAD_BOOTSTRAP
case 4:
test_mesh_api_connect_disconnect(rf_device_id, MESH_TYPE_THREAD);
break;
case 5:
test_mesh_api_delete_connected(rf_device_id, MESH_TYPE_THREAD);
break;
case 6:
test_mesh_api_connect(rf_device_id, MESH_TYPE_THREAD);
break;
case 7:
test_mesh_api_data_poll_rate_set_thread(rf_device_id);
break;
#endif // TEST_THREAD_BOOTSTRAP
default:
endTest(tests_pass);
break;
}
testId++;
}
void testResult(int status) {
tests_pass = tests_pass && status;
}
void endTest(bool status) {
if (loopCount > 0) {
printf("\r\n#####\r\n");
printf("\r\nTest loops left %d, current result=%d\r\n", loopCount, tests_pass);
printf("\r\n#####\r\n");
loopCount--;
testId = 0;
/* Schedule tests run again */
FunctionPointer0<void> fpNextTest(testMeshApi, &TestMeshApi::runTests);
minar::Scheduler::postCallback(fpNextTest.bind()).delay(minar::milliseconds(3000));
} else {
MBED_HOSTTEST_RESULT(status);
}
}
};
void test_result_notify(int result, AbstractMesh *meshAPI)
{
if (meshAPI != NULL) {
delete meshAPI;
}
/* inform results to main class */
FunctionPointer1<void, int> fpResult(testMeshApi, &TestMeshApi::testResult);
minar::Scheduler::postCallback(fpResult.bind(result));
/* Schedule next test to run */
FunctionPointer0<void> fpNextTest(testMeshApi, &TestMeshApi::runTests);
minar::Scheduler::postCallback(fpNextTest.bind()).delay(minar::milliseconds(1000));
}
void app_start(int, char **)
{
MBED_HOSTTEST_TIMEOUT(5);
MBED_HOSTTEST_SELECT(default);
MBED_HOSTTEST_DESCRIPTION(Mesh network API tests);
MBED_HOSTTEST_START("mbed-mesh-api");
// set tracing baud rate
static Serial &pc = get_stdio_serial();
pc.baud(115200);
// before registering RF device mesh network needs to be created
Mesh6LoWPAN_ND *mesh_api = (Mesh6LoWPAN_ND *)MeshInterfaceFactory::createInterface(MESH_TYPE_6LOWPAN_ND);
delete mesh_api;
rf_device_id = rf_device_register();
testMeshApi = new TestMeshApi;
FunctionPointer0<void> fp(testMeshApi, &TestMeshApi::runTests);
minar::Scheduler::postCallback(fp.bind());
}

View File

@ -1,486 +0,0 @@
/*
* Copyright (c) 2015 ARM Limited. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
* Licensed under the Apache License, Version 2.0 (the License); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "mbed.h"
#include "mbed-mesh-api/Mesh6LoWPAN_ND.h"
#include "mbed-mesh-api/MeshThread.h"
#include "mbed-mesh-api/MeshInterfaceFactory.h"
#include "mbed-mesh-api/mesh_interface_types.h"
#include "sal/test/ctest_env.h"
#include "atmel-rf-driver/driverRFPhy.h" // rf_device_register
#include "test_cases.h"
#include "mbed-drivers/test_env.h"
#define HAVE_DEBUG 1
#include "ns_trace.h"
#define TRACE_GROUP "main" // for traces
#define TEST_RESULT_PRINT()\
do {\
TEST_PRINT("{{summary %s [%s] (%d/%d FAILED)}}\r\n", __func__, (TEST_RESULT()?"PASS":"FAIL"), tests_failed_global, tests_total_global);\
}while (0)
static uint8_t mesh_network_state = MESH_DISCONNECTED;
AbstractMesh *mesh_api = NULL;
extern void test_result_notify(int result, AbstractMesh *meshAPI);
// Thread device type, currently defined statically, change also
// YOTTA_CFG_MBED_MESH_API_THREAD_DEVICE_TYPE from static_config.h to match selection
#define TEST_THREAD_DEVICE_TYPE_SED false
/*
* Callback from mesh network. Called when network state changes.
*/
void test_callback_connect_disconnect(mesh_connection_status_t mesh_state)
{
tr_info("test_callback_connect_disconnect() %d", mesh_state);
mesh_network_state = mesh_state;
if (mesh_network_state == MESH_CONNECTED) {
tr_info("Connected to mesh network!");
mesh_error_t err = mesh_api->disconnect();
TEST_EQ(err, MESH_ERROR_NONE);
} else if (mesh_network_state == MESH_DISCONNECTED) {
tr_info("Disconnected from mesh network!");
TEST_RESULT_PRINT();
test_result_notify(test_pass_global, mesh_api);
} else {
// untested branch, catch erros by bad state checking...
TEST_EQ(mesh_network_state, MESH_CONNECTED);
tr_error("Networking error!");
TEST_RESULT_PRINT();
test_result_notify(test_pass_global, mesh_api);
}
}
void test_mesh_api_connect_disconnect(int8_t rf_device_id, mesh_network_type_t type)
{
mesh_error_t err;
TEST_PRINT("\r\nBegin %s, type=%d\r\n", __func__, type);
mesh_api = MeshInterfaceFactory::createInterface(type);
// initialize interface
if (type == MESH_TYPE_THREAD) {
uint8_t eui64[8];
char *pskd;
rf_read_mac_address(eui64);
pskd = (char *)"Secret password";
err = ((MeshThread *)mesh_api)->init(rf_device_id, test_callback_connect_disconnect, eui64, pskd);
} else {
err = mesh_api->init(rf_device_id, test_callback_connect_disconnect);
}
if (!TEST_EQ(err, MESH_ERROR_NONE)) {
TEST_RESULT_PRINT();
test_result_notify(test_pass_global, mesh_api);
return;
}
err = mesh_api->connect();
if (!TEST_EQ(err, MESH_ERROR_NONE)) {
TEST_RESULT_PRINT();
test_result_notify(test_pass_global, mesh_api);
return;
}
// control goes to test callback
}
void test_callback_init(mesh_connection_status_t mesh_state)
{
tr_info("test_callback_init() %d", mesh_state);
}
void test_mesh_api_init(int8_t rf_device_id)
{
mesh_error_t err;
TEST_PRINT("\r\nBegin %s\r\n", __func__);
mesh_api = (Mesh6LoWPAN_ND *)MeshInterfaceFactory::createInterface(MESH_TYPE_6LOWPAN_ND);
do {
// no callback set
err = mesh_api->init(rf_device_id, NULL);
if (!TEST_EQ(err, MESH_ERROR_PARAM)) {
break;
}
// bad rf-device_id
err = mesh_api->init(rf_device_id + 1, test_callback_init);
if (!TEST_EQ(err, MESH_ERROR_MEMORY)) {
break;
}
// successful re-initialization
err = mesh_api->init(rf_device_id, test_callback_init);
if (!TEST_EQ(err, MESH_ERROR_NONE)) {
break;
}
/* Thread can't be instantiated if ND is initialized */
MeshThread *meshThread = (MeshThread *)MeshInterfaceFactory::createInterface(MESH_TYPE_THREAD);
if (!TEST_EQ(meshThread, NULL)) {
break;
}
break;
} while (1);
TEST_RESULT_PRINT();
test_result_notify(test_pass_global, mesh_api);
}
void test_mesh_api_init_thread(int8_t rf_device_id)
{
mesh_error_t err;
uint8_t eui64[8];
char *pskd;
TEST_PRINT("\r\nBegin %s\r\n", __func__);
rf_read_mac_address(eui64);
pskd = (char *)"Secret password";
mesh_api = MeshInterfaceFactory::createInterface(MESH_TYPE_THREAD);
do {
// no callback set
err = ((MeshThread *)mesh_api)->init(rf_device_id, NULL);
if (!TEST_EQ(err, MESH_ERROR_PARAM)) {
break;
}
// No address in eui64
err = ((MeshThread *)mesh_api)->init(rf_device_id, test_callback_init, NULL, pskd);
if (!TEST_EQ(err, MESH_ERROR_PARAM)) {
break;
}
// bad rf-device_id
err = ((MeshThread *)mesh_api)->init(rf_device_id + 1, test_callback_init, eui64, pskd);
if (!TEST_EQ(err, MESH_ERROR_MEMORY)) {
break;
}
// successful re-initialization
err = ((MeshThread *)mesh_api)->init(rf_device_id, test_callback_init, eui64, pskd);
if (!TEST_EQ(err, MESH_ERROR_NONE)) {
break;
}
/* Thread can't be instantiated if it has been initialized already */
MeshThread *apiThread = (MeshThread *)MeshInterfaceFactory::createInterface(MESH_TYPE_THREAD);
if (!TEST_EQ(apiThread, NULL)) {
break;
}
/* 6LoWPAN ND can't be instantiated if Thread has been initialized */
Mesh6LoWPAN_ND *apiND = (Mesh6LoWPAN_ND *)MeshInterfaceFactory::createInterface(MESH_TYPE_6LOWPAN_ND);
if (!TEST_EQ(apiND, NULL)) {
break;
}
break;
} while (1);
TEST_RESULT_PRINT();
test_result_notify(test_pass_global, mesh_api);
}
/*
* Callback from mesh network for mesh_api_connect test
*/
void test_callback_connect(mesh_connection_status_t mesh_state)
{
mesh_error_t err;
tr_info("test_callback_connect() %d", mesh_state);
mesh_network_state = mesh_state;
if (mesh_network_state == MESH_CONNECTED) {
tr_info("Connected to mesh network!");
// try to connect again, should fail
err = mesh_api->connect();
if (!TEST_EQ(err, MESH_ERROR_STATE)) {
TEST_RESULT_PRINT();
test_result_notify(test_pass_global, mesh_api);
} else {
// disconnect
err = mesh_api->disconnect();
if (!TEST_EQ(err, MESH_ERROR_NONE)) {
TEST_RESULT_PRINT();
test_result_notify(test_pass_global, mesh_api);
}
}
} else if (mesh_network_state == MESH_DISCONNECTED) {
tr_info("Disconnected from mesh network!");
TEST_RESULT_PRINT();
test_result_notify(test_pass_global, mesh_api);
} else {
// untested branch, catch errors by bad state checking...
TEST_EQ(true, false);
tr_error("Networking error!");
TEST_RESULT_PRINT();
test_result_notify(test_pass_global, mesh_api);
}
}
void test_mesh_api_connect(int8_t rf_device_id, mesh_network_type_t type)
{
mesh_error_t err;
TEST_PRINT("\r\nBegin %s, type=%d\r\n", __func__, type);
mesh_api = MeshInterfaceFactory::createInterface(type);
do {
// connect uninitialized
err = mesh_api->connect();
if (!TEST_EQ(err, MESH_ERROR_PARAM)) {
TEST_RESULT_PRINT();
test_result_notify(test_pass_global, mesh_api);
break;
}
// initialize interface
if (type == MESH_TYPE_THREAD) {
uint8_t eui64[8];
char *pskd;
rf_read_mac_address(eui64);
pskd = (char *)"Secret password";
err = ((MeshThread *)mesh_api)->init(rf_device_id, test_callback_connect, eui64, pskd);
} else {
err = mesh_api->init(rf_device_id, test_callback_connect);
}
if (!TEST_EQ(err, MESH_ERROR_NONE)) {
TEST_RESULT_PRINT();
test_result_notify(test_pass_global, mesh_api);
break;
}
// successful connect
err = mesh_api->connect();
if (!TEST_EQ(err, MESH_ERROR_NONE)) {
TEST_RESULT_PRINT();
test_result_notify(test_pass_global, mesh_api);
break;
}
//test continues in callback
break;
} while (1);
}
/*
* Callback from mesh network for mesh_api_connect test
*/
void test_callback_disconnect(mesh_connection_status_t mesh_state)
{
tr_info("test_callback_disconnect() %d", mesh_state);
TEST_EQ(true, false);
tr_error("Networking error, callback received!");
TEST_RESULT_PRINT();
test_result_notify(test_pass_global, mesh_api);
}
void test_mesh_api_disconnect(int8_t rf_device_id, mesh_network_type_t type)
{
mesh_error_t err;
TEST_PRINT("\r\nBegin %s\r\n", __func__);
mesh_api = MeshInterfaceFactory::createInterface(type);
do {
// disconnect not initialized, callback not called
err = mesh_api->disconnect();
if (!TEST_EQ(err, MESH_ERROR_UNKNOWN)) {
break;
}
// initialize interface
if (type == MESH_TYPE_THREAD) {
uint8_t eui64[8];
char *pskd;
rf_read_mac_address(eui64);
pskd = (char *)"Secret password";
err = ((MeshThread *)mesh_api)->init(rf_device_id, test_callback_disconnect, eui64, pskd);
} else {
err = mesh_api->init(rf_device_id, test_callback_disconnect);
}
if (!TEST_EQ(err, MESH_ERROR_NONE)) {
break;
}
// disconnect not connected
err = mesh_api->disconnect();
if (!TEST_EQ(err, MESH_ERROR_UNKNOWN)) {
break;
}
break;
} while (1);
TEST_RESULT_PRINT();
test_result_notify(test_pass_global, mesh_api);
}
/*
* Callback from mesh network for test_mesh_api_delete_connected test
*/
void test_callback_delete_connected(mesh_connection_status_t mesh_state)
{
tr_info("test_callback_delete() %d", mesh_state);
if (mesh_state == MESH_CONNECTED) {
delete mesh_api;
mesh_api = NULL;
TEST_RESULT_PRINT();
test_result_notify(test_pass_global, mesh_api);
} else {
tr_error("Networking error!");
TEST_EQ(true, false);
TEST_RESULT_PRINT();
test_result_notify(test_pass_global, mesh_api);
}
}
void test_mesh_api_delete_connected(int8_t rf_device_id, mesh_network_type_t type)
{
mesh_error_t err;
TEST_PRINT("\r\nBegin %s, type=%d\r\n", __func__, type);
mesh_api = MeshInterfaceFactory::createInterface(type);
do {
// initialize interface
if (type == MESH_TYPE_THREAD) {
uint8_t eui64[8];
char *pskd;
rf_read_mac_address(eui64);
pskd = (char *)"Secret password";
err = ((MeshThread *)mesh_api)->init(rf_device_id, test_callback_delete_connected, eui64, pskd);
} else {
err = mesh_api->init(rf_device_id, test_callback_delete_connected);
}
if (!TEST_EQ(err, MESH_ERROR_NONE)) {
TEST_RESULT_PRINT();
test_result_notify(test_pass_global, mesh_api);
break;
}
// successful connect
err = mesh_api->connect();
if (!TEST_EQ(err, MESH_ERROR_NONE)) {
TEST_RESULT_PRINT();
test_result_notify(test_pass_global, mesh_api);
break;
}
//test continues in callback
break;
} while (1);
}
/*
* Callback from mesh network for test_mesh_api_data_poll_rate_set_thread test
*/
void test_callback_data_poll_rate_set_thread(mesh_connection_status_t mesh_state)
{
tr_info("test_callback_data_poll_rate_set() %d", mesh_state);
mesh_network_state = mesh_state;
if (mesh_network_state == MESH_CONNECTED) {
tr_info("Connected to mesh network!");
#if (TEST_THREAD_DEVICE_TYPE_SED == true)
mesh_error_t err;
// set data polling rate to 0 (enables fast polling mode)
err = ((MeshThread*)mesh_api)->data_poll_rate_set(0);
if (!TEST_EQ(err, MESH_ERROR_NONE)) {
TEST_RESULT_PRINT();
test_result_notify(test_pass_global, mesh_api);
return;
}
// try to set data polling rate to 100000
err = ((MeshThread*)mesh_api)->data_poll_rate_set(864001+1);
if (!TEST_EQ(err, MESH_ERROR_PARAM)) {
TEST_RESULT_PRINT();
test_result_notify(test_pass_global, mesh_api);
return;
}
// OK case, set data polling rate to 5
err = ((MeshThread*)mesh_api)->data_poll_rate_set(5);
if (!TEST_EQ(err, MESH_ERROR_NONE)) {
TEST_RESULT_PRINT();
test_result_notify(test_pass_global, mesh_api);
return;
}
#endif
TEST_RESULT_PRINT();
test_result_notify(test_pass_global, mesh_api);
} else if (mesh_network_state == MESH_DISCONNECTED) {
tr_info("Disconnected from mesh network!");
TEST_RESULT_PRINT();
test_result_notify(test_pass_global, mesh_api);
} else {
// untested branch, catch errors by bad state checking...
TEST_EQ(true, false);
tr_error("Networking error!");
TEST_RESULT_PRINT();
test_result_notify(test_pass_global, mesh_api);
}
}
void test_mesh_api_data_poll_rate_set_thread(int8_t rf_device_id)
{
mesh_error_t err;
TEST_PRINT("\r\nBegin %s\r\n", __func__);
mesh_api = MeshInterfaceFactory::createInterface(MESH_TYPE_THREAD);
do {
// try to set data polling rate when not initialized
err = ((MeshThread*)mesh_api)->data_poll_rate_set(1);
if (!TEST_EQ(err, MESH_ERROR_UNKNOWN)) {
TEST_RESULT_PRINT();
test_result_notify(test_pass_global, mesh_api);
break;
}
uint8_t eui64[8];
rf_read_mac_address(eui64);
err = ((MeshThread *)mesh_api)->init(rf_device_id, test_callback_data_poll_rate_set_thread, eui64, NULL);
if (!TEST_EQ(err, MESH_ERROR_NONE)) {
TEST_RESULT_PRINT();
test_result_notify(test_pass_global, mesh_api);
break;
}
// try to set data polling rate when not connected
err = ((MeshThread*)mesh_api)->data_poll_rate_set(1);
if (!TEST_EQ(err, MESH_ERROR_UNKNOWN)) {
TEST_RESULT_PRINT();
test_result_notify(test_pass_global, mesh_api);
break;
}
// successful connect
err = mesh_api->connect();
if (!TEST_EQ(err, MESH_ERROR_NONE)) {
TEST_RESULT_PRINT();
test_result_notify(test_pass_global, mesh_api);
break;
}
//test continues in callback
break;
} while (1);
}

View File

@ -1,31 +0,0 @@
/*
* Copyright (c) 2015 ARM Limited. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
* Licensed under the Apache License, Version 2.0 (the License); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __TEST_CASES__H__
#define __TEST_CASES__H__
/* positive cases */
void test_mesh_api_connect_disconnect(int8_t rf_device_id, mesh_network_type_t type);
/* failure cases */
void test_mesh_api_init(int8_t rf_device_id);
void test_mesh_api_init_thread(int8_t rf_device_id);
void test_mesh_api_connect(int8_t rf_device_id, mesh_network_type_t type);
void test_mesh_api_disconnect(int8_t rf_device_id, mesh_network_type_t type);
void test_mesh_api_delete_connected(int8_t rf_device_id, mesh_network_type_t type);
void test_mesh_api_data_poll_rate_set_thread(int8_t rf_device_id);
#endif /* __TEST_CASES__H__ */

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2016 ARM Limited. All rights reserved.
* Copyright (c) 2016, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef NANOSTACK_ETHERNET_PHY_H_

View File

@ -1,5 +1,6 @@
/* Nanostack implementation of NetworkSocketAPI
* Copyright (c) 2016 ARM Limited
/*
* Copyright (c) 2016-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -14,6 +15,8 @@
* limitations under the License.
*/
/* Nanostack implementation of NetworkSocketAPI */
#include "mbed.h"
#include "rtos.h"
#include "NanostackInterface.h"

View File

@ -1,15 +1,16 @@
/*
* Copyright (c) 2016 ARM Limited. All rights reserved.
* Copyright (c) 2016-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
* Licensed under the Apache License, Version 2.0 (the License); you may
* not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@ -1,15 +1,16 @@
/*
* Copyright (c) 2017 ARM Limited. All rights reserved.
* Copyright (c) 2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
* Licensed under the Apache License, Version 2.0 (the License); you may
* not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2016 ARM Limited. All rights reserved.
* Copyright (c) 2016, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef NANOSTACK_PHY_H_

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2016 ARM Limited. All rights reserved.
* Copyright (c) 2016-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef NANOSTACK_RF_PHY_H_

View File

@ -1,290 +0,0 @@
// Compiler:target pairs for assigning yotta builds to correct slave labels
def yottaTargets = [
armcc : "frdm-k64f-armcc",
gcc : "frdm-k64f-gcc"
]
def morpheusTargets = [
armcc: "K64F",
gcc : "K64F"
]
// Compilers for makefile based build steps
def makeCompilers = [
"armcc",
"gcc",
"arm-none-eabi-gcc"
]
// Nanostack configurations for makefile based build steps
def makeConfigs = [
"generic",
"lowpan_border_router",
"lowpan_border_router_rf_tunnel",
"lowpan_host",
"lowpan_router",
"nanostack_full",
"rf_interface",
"thread_border_router",
"thread_router",
"thread_end_device",
"thread_full_end_device",
"thread_thci"
]
/*****************************************************
* *
* Check out sources only once and use stash/unstash *
* to distribute source to actual builds *
* *
****************************************************/
node ("linux") {
stage "checkout"
// deleteDir deletes recursively current directory
deleteDir()
// Recursively clone ARMmbed/nanomesh-applications repository
checkoutApplications()
// After cloning nanomesh-applications we need to clean and
// re-clone nanostack with the changes under test
dir ("applications") {
sh "rm -rf nanostack && mkdir nanostack"
dir("nanostack") {
// Check out current branch with changes under test
checkout scm
}
}
// Check if these variables are available
echo "source branch: ${env.BRANCH_NAME}\n"
echo "target branch: ${env.CHANGE_TARGET}\n"
echo "change id: ${env.CHANGE_ID}\n"
echo "change title: ${env.CHANGE_TITLE}\n"
echo "change url: ${env.CHANGE_URL}\n"
echo "git revision: ${env.GIT_REVISION}\n"
// Stash stores a set of files for use later in the same build
stash includes: '**', useDefaultExcludes: false, name: 'workarea'
}
/**********************************************
* *
* Create step definitions for parallel *
* build execution *
* *
*********************************************/
def stepsForParallel = [:]
// Add yotta build steps to parallel execution
for (int i = 0; i < yottaTargets.size(); i++) {
def compiler = yottaTargets.keySet().asList().get(i)
def target = yottaTargets.get(compiler)
def stepName = "yotta ${target}"
stepsForParallel[stepName] = yottaBuildStep(compiler, target)
}
// Add morpheus build steps to parallel execution
/* Not yet
for (int i = 0; i < morpheusTargets.size(); i++) {
def compiler = morpheusTargets.keySet().asList().get(i)
def target = morpheusTargets.get(compiler)
def stepName = "morpheus ${target}"
stepsForParallel[stepName] = morpheusBuildStep(compiler, target)
}
*/
// Add makefile build steps to parallel execution
for (int i = 0; i < makeCompilers.size(); i++) {
for (int j = 0; j < makeConfigs.size(); j++) {
def compiler = makeCompilers.get(i)
def config = makeConfigs.get(j)
def stepName = "${compiler} ${config}"
stepsForParallel[stepName] = makeBuildStep(compiler, config)
}
}
// Add smoketest step to parallel execution
stepsForParallel["smokeTest"] = smokeTestStep()
/**********************************************
* *
* Actually run the steps in parallel *
* *
*********************************************/
stage "build"
parallel stepsForParallel
/**********************************************
* *
* End of execution, internal functions below *
* *
*********************************************/
// Create build step for morpheus
def morpheusBuildStep(compiler, target) {
return {
node ("${compiler}") {
deleteDir()
unstash 'workarea'
dir ("applications/nanostack") {
if("${compiler}" == "armcc") {
sh "mbed compile -m ${target} -t ARM -c"
}
if("${compiler}" == "gcc") {
sh "mbed compile -m ${target} -t GCC_ARM -c"
}
}
}
}
}
// Create build step definition for yotta build
def yottaBuildStep(compiler, target) {
return {
node ("${compiler}") {
deleteDir()
unstash 'workarea'
dir ("applications/nanostack") {
sh "yotta target ${target}"
sh "yotta build"
}
}
}
}
// Create build step definition for makefile build
def makeBuildStep(compiler, config) {
return {
node ("${compiler}") {
deleteDir()
unstash 'workarea'
dir ("applications") {
sh "make -C libService CC=${compiler} CONFIG=${config} export-headers"
sh "make -C nanostack CC=${compiler} CONFIG=${config}"
}
}
}
}
// Create build step definition for smoke test
def smokeTestStep() {
return {
node ("linux_test") {
deleteDir()
unstash 'workarea'
executeSmokeTest()
executeSmokePostbuild()
}
}
}
// Recursively clone ARMmbed/nanomesh-applications repository
def checkoutApplications() {
// Check out nanomesh-applications master branch and update all submodules
checkout([$class: 'GitSCM',
branches: [[name: '*/master']],
doGenerateSubmoduleConfigurations: false,
extensions: [
[$class: 'RelativeTargetDirectory', relativeTargetDir: 'applications'],
[$class: 'ScmName', name: 'nanomesh-applications'],
[$class: 'SubmoduleOption', disableSubmodules: false, recursiveSubmodules: true, reference: '', trackingSubmodules: true],
[$class: 'LocalBranch', localBranch: '**']
],
submoduleCfg: [],
userRemoteConfigs: [[url: 'git@github.com:ARMmbed/nanomesh-applications.git']]
])
}
def executeSmokeTest() {
dir ("applications") {
sh "make -f Makefile.simulator test-all-builds"
sh "make -f Makefile.simulator"
dir ("mbed-clitest") {
sh "python clitest.py --tcdir testcases/6lowpan --testtype smoke --type simulate --use_sniffer -w --valgrind --valgrind_tool memcheck -v"
dir ("log") {
sh "find . -name \\result.html -execdir mv {} result_6lp_smoke.html \\;"
sh "find . -name \\result_6lp_smoke.html -exec cp {} . \\;"
sh "find . -name \\*valgrind* -exec cp {} . \\;"
sh "find . -name \\result.junit.xml -execdir mv {} result.junit_6lp_smoke.xml \\;"
sh "find . -name \\result.junit_6lp_smoke.xml -exec cp {} . \\;"
}
sh "python clitest.py --group thread --testtype smoke --status released --type simulate -w --valgrind --valgrind_tool memcheck -v"
dir ("log") {
sh "find . -name \\result.html -execdir mv {} result_thread_smoke.html \\;"
sh "find . -name \\result_thread_smoke.html -exec cp {} . \\;"
sh "find . -name \\*valgrind* -exec cp {} . \\;"
sh "find . -name \\result.junit.xml -execdir mv {} result.junit_thread_smoke.xml \\;"
sh "find . -name \\result.junit_thread_smoke.xml -exec cp {} . \\;"
}
}
dir ("nanostack") {
sh "make CC=cppcheck CPPCHECK_OPTS=\"--xml --xml-version=2 2> cppcheck.xml\""
sh "sed -i 's%\\(<location file=\"\\)%\\1nanomesh-applications/nanostack/%' cppcheck.xml"
}
}
}
def executeSmokePostbuild() {
// Archive artifacts
archive 'applications/nanostack/cppcheck.xml, applications/mbed-clitest/log/**/*'
// Publish HTML reports
publishHTML(target: [allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false,
reportDir: 'applications/mbed-clitest/log/',
reportFiles: 'result_6lp_smoke.html, result_thread_smoke.html',
reportName: 'Test Results'])
// Publish JUnit test result report
step([$class: 'JUnitResultArchiver', testResults: 'applications/mbed-clitest/log/result.junit*.xml'])
// This version of plugin currently only on AWS test Jenkins
/*
step([$class: 'TextFinderPublisher',
fileSet: 'applications/mbed-clitest/log/result*.html',
regexp: 'fail<',
alsoCheckConsoleOutput: false,
succeedIfFound: false,
unstableIfFound: true
])
*/
// This version of plugin currently only on AWS test Jenkins
/*
step([$class: 'CppcheckPublisher',
pattern: 'applications/nanostack/cppcheck.xml',
allowNoReport: true, ignoreBlankFiles: false,
threshold: "", newThreshold: "",
failureThreshold: "", newFailureThreshold: "",
healthy: "", unHealthy: "",
severityError: true, severityWarning: true,
severityStyle: true, severityPerformance: true,
severityInformation: true, severityNoCategory: true,
severityPortability: true,
xSize: 500, ySize: 200, numBuildsInGraph: 10,
displayAllErrors: true,
displayErrorSeverity: false, displayWarningSeverity: false,
displayStyleSeverity: false, displayPerformanceSeverity: false,
displayInformationSeverity: false, displayNoCategorySeverity: false,
displayPortabilitySeverity: false
])
*/
// This version of plugin currently only on AWS test Jenkins
/*
step([$class: 'ValgrindPublisher',
pattern: "applications/mbed-clitest/log/*valgrind*.xml",
failThresholdInvalidReadWrite: "",
failThresholdDefinitelyLost: "",
failThresholdTotal: "",
unstableThresholdInvalidReadWrite: "",
unstableThresholdDefinitelyLost: "8",
unstableThresholdTotal: "",
publishResultsForAbortedBuilds: true,
publishResultsForFailedBuilds: true,
failBuildOnMissingReports: false,
failBuildOnInvalidReports: false
])
*/
}

View File

@ -7,9 +7,9 @@ This repository contains the ARM IPv6/6LoWPAN/Thread Stack for mbed OS.
mbed OS is now a Thread Certified Component. Using IPv6 with 6LoWPAN as the foundation, Thread technology provides a low-power, self-healing mesh network designed for the home.
The documentation is hosted in http://docs.mbed.com/projects/arm-ipv66lowpan-stack/
The documentation is hosted in [here](https://os.mbed.com/docs/v5.6/tutorials/6lowpan-mesh.html).
On mbed OS, usage is through [mbed Mesh API](https://docs.mbed.com/docs/mbed-os-api-reference/en/latest/APIs/communication/mesh/) and [Socket API](https://docs.mbed.com/docs/mbed-os-api-reference/en/latest/APIs/communication/network_sockets/).
On mbed OS, usage is through [mbed Mesh API](https://os.mbed.com/docs/v5.6/reference/mesh.html) and [Socket API](https://os.mbed.com/docs/v5.6/reference/network-socket.html).
To see, how the 6LoWPAN Stack works, check the example application [mbed-os-example-mesh-minimal](https://github.com/ARMmbed/mbed-os-example-mesh-minimal).

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

View File

@ -1,102 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output encoding="UTF-8" indent="yes" method="html"/>
<xsl:strip-space elements="*"/>
<xsl:variable name="list"
select="document('index.xml')/list" />
<xsl:template match="/">
<h1>
Unittest report
</h1>
<p>
<b>
Total tests run <xsl:value-of select="sum(document($list/entry/@name)/testsuite/@tests)"/>, failures: <xsl:value-of select="sum(document($list/entry/@name)/testsuite/@failures) + sum(document($list/entry/@name)/testsuite/@errors)"/>
</b>
<xsl:for-each select="document($list/entry/@name)" >
<xsl:apply-templates select="testsuite"/>
</xsl:for-each>
</p>
</xsl:template>
<xsl:template match="testsuite">
<h2>
<xsl:value-of select="@name" />
</h2>
<table border="1" cellSpacing="0" cellPadding="10" >
<tr>
<th>Tests run</th>
<th>Tests fail</th>
<th>Other errors</th>
</tr>
<tr>
<td><xsl:value-of select="@tests"/></td>
<td><xsl:value-of select="@failures"/></td>
<td><xsl:value-of select="@errors"/></td>
</tr>
</table>
<br/>
<table border="1" cellSpacing="0" cellPadding="10" >
<tr>
<th>Tests name</th>
<th>PASS/FAIL</th>
<th>Failing case</th>
<th>Reason</th>
</tr>
<xsl:apply-templates select="testcase"/>
</table>
</xsl:template>
<xsl:template match="testcase">
<xsl:choose>
<xsl:when test="failure">
<tr><td><font color="#FF0000"><xsl:value-of select="@name" /></font></td><xsl:apply-templates select="failure"/></tr>
</xsl:when>
<xsl:when test="error">
<tr><td><font color="#FF0000"><xsl:value-of select="@name" /></font></td><xsl:apply-templates select="error"/></tr>
</xsl:when>
<xsl:otherwise>
<tr><td><xsl:value-of select="@name" /></td><td><font color="#00FF00">PASS</font></td><td></td><td></td></tr>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="failure">
<td>
<b><font color="#FF0000">FAILED</font></b>
</td>
<td>
<font color="#ff0000">
<xsl:value-of select="@message" />
</font>
</td>
<td>
<font color="#ff0000">
<xsl:value-of select="@type" />
</font>
</td>
</xsl:template>
<xsl:template match="error">
<td>
<b><font color="#FF0000">FAILED</font></b>
</td>
<td>
<font color="#ff0000">
<xsl:value-of select="@message" />
</font>
</td>
<td>
<font color="#ff0000">
<xsl:value-of select="@type" />
</font>
</td>
</xsl:template>
</xsl:stylesheet>

View File

@ -1,16 +0,0 @@
#!/bin/bash
# Copyright (c) 2015 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# Licensed under the Apache License, Version 2.0 (the License); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# * http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an AS IS BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
make test

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2016 ARM. All rights reserved.
* Copyright (c) 2016, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2014 ARM. All rights reserved.
* Copyright (c) 2014, 2016-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "base/thread_border_router.cfg"

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015 ARM. All rights reserved.
* Copyright (c) 2015-2016, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "base/lowpan_border_router.cfg"

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015 ARM. All rights reserved.
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* This is for linux router which use RF tunnel interface */
#include "base/lowpan_border_router.cfg"

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015 ARM. All rights reserved.
* Copyright (c) 2015-2016, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* This is for linux router which use RF tunnel interface */
#include "base/lowpan_border_router.cfg"

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015 ARM. All rights reserved.
* Copyright (c) 2015-2016, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* This is for linux router which use RF tunnel interface */
#include "base/lowpan_border_router.cfg"

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015 ARM. All rights reserved.
* Copyright (c) 2015-2016, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015 ARM. All rights reserved.
* Copyright (c) 2015-2016, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015 ARM. All rights reserved.
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015 ARM. All rights reserved.
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2014-2016 ARM. All rights reserved.
* Copyright (c) 2014-2016, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015-2016 ARM. All rights reserved.
* Copyright (c) 2015-2016, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "nanostack_full.cfg"

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015-2016 ARM. All rights reserved.
* Copyright (c) 2015-2017, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "base/thread_border_router.cfg"

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2016 ARM. All rights reserved.
* Copyright (c) 2016, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "base/thread_end_device.cfg"

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2016 ARM. All rights reserved.
* Copyright (c) 2016, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "base/thread_full_end_device.cfg"

View File

@ -1,5 +1,18 @@
/*
* Copyright (c) 2015-2016 ARM. All rights reserved.
* Copyright (c) 2015-2016, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "base/thread_router.cfg"

Some files were not shown because too many files have changed in this diff Show More