本文整理汇总了C++中LE_INFO函数的典型用法代码示例。如果您正苦于以下问题:C++ LE_INFO函数的具体用法?C++ LE_INFO怎么用?C++ LE_INFO使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LE_INFO函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: filePasser_PassFd
void filePasser_PassFd(int fileDescriptor)
{
LE_INFO("Received the file descriptor from the client.");
LE_INFO("Reading the file to see what it said.");
char buf[1000] = "";
LE_ASSERT(read(fileDescriptor, buf, sizeof(buf)) > 0);
LE_INFO("Text in file: '%s'", buf);
LE_FATAL_IF(strstr(FILE_MSG, buf) != 0,
"Text in file should be '%s' but was '%s'", FILE_MSG, buf);
LE_INFO("File descriptor was passed correctly.");
close(fileDescriptor);
}
示例2: LE_INFO
le_result_t pa_rtc_Init
(
void
)
{
LE_INFO("simulation pa_rtc init - stub");
return LE_OK;
}
示例3: LE_INFO
//--------------------------------------------------------------------------------------------------
static void SessionReleaseTimerHandler
(
le_timer_Ref_t timerRef ///< This timer has expired
)
{
LE_INFO("SessionRelease timer expired; close session");
avcServer_ReleaseSession();
}
示例4: timerExpiredHandler
static void timerExpiredHandler(le_timer_Ref_t timerRef)
{
sig_appTermination_cbh(0);
LE_INFO("Legato AssetData: Legato AssetDataApp Ended");
//Quit the app
exit(EXIT_SUCCESS);
}
示例5: LE_INFO
//--------------------------------------------------------------------------------------------------
static void Field_executeCommandTwo_Handler
(
le_avdata_AssetInstanceRef_t instRef,
const char* fieldName,
void* contextPtr
)
{
LE_INFO("Registered handler called for %s", fieldName);
}
示例6: LE_INFO
// Delete from 1 to n-1 for all threads
static void DelMutex1toNMinus1PerThread
(
void* param1,
void* param2
)
{
LE_INFO("DelMutex1toNMinus1PerThread in thread [%s]", le_thread_GetMyName());
DelMutexes(0, 1);
}
示例7: LE_INFO
//--------------------------------------------------------------------------------------------------
static void RegUpdateTimerHandler
(
le_timer_Ref_t timerRef ///< This timer has expired
)
{
LE_INFO("RegUpdate timer expired; reporting REG_UPDATE");
lwm2m_RegistrationUpdate();
}
示例8: LE_INFO
//--------------------------------------------------------------------------------------------------
static void Testle_ips_GetInputVoltage
(
void
)
{
uint32_t voltage = 0;
LE_INFO("======== Testle_ips_GetInputVoltage Test ========");
LE_ASSERT(le_ips_GetInputVoltage(&voltage) == LE_OK);
}
示例9: LE_ASSERT_OK
//--------------------------------------------------------------------------------------------------
void simTest_SimSelect
(
)
{
// Select the embedded SIM
LE_ASSERT_OK(le_sim_SelectCard(LE_SIM_EMBEDDED));
// Get the selected card
le_sim_Id_t simId = le_sim_GetSelectedCard();
LE_ASSERT(LE_SIM_EMBEDDED == simId);
// Select the LE_SIM_EXTERNAL_SLOT_1 SIM
LE_ASSERT_OK(le_sim_SelectCard(LE_SIM_EXTERNAL_SLOT_1));
// Get the selected card
simId = le_sim_GetSelectedCard();
LE_ASSERT(LE_SIM_EXTERNAL_SLOT_1 == simId);
// Check if SIM present
if (!le_sim_IsPresent(LE_SIM_EMBEDDED))
{
LE_INFO("SIM not present");
}
// Get the selected card by le_sim_GetSelectedCard()
// Notice that the selected card received is the one used by the
// last Legato API and not the one set by le_sim_SelectCard().
simId = le_sim_GetSelectedCard();
LE_ASSERT(LE_SIM_EMBEDDED == simId);
// Check SIM ready
if (!le_sim_IsReady(LE_SIM_EXTERNAL_SLOT_1))
{
LE_INFO("SIM not ready");
}
// Get the selected card by le_sim_GetSelectedCard()
// Notice that the selected card received is the one used by the
// last Legato API and not the one set by le_sim_SelectCard().
simId = le_sim_GetSelectedCard();
LE_ASSERT(LE_SIM_EXTERNAL_SLOT_1 == simId);
}
示例10: LE_ERROR
//--------------------------------------------------------------------------------------------------
static void ConnectAudioToFileLocalPlay
(
void
)
{
le_result_t res;
if ((AudioFileFd=open(AudioFileRecPath, O_RDWR)) == -1)
{
LE_ERROR("Open file %s failure: errno.%d (%s)", AudioFileRecPath, errno, strerror(errno));
}
else
{
LE_INFO("Open file %s with AudioFileFd.%d", AudioFileRecPath, AudioFileFd);
}
// Play local on output connector.
FileAudioRef = le_audio_OpenPlayer();
LE_ERROR_IF((FileAudioRef==NULL), "OpenFilePlayback returns NULL!");
MediaHandlerRef = le_audio_AddMediaHandler(FileAudioRef, MyMediaEventHandler, NULL);
LE_ERROR_IF((MediaHandlerRef==NULL), "AddMediaHandler returns NULL!");
if (FileAudioRef && AudioOutputConnectorRef)
{
res = le_audio_Connect(AudioOutputConnectorRef, FileAudioRef);
if(res!=LE_OK)
{
LE_ERROR("Failed to connect FilePlayback on output connector!");
return;
}
LE_INFO("FilePlayback is now connected.");
res = le_audio_PlayFile(FileAudioRef, AudioFileFd);
if(res != LE_OK)
{
LE_ERROR("Failed to play the file!");
}
else
{
LE_INFO("File is now playing");
}
}
}
示例11: le_temp_GetRadioThresholds
//--------------------------------------------------------------------------------------------------
static void Testle_temp_SetGetRadioThresholds
(
)
{
int32_t oldWarningTemp = 0;
int32_t oldCriticalTemp = 0;
int32_t warningTemp = 0;
int32_t criticalTemp = 0;
int32_t refwarningTemp = 0;
int32_t refcriticalTemp = 0;
le_result_t res = LE_FAULT;
res = le_temp_GetRadioThresholds(&oldWarningTemp, &oldCriticalTemp);
LE_ASSERT(res == LE_OK);
LE_INFO("le_temp_GetRadioThresholds(%d, %d)", oldWarningTemp, oldCriticalTemp);
refwarningTemp = oldWarningTemp - 30;
refcriticalTemp = oldCriticalTemp - 20;
res = le_temp_SetRadioThresholds(refwarningTemp, refcriticalTemp);
LE_ASSERT(res == LE_OK);
LE_INFO("le_temp_SetThreshold(%d, %d)", refwarningTemp, refcriticalTemp);
res = le_temp_GetRadioThresholds(&warningTemp, &criticalTemp);
LE_ASSERT(res == LE_OK);
LE_INFO("le_temp_GetThreshold(%d, %d)", warningTemp, criticalTemp);
LE_ASSERT(warningTemp == refwarningTemp);
LE_ASSERT(criticalTemp == refcriticalTemp);
// Test with critical threshold equal to the warning temperature.
res = le_temp_SetRadioThresholds(warningTemp, warningTemp);
LE_INFO("le_temp_SetThreshold(%d, %d)", warningTemp, warningTemp);
LE_ASSERT(res == LE_BAD_PARAMETER);
refwarningTemp = oldWarningTemp;
refcriticalTemp = oldWarningTemp - 10;
// Test with critical threshold temperature lesser than the warning temperature.
res = le_temp_SetRadioThresholds(refwarningTemp, refcriticalTemp);
LE_INFO("le_temp_SetThreshold(%d, %d)", refwarningTemp, refcriticalTemp);
LE_ASSERT(res == LE_BAD_PARAMETER);
LE_INFO("Restore Initial thresold values warning=%d, critical=%d",
oldWarningTemp, oldCriticalTemp);
res = le_temp_SetRadioThresholds(oldWarningTemp, oldCriticalTemp);
LE_INFO("le_temp_SetThreshold(%d, %d)", oldWarningTemp, oldCriticalTemp);
LE_ASSERT(res == LE_OK);
res = le_temp_GetRadioThresholds(&warningTemp, &criticalTemp);
LE_ASSERT(res == LE_OK);
LE_INFO("le_temp_GetThreshold(%d, %d)", warningTemp, criticalTemp);
LE_ASSERT(warningTemp == oldWarningTemp);
LE_ASSERT(criticalTemp == oldCriticalTemp);
}
示例12: le_mem_ForceAlloc
//--------------------------------------------------------------------------------------------------
le_result_t le_media_PlayDtmf
(
le_audio_Stream_t* streamPtr, ///< [IN] Stream object
const char* dtmfPtr, ///< [IN] The DTMFs to play.
uint32_t duration, ///< [IN] The DTMF duration in milliseconds.
uint32_t pause ///< [IN] The pause duration between tones in milliseconds.
)
{
le_result_t res;
DtmfThreadCtx_t* threadCtxPtr = le_mem_ForceAlloc(DtmfThreadContextPool);
memset(threadCtxPtr, 0, sizeof(DtmfThreadCtx_t));
streamPtr->samplePcmConfig.sampleRate = 16000;
streamPtr->samplePcmConfig.bitsPerSample = 16;
streamPtr->samplePcmConfig.channelsCount = 1;
streamPtr->samplePcmConfig.fileSize = -1;
streamPtr->samplePcmConfig.pcmFormat = PCM_RAW;
threadCtxPtr->duration = duration;
threadCtxPtr->pause = pause;
threadCtxPtr->sampleRate = 16000;
threadCtxPtr->dtmfPtr = dtmfPtr;
if (pipe(threadCtxPtr->pipefd) == -1)
{
LE_ERROR("Failed to create the pipe");
le_mem_Release(threadCtxPtr);
return LE_FAULT;
}
streamPtr->fd = threadCtxPtr->pipefd[0];
if ((res=pa_audio_PlaySamples(streamPtr->audioInterface,
streamPtr->fd,
&streamPtr->samplePcmConfig)) == LE_OK)
{
LE_INFO("Spawn DTMF thread");
if (DtmfTreadRef == NULL)
{
DtmfTreadRef = le_thread_Create("PlayDtmfs", PlayDtmfThread, threadCtxPtr);
le_thread_AddChildDestructor(DtmfTreadRef,
DestroyPlayDtmfThread,
threadCtxPtr);
le_thread_Start(DtmfTreadRef);
}
}
else
{
le_mem_Release(threadCtxPtr);
LE_ERROR("Cannot spawn DTMF thread!");
}
return res;
}
示例13: le_sim_RemoveSimToolkitEventHandler
//--------------------------------------------------------------------------------------------------
static void SigHandler
(
int sigNum
)
{
le_sim_RemoveSimToolkitEventHandler(HandlerRef);
LE_INFO("EXIT SIM Toolkit Test");
exit(EXIT_SUCCESS);
}
示例14: mqttClient_dataConnectionStateHandler
static void mqttClient_dataConnectionStateHandler(const char* intfName, bool isConnected, void* contextPtr)
{
mqttClient_t* clientData = (mqttClient_t*)contextPtr;
int32_t rc = LE_OK;
LE_ASSERT(clientData);
LE_DEBUG("interface('%s') connected(%u)", intfName, isConnected);
if (isConnected)
{
if ((clientData->session.sock == MQTT_CLIENT_INVALID_SOCKET) && !clientData->session.isConnected)
{
LE_INFO("starting session");
rc = mqttClient_startSession(clientData);
if (rc)
{
LE_ERROR("mqttClient_startSession() failed(%d)", rc);
goto cleanup;
}
}
else
{
LE_INFO("No ongoing MQTT Connection request");
}
}
else
{
LE_INFO("disconnected('%s')", intfName);
mqttClient_disconnectData(clientData);
}
cleanup:
if (rc)
{
int32_t err = mqttClient_disconnectData(clientData);
if (err)
{
LE_ERROR("mqttClient_disconnectData() failed(%d)", err);
}
}
return;
}
示例15: LE_INFO
//--------------------------------------------------------------------------------------------------
static void SigHandler
(
int sigNum
)
{
LE_INFO("End and delete last test eCall");
le_ecall_End(LastTestECallRef);
le_ecall_Delete(LastTestECallRef);
exit(EXIT_SUCCESS);
}