sbgInterfaceUdp.h
Go to the documentation of this file.
1 
21 #ifndef SBG_INTERFACE_UDP_H
22 #define SBG_INTERFACE_UDP_H
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 #include "sbgInterface.h"
29 
30 //----------------------------------------------------------------------//
31 //- Predefinitions -//
32 //----------------------------------------------------------------------//
33 
34 #define SBG_INTERFACE_UDP_PACKET_MAX_SIZE (1400)
35 
36 //----------------------------------------------------------------------//
37 //- Structures definitions -//
38 //----------------------------------------------------------------------//
39 
43 typedef struct _SbgInterfaceUdp
44 {
45  void *pUdpSocket;
47  uint32_t remotePort;
48  uint32_t localPort;
50 
51 //----------------------------------------------------------------------//
52 //- Public functions -//
53 //----------------------------------------------------------------------//
54 
68 SBG_COMMON_LIB_API SbgErrorCode sbgInterfaceUdpCreate(SbgInterface *pHandle, sbgIpAddress remoteAddr, uint32_t remotePort, uint32_t localPort);
69 
77 
86 
95 SBG_COMMON_LIB_API SbgErrorCode sbgInterfaceUdpWrite(SbgInterface *pHandle, const void *pBuffer, size_t bytesToWrite);
96 
106 SBG_COMMON_LIB_API SbgErrorCode sbgInterfaceUdpRead(SbgInterface *pHandle, void *pBuffer, size_t *pReadBytes, size_t bytesToRead);
107 
108 #ifdef __cplusplus
109 }
110 #endif
111 
112 #endif /* SBG_INTERFACE_UDP_H */
sbgInterfaceUdpRead
SBG_COMMON_LIB_API SbgErrorCode sbgInterfaceUdpRead(SbgInterface *pHandle, void *pBuffer, size_t *pReadBytes, size_t bytesToRead)
Definition: sbgInterfaceUdp.c:529
_SbgInterfaceUdp::localPort
uint32_t localPort
Definition: sbgInterfaceUdp.h:48
_SbgInterfaceUdp
Definition: sbgInterfaceUdp.h:43
sbgInterfaceUdpDestroy
SBG_COMMON_LIB_API SbgErrorCode sbgInterfaceUdpDestroy(SbgInterface *pHandle)
Definition: sbgInterfaceUdp.c:315
_SbgInterfaceUdp::remotePort
uint32_t remotePort
Definition: sbgInterfaceUdp.h:47
sbgInterfaceUdpWrite
SBG_COMMON_LIB_API SbgErrorCode sbgInterfaceUdpWrite(SbgInterface *pHandle, const void *pBuffer, size_t bytesToWrite)
Definition: sbgInterfaceUdp.c:433
SBG_COMMON_LIB_API
#define SBG_COMMON_LIB_API
Header file that contains all common definitions.
Definition: sbgDefines.h:58
sbgInterfaceUdpCreate
SBG_COMMON_LIB_API SbgErrorCode sbgInterfaceUdpCreate(SbgInterface *pHandle, sbgIpAddress remoteAddr, uint32_t remotePort, uint32_t localPort)
_SbgInterfaceUdp::pUdpSocket
void * pUdpSocket
Definition: sbgInterfaceUdp.h:45
_SbgInterfaceUdp::remoteAddr
sbgIpAddress remoteAddr
Definition: sbgInterfaceUdp.h:46
sbgInterfaceUdpAllowBroadcast
SBG_COMMON_LIB_API SbgErrorCode sbgInterfaceUdpAllowBroadcast(SbgInterface *pHandle, bool allowBroadcast)
Definition: sbgInterfaceUdp.c:370
sbgIpAddress
uint32_t sbgIpAddress
Definition: sbgTypes.h:64
SbgErrorCode
enum _SbgErrorCode SbgErrorCode
Header file that defines all error codes for SBG Systems libraries.
_SbgInterface
Definition: sbgInterface.h:131
sbgInterface.h
SbgInterfaceUdp
struct _SbgInterfaceUdp SbgInterfaceUdp


sbg_driver
Author(s): SBG Systems
autogenerated on Fri Oct 11 2024 02:13:40