当前位置: 首页>>代码示例>>C++>>正文


C++ MessageSend函数代码示例

本文整理汇总了C++中MessageSend函数的典型用法代码示例。如果您正苦于以下问题:C++ MessageSend函数的具体用法?C++ MessageSend怎么用?C++ MessageSend使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了MessageSend函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: audioIndicateCodec

/****************************************************************************
NAME    
    audioIndicateCodec
    
DESCRIPTION
    Sends an event to indicate which A2DP codec is in use

RETURNS
    void
*/
void audioIndicateCodec(uint8 seid)
{
    switch(seid)
    {
        case SBC_SEID:
            MessageSend ( &theSink.task , EventSbcCodec , 0 ) ;
            break;
        case MP3_SEID:
            MessageSend ( &theSink.task , EventMp3Codec , 0 ) ;
            break;        
        case AAC_SEID:
            MessageSend ( &theSink.task , EventAacCodec , 0 ) ;
            break;  
        case APTX_SEID:
            MessageSend ( &theSink.task , EventAptxCodec , 0 ) ;
            break;  
#ifdef INCLUDE_FASTSTREAM            
        case FASTSTREAM_SEID:
            MessageSend ( &theSink.task , EventFaststreamCodec , 0 ) ;
            break;  
#endif
#ifdef INCLUDE_APTX_ACL_SPRINT            
        case APTX_SPRINT_SEID:
            MessageSend ( &theSink.task , EventAptxLLCodec , 0 ) ;
            break;              
#endif            
        default:
           AUD_DEBUG(("AUD: Unknown codec\n"));                 
    }
}
开发者ID:NemProjects,项目名称:BC,代码行数:40,代码来源:sink_audio.c

示例2: connectionSmInit

/****************************************************************************
NAME
    connectionSmInit

DESCRIPTION
    This Function is called to initialise SM. The config option is not 
    currently used but may be in future.

RETURNS
    Nothing.
*/
void connectionSmInit(cl_dm_bt_version version, connectionSmState *smState, uint8 flags)
{
    MAKE_CL_MESSAGE(CL_INTERNAL_SM_INIT_REQ);

    message->options            =  DM_SM_INIT_SECURITY_MODE | 
                                   DM_SM_INIT_MODE3_ENC;
    
    message->config             =  0;
    
    if(version >= bluetooth4_1 && (flags & CONNECTION_FLAG_SC_ENABLE))
    {
        message->options        |= DM_SM_INIT_SECURE_CONNECTIONS;

        if(flags & CONNECTION_FLAG_SCOM_ENABLE)
        {
            message->config         |=  DM_SM_SEC_MODE_CONFIG_SC_ONLY_MODE;
            message->options        |=  DM_SM_INIT_CONFIG;
        }
    }

    message->write_auth_enable  =  cl_sm_wae_acl_owner_none;

    if(version >= bluetooth2_1)
    {
        message->options            |=  DM_SM_INIT_WRITE_AUTH_ENABLE;

        message->security_mode      =   sec_mode4_ssp;
        message->mode3_enc          =   hci_enc_mode_pt_to_pt_and_bcast;

    }
    else if (version == bluetooth2_0)
    {
        /* As per the documentation for DM_SM_INIT_REQ_T in dm_prim.h
         * write auth enable applies to security mode 2.
         * mode3 encryption doesn't apply in this mode.
         * No clue why mode 3 encryption is enabled.
         */
        message->options            |=  DM_SM_INIT_WRITE_AUTH_ENABLE;
        message->security_mode      =   sec_mode2_service;
        message->mode3_enc          =   hci_enc_mode_pt_to_pt;
    }    
    else
    {
        message->security_mode      =   sec_mode2_service;
        message->mode3_enc          =   hci_enc_mode_pt_to_pt;
    }

    smState->security_mode = message->security_mode;
    smState->enc_mode = message->mode3_enc;
    
    MessageSend(connectionGetCmTask(), CL_INTERNAL_SM_INIT_REQ, message);
}
开发者ID:stephen-kun,项目名称:koovox_adk4.0,代码行数:63,代码来源:dm_security_init.c

