當前位置: 首頁>>代碼示例>>C++>>正文


C++ AVB_TRACE_ENTRY函數代碼示例

本文整理匯總了C++中AVB_TRACE_ENTRY函數的典型用法代碼示例。如果您正苦於以下問題:C++ AVB_TRACE_ENTRY函數的具體用法?C++ AVB_TRACE_ENTRY怎麽用?C++ AVB_TRACE_ENTRY使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了AVB_TRACE_ENTRY函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: TLHandleListGet

// This is currently only for used for Endpoint
tl_handle_t TLHandleListGet(int endpointHandle)
{
	AVB_TRACE_ENTRY(AVB_TRACE_TL);

	if (!endpointHandle || !gTLHandleList) {
		AVB_TRACE_EXIT(AVB_TRACE_TL);
		return NULL;
	}

	TL_LOCK();
	int i1;
	for (i1 = 0; i1 < gMaxTL; i1++) {
		if (gTLHandleList[i1]) {
			tl_state_t *pTLState = (tl_state_t *)gTLHandleList[i1];
			if (pTLState->endpointHandle == endpointHandle) {
				TL_UNLOCK();
				AVB_TRACE_EXIT(AVB_TRACE_TL);
				return pTLState;
			}
		}
	}
	TL_UNLOCK();
	AVB_TRACE_EXIT(AVB_TRACE_TL);
	return NULL;
}
開發者ID:Chandini212,項目名稱:Open-AVB,代碼行數:26,代碼來源:openavb_tl_endpoint.c

示例2: openavbTLAVDECCRunTalker

bool openavbTLAVDECCRunTalker(tl_handle_t handle, U16 configIdx, U16 descriptorType, U16 descriptorIdx, void *pVoidTalkerStreamInfo)
{
	AVB_TRACE_ENTRY(AVB_TRACE_TL);

	if (!handle) {
		AVB_LOG_ERROR("Invalid handle.");
		AVB_TRACE_EXIT(AVB_TRACE_TL);
		return FALSE;
	}

	tl_state_t *pTLState = (tl_state_t *)handle;

	if (pTLState->cfg.intf_cb.intf_avdecc_init_cb) {
		pTLState->cfg.intf_cb.intf_avdecc_init_cb(pTLState->pMediaQ, configIdx, descriptorType, descriptorIdx);
	}
	if (pTLState->cfg.map_cb.map_avdecc_init_cb) {
		pTLState->cfg.map_cb.map_avdecc_init_cb(pTLState->pMediaQ, configIdx, descriptorType, descriptorIdx);
	}

	if (!openavbTLIsRunning(handle)) {
		openavbTLRun(handle);
	}

	AVB_TRACE_EXIT(AVB_TRACE_TL);
	return TRUE;
}
開發者ID:Chandini212,項目名稱:Open-AVB,代碼行數:26,代碼來源:openavb_tl_endpoint.c

示例3: openavbTLThreadFn

/* Talker Listener thread function that talks primarily with the endpoint
 */
void* openavbTLThreadFn(void *pv)
{
	AVB_TRACE_ENTRY(AVB_TRACE_TL);

	tl_state_t *pTLState = (tl_state_t *)pv;

	while (pTLState->bRunning) {
		AVB_TRACE_LINE(AVB_TRACE_TL_DETAIL);

		int endpointHandle = openavbEptClntOpenSrvrConnection(pTLState);

		if (endpointHandle == AVB_ENDPOINT_HANDLE_INVALID) {
			// error connecting to endpoint, already logged
		}
		else {
			pTLState->endpointHandle = endpointHandle;

			// Validate the AVB version for TL and Endpoint are the same before continuing
			pTLState->AVBVerState = OPENAVB_TL_AVB_VER_UNKNOWN;
			pTLState->bConnected = openavbEptClntRequestVersionFromServer(pTLState->endpointHandle);
			while (pTLState->bRunning && pTLState->bConnected && pTLState->AVBVerState == OPENAVB_TL_AVB_VER_UNKNOWN) {
				// Check for endpoint version message. Timeout in 50 msec.
				if (!openavbEptClntService(pTLState->endpointHandle, 50)) {
					AVB_LOG_WARNING("Lost connection to endpoint, will retry");
					pTLState->bConnected = FALSE;
					pTLState->endpointHandle = 0;
				}
			}
			if (pTLState->AVBVerState == OPENAVB_TL_AVB_VER_INVALID) {
				AVB_LOG_ERROR("AVB core version is different than Endpoint AVB core version. Streams will not be started. Will reconnect to the endpoint and check again.");
			}

			if (pTLState->bConnected && pTLState->AVBVerState == OPENAVB_TL_AVB_VER_VALID) {
				if (pTLState->cfg.role == AVB_ROLE_TALKER) {
					openavbTLRunTalker(pTLState);
				}
				else {
					openavbTLRunListener(pTLState);
				}
			}

			// Close the endpoint connection. unless connection already gone in which case the socket could already be reused.
			if (pTLState->bConnected) {
				openavbEptClntCloseSrvrConnection(endpointHandle);
				pTLState->bConnected = FALSE;
				pTLState->endpointHandle = 0;
			}
		}

		if (pTLState->bRunning) {
			SLEEP(1);
		}
	}

	THREAD_JOINABLE(pTLState->TLThread);

	AVB_TRACE_EXIT(AVB_TRACE_TL);
	return NULL;
}
開發者ID:Chandini212,項目名稱:Open-AVB,代碼行數:61,代碼來源:openavb_tl_endpoint.c

