Max OS 0.3
Loading...
Searching...
No Matches
MaxOS::net::UDPDataReceivedEvent Class Reference

Event fired when data is received on a UDP socket. More...

#include <udp.h>

Inheritance diagram for MaxOS::net::UDPDataReceivedEvent:
MaxOS::common::Event< UDPEvents >

Public Member Functions

 UDPDataReceivedEvent (UDPSocket *socket, uint8_t *data, uint16_t size)
 Construct a new UDP Data Received Event object.
 
- Public Member Functions inherited from MaxOS::common::Event< UDPEvents >
 Event (UDPEvents type)
 Constructs a new Event object.
 

Public Attributes

UDPSocketsocket
 The socket that received the data.
 
uint8_t * data
 The data received.
 
uint16_t size
 The size of the data received.
 
- Public Attributes inherited from MaxOS::common::Event< UDPEvents >
UDPEvents type
 
uint8_tbuffer_value
 
uint32_t int_value
 
bool bool_value
 
union { 
 
   uint8_t *   buffer_value 
 
   uint32_t   int_value 
 
   bool   bool_value 
 
return_value 
 

Detailed Description

Event fired when data is received on a UDP socket.

Definition at line 56 of file udp.h.

Constructor & Destructor Documentation

◆ UDPDataReceivedEvent()

UDPDataReceivedEvent::UDPDataReceivedEvent ( UDPSocket socket,
uint8_t data,
uint16_t  size 
)

Construct a new UDP Data Received Event object.

Parameters
socketThe socket that received the data
dataThe data received
sizeThe size of the data received

Definition at line 322 of file udp.cpp.

323: Event(UDPEvents::DATA_RECEIVED)
324{
325 this -> socket = socket; //Set the socket
326 this -> data = data; //Set the data
327 this -> size = size; //Set the size
328
329}
Used to store information about an event, has a type and a return value.
UDPSocket * socket
The socket that received the data.
Definition udp.h:58
uint16_t size
The size of the data received.
Definition udp.h:60
uint8_t * data
The data received.
Definition udp.h:59

References data, size, and socket.

Member Data Documentation

◆ data

uint8_t* MaxOS::net::UDPDataReceivedEvent::data

The data received.

Definition at line 59 of file udp.h.

Referenced by UDPDataReceivedEvent().

◆ size

uint16_t MaxOS::net::UDPDataReceivedEvent::size

The size of the data received.

Definition at line 60 of file udp.h.

Referenced by UDPDataReceivedEvent().

◆ socket

UDPSocket* MaxOS::net::UDPDataReceivedEvent::socket

The socket that received the data.

Definition at line 58 of file udp.h.

Referenced by UDPDataReceivedEvent().


The documentation for this class was generated from the following files: