bindings: Add Packet.get_type() method.

This commit is contained in:
Martin Ling 2014-07-20 01:38:31 +01:00
parent 6fa0eb86af
commit 90ba83f21d
2 changed files with 7 additions and 0 deletions

View File

@ -939,6 +939,11 @@ Packet::~Packet()
delete payload;
}
const PacketType *Packet::get_type()
{
return PacketType::get(structure->type);
}
PacketPayload *Packet::get_payload()
{
return payload;

View File

@ -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: