odtone::mih::message
// In header: </home/carlos/Projectos/odtone/inc/odtone/mih/message.hpp> class message { public: // construct/copy/destruct message(); message(const frame &); message& operator=(const frame &); ~message(); // public member functions void reset(); void version(uint8); void ackreq(bool); void ackrsp(bool); void uir(bool); void m(bool); void fn(uint8); void sid(service::type); void opcode(operation::type); void aid(action::type); void mid(uint16); void tid(uint16); void source(const id &); void destination(const id &); void payload(const message &); uint8 version() const; bool ackreq() const; bool ackrsp() const; bool uir() const; bool m() const; uint8 fn() const; service::type sid() const; operation::type opcode() const; action::type aid() const; uint16 mid() const; uint16 tid() const; const id & source() const; const id & destination() const; iarchive & input(); oarchive & output(); void get_frame(frame_vla &) const; bool has_service_specific_tlv(); };
MIH Message.
This class is a high level representation of an MIH message. It provides access to all fields of the MIH message header, the destination and sources ID's (which is part of payload but common to all messages), and it also provides serialization/deserialization operations.
message
public
construct/copy/destructmessage();
Construct an empty MIH Message.
The defaults for each field are: version = 1; ackreq = false; ackrsp = false; uir = false; m = false; fn = 0; mid = 0; tid = 0;
message(const frame & fm);
Construct a MIH Message by extracting the data from a frame.
Parameters: |
|
message& operator=(const frame & fm);
Extract the message data from a frame.
Parameters: |
|
||
Returns: |
The message with updated data. |
~message();
Destruct a MIH Message.
message
public member functionsvoid reset();
Clear the payload.
void version(uint8 v);
Set the MIH Message Version.
Parameters: |
|
void ackreq(bool v);
Set the MIH Message Acknowledge Request Flag.
Parameters: |
|
void ackrsp(bool v);
Set the MIH Message Acknowledge Response Flag.
Parameters: |
|
void uir(bool v);
Set the MIH Message Unauthenticated Information Request Flag.
Parameters: |
|
void m(bool v);
Set the MIH Message More Fragment Flag.
Parameters: |
|
void fn(uint8 v);
Set the MIH Message Fragment Number.
Parameters: |
|
void sid(service::type v);
Set the MIH Message ID Service Identifier.
Parameters: |
|
void opcode(operation::type v);
Set the MIH Message ID Operation Code.
Parameters: |
|
void aid(action::type v);
Set the MIH Message ID Action Identifier.
Parameters: |
|
void mid(uint16 v);
Set the MIH Message ID.
Parameters: |
|
void tid(uint16 v);
Set the MIH Message Transaction ID.
Parameters: |
|
void source(const id & id);
Set the MIH Message Source ID.
Parameters: |
|
void destination(const id & id);
Set the MIH Message Destination ID.
Parameters: |
|
void payload(const message & msg);
Set the message payload by copying it from another message.
Note | |
---|---|
The source and destination TLVs are not copied. |
Parameters: |
|
uint8 version() const;
Get the MIH Message Version.
Returns: |
The value of the MIH Message Version field. |
bool ackreq() const;
Get the MIH Message Acknowledge Request Flag.
Returns: |
The value of the MIH Message Acknowledge Request Flag. |
bool ackrsp() const;
Get the MIH Message Acknowledge Response Flag.
Returns: |
The value of the MIH Message Acknowledge Response Flag field. |
bool uir() const;
Get the MIH Message Unauthenticated Information Request Flag.
Returns: |
The value of the MIH Message Unauthenticated Information Request Flag. |
bool m() const;
Get the MIH Message More Fragment Flag.
Returns: |
The value of the MIH Message More Fragment Flag. |
uint8 fn() const;
Get the MIH Message Fragment Number.
Returns: |
The value of the MIH Message Fragment Number. |
service::type sid() const;
Get the MIH Message ID Service Identifier.
Returns: |
The value of the MIH Message ID Service Identifier. |
operation::type opcode() const;
Get the MIH Message ID Operation Code.
Returns: |
The value of the MIH Message ID Operation Code. |
action::type aid() const;
Get the MIH Message ID Action Identifier.
Returns: |
The value of the MIH Message ID Action Identifier. |
uint16 mid() const;
Get the MIH Message ID.
Returns: |
The value of the MIH Message ID. |
uint16 tid() const;
Get the MIH Message Transaction ID.
Returns: |
The value of the MIH Message Transaction ID. |
const id & source() const;
Get the MIH Message Source ID.
Returns: |
The value of the MIH Message Source MIHF ID. |
const id & destination() const;
Get the MIH Message Destination ID.
Returns: |
The value of the MIH Message Destination MIHF ID. |
iarchive & input();
Get the message's input archive.
Returns: |
The message's input archive. |
oarchive & output();
Get the message's output archive.
Returns: |
The message's output archive. |
void get_frame(frame_vla & fm) const;
Get the MIH Message Frame.
Parameters: |
|
bool has_service_specific_tlv();
Check if the MIH Message has service specific TLVs
Returns: |
True if has service specific TLVs or false otherwise. |