MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_link_parse_frame

Function rt_link_parse_frame

components/utilities/rt-link/src/rtlink.c:607–638  ·  view source on GitHub ↗

Discriminate frame type */

Source from the content-addressed store, hash-verified

605
606/* Discriminate frame type */
607static rt_err_t rt_link_parse_frame(struct rt_link_frame *receive_frame)
608{
609 switch (receive_frame->attribute)
610 {
611 case RT_LINK_RESEND_FRAME:
612 rt_link_resend_handle(receive_frame);
613 break;
614 case RT_LINK_CONFIRM_FRAME:
615 rt_link_confirm_handle(receive_frame);
616 break;
617 case RT_LINK_HANDSHAKE_FRAME:
618 rt_link_handshake_handle(receive_frame);
619 break;
620 case RT_LINK_SESSION_END:
621 rt_link_session_end_handle(receive_frame);
622 break;
623 case RT_LINK_DETACH_FRAME:
624 rt_link_detach_handle(receive_frame);
625 break;
626
627 case RT_LINK_SHORT_DATA_FRAME:
628 rt_link_short_handle(receive_frame);
629 break;
630 case RT_LINK_LONG_DATA_FRAME:
631 rt_link_long_handle(receive_frame);
632 break;
633
634 default:
635 return -RT_ERROR;
636 }
637 return RT_EOK;
638}
639
640/* RT_LINK_READ_CHECK_EVENT handle */
641static void rt_link_frame_check(void)

Callers 1

rt_link_frame_checkFunction · 0.85

Calls 7

rt_link_resend_handleFunction · 0.85
rt_link_confirm_handleFunction · 0.85
rt_link_handshake_handleFunction · 0.85
rt_link_detach_handleFunction · 0.85
rt_link_short_handleFunction · 0.85
rt_link_long_handleFunction · 0.85

Tested by

no test coverage detected