示例3: AvrcpBrowseGetFolderItemsResponse

/****************************************************************************
*NAME 
*   AvrcpBrowseGetFolderItemsResponse
*
*DESCRIPTION
*   This function is used to send response for  GetFolderItems command to CT.
*   This will be called in response to a AVRCP_BROWSE_GET_FOLDER_ITEMS_IND
*   message.
*
*PARAMETRS
*   avrcp              - Task
*   avrcp_response_type- response. avrcp_response_browsing_success on Success.
*   uint16             - UID Counter. 0 for non database aware players
*   uint16             - number of items returned
*   uint16             - size of the item list in bytes
*   Source             - item list
*****************************************************************************/
void AvrcpBrowseGetFolderItemsResponse( AVRCP*              avrcp,         
                                        avrcp_response_type response,     
                                        uint16              uid_counter, 
                                        uint16              num_items,  
                                        uint16              item_list_size,
                                        Source              item_list)
{
    AVBP *avbp = (AVBP*)avrcp->avbp_task;

    if((SourceBoundary(item_list) < item_list_size) ||
       (!num_items && item_list_size) || 
       (item_list_size > (avbp->avbp_mtu - AVBP_MAX_FIXED_PDU_SIZE)))
    {
        AVRCP_DEBUG(("Wrong parameters\n"));
        if(item_list)
        {
            SourceEmpty(item_list);
        }
        return; 
    }
     
    if((isAvbpCheckConnected(avbp)) && 
      (avbp->blocking_cmd == AVBP_GET_FOLDER_ITEMS_PDU_ID))
    {
        MAKE_AVRCP_MESSAGE(AVRCP_INTERNAL_GET_FOLDER_ITEMS_RES);
        message->response = response;
        message->num_items = num_items;
        message->item_list_size = item_list_size;
        message->item_list = item_list;
        if(isAvrcpDatabaseEnabled(avrcpGetDeviceTask()))
        {
           message->uid_counter = uid_counter;
        }
        else
        {
           message->uid_counter = 0;
        }

        /* Queue the Response */
        MessageSend(&avbp->task,
                    AVRCP_INTERNAL_GET_FOLDER_ITEMS_RES,
                    message);
    }
    else
    {
        AVRCP_INFO(("Wrong State. Ignoring the response\n"));
        if(item_list)
        {
            SourceEmpty(item_list);
        }
    }
}
开发者ID:stephen-kun,项目名称:csr8670,代码行数:69,代码来源:avrcp_browsing.c

示例4: oscl_memcpy

void ML::MsgLoopReqSend(PS_MlRequestType pLoop_Type)
{
    S_MaintenanceLoopRequest   maintenanceLoopRequest ;
    S_H245Msg                  h245Msg ;

    oscl_memcpy((int8*)&maintenanceLoopRequest.mlRequestType, (int8*)pLoop_Type, sizeof(S_MlRequestType)) ;

    h245Msg.Type1 = H245_MSG_REQ ;
    h245Msg.Type2 = MSGTYP_ML_REQ ;
    h245Msg.pData = (uint8*) & maintenanceLoopRequest ;

    MessageSend(&h245Msg) ;
}
开发者ID:0omega,项目名称:platform_external_opencore,代码行数:13,代码来源:ml.cpp

示例5: avrcpSendGetCapsResponse

void avrcpSendGetCapsResponse(AVRCP *avrcp, 
                            avrcp_response_type response, 
                            avrcp_capability_id caps, 
                            uint16 size_caps_list, 
                            Source caps_list)
{
    MAKE_AVRCP_MESSAGE(AVRCP_INTERNAL_GET_CAPS_RES);
    message->caps_id = caps;        
    message->response = response;        
    message->size_caps_list = size_caps_list;
    message->caps_list = caps_list;
    MessageSend(&avrcp->task, AVRCP_INTERNAL_GET_CAPS_RES, message);
}
开发者ID:Duiesel,项目名称:thebirdfree-personal,代码行数:13,代码来源:avrcp_send_response.c

示例6: hfpSendUnhandledIndicatorListToApp

