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

Add SystemClock, SystemMutex, and SystemError #11

Merged
merged 12 commits into from
Mar 8, 2020
32 changes: 32 additions & 0 deletions build/config/standalone/BleProjectConfig.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
*
* <COPYRIGHT>
*
* 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
* BLE project configuration for standalone builds on Linux and OS X.
*
*/
#ifndef BLEPROJECTCONFIG_H
#define BLEPROJECTCONFIG_H

// Set the number of BLEEndPoints to a number greater than one (1) since
// there can be a delay between closing the endpoint and when the end point
// is actually closed and the end point resources are available for reuse.
//
// Experimentation has shown that four (4) tends to be a reasonable number.
#define BLE_LAYER_NUM_BLE_ENDPOINTS 4
sagar-apple marked this conversation as resolved.
Show resolved Hide resolved

#endif /* BLEPROJECTCONFIG_H */
73 changes: 73 additions & 0 deletions build/config/standalone/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/*
*
* <COPYRIGHT>
*
* 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
* CHIP project configuration for standalone builds on Linux and OS X.
*
*/
#ifndef CHIPPROJECTCONFIG_H
#define CHIPPROJECTCONFIG_H


#define CHIP_CONFIG_ENABLE_EPHEMERAL_UDP_PORT 1

// Configure WDM for event offload
#define CHIP_CONFIG_EVENT_LOGGING_WDM_OFFLOAD 1

#define CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS 1

#define CHIP_CONFIG_EVENT_LOGGING_NUM_EXTERNAL_CALLBACKS 2

#define CHIP_CONFIG_EVENT_LOGGING_EXTERNAL_EVENT_SUPPORT 1

#define WDM_UPDATE_MAX_ITEMS_IN_TRAIT_DIRTY_PATH_STORE 300

// Uncomment this for a large Tunnel MTU.
//#define CHIP_CONFIG_TUNNEL_INTERFACE_MTU (9000)

// Max number of Bindings per CHIPExchangeManager
#define CHIP_CONFIG_MAX_BINDINGS 8

// Enable support functions for parsing command-line arguments
#define CHIP_CONFIG_ENABLE_ARG_PARSER 1

// Enable reading DRBG seed data from /dev/(u)random.
// This is needed for test applications and the CHIP device manager to function
// properly when CHIP_CONFIG_RNG_IMPLEMENTATION_CHIPDRBG is enabled.
#define CHIP_CONFIG_DEV_RANDOM_DRBG_SEED 1

#define CHIP_CONFIG_SECURITY_TEST_MODE 1

#define WDM_ENFORCE_EXPIRY_TIME 1

// Increase session idle timeout in stand-alone builds for the convenience of developers.
#define CHIP_CONFIG_DEFAULT_SECURITY_SESSION_IDLE_TIMEOUT 120000

#define CHIP_CONFIG_ENABLE_WDM_UPDATE 1

#define CHIP_CONFIG_LEGACY_CASE_AUTH_DELEGATE 0

#define CHIP_CONFIG_LEGACY_KEY_EXPORT_DELEGATE 0

#define CHIP_SYSTEM_CONFIG_PACKETBUFFER_MAXALLOC 300

#define CHIP_CONFIG_ENABLE_FUNCT_ERROR_LOGGING 1

#define CHIP_CONFIG_DATA_MANAGEMENT_CLIENT_EXPERIMENTAL 1

#endif /* CHIPPROJECTCONFIG_H */
31 changes: 31 additions & 0 deletions build/config/standalone/SystemProjectConfig.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
*
* <COPYRIGHT>
*
* 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
* chip::System project configuration for standalone builds on Linux and OS X.
*
*/
#ifndef SYSTEMPROJECTCONFIG_H
#define SYSTEMPROJECTCONFIG_H

#if CHIP_SYSTEM_CONFIG_USE_SOCKETS
// Uncomment this for larger buffers (e.g. to support a bigger CHIP_CONFIG_TUNNEL_INTERFACE_MTU).
//#define CHIP_SYSTEM_CONFIG_PACKETBUFFER_CAPACITY_MAX 9050
#endif

