1 // Copyright 2021 The Pigweed Authors 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); you may not 4 // use this file except in compliance with the License. You may obtain a copy of 5 // the License at 6 // 7 // https://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 // License for the specific language governing permissions and limitations under 13 // the License. 14 #pragma once 15 16 // PW_SYSTEM_LOG_BUFFER_SIZE is the log buffer size which determines how many 17 // log entries can be buffered prior to streaming them. 18 // 19 // Defaults to 4KiB. 20 #ifndef PW_SYSTEM_LOG_BUFFER_SIZE 21 #define PW_SYSTEM_LOG_BUFFER_SIZE 4096 22 #endif // PW_SYSTEM_LOG_BUFFER_SIZE 23 24 // PW_SYSTEM_MAX_LOG_ENTRY_SIZE limits the proto-encoded log entry size. This 25 // value might depend on a target interface's MTU. 26 // 27 // Defaults to 256B. 28 #ifndef PW_SYSTEM_MAX_LOG_ENTRY_SIZE 29 #define PW_SYSTEM_MAX_LOG_ENTRY_SIZE 256 30 #endif // PW_SYSTEM_MAX_LOG_ENTRY_SIZE 31 32 // PW_SYSTEM_MAX_TRANSMISSION_UNIT target's MTU. 33 // 34 // Defaults to 1055 bytes, which is enough to fit 512-byte payloads when using 35 // HDLC framing. 36 #ifndef PW_SYSTEM_MAX_TRANSMISSION_UNIT 37 #define PW_SYSTEM_MAX_TRANSMISSION_UNIT 1055 38 #endif // PW_SYSTEM_MAX_TRANSMISSION_UNIT 39 40 // PW_SYSTEM_DEFAULT_CHANNEL_ID RPC channel ID to host. 41 // 42 // Defaults to 1. 43 #ifndef PW_SYSTEM_DEFAULT_CHANNEL_ID 44 #define PW_SYSTEM_DEFAULT_CHANNEL_ID 1 45 #endif // PW_SYSTEM_DEFAULT_CHANNEL_ID 46 47 // PW_SYSTEM_DEFAULT_RPC_HDLC_ADDRESS RPC HDLC default address. 48 // 49 // Defaults to 82. 50 #ifndef PW_SYSTEM_DEFAULT_RPC_HDLC_ADDRESS 51 #define PW_SYSTEM_DEFAULT_RPC_HDLC_ADDRESS 82 52 #endif // PW_SYSTEM_DEFAULT_RPC_HDLC_ADDRESS 53 54 // PW_SYSTEM_ENABLE_THREAD_SNAPSHOT_SERVICE specifies if the thread snapshot 55 // RPC service is enabled. 56 // 57 // Defaults to 1. 58 #ifndef PW_SYSTEM_ENABLE_THREAD_SNAPSHOT_SERVICE 59 #define PW_SYSTEM_ENABLE_THREAD_SNAPSHOT_SERVICE 1 60 #endif // PW_SYSTEM_ENABLE_THREAD_SNAPSHOT_SERVICE 61 62 // PW_SYSTEM_WORK_QUEUE_MAX_ENTRIES specifies the maximum number of work queue 63 // entries that may be staged at once. 64 // 65 // Defaults to 32. 66 #ifndef PW_SYSTEM_WORK_QUEUE_MAX_ENTRIES 67 #define PW_SYSTEM_WORK_QUEUE_MAX_ENTRIES 32 68 #endif // PW_SYSTEM_WORK_QUEUE_MAX_ENTRIES 69 70 // PW_SYSTEM_SOCKET_IO_PORT specifies the port number to use for the socket 71 // stream implementation of pw_system's I/O interface. 72 // 73 // Defaults to 33000. 74 #ifndef PW_SYSTEM_SOCKET_IO_PORT 75 #define PW_SYSTEM_SOCKET_IO_PORT 33000 76 #endif // PW_SYSTEM_SOCKET_IO_PORT 77