mirror of
https://github.com/espressif/openthread.git
synced 2026-07-30 23:57:47 +00:00
[diags] make diag output & cmd line buffer params configurable (#2728)
This commit is contained in:
@@ -1602,4 +1602,34 @@
|
||||
#define OPENTHREAD_CONFIG_DISABLE_CCA_ON_LAST_ATTEMPT 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_DIAG_OUTPUT_BUFFER_SIZE
|
||||
*
|
||||
* Define OpenThread diagnostic mode output buffer size in bytes
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_DIAG_OUTPUT_BUFFER_SIZE
|
||||
#define OPENTHREAD_CONFIG_DIAG_OUTPUT_BUFFER_SIZE 256
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_DIAG_CMD_LINE_ARGS_MAX
|
||||
*
|
||||
* Define OpenThread diagnostic mode max command line arguments.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_DIAG_CMD_LINE_ARGS_MAX
|
||||
#define OPENTHREAD_CONFIG_DIAG_CMD_LINE_ARGS_MAX 32
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_DIAG_CMD_LINE_BUFFER_SIZE
|
||||
*
|
||||
* Define OpenThread diagnostic mode command line buffer size in bytes.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_DIAG_CMD_LINE_BUFFER_SIZE
|
||||
#define OPENTHREAD_CONFIG_DIAG_CMD_LINE_BUFFER_SIZE 256
|
||||
#endif
|
||||
|
||||
#endif // OPENTHREAD_CORE_DEFAULT_CONFIG_H_
|
||||
|
||||
@@ -62,7 +62,7 @@ private:
|
||||
|
||||
enum
|
||||
{
|
||||
kMaxOutputSize = 256,
|
||||
kMaxOutputSize = OPENTHREAD_CONFIG_DIAG_OUTPUT_BUFFER_SIZE,
|
||||
};
|
||||
|
||||
struct DiagStats
|
||||
|
||||
@@ -68,8 +68,8 @@ const char *otDiagProcessCmdLine(const char *aInput)
|
||||
{
|
||||
enum
|
||||
{
|
||||
kMaxArgs = 32,
|
||||
kMaxCommandBuffer = 256,
|
||||
kMaxArgs = OPENTHREAD_CONFIG_DIAG_CMD_LINE_ARGS_MAX,
|
||||
kMaxCommandBuffer = OPENTHREAD_CONFIG_DIAG_CMD_LINE_BUFFER_SIZE,
|
||||
};
|
||||
|
||||
otError error = OT_ERROR_NONE;
|
||||
|
||||
Reference in New Issue
Block a user