bindings: Add Packet.get_type() method.
This commit is contained in:
parent
6fa0eb86af
commit
90ba83f21d
|
@ -939,6 +939,11 @@ Packet::~Packet()
|
||||||
delete payload;
|
delete payload;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const PacketType *Packet::get_type()
|
||||||
|
{
|
||||||
|
return PacketType::get(structure->type);
|
||||||
|
}
|
||||||
|
|
||||||
PacketPayload *Packet::get_payload()
|
PacketPayload *Packet::get_payload()
|
||||||
{
|
{
|
||||||
return payload;
|
return payload;
|
||||||
|
|
|
@ -477,6 +477,8 @@ protected:
|
||||||
class SR_API Packet
|
class SR_API Packet
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Type of this packet. */
|
||||||
|
const PacketType *get_type();
|
||||||
/** Payload of this packet. */
|
/** Payload of this packet. */
|
||||||
PacketPayload *get_payload();
|
PacketPayload *get_payload();
|
||||||
protected:
|
protected:
|
||||||
|
|
Loading…
Reference in New Issue