Murata RF modules are designed to simplify wireless development and certification by minimizing the amount of RF expertise you need to wirelessly enable a wide range of applications.
Diff: Indication/UDPReceivedIndication.h
- Revision:
- 0:8e83b9448758
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Indication/UDPReceivedIndication.h Tue Feb 03 21:24:15 2015 +0000 @@ -0,0 +1,42 @@ +#ifndef SmartLab_MuRata_Indication_UDPReceivedIndication +#define SmartLab_MuRata_Indication_UDPReceivedIndication + +#include "Payload.h" +#include "IPAddress.h" + +namespace SmartLabMuRata +{ +/// <summary> +/// This event is generated when a UDP server (in unconnected mode) receives a packet. +/// </summary> +class UDPReceivedIndication : public Payload +{ +private : + int receiveLength; + +public : + static const int PAYLOAD_OFFSET = 11; + + UDPReceivedIndication(Payload * payload); + + char GetServerSocketID(); + + IPAddress GetRemoteIP(); + + int GetRemotePort(); + + int GetPayloadLength(); + + char GetPayload(int index); + + const char * GetPayload(); + + /// <summary> + /// Get the start index of the payload + /// </summary> + /// <returns></returns> + int GetPayloadOffset(); +}; +} + +#endif \ No newline at end of file