VLCB SDK
An opinionated SDK for VLCB protocol
Loading...
Searching...
No Matches
iface_vlcb.c
Go to the documentation of this file.
1#include <assert.h>
2#include <stddef.h>
3#include <stdint.h>
4
5#include "iface_can.h"
7#include "vlcb/platform/log.h"
8
26
28 const VlcbNetAdptCaps caps,
29 const VlcbNetPacket *const packet) {
30 switch (caps.medium) {
31 case VLCB_MEDIUM_CAN:
32 return DispatchCanPacket(iface, packet);
33 break;
34 }
35 assert(false /* unimplemented behavior guard */);
36}
VlcbNetAdptErr
Definition adapter.h:39
@ VLCB_MEDIUM_CAN
Definition addr.h:6
VlcbNetAdptErr DispatchCanPacket(VlcbNetIface *const iface, const VlcbNetPacket *const packet)
Definition iface_can.c:37
VlcbNetAdptErr DispatchVlcbPacket(VlcbNetIface *const iface, const VlcbNetAdptCaps caps, const VlcbNetPacket *const packet)
Definition iface_vlcb.c:27
void ProcessVlcbPacket(VlcbNetIface *const iface, VlcbNetPacket *const packet)
Definition iface_vlcb.c:9
#define _INTERFACE_PTR_STATIC_CALL(o, m,...)
Definition interface.h:26
#define _INTERFACE_PTR_CALL(o, m,...)
Definition interface.h:28
#define VLCBLOG_ERROR(msg)
Definition log.h:31
VlcbNetSocketProcessErr ProcessPacket(const VlcbNetSocketDatagram *const self, const VlcbNetPacket *const packet)
bool SupportsProtocol(VlcbNetProtocol proto)
bool vlcb_net_sock_list_iter_HasNext(VlcbNetSocketListIter *const iter)
Definition socket.c:43
VlcbNetSocketProcessErr
Definition socket.h:10
@ VLCB_NET_SOCK_PROC_ERR_OK
Definition socket.h:11
VlcbNetSocketHandle vlcb_net_sock_list_iter_Next(VlcbNetSocketListIter *const iter)
Definition socket.c:50
vlcb_error vlcb_net_sock_ProcessErrToStr(VlcbNetSocketProcessErr err)
Definition socket.c:56
VlcbNetSocketListIter vlcb_net_sock_list_GetIterator(const VlcbNetSocketList *const list)
Definition socket.c:30
IVlcbNetSocket * VlcbNetSocketHandle
Definition socket.h:41
VlcbNetMedium medium
Definition adapter.h:36
VlcbNetSocketList *const sockets
Definition iface.h:12
VlcbOpCode opc
Definition vlcb.h:35
VlcbNetProtocol vlcb_net_pkt_DetectProtocol(VlcbOpCode opc)
Definition vlcb.c:6
VlcbNetProtocol
Definition vlcb.h:26