#endif /* SYSTEMPROJECTCONFIG_H */
28 changes: 28 additions & 0 deletions build/config/standalone/darwin/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
*
* <COPYRIGHT>
*
* 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
* Alternate CHIP project configuration for building standalone without OpenSSL.
*
*/
#ifndef CHIPPROJECTCONFIG_OSX_H
#define CHIPPROJECTCONFIG_OSX_H

#include "../CHIPProjectConfig.h"
#define INET_CONFIG_OVERRIDE_SYSTEM_TCP_USER_TIMEOUT 0

#endif /* CHIPPROJECTCONFIG_H */
59 changes: 59 additions & 0 deletions build/config/standalone/no-openssl/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
*
* <COPYRIGHT>
*
* 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
* Alternate CHIP project configuration for building standalone without OpenSSL.
*
*/
#ifndef CHIPPROJECTCONFIG_NOOPENSSL_H
#define CHIPPROJECTCONFIG_NOOPENSSL_H

#include "../CHIPProjectConfig.h"

#undef CHIP_CONFIG_USE_OPENSSL_ECC
#undef CHIP_CONFIG_USE_MICRO_ECC
#undef CHIP_CONFIG_HASH_IMPLEMENTATION_OPENSSL
#undef CHIP_CONFIG_HASH_IMPLEMENTATION_MINCRYPT
#undef CHIP_CONFIG_RNG_IMPLEMENTATION_OPENSSL
#undef CHIP_CONFIG_RNG_IMPLEMENTATION_CHIPDRBG
#undef CHIP_CONFIG_AES_IMPLEMENTATION_OPENSSL
#undef CHIP_CONFIG_AES_IMPLEMENTATION_AESNI
#undef CHIP_CONFIG_AES_IMPLEMENTATION_PLATFORM
#undef CHIP_CONFIG_SUPPORT_PASE_CONFIG0
#undef CHIP_CONFIG_SUPPORT_PASE_CONFIG1
#undef CHIP_CONFIG_SUPPORT_PASE_CONFIG2
#undef CHIP_CONFIG_SUPPORT_PASE_CONFIG3
#undef CHIP_CONFIG_SUPPORT_PASE_CONFIG4
#undef CHIP_CONFIG_ENABLE_PROVISIONING_BUNDLE_SUPPORT

#define CHIP_CONFIG_USE_OPENSSL_ECC 0
#define CHIP_CONFIG_USE_MICRO_ECC 1
#define CHIP_CONFIG_HASH_IMPLEMENTATION_OPENSSL 0
#define CHIP_CONFIG_HASH_IMPLEMENTATION_MINCRYPT 1
#define CHIP_CONFIG_RNG_IMPLEMENTATION_OPENSSL 0
#define CHIP_CONFIG_RNG_IMPLEMENTATION_CHIPDRBG 1
#define CHIP_CONFIG_AES_IMPLEMENTATION_OPENSSL 0
#define CHIP_CONFIG_AES_IMPLEMENTATION_AESNI 1
#define CHIP_CONFIG_AES_IMPLEMENTATION_PLATFORM 0
#define CHIP_CONFIG_SUPPORT_PASE_CONFIG0 0
#define CHIP_CONFIG_SUPPORT_PASE_CONFIG1 0
#define CHIP_CONFIG_SUPPORT_PASE_CONFIG2 0
#define CHIP_CONFIG_SUPPORT_PASE_CONFIG3 0
#define CHIP_CONFIG_SUPPORT_PASE_CONFIG4 1
#define CHIP_CONFIG_ENABLE_PROVISIONING_BUNDLE_SUPPORT 0

#endif /* CHIPPROJECTCONFIG_H */
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
TOPTARGETS := all clean run_tests

SUBDIRS = lwip
SUBDIRS = lwip system

$(TOPTARGETS): $(SUBDIRS)
$(SUBDIRS):
Expand Down
Loading