-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Rob Walker
committed
May 21, 2020
1 parent
4070921
commit 4405312
Showing
29 changed files
with
446 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# | ||
# Copyright (c) 2020 Project CHIP Authors | ||
# | ||
# 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. | ||
# | ||
|
||
# | ||
# Description: | ||
# This file governs what comes out of the app directory, chiefly | ||
# the data model and application layer for the CHIP interaction | ||
# model. | ||
# | ||
|
||
include $(abs_top_nlbuild_autotools_dir)/automake/pre.am | ||
|
||
SUBDIRS = \ | ||
chip-zcl \ | ||
plugin/test-unit \ | ||
$(NULL) | ||
|
||
# plugin/test-on-off | ||
|
||
include $(abs_top_nlbuild_autotools_dir)/automake/post.am |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# | ||
# Copyright (c) 2020 Project CHIP Authors | ||
# | ||
# 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. | ||
# | ||
|
||
# | ||
# Description: | ||
# This file exports the CHIP ZCL Application layer API headers | ||
# for install and dist targets | ||
# | ||
|
||
include $(abs_top_nlbuild_autotools_dir)/automake/pre.am | ||
|
||
chip_zcldir = $(includedir)/chip-zcl | ||
|
||
chip_zcl_HEADERS = \ | ||
chip-zcl-buffer.h \ | ||
chip-zcl-codec.h \ | ||
chip-zcl-struct.h \ | ||
chip-zcl.h \ | ||
$(NULL) | ||
|
||
include $(abs_top_nlbuild_autotools_dir)/automake/post.am |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#include "../api/chip-zcl.h" | ||
#include "chip-zcl.h" | ||
|
||
// Callback implementations | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* | ||
* Copyright (c) 2020 Project CHIP Authors | ||
* | ||
* 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 "ChipZclOnOffTest.h" | ||
|
||
int main(void) | ||
{ | ||
return testClusterCmdOnOff(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/** | ||
* | ||
* Copyright (c) 2020 Project CHIP Authors | ||
* | ||
* 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 CHIP_ZCL_ON_OFF_TEST | ||
#define CHIP_ZCL_ON_OFF_TEST | ||
|
||
int testClusterCmdOnOff(void); | ||
|
||
#endif // CHIP_ZCL_ON_OFF_TEST |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
# | ||
# Copyright (c) 2020 Project CHIP Authors | ||
# | ||
# 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. | ||
# | ||
|
||
# | ||
# Description: | ||
# This file governs what comes out of the app directory, chiefly | ||
# the data model and application layer for the CHIP interaction | ||
# model. | ||
# | ||
|
||
include $(abs_top_nlbuild_autotools_dir)/automake/pre.am | ||
|
||
if CHIP_BUILD_TESTS | ||
|
||
# C/C++ preprocessor option flags that will apply to all compiled | ||
# objects in this makefile. | ||
|
||
AM_CPPFLAGS = \ | ||
-I$(top_srcdir)/src/app/chip-zcl \ | ||
-I$(top_srcdir)/src/app/gen \ | ||
$(NULL) | ||
|
||
lib_LIBRARIES = \ | ||
libChipZclOnOffTest.a \ | ||
$(NULL) | ||
|
||
# plugins we need | ||
libChipZclOnOffTest_a_SOURCES = \ | ||
../../gen/gen-callback-stubs.c \ | ||
../../gen/gen-specs.c \ | ||
../../gen/gen-command-handler.c \ | ||
../core-data-model/zcl-data-model.c \ | ||
../cluster-server-on-off/on-off-server.c \ | ||
../binding-mock/mock.c \ | ||
cluster-cmd-on-off-test.c \ | ||
ChipZclOnOffTest.c \ | ||
$(NULL) | ||
|
||
check_PROGRAMS = \ | ||
ChipZclOnOffTest \ | ||
$(NULL) | ||
|
||
ChipZclOnOffTest_LDADD = libChipZclOnOffTest.a | ||
|
||
TESTS = $(check_PROGRAMS) | ||
|
||
###################### | ||
# coverage boilerplate, TODO: move to an include | ||
if CHIP_BUILD_COVERAGE | ||
CLEANFILES = $(wildcard *.gcda *.gcno) | ||
|
||
if CHIP_BUILD_COVERAGE_REPORTS | ||
# The bundle should positively be qualified with the absolute build | ||
# path. Otherwise, VPATH will get auto-prefixed to it if there is | ||
# already such a directory in the non-colocated source tree. | ||
|
||
CHIP_COVERAGE_BUNDLE = ${abs_builddir}/${PACKAGE}${NL_COVERAGE_BUNDLE_SUFFIX} | ||
CHIP_COVERAGE_INFO = ${CHIP_COVERAGE_BUNDLE}/${PACKAGE}${NL_COVERAGE_INFO_SUFFIX} | ||
|
||
$(CHIP_COVERAGE_BUNDLE): | ||
$(call create-directory) | ||
|
||
$(CHIP_COVERAGE_INFO): check-local | $(CHIP_COVERAGE_BUNDLE) | ||
$(call generate-coverage-report,${top_builddir},*/usr/include/* */third_party/*) | ||
|
||
coverage-local: $(CHIP_COVERAGE_INFO) | ||
|
||
clean-local: clean-local-coverage | ||
|
||
.PHONY: clean-local-coverage | ||
clean-local-coverage: | ||
-$(AM_V_at)rm -rf $(CHIP_COVERAGE_BUNDLE) | ||
|
||
endif # CHIP_BUILD_COVERAGE_REPORTS | ||
endif # CHIP_BUILD_COVERAGE | ||
endif # CHIP_BUILD_TESTS | ||
include $(abs_top_nlbuild_autotools_dir)/automake/post.am |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** | ||
* | ||
* Copyright (c) 2020 Project CHIP Authors | ||
* | ||
* 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 "ChipZclOnOffTest.h" | ||
|
||
#include "chip-zcl.h" | ||
|
||
#include "gen.h" | ||
|
||
#include <stdio.h> | ||
|
||
int testClusterCmdOnOff(void) | ||
{ | ||
ChipZclCommandContext_t context; | ||
context.mfgSpecific = false; | ||
context.clusterId = CHIP_ZCL_CLUSTER_ON_OFF; | ||
context.commandId = ZCL_ON_COMMAND_ID; | ||
context.direction = ZCL_DIRECTION_CLIENT_TO_SERVER; | ||
return chipZclClusterCommandParse(&context); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/** | ||
* | ||
* Copyright (c) 2020 Project CHIP Authors | ||
* | ||
* 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. | ||
*/ | ||
|
||
/** | ||
* @file | ||
* This file provides unit testing for the CHIP ZCL Command Handling | ||
* related to the on-off-server functionality. It constructs an | ||
* incoming message related to on-off and passes it into the CHIP | ||
* ZCL message dispatch code | ||
* | ||
*/ | ||
|
||
#include "ChipZclOnOffTest.h" | ||
|
||
int main(void) | ||
{ | ||
return testClusterServerOnOffCmd(); | ||
} |
Oops, something went wrong.