Skip to content

Commit

Permalink
Manual fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kghost committed Sep 2, 2021
1 parent f76de53 commit 8e77155
Show file tree
Hide file tree
Showing 33 changed files with 71 additions and 100 deletions.
4 changes: 2 additions & 2 deletions examples/chip-tool/templates/commands.zapt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
#include <cstdint>

#include <commands/clusters/ModelCommand.h>
#include <zap-generated/CHIPClientCallbacks.h>
#include <zap-generated/CHIPClusters.h>
#include <lib/core/CHIPSafeCasts.h>
#include <lib/support/BytesToHex.h>
#include <zap-generated/CHIPClientCallbacks.h>
#include <zap-generated/CHIPClusters.h>

static void OnDefaultSuccessResponse(void * context)
{
Expand Down
2 changes: 1 addition & 1 deletion examples/platform/nrfconnect/util/DFUTrigger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#endif

#include <drivers/gpio.h>
#include <lib/shell/shell.h>
#include <shell/shell.h>

namespace {
constexpr const char * kGPIOController = "GPIO_0";
Expand Down
14 changes: 6 additions & 8 deletions src/app/zap-templates/templates/app/CHIPClusters-src.zapt
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,17 @@

#include <cstdint>


#include <app/InteractionModelEngine.h>
#include <app/chip-zcl-zpro-codec.h>
#include <app/util/basic-types.h>
#include <app-common/zap-generated/ids/Attributes.h>
#include <lib/support/BufferWriter.h>
#include <lib/support/CodeUtils.h>
#include <lib/support/SafeInt.h>
#include <lib/support/logging/CHIPLogging.h>
#include <system/SystemPacketBuffer.h>

#include <app/chip-zcl-zpro-codec.h>
#include <app-common/zap-generated/ids/Attributes.h>
#include <app/util/basic-types.h>

#include <zap-generated/CHIPClientCallbacks.h>
#include <lib/support/SafeInt.h>
#include <lib/support/CodeUtils.h>
#include <app/InteractionModelEngine.h>

#define COMMAND_HEADER(name, clusterId) \
const char * kName = name; \
Expand Down
2 changes: 2 additions & 0 deletions src/app/zap-templates/templates/app/af-structs.zapt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
#pragma once

#include <stdint.h>

#include <app/util/basic-types.h>
#include <lib/support/Span.h>

#include "enums.h"

{{#zcl_structs}}
Expand Down
4 changes: 2 additions & 2 deletions src/controller/java/templates/CHIPClusters-JNI.zapt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
#include <controller/java/JniReferences.h>
#include <controller/java/JniTypeWrappers.h>
#include <controller/java/StackLock.h>
#include <lib/core/CHIPSafeCasts.h>
#include <lib/support/Span.h>
#include <jni.h>
#include <lib/core/CHIPSafeCasts.h>
#include <lib/support/CodeUtils.h>
#include <lib/support/Span.h>

#define JNI_METHOD(RETURN, CLASS_NAME, METHOD_NAME) \
extern "C" JNIEXPORT RETURN JNICALL Java_chip_devicecontroller_ChipClusters_00024##CLASS_NAME##_##METHOD_NAME
Expand Down
3 changes: 1 addition & 2 deletions src/controller/python/chip/clusters/CHIPClusters.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions src/controller/python/templates/python-CHIPClusters-cpp.zapt
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{{> header}}

#include <lib/core/CHIPCore.h>

#include <app/CommandSender.h>
#include <app/InteractionModelEngine.h>
#include <lib/core/CHIPCore.h>
#include <lib/support/Span.h>

#include <controller/CHIPDevice.h>
Expand Down
1 change: 1 addition & 0 deletions src/credentials/CHIPCert.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#pragma once

#include <cstdint>
#include <string.h>

#include <crypto/CHIPCryptoPAL.h>
Expand Down
1 change: 0 additions & 1 deletion src/credentials/tests/CHIPCert_test_vectors.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

#pragma once

#include <lib/asn1/ASN1OID.h>
#include <lib/core/CHIPConfig.h>
#include <lib/support/BitFlags.h>
#include <lib/support/CodeUtils.h>
Expand Down
2 changes: 1 addition & 1 deletion src/darwin/Framework/CHIP/CHIPManualSetupPayloadParser.mm
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
#import "CHIPLogging.h"
#import "CHIPSetupPayload_Internal.h"

#import <lib/support/CHIPMem.h>
#import <setup_payload/ManualSetupPayloadParser.h>
#import <setup_payload/SetupPayload.h>
#import <support/CHIPMem.h>

@implementation CHIPManualSetupPayloadParser {
NSString * _decimalStringRepresentation;
Expand Down
2 changes: 1 addition & 1 deletion src/darwin/Framework/CHIP/CHIPQRCodeSetupPayloadParser.mm
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
#import "CHIPLogging.h"
#import "CHIPSetupPayload_Internal.h"

#import <lib/support/CHIPMem.h>
#import <setup_payload/QRCodeSetupPayloadParser.h>
#import <setup_payload/SetupPayload.h>
#import <support/CHIPMem.h>

@implementation CHIPQRCodeSetupPayloadParser {
NSString * _base38Representation;
Expand Down
4 changes: 0 additions & 4 deletions src/lib/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
import("//build_overrides/chip.gni")
import("lib.gni")

config("includes") {
include_dirs = [ "." ]
}

static_library("lib") {
public_deps = [
"${chip_root}/src/app",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/asn1/ASN1.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace chip {
namespace ASN1 {

#ifndef DOXYGEN_SHOULD_SKIP_THIS
#include <lib/asn1/ASN1OID.h>
#include <asn1/ASN1OID.h>
#endif

static constexpr size_t kMaxConstructedAndEncapsulatedTypesDepth = 10;
Expand Down
1 change: 0 additions & 1 deletion src/lib/asn1/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ static_library("asn1") {

public_configs = [
"${chip_root}/src:includes",
"${chip_root}/src/lib:includes",
"${chip_root}/src/system:system_config",
]
}
4 changes: 1 addition & 3 deletions src/lib/asn1/tests/TestASN1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@
#include <stdio.h>
#include <string.h>

#include <lib/support/UnitTestRegistration.h>

#include <lib/asn1/ASN1.h>
#include <lib/asn1/ASN1Macros.h>
#include <lib/asn1/ASN1OID.h>
#include <lib/support/UnitTestRegistration.h>

using namespace chip;
using namespace chip::ASN1;
Expand Down
5 changes: 1 addition & 4 deletions src/lib/core/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,7 @@ source_set("chip_config_header") {
"CHIPTimeConfig.h",
]

public_configs = [
"${chip_root}/src:includes",
"${chip_root}/src/lib:includes",
]
public_configs = [ "${chip_root}/src:includes" ]

public_deps = [
":chip_buildconfig",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/core/CHIPConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#pragma once

#if CHIP_HAVE_CONFIG_H
#include <lib/core/CHIPBuildConfig.h>
#include <core/CHIPBuildConfig.h>
#endif

#include <ble/BleConfig.h>
Expand Down
18 changes: 9 additions & 9 deletions src/lib/mdns/Discovery_ImplPlatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@
* limitations under the License.
*/

#include "Discovery_ImplPlatform.h"
#include "MdnsCache.h"
#include <lib/mdns/Discovery_ImplPlatform.h>

#include <inttypes.h>

#include "ServiceNaming.h"
#include "lib/core/CHIPSafeCasts.h"
#include "lib/mdns/TxtFields.h"
#include "lib/mdns/platform/Mdns.h"
#include "lib/support/logging/CHIPLogging.h"
#include "platform/CHIPDeviceConfig.h"
#include "platform/CHIPDeviceLayer.h"
#include <lib/core/CHIPConfig.h>
#include <lib/core/CHIPSafeCasts.h>
#include <lib/mdns/MdnsCache.h>
#include <lib/mdns/ServiceNaming.h>
#include <lib/mdns/TxtFields.h>
#include <lib/mdns/platform/Mdns.h>
#include <lib/support/CHIPMemString.h>
#include <lib/support/CodeUtils.h>
#include <lib/support/ErrorStr.h>
#include <lib/support/RandUtils.h>
#include <lib/support/logging/CHIPLogging.h>
#include <platform/CHIPDeviceConfig.h>
#include <platform/CHIPDeviceLayer.h>

namespace chip {
namespace Mdns {
Expand Down
6 changes: 2 additions & 4 deletions src/lib/mdns/Resolver_ImplMinimalMdns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@

#include <limits>

#include "MinimalMdnsServer.h"
#include "ServiceNaming.h"

#include <lib/core/CHIPConfig.h>

#include <lib/mdns/MinimalMdnsServer.h>
#include <lib/mdns/ServiceNaming.h>
#include <lib/mdns/TxtFields.h>
#include <lib/mdns/minimal/Parser.h>
#include <lib/mdns/minimal/QueryBuilder.h>
Expand Down
8 changes: 4 additions & 4 deletions src/lib/mdns/platform/Mdns.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
#include <algorithm>
#include <stdint.h>

#include "inet/IPAddress.h"
#include "inet/InetInterface.h"
#include "lib/core/Optional.h"
#include "lib/mdns/ServiceNaming.h"
#include <inet/IPAddress.h>
#include <inet/InetInterface.h>
#include <lib/core/CHIPError.h>
#include <lib/core/Optional.h>
#include <lib/mdns/ServiceNaming.h>

namespace chip {
namespace Mdns {
Expand Down
10 changes: 5 additions & 5 deletions src/lib/mdns/tests/TestMdnsCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <lib/support/logging/CHIPLogging.h>

// set this to 1 to enable DumpCache to see the state of the cache when needed
// #define MDNS_LOGGING 1
#include <iostream>
#include <lib/mdns/MdnsCache.h>

#include <cstdint>
#include <lib/support/UnitTestRegistration.h>
#include <iostream>
#include <nlunit-test.h>

#include <inet/IPAddress.h>
#include <inet/InetInterface.h>
#include <inet/InetLayer.h>
#include <lib/core/CHIPError.h>
#include <lib/core/PeerId.h>
#include <lib/mdns/MdnsCache.h>
#include <lib/support/UnitTestRegistration.h>
#include <lib/support/logging/CHIPLogging.h>
#include <system/SystemTimer.h>
#include <system/TimeSource.h>

Expand Down
2 changes: 1 addition & 1 deletion src/lib/shell/MainLoopZephyr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/
#include <init.h>
#include <lib/shell/shell.h>
#include <shell/shell.h>

#include <lib/core/CHIPError.h>
#include <lib/shell/Engine.h>
Expand Down
4 changes: 2 additions & 2 deletions src/lib/shell/streamer_zephyr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@

#include <cassert>

#include <lib/shell/shell.h>
#include <lib/shell/shell_uart.h>
#include <shell/shell.h>
#include <shell/shell_uart.h>

namespace chip {
namespace Shell {
Expand Down
1 change: 0 additions & 1 deletion src/lib/support/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ static_library("support") {

public_configs = [
"${chip_root}/src:includes",
"${chip_root}/src/lib:includes",
"${chip_root}/src/system:system_config",
]

Expand Down
2 changes: 1 addition & 1 deletion src/platform/logging/impl/android/Logging.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* See Project chip LICENSE file for licensing information. */

#include "platform/logging/LogV.h"
#include <lib/support/logging/Constants.h>
#include <platform/logging/LogV.h>

#include <android/log.h>

Expand Down
2 changes: 1 addition & 1 deletion src/platform/mbed/Logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* Logging implementation for Mbed platform
*/

#include <core/CHIPConfig.h>
#include <lib/core/CHIPConfig.h>
#include <platform/logging/LogV.h>
#include <support/logging/CHIPLogging.h>
#include <support/logging/Constants.h>
Expand Down
1 change: 0 additions & 1 deletion src/tools/chip-cert/chip-cert.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
#include <CHIPVersion.h>
#include <credentials/CHIPCert.h>
#include <lib/asn1/ASN1.h>
#include <lib/asn1/ASN1OID.h>
#include <lib/core/CHIPConfig.h>
#include <lib/core/CHIPCore.h>
#include <lib/core/CHIPSafeCasts.h>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 4 additions & 7 deletions zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 4 additions & 7 deletions zzz_generated/lighting-app/zap-generated/CHIPClusters.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8e77155

Please sign in to comment.