• Home
  • Raw
  • Download

Lines Matching full:context

56 static bool chppProcessPredefinedClientRequest(struct ChppAppState *context,
58 static bool chppProcessPredefinedServiceResponse(struct ChppAppState *context,
61 static bool chppDatagramLenIsOk(struct ChppAppState *context,
65 struct ChppAppState *context, uint8_t handle, enum ChppMessageType type);
68 struct ChppAppState *context, uint8_t index);
71 struct ChppAppState *context, uint8_t index);
83 static void chppProcessPredefinedHandleDatagram(struct ChppAppState *context,
85 static void chppProcessNegotiatedHandleDatagram(struct ChppAppState *context,
96 * @param context State of the app layer.
102 static bool chppProcessPredefinedClientRequest(struct ChppAppState *context, in chppProcessPredefinedClientRequest() argument
110 dispatchResult = chppDispatchLoopbackClientRequest(context, buf, len); in chppProcessPredefinedClientRequest()
115 dispatchResult = chppDispatchTimesyncClientRequest(context, buf, len); in chppProcessPredefinedClientRequest()
120 dispatchResult = chppDispatchDiscoveryClientRequest(context, buf, len); in chppProcessPredefinedClientRequest()
141 * @param context State of the app layer.
147 static bool chppProcessPredefinedServiceResponse(struct ChppAppState *context, in chppProcessPredefinedServiceResponse() argument
151 UNUSED_VAR(context); in chppProcessPredefinedServiceResponse()
161 dispatchResult = chppDispatchLoopbackServiceResponse(context, buf, len); in chppProcessPredefinedServiceResponse()
168 dispatchResult = chppDispatchTimesyncServiceResponse(context, buf, len); in chppProcessPredefinedServiceResponse()
175 dispatchResult = chppDispatchDiscoveryServiceResponse(context, buf, len); in chppProcessPredefinedServiceResponse()
198 * @param context State of the app layer.
204 static bool chppDatagramLenIsOk(struct ChppAppState *context, in chppDatagramLenIsOk() argument
207 CHPP_DEBUG_NOT_NULL(context); in chppDatagramLenIsOk()
244 chppServiceOfHandle(context, handle); in chppDatagramLenIsOk()
253 const struct ChppClient *client = chppClientOfHandle(context, handle); in chppDatagramLenIsOk()
280 * @param context State of the app layer.
288 struct ChppAppState *context, uint8_t handle, enum ChppMessageType type) { in chppGetDispatchFunction() argument
289 CHPP_DEBUG_NOT_NULL(context); in chppGetDispatchFunction()
300 chppClientStateOfHandle(context, handle); in chppGetDispatchFunction()
314 return chppServiceOfHandle(context, handle)->requestDispatchFunctionPtr; in chppGetDispatchFunction()
316 return chppClientOfHandle(context, handle)->responseDispatchFunctionPtr; in chppGetDispatchFunction()
318 return chppClientOfHandle(context, handle)->requestDispatchFunctionPtr; in chppGetDispatchFunction()
320 return chppServiceOfHandle(context, handle)->responseDispatchFunctionPtr; in chppGetDispatchFunction()
322 return chppServiceOfHandle(context, handle) in chppGetDispatchFunction()
325 return chppClientOfHandle(context, handle) in chppGetDispatchFunction()
339 * @param context State of the app layer.
345 struct ChppAppState *context, uint8_t index) { in chppGetClientResetNotifierFunction() argument
346 CHPP_DEBUG_NOT_NULL(context); in chppGetClientResetNotifierFunction()
347 return context->registeredClients[index]->resetNotifierFunctionPtr; in chppGetClientResetNotifierFunction()
356 * @param context State of the app layer.
362 struct ChppAppState *context, uint8_t index) { in chppGetServiceResetNotifierFunction() argument
363 CHPP_DEBUG_NOT_NULL(context); in chppGetServiceResetNotifierFunction()
364 return context->registeredServices[index]->resetNotifierFunctionPtr; in chppGetServiceResetNotifierFunction()
373 * @param context State of the app layer.
379 struct ChppAppState *context, uint8_t handle) { in chppServiceOfHandle() argument
380 CHPP_DEBUG_NOT_NULL(context); in chppServiceOfHandle()
382 if (serviceIndex < context->registeredServiceCount) { in chppServiceOfHandle()
383 return context->registeredServices[serviceIndex]; in chppServiceOfHandle()
395 * @param context State of the app layer.
401 struct ChppAppState *context, uint8_t handle) { in chppClientOfHandle() argument
402 CHPP_DEBUG_NOT_NULL(context); in chppClientOfHandle()
404 if (serviceIndex < context->discoveredServiceCount) { in chppClientOfHandle()
405 uint8_t clientIndex = context->clientIndexOfServiceIndex[serviceIndex]; in chppClientOfHandle()
406 if (clientIndex < context->registeredClientCount) { in chppClientOfHandle()
407 return context->registeredClients[clientIndex]; in chppClientOfHandle()
419 * @param context State of the app layer.
425 struct ChppAppState *context, uint8_t handle) { in chppServiceStateOfHandle() argument
426 CHPP_DEBUG_NOT_NULL(context); in chppServiceStateOfHandle()
428 context->registeredServiceCount); in chppServiceStateOfHandle()
431 return context->registeredServiceStates[serviceIdx]; in chppServiceStateOfHandle()
439 * @param context State of the app layer.
445 struct ChppAppState *context, uint8_t handle) { in chppClientStateOfHandle() argument
446 CHPP_DEBUG_NOT_NULL(context); in chppClientStateOfHandle()
448 context->registeredClientCount); in chppClientStateOfHandle()
450 const uint8_t clientIdx = context->clientIndexOfServiceIndex[serviceIdx]; in chppClientStateOfHandle()
451 return context->registeredClientStates[clientIdx]->context; in chppClientStateOfHandle()
490 * @param context State of the app layer.
494 static void chppProcessPredefinedHandleDatagram(struct ChppAppState *context, in chppProcessPredefinedHandleDatagram() argument
496 CHPP_DEBUG_NOT_NULL(context); in chppProcessPredefinedHandleDatagram()
504 success = chppProcessPredefinedClientRequest(context, buf, len); in chppProcessPredefinedHandleDatagram()
508 success = chppProcessPredefinedServiceResponse(context, buf, len); in chppProcessPredefinedHandleDatagram()
522 chppEnqueueTxErrorDatagram(context->transportContext, in chppProcessPredefinedHandleDatagram()
576 enum ChppAppErrorCode error = dispatchFunc(endpointState->context, buf, len); in chppProcessNegotiatedHandleDatagram()
680 void chppAppProcessRxDatagram(struct ChppAppState *context, uint8_t *buf, in chppAppProcessRxDatagram() argument
682 CHPP_DEBUG_NOT_NULL(context); in chppAppProcessRxDatagram()
706 if (!chppDatagramLenIsOk(context, rxHeader, len)) { in chppAppProcessRxDatagram()
707 chppEnqueueTxErrorDatagram(context->transportContext, in chppAppProcessRxDatagram()
712 chppDispatchNonHandle(context, buf, len); in chppAppProcessRxDatagram()
715 chppProcessPredefinedHandleDatagram(context, buf, len); in chppAppProcessRxDatagram()
718 chppProcessNegotiatedHandleDatagram(context, buf, len); in chppAppProcessRxDatagram()
722 chppDatagramProcessDoneCb(context->transportContext, buf); in chppAppProcessRxDatagram()
725 void chppAppProcessTimeout(struct ChppAppState *context, in chppAppProcessTimeout() argument
727 CHPP_DEBUG_NOT_NULL(context); in chppAppProcessTimeout()
728 for (uint8_t i = 0; i < context->registeredClientCount; i++) { in chppAppProcessTimeout()
729 const struct ChppClient *client = context->registeredClients[i]; in chppAppProcessTimeout()
731 context->registeredClientStates[i]; in chppAppProcessTimeout()
734 client->timeoutFunctionPtr(endpointState->context); in chppAppProcessTimeout()
738 for (uint8_t i = 0; i < context->registeredServiceCount; i++) { in chppAppProcessTimeout()
739 const struct ChppService *service = context->registeredServices[i]; in chppAppProcessTimeout()
741 context->registeredServiceStates[i]; in chppAppProcessTimeout()
744 service->timeoutFunctionPtr(endpointState->context); in chppAppProcessTimeout()
750 void chppAppProcessReset(struct ChppAppState *context) { in chppAppProcessReset() argument
751 CHPP_DEBUG_NOT_NULL(context); in chppAppProcessReset()
754 if (!context->isDiscoveryComplete) { in chppAppProcessReset()
755 chppInitiateDiscovery(context); in chppAppProcessReset()
759 for (uint8_t i = 0; i < context->discoveredServiceCount; i++) { in chppAppProcessReset()
760 uint8_t clientIndex = context->clientIndexOfServiceIndex[i]; in chppAppProcessReset()
764 chppGetClientResetNotifierFunction(context, clientIndex); in chppAppProcessReset()
772 context->registeredClientStates[clientIndex]->context); in chppAppProcessReset()
780 for (uint8_t i = 0; i < context->registeredServiceCount; i++) { in chppAppProcessReset()
782 chppGetServiceResetNotifierFunction(context, i); in chppAppProcessReset()
788 ResetNotifierFunction(context->registeredServiceStates[i]->context); in chppAppProcessReset()
794 chppTimesyncClientReset(context); in chppAppProcessReset()
1285 uint64_t chppAppGetNextTimerTimeoutNs(struct ChppAppState *context) { in chppAppGetNextTimerTimeoutNs() argument
1286 CHPP_DEBUG_NOT_NULL(context); in chppAppGetNextTimerTimeoutNs()
1288 for (uint8_t i = 0; i < context->registeredClientCount; i++) { in chppAppGetNextTimerTimeoutNs()
1290 MIN(timeoutNs, context->registeredClientStates[i]->nextTimerTimeoutNs); in chppAppGetNextTimerTimeoutNs()
1292 for (uint8_t i = 0; i < context->registeredServiceCount; i++) { in chppAppGetNextTimerTimeoutNs()
1294 MIN(timeoutNs, context->registeredServiceStates[i]->nextTimerTimeoutNs); in chppAppGetNextTimerTimeoutNs()