本文整理汇总了C++中MAKE_CL_MESSAGE函数的典型用法代码示例。如果您正苦于以下问题:C++ MAKE_CL_MESSAGE函数的具体用法?C++ MAKE_CL_MESSAGE怎么用?C++ MAKE_CL_MESSAGE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了MAKE_CL_MESSAGE函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: connectionHandleReadRemoteSupportedFeaturesRequest
/****************************************************************************
NAME
connectionHandleReadRemoteSupportedFeaturesRequest
DESCRIPTION
Request to read the supported features of a remote device.
RETURNS
void
*/
void connectionHandleReadRemoteSupportedFeaturesRequest(connectionReadInfoState *state, const CL_INTERNAL_DM_READ_REMOTE_SUPP_FEAT_REQ_T *req)
{
/* Check the resource lock */
if (!state->stateInfoLock)
{
bdaddr addr;
/* Check we got a valid addr */
if (!SinkGetBdAddr(req->sink, &addr))
{
/* Send an error to the app as it didn't pass in a valid sink */
sendRemoteSupportedFeaturesCfm(req->theAppTask, hci_error_no_connection, 0, req->sink);
}
else
{
/* Response not outstanding so issue request */
MAKE_PRIM_C(DM_HCI_READ_REMOTE_FEATURES);
connectionConvertBdaddr_t(&prim->bd_addr, &addr);
VmSendDmPrim(prim);
/* Set the lock */
state->stateInfoLock = req->theAppTask;
state->sink = req->sink;
}
}
else
{
/* Lock set so queue up the request */
MAKE_CL_MESSAGE(CL_INTERNAL_DM_READ_REMOTE_SUPP_FEAT_REQ);
COPY_CL_MESSAGE(req, message);
MessageSendConditionallyOnTask(connectionGetCmTask(), CL_INTERNAL_DM_READ_REMOTE_SUPP_FEAT_REQ, message, &state->stateInfoLock);
}
}
示例2: connectionHandleDmHciModeChangeEvent
/****************************************************************************
NAME
connectionHandleDmHciModeChangeEvent
DESCRIPTION
An indication from BlueStack that an ACL has been opened. Some clients
may need this information so pass the indication up to the task
registered as the "app task" (we don't know who else to pass this to!).
RETURNS
void
*/
void connectionHandleDmHciModeChangeEvent(Task task, const DM_HCI_MODE_CHANGE_EVENT_T *ev)
{
const msg_filter *msgFilter = connectionGetMsgFilter();
if (task && (msgFilter[0] & msg_group_mode_change))
{
/* Check mode change was successful */
if ((ev->status == HCI_SUCCESS) && ((ev->mode == HCI_BT_MODE_ACTIVE) || (ev->mode == HCI_BT_MODE_SNIFF)))
{
MAKE_CL_MESSAGE(CL_DM_MODE_CHANGE_EVENT);
connectionConvertBdaddr(&message->bd_addr, &ev->bd_addr);
/* Convert HCI mode into connection library power mode */
switch (ev->mode)
{
case HCI_BT_MODE_ACTIVE:
message->mode = lp_active;
break;
case HCI_BT_MODE_SNIFF:
message->mode = lp_sniff;
break;
default:
Panic();
break;
}
message->interval = ev->length;
MessageSend(task, CL_DM_MODE_CHANGE_EVENT, message);
}
}
}
示例3: ConnectionReadClassOfDevice
void ConnectionReadClassOfDevice(Task theAppTask)
{
/* Create internal message and sent to the CL */
MAKE_CL_MESSAGE(CL_INTERNAL_DM_READ_CLASS_OF_DEVICE_REQ);
message->theAppTask = theAppTask;
MessageSend(connectionGetCmTask(), CL_INTERNAL_DM_READ_CLASS_OF_DEVICE_REQ, message);
}
示例4: ConnectionSmSendKeypressNotificationRequest
void ConnectionSmSendKeypressNotificationRequest(const bdaddr* bd_addr, cl_sm_keypress_type type)
{
MAKE_CL_MESSAGE(CL_INTERNAL_SM_SEND_KEYPRESS_NOTIFICATION_REQ);
message->bd_addr = *bd_addr;
message->type = type;
MessageSend(connectionGetCmTask(), CL_INTERNAL_SM_SEND_KEYPRESS_NOTIFICATION_REQ, message);
}
示例5: ConnectionWriteClassOfDevice
void ConnectionWriteClassOfDevice(uint32 cod)
{
/* All requests are sent through the internal state handler */
MAKE_CL_MESSAGE(CL_INTERNAL_DM_WRITE_CLASS_OF_DEVICE_REQ);
message->class_of_device = cod;
MessageSend(connectionGetCmTask(), CL_INTERNAL_DM_WRITE_CLASS_OF_DEVICE_REQ, message);
}
示例6: ConnectionSmUnRegisterOutgoingService
void ConnectionSmUnRegisterOutgoingService(const bdaddr* bd_addr, dm_protocol_id protocol_id, uint32 channel)
{
#ifdef CONNECTION_DEBUG_LIB
if ((protocol_id != protocol_l2cap) && (protocol_id != protocol_rfcomm))
{
CL_DEBUG(("Out of range protocol id 0x%x\n", protocol_id));
}
/* TODO: Check if we should check channel range for outgoing service channel */
if((protocol_id == protocol_rfcomm) &&
((channel < RFCOMM_SERVER_CHANNEL_MIN) ||
(channel > RFCOMM_SERVER_CHANNEL_MAX))
)
{
CL_DEBUG(("Out of range RFCOMM server channel 0x%lx\n", channel));
}
if(bd_addr == NULL)
{
CL_DEBUG(("Out of range Bluetooth Address 0x%p\n", (void*)bd_addr));
}
#endif
{
MAKE_CL_MESSAGE(CL_INTERNAL_SM_UNREGISTER_OUTGOING_REQ);
message->bd_addr = *bd_addr;
message->protocol_id = protocol_id;
message->channel = channel;
MessageSend(connectionGetCmTask(), CL_INTERNAL_SM_UNREGISTER_OUTGOING_REQ, message);
}
}
示例7: ConnectionRfcommDeallocateChannel
void ConnectionRfcommDeallocateChannel(Task theAppTask, uint8 local_server_channel)
{
MAKE_CL_MESSAGE(CL_INTERNAL_RFCOMM_UNREGISTER_REQ);
message->theAppTask = theAppTask;
message->local_server_channel = local_server_channel;
MessageSend(connectionGetCmTask(), CL_INTERNAL_RFCOMM_UNREGISTER_REQ, message);
}
示例8: ConnectionRfcommDisconnectResponse
void ConnectionRfcommDisconnectResponse(Sink sink)
{
/* Send an internal message */
MAKE_CL_MESSAGE(CL_INTERNAL_RFCOMM_DISCONNECT_RSP);
message->sink = sink;
MessageSend(connectionGetCmTask(), CL_INTERNAL_RFCOMM_DISCONNECT_RSP, message);
}
示例9: ConnectionClearParameterCache
void ConnectionClearParameterCache(const bdaddr *addr)
{
/* Send an internal message requesting this action */
MAKE_CL_MESSAGE(CL_INTERNAL_DM_CLEAR_PARAM_CACHE_REQ);
message->bd_addr = *addr;
MessageSend(connectionGetCmTask(), CL_INTERNAL_DM_CLEAR_PARAM_CACHE_REQ, message);
}
示例10: ConnectionSmRegisterIncomingService
void ConnectionSmRegisterIncomingService(dm_protocol_id protocol_id, uint32 channel, dm_security_in security)
{
/* Check params are within allowed values - debug build only */
#ifdef CONNECTION_DEBUG_LIB
if ((protocol_id != protocol_l2cap) && (protocol_id != protocol_rfcomm))
{
CL_DEBUG(("Out of range protocol id 0x%x\n", protocol_id));
}
if((protocol_id == protocol_rfcomm) && ((channel < RFCOMM_SERVER_CHANNEL_MIN) || (channel > RFCOMM_SERVER_CHANNEL_MAX)))
{
CL_DEBUG(("Out of range RFCOMM server channel 0x%lx\n", channel));
}
/* Are any bits other then valid dm_security_in bits are set. */
if (security & ~sec_in_bitmask)
{
CL_DEBUG(("Invalid dm_security_in bits set 0x%x\n", (security & ~sec_in_bitmask)));
}
#endif
{
MAKE_CL_MESSAGE(CL_INTERNAL_SM_REGISTER_REQ);
message->protocol_id = protocol_id;
message->channel = channel;
message->outgoing_ok = FALSE;
message->security_level = security;
message->psm = 0;
MessageSend(connectionGetCmTask(), CL_INTERNAL_SM_REGISTER_REQ, message);
}
}
示例11: ConnectionSyncRegister
void ConnectionSyncRegister(Task theAppTask)
{
/* Send an internal register request message */
MAKE_CL_MESSAGE(CL_INTERNAL_SYNC_REGISTER_REQ);
message->theAppTask = theAppTask;
MessageSend(connectionGetCmTask(), CL_INTERNAL_SYNC_REGISTER_REQ, message);
}
示例12: ConnectionReadRemoteSuppFeatures
void ConnectionReadRemoteSuppFeatures(Task theAppTask, Sink sink)
{
/* All requests are sent through the internal state handler */
MAKE_CL_MESSAGE(CL_INTERNAL_DM_READ_REMOTE_SUPP_FEAT_REQ);
message->theAppTask = theAppTask;
message->sink = sink;
MessageSend(connectionGetCmTask(), CL_INTERNAL_DM_READ_REMOTE_SUPP_FEAT_REQ, message);
}
示例13: ConnectionReadRemoteVersion
void ConnectionReadRemoteVersion(Task theAppTask, Sink sink)
{
/* All requests are sent through the internal state handler */
MAKE_CL_MESSAGE(CL_INTERNAL_DM_READ_REMOTE_VERSION_REQ);
message->theAppTask = theAppTask;
message->sink = sink;
MessageSendConditionallyOnTask(connectionGetCmTask(), CL_INTERNAL_DM_READ_REMOTE_VERSION_REQ, message, &theCm.infoState.stateInfoLock);
}
示例14: ConnectionL2capDisconnectResponse
void ConnectionL2capDisconnectResponse(uint8 identifier, Sink sink)
{
/* Send an internal message */
MAKE_CL_MESSAGE(CL_INTERNAL_L2CAP_DISCONNECT_RSP);
message->identifier = identifier;
message->sink = sink;
MessageSend(connectionGetCmTask(), CL_INTERNAL_L2CAP_DISCONNECT_RSP, message);
}
示例15: ConnectionL2capUnregisterRequest
void ConnectionL2capUnregisterRequest(Task appTask, uint16 psm)
{
/* Send an internal message */
MAKE_CL_MESSAGE(CL_INTERNAL_L2CAP_UNREGISTER_REQ);
message->theAppTask = appTask;
message->app_psm = psm;
MessageSend(connectionGetCmTask(), CL_INTERNAL_L2CAP_UNREGISTER_REQ, message);
}