static int mangoh_bridge_air_vantage_available(void* param, const unsigned char* data, uint32_t size) { mangoh_bridge_air_vantage_t* airVantage = (mangoh_bridge_air_vantage_t*)param; int32_t res = LE_OK; le_log_TraceRef_t traceRef = mangoh_bridge_getTraceRef(); LE_ASSERT(airVantage); LE_ASSERT(data); LE_TRACE(traceRef, "---> AVAIL"); mangoh_bridge_air_vantage_avail_rsp_t* const rsp = (mangoh_bridge_air_vantage_avail_rsp_t*)((mangoh_bridge_t*)airVantage->bridge)->packet.msg.data; LE_TRACE(traceRef, "Rx buffer length(%u)", airVantage->rxBuffLen); rsp->result = htons(airVantage->rxBuffLen); LE_TRACE(traceRef, "result(%d)", rsp->result); res = mangoh_bridge_sendResult(airVantage->bridge, sizeof(rsp->result)); if (res != LE_OK) { LE_ERROR("ERROR mangoh_bridge_sendResult() failed(%d)", res); goto cleanup; } cleanup: return res; }
//-------------------------------------------------------------------------------------------------- void comp1_Foo(void) { LE_DEBUG("comp1 %d msg", LE_LOG_DEBUG); LE_INFO("comp1 %d msg", LE_LOG_INFO); LE_WARN("comp1 %d msg", LE_LOG_WARN); LE_ERROR("comp1 %d msg", LE_LOG_ERR); LE_CRIT("comp1 %d msg", LE_LOG_CRIT); LE_EMERG("comp1 %d msg", LE_LOG_EMERG); le_log_TraceRef_t trace1 = le_log_GetTraceRef("key 1"); le_log_TraceRef_t trace2 = le_log_GetTraceRef("key 2"); LE_TRACE(trace1, "Trace msg in %s", STRINGIZE(LE_COMPONENT_NAME)); LE_TRACE(trace2, "Trace msg in %s", STRINGIZE(LE_COMPONENT_NAME)); }