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