25 #include "rdk_moca_hal.h"
27 #define RMH_PrintErr(fmt, ...) RMH_Print(RMH_LOG_ERROR, "ERROR: ", fmt, ##__VA_ARGS__);
28 #define RMH_PrintWrn(fmt, ...) RMH_Print(RMH_LOG_ERROR, "WARNING: ", fmt, ##__VA_ARGS__);
29 #define RMH_PrintMsg(fmt, ...) RMH_Print(RMH_LOG_MESSAGE, "", fmt, ##__VA_ARGS__);
30 #define RMH_PrintDbg(fmt, ...) RMH_Print(RMH_LOG_DEBUG, "", fmt, ##__VA_ARGS__);
31 #define RMH_Print(level, logPrefix, fmt, ...) { \
32 if (app && (app->apiLogLevel & level) == level) { \
33 fprintf(stdout, "%s" logPrefix fmt "", app->appPrefix ? app->appPrefix : "", ##__VA_ARGS__); \
41 RMH_Result (*apiFunc)();
42 const RMH_Result (*apiHandlerFunc)(
const struct RMHApp *app,
void *api);
55 bool argMonitorDriverDebug;
56 bool argHelpRequested;
61 uint32_t driverLogLevel;
62 const char* argRunCommand;
63 const char* appPrefix;
73 RMH_Result RMHApp_ReadMenuOption(
RMHApp *app, uint32_t *value,
bool helpSupported,
bool *helpRequested);
74 const char * RMHApp_ReadNextArg(
RMHApp *app);
75 void RMHApp_RegisterAPIHandlers(
RMHApp *app);