[diags] make diag output & cmd line buffer params configurable (#2728)

This commit is contained in:
Biswajit
2018-06-04 09:28:13 -07:00
committed by Jonathan Hui
parent e7d782c421
commit bdc73dc193
3 changed files with 33 additions and 3 deletions
+30
View File
@@ -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_
+1 -1
View File
@@ -62,7 +62,7 @@ private:
enum
{
kMaxOutputSize = 256,
kMaxOutputSize = OPENTHREAD_CONFIG_DIAG_OUTPUT_BUFFER_SIZE,
};
struct DiagStats
+2 -2
View File
@@ -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;