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.

Indication/UDPReceivedIndication.h

Committer:
yangcq88517
Date:
2016-03-16
Revision:
9:0ce800923eda
Parent:
0:8e83b9448758

File content as of revision 9:0ce800923eda:

#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