本文整理汇总了C++中CASE_RETURN_STRING函数的典型用法代码示例。如果您正苦于以下问题:C++ CASE_RETURN_STRING函数的具体用法?C++ CASE_RETURN_STRING怎么用?C++ CASE_RETURN_STRING使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了CASE_RETURN_STRING函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: macTraceGetInfoLogString
tANI_U8* macTraceGetInfoLogString( tANI_U16 infoLog )
{
switch( infoLog )
{
CASE_RETURN_STRING(eLOG_NODROP_MISSED_BEACON_SCENARIO);
CASE_RETURN_STRING(eLOG_PROC_DEAUTH_FRAME_SCENARIO);
default:
return( (tANI_U8*)"UNKNOWN" );
break;
}
}
示例2: switch
static const char *system_config_to_string(uint8_t idx)
{
switch (idx) {
CASE_RETURN_STRING(CDS_THROUGHPUT);
CASE_RETURN_STRING(CDS_POWERSAVE);
CASE_RETURN_STRING(CDS_LATENCY);
default:
return "Unknown";
}
}
示例3: edge_event_to_str
static inline const char*
edge_event_to_str(enum scroll_event event)
{
switch (event) {
CASE_RETURN_STRING(SCROLL_EVENT_TOUCH);
CASE_RETURN_STRING(SCROLL_EVENT_MOTION);
CASE_RETURN_STRING(SCROLL_EVENT_RELEASE);
CASE_RETURN_STRING(SCROLL_EVENT_TIMEOUT);
CASE_RETURN_STRING(SCROLL_EVENT_POSTED);
}
return NULL;
}
示例4: edge_state_to_str
static inline const char*
edge_state_to_str(enum tp_edge_scroll_touch_state state)
{
switch (state) {
CASE_RETURN_STRING(EDGE_SCROLL_TOUCH_STATE_NONE);
CASE_RETURN_STRING(EDGE_SCROLL_TOUCH_STATE_EDGE_NEW);
CASE_RETURN_STRING(EDGE_SCROLL_TOUCH_STATE_EDGE);
CASE_RETURN_STRING(EDGE_SCROLL_TOUCH_STATE_AREA);
}
return NULL;
}
示例5: tap_event_to_str
static inline const char*
tap_event_to_str(enum tap_event event) {
argcheck_int_range(event, TAP_EVENT_TOUCH, TAP_EVENT_TIMEOUT);
switch(event) {
CASE_RETURN_STRING(TAP_EVENT_TOUCH);
CASE_RETURN_STRING(TAP_EVENT_MOTION);
CASE_RETURN_STRING(TAP_EVENT_RELEASE);
CASE_RETURN_STRING(TAP_EVENT_TIMEOUT);
CASE_RETURN_STRING(TAP_EVENT_BUTTON);
}
return NULL;
}
示例6: macTraceGetcsrRoamState
/* ---------------------------------------------------------------------------
\fn macTraceGetcsrRoamState
\function to get string equivalent of a value
from the enum eCsrRoamState.
\param csrRoamState - the value from the enum
\return the string equivalent of csrRoamState
---------------------------------------------------------------------------*/
tANI_U8* macTraceGetcsrRoamState(tANI_U16 csrRoamState)
{
switch(csrRoamState)
{
CASE_RETURN_STRING(eCSR_ROAMING_STATE_STOP);
CASE_RETURN_STRING(eCSR_ROAMING_STATE_IDLE);
CASE_RETURN_STRING(eCSR_ROAMING_STATE_SCANNING);
CASE_RETURN_STRING(eCSR_ROAMING_STATE_JOINING);
CASE_RETURN_STRING(eCSR_ROAMING_STATE_JOINED);
default:
return( (tANI_U8*)"UNKNOWN" );
break;
}
}
示例7: macTraceGetTLState
/* ---------------------------------------------------------------------------
\fn macTraceGetTLState
\function to get string equivalent of a value
from the enum WLANTL_STAStateType.
\param tlState - the value from the enum
\return the string equivalent of tlState
---------------------------------------------------------------------------*/
tANI_U8* macTraceGetTLState(tANI_U16 tlState)
{
switch(tlState)
{
CASE_RETURN_STRING(WLANTL_STA_INIT);
CASE_RETURN_STRING(WLANTL_STA_CONNECTED);
CASE_RETURN_STRING(WLANTL_STA_AUTHENTICATED);
CASE_RETURN_STRING(WLANTL_STA_DISCONNECTED);
CASE_RETURN_STRING(WLANTL_STA_MAX_STATE);
default:
return( (tANI_U8*)"UNKNOWN" );
break;
}
}
示例8: button_event_to_str
static inline const char*
button_event_to_str(enum button_event event) {
switch(event) {
CASE_RETURN_STRING(BUTTON_EVENT_IN_BOTTOM_R);
CASE_RETURN_STRING(BUTTON_EVENT_IN_BOTTOM_L);
CASE_RETURN_STRING(BUTTON_EVENT_IN_TOP_R);
CASE_RETURN_STRING(BUTTON_EVENT_IN_TOP_M);
CASE_RETURN_STRING(BUTTON_EVENT_IN_TOP_L);
CASE_RETURN_STRING(BUTTON_EVENT_IN_AREA);
CASE_RETURN_STRING(BUTTON_EVENT_UP);
CASE_RETURN_STRING(BUTTON_EVENT_PRESS);
CASE_RETURN_STRING(BUTTON_EVENT_RELEASE);
CASE_RETURN_STRING(BUTTON_EVENT_TIMEOUT);
}
return NULL;
}
示例9: hidpp20_feature_get_name
const char*
hidpp20_feature_get_name(uint16_t feature)
{
static char numeric[8];
const char *str;
#define CASE_RETURN_STRING(a) case a: return #a; break
switch(feature)
{
CASE_RETURN_STRING(HIDPP_PAGE_ROOT);
CASE_RETURN_STRING(HIDPP_PAGE_FEATURE_SET);
CASE_RETURN_STRING(HIDPP_PAGE_MOUSE_POINTER_BASIC);
CASE_RETURN_STRING(HIDPP_PAGE_ADJUSTABLE_DPI);
CASE_RETURN_STRING(HIDPP_PAGE_SPECIAL_KEYS_BUTTONS);
CASE_RETURN_STRING(HIDPP_PAGE_BATTERY_LEVEL_STATUS);
CASE_RETURN_STRING(HIDPP_PAGE_KBD_REPROGRAMMABLE_KEYS);
default:
sprintf(numeric, "%#4x", feature);
str = numeric;
break;
}
#undef CASE_RETURN_STRING
return str;
}
示例10: middlebutton_state_to_str
static inline const char*
middlebutton_state_to_str(enum evdev_middlebutton_state state)
{
switch (state) {
CASE_RETURN_STRING(MIDDLEBUTTON_IDLE);
CASE_RETURN_STRING(MIDDLEBUTTON_LEFT_DOWN);
CASE_RETURN_STRING(MIDDLEBUTTON_RIGHT_DOWN);
CASE_RETURN_STRING(MIDDLEBUTTON_MIDDLE);
CASE_RETURN_STRING(MIDDLEBUTTON_LEFT_UP_PENDING);
CASE_RETURN_STRING(MIDDLEBUTTON_RIGHT_UP_PENDING);
CASE_RETURN_STRING(MIDDLEBUTTON_PASSTHROUGH);
CASE_RETURN_STRING(MIDDLEBUTTON_IGNORE_LR);
CASE_RETURN_STRING(MIDDLEBUTTON_IGNORE_L);
CASE_RETURN_STRING(MIDDLEBUTTON_IGNORE_R);
}
return NULL;
}
示例11: macTraceGetNeighbourRoamState
/* ---------------------------------------------------------------------------
\fn macTraceGetNeighbourRoamState
\function to get string equivalent of a value
from the enum eCsrNeighborRoamState.
\param neighbourRoamState - the value from the enum
\return the string equivalent of neighbourRoamState
---------------------------------------------------------------------------*/
tANI_U8* macTraceGetNeighbourRoamState(tANI_U16 neighbourRoamState)
{
switch(neighbourRoamState)
{
CASE_RETURN_STRING(eCSR_NEIGHBOR_ROAM_STATE_CLOSED);
CASE_RETURN_STRING(eCSR_NEIGHBOR_ROAM_STATE_INIT);
CASE_RETURN_STRING(eCSR_NEIGHBOR_ROAM_STATE_CONNECTED);
CASE_RETURN_STRING(eCSR_NEIGHBOR_ROAM_STATE_CFG_CHAN_LIST_SCAN);
CASE_RETURN_STRING(eCSR_NEIGHBOR_ROAM_STATE_REASSOCIATING);
#ifdef WLAN_FEATURE_VOWIFI_11R
CASE_RETURN_STRING(eCSR_NEIGHBOR_ROAM_STATE_REPORT_QUERY);
CASE_RETURN_STRING(eCSR_NEIGHBOR_ROAM_STATE_REPORT_SCAN);
CASE_RETURN_STRING(eCSR_NEIGHBOR_ROAM_STATE_PREAUTHENTICATING);
CASE_RETURN_STRING(eCSR_NEIGHBOR_ROAM_STATE_PREAUTH_DONE);
#endif /* WLAN_FEATURE_VOWIFI_11R */
CASE_RETURN_STRING(eNEIGHBOR_STATE_MAX);
default:
return( (tANI_U8*)"UNKNOWN" );
break;
}
}
示例12: macTraceGetP2PConnState
tANI_U8* macTraceGetP2PConnState(tANI_U16 connState)
{
switch(connState)
{
CASE_RETURN_STRING(P2P_NOT_ACTIVE);
CASE_RETURN_STRING(P2P_GO_NEG_PROCESS);
CASE_RETURN_STRING(P2P_GO_NEG_COMPLETED);
CASE_RETURN_STRING(P2P_CLIENT_CONNECTING_STATE_1);
CASE_RETURN_STRING(P2P_GO_COMPLETED_STATE);
CASE_RETURN_STRING(P2P_CLIENT_CONNECTED_STATE_1);
CASE_RETURN_STRING(P2P_CLIENT_DISCONNECTED_STATE);
CASE_RETURN_STRING(P2P_CLIENT_CONNECTING_STATE_2);
CASE_RETURN_STRING(P2P_CLIENT_COMPLETED_STATE);
default:
return( (tANI_U8*)"UNKNOWN" );
break;
}
}
示例13: button_state_to_str
static inline const char*
button_state_to_str(enum button_state state) {
switch(state) {
CASE_RETURN_STRING(BUTTON_STATE_NONE);
CASE_RETURN_STRING(BUTTON_STATE_AREA);
CASE_RETURN_STRING(BUTTON_STATE_BOTTOM);
CASE_RETURN_STRING(BUTTON_STATE_TOP);
CASE_RETURN_STRING(BUTTON_STATE_TOP_NEW);
CASE_RETURN_STRING(BUTTON_STATE_TOP_TO_IGNORE);
CASE_RETURN_STRING(BUTTON_STATE_IGNORE);
}
return NULL;
}
示例14: macTraceGetCfgMsgString
tANI_U8* macTraceGetCfgMsgString( tANI_U16 cfgMsg )
{
switch( cfgMsg )
{
CASE_RETURN_STRING(WNI_CFG_PARAM_UPDATE_IND);
CASE_RETURN_STRING(WNI_CFG_DNLD_REQ);
CASE_RETURN_STRING(WNI_CFG_DNLD_CNF);
CASE_RETURN_STRING(WNI_CFG_GET_RSP);
CASE_RETURN_STRING(WNI_CFG_SET_CNF);
CASE_RETURN_STRING(SIR_CFG_PARAM_UPDATE_IND);
CASE_RETURN_STRING(SIR_CFG_DOWNLOAD_COMPLETE_IND);
CASE_RETURN_STRING(WNI_CFG_SET_REQ_NO_RSP);
default:
return( (tANI_U8*)"UNKNOWN" );
break;
}
}
示例15: button_event_to_str
static inline const char*
button_event_to_str(enum button_event event) {
argcheck_int_range(event, BUTTON_EVENT_IN_R, BUTTON_EVENT_TIMEOUT);
switch(event) {
CASE_RETURN_STRING(BUTTON_EVENT_IN_R);
CASE_RETURN_STRING(BUTTON_EVENT_IN_L);
CASE_RETURN_STRING(BUTTON_EVENT_IN_AREA);
CASE_RETURN_STRING(BUTTON_EVENT_UP);
CASE_RETURN_STRING(BUTTON_EVENT_PRESS);
CASE_RETURN_STRING(BUTTON_EVENT_RELEASE);
CASE_RETURN_STRING(BUTTON_EVENT_TIMEOUT);
}
return NULL;
}