示例4: openavbRawsockRelRxFrame

bool openavbRawsockRelRxFrame(void *pvRawsock, U8 *pBuffer)
{
	AVB_TRACE_ENTRY(AVB_TRACE_RAWSOCK_DETAIL);

	bool ret = ((base_rawsock_t*)pvRawsock)->cb.relRxFrame(pvRawsock, pBuffer);

	AVB_TRACE_EXIT(AVB_TRACE_RAWSOCK_DETAIL);
	return ret;
}
開發者ID:Chandini212,項目名稱:Open-AVB,代碼行數:9,代碼來源:rawsock_impl.c

示例5: openavbRawsockClose

void openavbRawsockClose(void *pvRawsock)
{
	AVB_TRACE_ENTRY(AVB_TRACE_RAWSOCK);

	((base_rawsock_t*)pvRawsock)->cb.close(pvRawsock);

	AVB_TRACE_EXIT(AVB_TRACE_RAWSOCK);
}
開發者ID:Chandini212,項目名稱:Open-AVB,代碼行數:8,代碼來源:rawsock_impl.c

示例6: socketClose

static void socketClose(int h)
{
	AVB_TRACE_ENTRY(AVB_TRACE_ENDPOINT);
	if (h != AVB_ENDPOINT_HANDLE_INVALID) {
		close(h);
	}
	AVB_TRACE_EXIT(AVB_TRACE_ENDPOINT);
}
開發者ID:AVnu,項目名稱:Open-AVB,代碼行數:8,代碼來源:openavb_endpoint_client_osal.c

示例7: openavbSetRxSignalMode

void openavbSetRxSignalMode(void *pvRawsock, bool rxSignalMode)
{
	AVB_TRACE_ENTRY(AVB_TRACE_RAWSOCK);

	((base_rawsock_t*)pvRawsock)->cb.setRxSignalMode(pvRawsock, rxSignalMode);

	AVB_TRACE_EXIT(AVB_TRACE_RAWSOCK);
}
開發者ID:Chandini212,項目名稱:Open-AVB,代碼行數:8,代碼來源:rawsock_impl.c

示例8: openavbEptSrvrHndlVerRqstFromClient

/* Client version request
 */
bool openavbEptSrvrHndlVerRqstFromClient(int h)
{
	AVB_TRACE_ENTRY(AVB_TRACE_ENDPOINT);

	openavbEptSrvrSendServerVersionToClient(h, AVB_CORE_VER_FULL);

	AVB_TRACE_EXIT(AVB_TRACE_ENDPOINT);
	return TRUE;
}
開發者ID:Chandini212,項目名稱:Open-AVB,代碼行數:11,代碼來源:openavb_endpoint_server.c

示例9: openavbTLAVDECCStopTalker

bool openavbTLAVDECCStopTalker(tl_handle_t handle, U16 configIdx, void *pVoidTalkerStreamInfo)
{
	AVB_TRACE_ENTRY(AVB_TRACE_TL);

	openavbTLStop(handle);

	AVB_TRACE_EXIT(AVB_TRACE_TL);
	return TRUE;
}
開發者ID:Chandini212,項目名稱:Open-AVB,代碼行數:9,代碼來源:openavb_tl_endpoint.c

示例10: openavbRawsockRxBufLevel

int openavbRawsockRxBufLevel(void *pvRawsock)
{
	AVB_TRACE_ENTRY(AVB_TRACE_RAWSOCK_DETAIL);

	int ret = ((base_rawsock_t*)pvRawsock)->cb.rxBufLevel(pvRawsock);

	AVB_TRACE_EXIT(AVB_TRACE_RAWSOCK_DETAIL);
	return ret;
}
開發者ID:Chandini212,項目名稱:Open-AVB,代碼行數:9,代碼來源:rawsock_impl.c

示例11: openavbRawsockGetAddr

