sbgInterfaceUdp.h
Go to the documentation of this file.
1 
21 #ifndef __SBG_INTERFACE_UDP_H__
22 #define __SBG_INTERFACE_UDP_H__
23 
24 //----------------------------------------------------------------------//
25 //- Header (open extern C block) -//
26 //----------------------------------------------------------------------//
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 #include "sbgInterface.h"
32 
33 //----------------------------------------------------------------------//
34 //- Structure definitions -//
35 //----------------------------------------------------------------------//
36 
37 //----------------------------------------------------------------------//
38 //- Predefinitions -//
39 //----------------------------------------------------------------------//
40 
41 #define SBG_INTERFACE_UDP_PACKET_MAX_SIZE (1400)
42 
43 //----------------------------------------------------------------------//
44 //- Callbacks definitions -//
45 //----------------------------------------------------------------------//
46 
47 //----------------------------------------------------------------------//
48 //- Structures definitions -//
49 //----------------------------------------------------------------------//
50 
54 typedef struct _SbgInterfaceUdp
55 {
56  void *pUdpSocket;
61 
62 //----------------------------------------------------------------------//
63 //- Operations methods declarations -//
64 //----------------------------------------------------------------------//
65 
77 
84 
91 SbgErrorCode sbgInterfaceUdpAllowBroadcast(SbgInterface *pHandle, bool allowBroadcast);
92 
93 //----------------------------------------------------------------------//
94 //- Internal interfaces write/read implementations -//
95 //----------------------------------------------------------------------//
96 
104 SbgErrorCode sbgInterfaceUdpWrite(SbgInterface *pHandle, const void *pBuffer, size_t bytesToWrite);
105 
114 SbgErrorCode sbgInterfaceUdpRead(SbgInterface *pHandle, void *pBuffer, size_t *pReadBytes, size_t bytesToRead);
115 
116 //----------------------------------------------------------------------//
117 //- Footer (close extern C block) -//
118 //----------------------------------------------------------------------//
119 #ifdef __cplusplus
120 }
121 #endif
122 
123 #endif /* __INTERFACE_UDP_H__ */
This file implements the base interface for all Serial and Ethernet ports.
unsigned int uint32
Definition: sbgTypes.h:58
struct _SbgInterfaceUdp SbgInterfaceUdp
SbgErrorCode sbgInterfaceUdpRead(SbgInterface *pHandle, void *pBuffer, size_t *pReadBytes, size_t bytesToRead)
sbgIpAddress remoteAddr
uint32 sbgIpAddress
Definition: sbgTypes.h:70
SbgErrorCode sbgInterfaceUdpCreate(SbgInterface *pHandle, sbgIpAddress remoteAddr, uint32 remotePort, uint32 localPort)
SbgErrorCode sbgInterfaceUdpDestroy(SbgInterface *pHandle)
SbgErrorCode sbgInterfaceUdpAllowBroadcast(SbgInterface *pHandle, bool allowBroadcast)
SbgErrorCode sbgInterfaceUdpWrite(SbgInterface *pHandle, const void *pBuffer, size_t bytesToWrite)
enum _SbgErrorCode SbgErrorCode


sbg_driver
Author(s):
autogenerated on Sun Jan 27 2019 03:42:20