Skip to content

Commit f5f14f9

Browse files
committed
Define new JF server variables for JF Admins only
1 parent 7481f60 commit f5f14f9

File tree

6 files changed

+33
-0
lines changed

6 files changed

+33
-0
lines changed

examples/jf-admin-app/linux/args.gni

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,5 @@ chip_enable_additional_data_advertising = true
3434
chip_enable_rotating_device_id = true
3535

3636
chip_enable_read_client = false
37+
38+
chip_device_config_enable_joint_fabric = true

src/app/server/BUILD.gn

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import("//build_overrides/chip.gni")
1616
import("${chip_root}/src/access/access.gni")
1717
import("${chip_root}/src/app/common_flags.gni")
1818
import("${chip_root}/src/app/icd/icd.gni")
19+
import("${chip_root}/src/platform/device.gni")
1920

2021
config("server_config") {
2122
defines = []
@@ -63,6 +64,13 @@ static_library("server") {
6364
"Server.h",
6465
]
6566

67+
if (chip_device_config_enable_joint_fabric) {
68+
sources += [
69+
"JointFabricDatastore.cpp",
70+
"JointFabricDatastore.h",
71+
]
72+
}
73+
6674
public_configs = [ ":server_config" ]
6775

6876
cflags = [ "-Wconversion" ]

src/app/server/Server.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@
8282
#endif // CHIP_CONFIG_ENABLE_ICD_CIP
8383
#endif // CHIP_CONFIG_ENABLE_ICD_SERVER
8484

85+
#if CHIP_DEVICE_CONFIG_ENABLE_JOINT_FABRIC
86+
#include <app/server/JointFabricDatastore.h>
87+
#endif // CHIP_DEVICE_CONFIG_ENABLE_JOINT_FABRIC
88+
8589
namespace chip {
8690

8791
inline constexpr size_t kMaxBlePendingPackets = 1;
@@ -419,7 +423,9 @@ class Server
419423

420424
app::reporting::ReportScheduler * GetReportScheduler() { return mReportScheduler; }
421425

426+
#if CHIP_DEVICE_CONFIG_ENABLE_JOINT_FABRIC
422427
app::JointFabricDatastore & GetJointFabricDatastore() { return mJointFabricDatastore; }
428+
#endif // CHIP_DEVICE_CONFIG_ENABLE_JOINT_FABRIC
423429

424430
#if CHIP_CONFIG_ENABLE_ICD_SERVER
425431
app::ICDManager & GetICDManager() { return mICDManager; }
@@ -700,7 +706,9 @@ class Server
700706
Access::AccessControl mAccessControl;
701707
app::AclStorage * mAclStorage;
702708

709+
#if CHIP_DEVICE_CONFIG_ENABLE_JOINT_FABRIC
703710
app::JointFabricDatastore mJointFabricDatastore;
711+
#endif // CHIP_DEVICE_CONFIG_ENABLE_JOINT_FABRIC
704712

705713
TestEventTriggerDelegate * mTestEventTriggerDelegate;
706714
Crypto::OperationalKeystore * mOperationalKeystore;

src/include/platform/CHIPDeviceConfig.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,15 @@
456456
#define CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF 0
457457
#endif
458458

459+
/**
460+
* CHIP_DEVICE_CONFIG_ENABLE_JOINT_FABRIC
461+
*
462+
* Enable support for Joint Fabric in core SDK.
463+
*/
464+
#ifndef CHIP_DEVICE_CONFIG_ENABLE_JOINT_FABRIC
465+
#define CHIP_DEVICE_CONFIG_ENABLE_JOINT_FABRIC 0
466+
#endif
467+
459468
/**
460469
* CHIP_DEVICE_CONFIG_WIFIPAF_MIN_ADVERTISING_TIMEOUT_SECS
461470
*

src/platform/BUILD.gn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ if (chip_device_platform != "none" && chip_device_platform != "external") {
141141
"CHIP_USE_TRANSITIONAL_DEVICE_INSTANCE_INFO_PROVIDER=${chip_use_transitional_device_instance_info_provider}",
142142
"CHIP_DEVICE_CONFIG_ENABLE_DYNAMIC_MRP_CONFIG=${chip_device_config_enable_dynamic_mrp_config}",
143143
"CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF=${chip_device_config_enable_wifipaf}",
144+
"CHIP_DEVICE_CONFIG_ENABLE_JOINT_FABRIC=${chip_device_config_enable_joint_fabric}",
144145
]
145146

146147
public_deps = [ "${chip_root}/src/app/icd/server:icd-server-config" ]

src/platform/device.gni

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,11 @@ declare_args() {
120120
}
121121
}
122122

123+
declare_args() {
124+
# Enable Joint Fabric features
125+
chip_device_config_enable_joint_fabric = false
126+
}
127+
123128
declare_args() {
124129
# Include wifi-paf to commission the device or not
125130
# This is a feature of Wi-Fi spec that it can be enabled if wifi is enabled

0 commit comments

Comments
 (0)