UDP messages
Sending and receiving UDP messages.
Functions |
|
| EmberStatus | emberUdpListen (uint16_t port, const uint8_t *address) |
|
This function sets up a listener for UDP messages for a given address.
|
|
| EmberStatus | emberSendUdp (const uint8_t *destination, uint16_t sourcePort, uint16_t destinationPort, uint8_t *payload, uint16_t payloadLength) |
|
This function sends a UDP message.
|
|
| void | emberUdpHandler (const uint8_t *destination, const uint8_t *source, uint16_t localPort, uint16_t remotePort, const uint8_t *payload, uint16_t payloadLength) |
|
An application callback for an incoming UDP message.
|
|
| void | emberUdpMulticastHandler (const uint8_t *destination, const uint8_t *source, uint16_t localPort, uint16_t remotePort, const uint8_t *payload, uint16_t payloadLength) |
|
An application callback for an incoming UDP multicast.
|
|
Detailed Description
See
udp.h
for source code.
Function Documentation
| EmberStatus emberSendUdp | ( | const uint8_t * |
destination,
|
| uint16_t |
sourcePort,
|
||
| uint16_t |
destinationPort,
|
||
| uint8_t * |
payload,
|
||
| uint16_t |
payloadLength
|
||
| ) |
- Parameters
-
destinationIPv6 destination address sourcePortUDP source port destinationPortUDP destination port payloadUDP transport payload payloadLengthPayload length
- Returns
- EMBER_SUCCESS if successful EMBER_NO_BUFFERS if failed to allocate a buffer EMBER_ERR_FATAL other fatal failure
| void emberUdpHandler | ( | const uint8_t * |
destination,
|
| const uint8_t * |
source,
|
||
| uint16_t |
localPort,
|
||
| uint16_t |
remotePort,
|
||
| const uint8_t * |
payload,
|
||
| uint16_t |
payloadLength
|
||
| ) |
- Parameters
-
destinationIPv6 destination address sourceIPv6 source address localPortUDP source port remotePortUDP destination port payloadUDP transport payload payloadLengthpayload length
An application callback for an incoming UDP message.
- Parameters
-
destinationIPV6 destination address sourceIPV6 source address localPortUDP source port remotePortUDP destination port payloadUDP transport payload payloadLengthpayload length
Referenced by emberUdpMulticastHandler() .
| EmberStatus emberUdpListen | ( | uint16_t |
port,
|
| const uint8_t * |
address
|
||
| ) |
- Parameters
-
portA port to bind the UDP address to addressThe IPv6 address listened to.
- Returns
- EMBER_SUCCESS if successful EMBER_TABLE_FULL if we failed to set up a listener EMBER_ERR_FATAL other fatal failure
| void emberUdpMulticastHandler | ( | const uint8_t * |
destination,
|
| const uint8_t * |
source,
|
||
| uint16_t |
localPort,
|
||
| uint16_t |
remotePort,
|
||
| const uint8_t * |
payload,
|
||
| uint16_t |
payloadLength
|
||
| ) |
- Parameters
-
destinationIPv6 destination address sourceIPv6 source address localPortUDP source port remotePortUDP destination port payloadUDP transport payload payloadLengthpayload length
An application callback for an incoming UDP multicast.
- Parameters
-
destinationIPV6 destination address sourceIPV6 source address localPortUDP source port remotePortUDP destination port payloadUDP transport payload payloadLengthpayload length
References emberUdpHandler() .