/* Send the indicator list to the app so it can parse it for any non-HFP indicators it is interested in */
static void hfpSendUnhandledIndicatorListToApp(hfp_link_data* link, uint16 register_index, uint16 cind_index, uint16 min_range, uint16 max_range)
{
    MAKE_HFP_MESSAGE(HFP_EXTRA_INDICATOR_INDEX_IND);
    message->priority = hfpGetLinkPriority(link);
    message->indicator_register_index = register_index;
    message->indicator_index = cind_index;
    message->min_range = min_range;
    message->max_range = max_range;
    MessageSend(theHfp->clientTask, HFP_EXTRA_INDICATOR_INDEX_IND, message);
    
    /* Store the extra indicator index internally */
    hfpStoreUnhandledIndicator(link, cind_index);
}
开发者ID:stephen-kun,项目名称:koovox_adk4.0,代码行数:14,代码来源:hfp_indicators_handler.c

示例7: a2dpSendInitCfmToClient

void a2dpSendInitCfmToClient(a2dp_status_code status)
{
    MAKE_A2DP_MESSAGE(A2DP_INIT_CFM);
    message->status = status;
    MessageSend(a2dp->clientTask, A2DP_INIT_CFM, message);

    /* If the initialisation failed, free the allocated task */
    if (status != a2dp_success)
    {
        free(a2dp);
        a2dp = 0;
    }
}
开发者ID:stephen-kun,项目名称:koovox_adk4.0,代码行数:13,代码来源:a2dp_init.c

示例8: powerManagerHandleVbatNormal

/****************************************************************************
NAME    
    batteryNormal
    
DESCRIPTION
    Called when the battery voltage is detected to be in a Normal state
*/
static void powerManagerHandleVbatNormal(uint8 level)
{
#ifndef NO_LED     
    bool low_batt = powerManagerIsVbatLow();
#endif    
    PM_DEBUG(("PM: Battery Normal %d\n", level));
    MessageSend(&theSink.task, EventSysBatteryOk, 0);
    
    /* If charger connected send a charger gas gauge message (these don't have any functional use but can be associated with LEDs/tones) */
    if (powerManagerIsChargerConnected())
        MessageSend(&theSink.task, (EventSysChargerGasGauge0+level), 0);
    
    /* reset any low battery warning that may be in place */
    theSink.battery_state = POWER_BATT_LEVEL0 + level;
    csr2csrHandleAgBatteryRequestRes(level);
#ifndef NO_LED 
    /* when changing from low battery state to a normal state, refresh the led state pattern
       to replace the low battery pattern should it have been shown */
    if(low_batt) LEDManagerIndicateState(stateManagerGetState());
#endif    
    AudioSetPower(powerManagerGetLBIPM());
}
开发者ID:jrryu,项目名称:HW--FW,代码行数:29,代码来源:sink_powermanager.c

示例9: ConnectionAuthGetPriorityDeviceStatusTestExtra

void ConnectionAuthGetPriorityDeviceStatusTestExtra(
        Task theAppTask,
        const bdaddr* bd_addr, 
        bool *is_priority_device
        )
{
    CL_AUTH_GET_PRIORITY_DEVICE_STATUS_IND_TEST_EXTRA_T *new_msg = 
                    PanicUnlessMalloc(sizeof(CL_AUTH_GET_PRIORITY_DEVICE_STATUS_IND_TEST_EXTRA_T));

    new_msg->result = ConnectionAuthGetPriorityDeviceStatus(bd_addr, &(new_msg->is_priority_device));

    MessageSend(theAppTask, CL_AUTH_GET_PRIORITY_DEVICE_STATUS_IND_TEST_EXTRA, new_msg);
}
开发者ID:stephen-kun,项目名称:koovox_adk4.0,代码行数:13,代码来源:connection_shim.c

示例10: ConnectionAuthSetPriorityDeviceTestExtra

/* 
 *  B-134381
 */