bool openavbRawsockGetAddr(void *pvRawsock, U8 addr[ETH_ALEN])
{
	AVB_TRACE_ENTRY(AVB_TRACE_RAWSOCK);

	bool ret = ((base_rawsock_t*)pvRawsock)->cb.getAddr(pvRawsock, addr);

	AVB_TRACE_EXIT(AVB_TRACE_RAWSOCK);
	return ret;
}
開發者ID:Chandini212,項目名稱:Open-AVB,代碼行數:9,代碼來源:rawsock_impl.c

示例12: openavbRawsockRxAVTPSubtype

bool openavbRawsockRxAVTPSubtype(void *pvRawsock, U8 subtype)
{
	AVB_TRACE_ENTRY(AVB_TRACE_RAWSOCK);

	bool ret = ((base_rawsock_t*)pvRawsock)->cb.rxAVTPSubtype(pvRawsock, subtype);

	AVB_TRACE_EXIT(AVB_TRACE_RAWSOCK);
	return ret;
}
開發者ID:Chandini212,項目名稱:Open-AVB,代碼行數:9,代碼來源:rawsock_impl.c

示例13: openavbRawsockGetSocket

int openavbRawsockGetSocket(void *pvRawsock)
{
	AVB_TRACE_ENTRY(AVB_TRACE_RAWSOCK);

	int ret = ((base_rawsock_t*)pvRawsock)->cb.getSocket(pvRawsock);

	AVB_TRACE_EXIT(AVB_TRACE_RAWSOCK);
	return ret;
}
開發者ID:Chandini212,項目名稱:Open-AVB,代碼行數:9,代碼來源:rawsock_impl.c

示例14: listenerDoStream

static inline bool listenerDoStream(tl_state_t *pTLState)
{
	AVB_TRACE_ENTRY(AVB_TRACE_TL);

	if (!pTLState) {
		AVB_LOG_ERROR("Invalid TLState");
		AVB_TRACE_EXIT(AVB_TRACE_TL);
		return FALSE;
	}

	openavb_tl_cfg_t *pCfg = &pTLState->cfg;
	listener_data_t *pListenerData = pTLState->pPvtListenerData;
	bool bRet = FALSE;

	if (pTLState->bStreaming) {
		U64 nowNS;

		pListenerData->nReportCalls++;

		// Try to receive a frame
		if (IS_OPENAVB_SUCCESS(openavbAvtpRx(pListenerData->avtpHandle))) {
			pListenerData->nReportFrames++;
		}

		CLOCK_GETTIME64(OPENAVB_TIMER_CLOCK, &nowNS);

		if (pCfg->report_seconds > 0) {
			if (nowNS > pListenerData->nextReportNS) {
				listenerShowStats(pListenerData, pTLState);

				openavbListenerAddStat(pTLState, TL_STAT_RX_CALLS, pListenerData->nReportCalls);
				openavbListenerAddStat(pTLState, TL_STAT_RX_FRAMES, pListenerData->nReportFrames);

				pListenerData->nReportCalls = 0;
				pListenerData->nReportFrames = 0;
				pListenerData->nextReportNS += (pCfg->report_seconds * NANOSECONDS_PER_SECOND);
			}
		} else if (pCfg->report_frames > 0 && pListenerData->nReportFrames != pListenerData->lastReportFrames) {
			if (pListenerData->nReportFrames % pCfg->report_frames == 1) {
				listenerShowStats(pListenerData, pTLState);
				pListenerData->lastReportFrames = pListenerData->nReportFrames;
			}
		}

		if (nowNS > pListenerData->nextSecondNS) {
			pListenerData->nextSecondNS += NANOSECONDS_PER_SECOND;
			bRet = TRUE;
		}
	}
	else {
		SLEEP_MSEC(1);
		bRet = TRUE;
	}

	AVB_TRACE_EXIT(AVB_TRACE_TL);
	return bRet;
}
開發者ID:AVnu,項目名稱:Open-AVB,代碼行數:57,代碼來源:openavb_listener.c

示例15: AVB_TRACE_ENTRY

U8 *openavbRawsockGetRxFrame(void *pvRawsock, U32 timeout, unsigned int *offset, unsigned int *len)
{
	AVB_TRACE_ENTRY(AVB_TRACE_RAWSOCK_DETAIL);

	U8 *ret = ((base_rawsock_t*)pvRawsock)->cb.getRxFrame(pvRawsock, timeout, offset, len);

	AVB_TRACE_EXIT(AVB_TRACE_RAWSOCK_DETAIL);
	return ret;
}
開發者ID:Chandini212,項目名稱:Open-AVB,代碼行數:9,代碼來源:rawsock_impl.c


注:本文中的AVB_TRACE_ENTRY函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。