Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

reorder headers and break into blocks in src/app #685

Merged
merged 2 commits into from
May 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/api/chip-zcl.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
#ifndef CHIP_ZCL_MASTER_HEADER
#define CHIP_ZCL_MASTER_HEADER

#include <memory.h>
#include <stdbool.h>
#include <stdint.h>
#include <memory.h>

typedef uint64_t bitmap64_t;
typedef uint8_t enum8_t;
Expand Down
2 changes: 2 additions & 0 deletions src/app/plugin/basic-server/utest.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
#define CHIP_AF_API_ZCL_CORE "utest.h"

#include "chip-zcl.h"

#include "gen-types.h"

#include <stdio.h>
#endif /* UTEST_H */
2 changes: 1 addition & 1 deletion src/app/plugin/identify-server/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ REQUIRED_PLUGINS=../zcl-data-model/zcl-data-model.o ../../utest-gen/gen-callback

# ---------- GENERIC -------------
CC=gcc
CFLAGS="-I../../api/" "-I../../utest-gen/" -DCHIP_TEST
CFLAGS="-I../../api/" "-I../../utest-gen/" "-I../zcl-data-model" -DCHIP_TEST

$(NAME).out: $(NAME).o utest.o ../../api/mock/mock.o $(REQUIRED_PLUGINS)
$(CC) -o $(NAME).out $(NAME).o ../../api/mock/mock.o utest.o $(REQUIRED_PLUGINS)
Expand Down
6 changes: 4 additions & 2 deletions src/app/plugin/identify-server/utest.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@
#define CHIP_AF_API_HAL "utest.h"

#include "chip-zcl.h"
#include "gen-types.h"
#include "../zcl-data-model/zcl-data-model.h"
#include "zcl-data-model.h"

#include "gen-callbacks.h"
#include "gen-cluster-id.h"
#include "gen-types.h"

#include <stdio.h>
#endif /* UTEST_H */
4 changes: 3 additions & 1 deletion src/app/plugin/level-control-server/utest.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@
#define CHIP_AF_PLUGIN_LEVEL_CONTROL_SERVER_MINIMUM_LEVEL 0

#include "chip-zcl.h"
#include "gen-types.h"

#include "gen-cluster-id.h"
#include "gen-types.h"

#include <stdio.h>
#endif /* UTEST_H */
2 changes: 1 addition & 1 deletion src/app/plugin/message-dispatch/dispatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
#define ZCL_COMMAND_DISPATCH_H

#include "chip-zcl.h"
#include "general-command-handler.h"
#include "cluster-command-handler.h"
#include "general-command-handler.h"

// Main command parsing controller.
ChipZclStatus_t chipZclCommandParse(ChipZclCommandContext_t * context);
Expand Down
4 changes: 3 additions & 1 deletion src/app/plugin/message-dispatch/utest.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@
#define UTEST_H

#include "chip-zcl.h"
#include "gen-types.h"
#include "dispatch.h"
#include "general-command-handler.h"

#include "gen-types.h"

#include <stdio.h>
#endif /* UTEST_H */
4 changes: 3 additions & 1 deletion src/app/plugin/on-off-server/utest.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
#define CHIP_AF_API_ZCL_CORE "utest.h"

#include "chip-zcl.h"
#include "gen-types.h"

#include "gen-cluster-id.h"
#include "gen-types.h"

#include <stdio.h>
#endif /* UTEST_H */
2 changes: 2 additions & 0 deletions src/app/plugin/zcl-data-model/utest.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
#define CHIP_AF_API_ZCL_CORE "utest.h"

#include "chip-zcl.h"

#include "gen-types.h"

#include <stdio.h>
#endif /* UTEST_H */
6 changes: 4 additions & 2 deletions src/app/plugin/zcl-data-model/zcl-data-model.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
*
*/

#include "zcl-data-model.h"

#ifdef CHIP_TEST
#include "utest.h"
#endif
Expand All @@ -36,9 +38,9 @@
#include CHIP_AF_API_ZCL_CORE

#include "chip-zcl.h"
#include "zcl-data-model.h"
#include "gen-callbacks.h"

#include "gen-attribute-type.h"
#include "gen-callbacks.h"
#include "gen-endpoint-config.h"

//------------------------------------------------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions src/app/plugin/zcl-data-model/zcl-data-model.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
#ifndef CHIP_ZCL_ATTRIBUTE_DB
#define CHIP_ZCL_ATTRIBUTE_DB

#include <stdint.h>

#include "chip-zcl.h"

#include "gen-attribute-storage.h"
rwalker-apple marked this conversation as resolved.
Show resolved Hide resolved

/**
Expand Down
3 changes: 2 additions & 1 deletion src/app/utest-gen/cluster-command-handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@
#define CHIP_ZCL_COMMAND_PARSE_HEADER

#include "chip-zcl.h"
#include "gen-types.h"

#include "gen-cluster-id.h"
#include "gen-command-id.h"
#include "gen-types.h"

// This is a set of generated prototype for functions that parse the
// the incomming message, and call appropriate command handler.
Expand Down
4 changes: 3 additions & 1 deletion src/app/utest-gen/gen-specs.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@
*/

#include "chip-zcl.h"
#include "gen-types.h"

#include "gen-cluster-id.h"
#include "gen-types.h"

#include <stdio.h>

// -----------------------------------------------------------------------------
Expand Down
6 changes: 4 additions & 2 deletions src/app/utest/utest-on-off.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@
*
*/

#include <stdio.h>
#include "chip-zcl.h"
#include "cluster-command-handler.h"

#include "gen-cluster-id.h"

#include <stdio.h>

int main()
{
ChipZclCommandContext_t context;
Expand All @@ -38,4 +40,4 @@ int main()
context.direction = ZCL_DIRECTION_CLIENT_TO_SERVER;
ChipZclStatus_t status = chipZclClusterCommandParse(&context);
printf("Success: 0x%X \n", status);
}
}