void ConnectionAuthSetPriorityDeviceTestExtra(
        Task theAppTask,
        const bdaddr *bd_addr,
        bool is_priority_device
        )
{
    CL_AUTH_SET_PRIORITY_DEVICE_IND_TEST_EXTRA_T *new_msg = 
                    PanicUnlessMalloc(sizeof(CL_AUTH_SET_PRIORITY_DEVICE_IND_TEST_EXTRA_T));

    new_msg->result = ConnectionAuthSetPriorityDevice(bd_addr, is_priority_device);

    MessageSend(theAppTask, CL_AUTH_SET_PRIORITY_DEVICE_IND_TEST_EXTRA, new_msg);
}
开发者ID:stephen-kun,项目名称:koovox_adk4.0,代码行数:16,代码来源:connection_shim.c

示例11: ConnectionRfcommPortNegResponse

void ConnectionRfcommPortNegResponse(Task appTask, Sink sink, port_par* port_params)
{
    MAKE_CL_MESSAGE(CL_INTERNAL_RFCOMM_PORTNEG_RSP);
    message->theAppTask = appTask;
    message->sink = sink;

    if (port_params)
        message->port_params = *port_params;
    else
        initPortParams(&(message->port_params));

    MessageSend(connectionGetCmTask(), CL_INTERNAL_RFCOMM_PORTNEG_RSP, message);
}
开发者ID:stephen-kun,项目名称:koovox_adk4.0,代码行数:13,代码来源:rfc.c

示例12: oscl_memset

void ML::MsgLoopOffSend(void)
{
    S_MaintenanceLoopOffCommand    maintenanceLoopOffCommand ;
    S_H245Msg                      h245Msg ;

    oscl_memset(&maintenanceLoopOffCommand, 0, sizeof(S_MaintenanceLoopOffCommand)) ;

    h245Msg.Type1 = H245_MSG_CMD ;
    h245Msg.Type2 = MSGTYP_ML_OFF_CMD ;
    h245Msg.pData = (uint8*) & maintenanceLoopOffCommand ;

    MessageSend(&h245Msg) ;
}
开发者ID:0omega,项目名称:platform_external_opencore,代码行数:13,代码来源:ml.cpp

示例13: ConnectionRfcommConnectResponse

void ConnectionRfcommConnectResponse(Task theAppTask, bool response, const Sink sink, uint8 local_server_channel, const rfcomm_config_params *config)
{
    /* Send an internal message */
    MAKE_CL_MESSAGE(CL_INTERNAL_RFCOMM_CONNECT_RES);
    message->theAppTask = theAppTask;
    message->response = response;
    message->sink = sink;
    message->server_channel = local_server_channel;
    
    initConfigParams(config, &message->config);
    
    MessageSend(connectionGetCmTask(), CL_INTERNAL_RFCOMM_CONNECT_RES, message);
}
开发者ID:stephen-kun,项目名称:koovox_adk4.0,代码行数:13,代码来源:rfc.c

示例14: sendSppStartServiceCfm

static void sendSppStartServiceCfm(spp_start_status status)
{
    if (sppsClientTask)
    {
        MAKE_SPP_MESSAGE(SPP_START_SERVICE_CFM);
        message->status = status;
        MessageSend(sppsClientTask, SPP_START_SERVICE_CFM, message);
    }
#if SPP_DEBUG_LIB
    else
        SPP_DEBUG(("sppsClientTask is NULL!\n"));
#endif
}
开发者ID:stephen-kun,项目名称:koovox_adk4.0,代码行数:13,代码来源:spps_service_handler.c

示例15: sendSppStopServiceCfm

static void sendSppStopServiceCfm(Task theClientTask, spp_stop_status status)
{
    if (theClientTask)
    {
        MAKE_SPP_MESSAGE(SPP_STOP_SERVICE_CFM);
        message->status = status;
        MessageSend(theClientTask, SPP_STOP_SERVICE_CFM, message);
    }
#if SPP_DEBUG_LIB
    else
        SPP_DEBUG(("theClientTask is NULL!\n"));
#endif
}
开发者ID:stephen-kun,项目名称:koovox_adk4.0,代码行数:13,代码来源:spps_service_handler.c


注:本文中的MessageSend函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。