'ODTONE - Open Dot Twenty One'

PrevUpHomeNext

Class message

odtone::mih::message

Synopsis

// 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();
};

Description

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/destruct

  1. message();

    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;

  2. message(const frame & fm);

    Construct a MIH Message by extracting the data from a frame.

    Parameters:

    fm

    The frame from which extract the information.

  3. message& operator=(const frame & fm);

    Extract the message data from a frame.

    Parameters:

    fm

    The frame from which extract the information.

    Returns:

    The message with updated data.

  4. ~message();

    Destruct a MIH Message.

message public member functions

  1. void reset();

    Clear the payload.

  2. void version(uint8 v);

    Set the MIH Message Version.

    Parameters:

    v

    The value of the MIH Message Version field.

  3. void ackreq(bool v);

    Set the MIH Message Acknowledge Request Flag.

    Parameters:

    v

    The value of the MIH Message Acknowledge Request Flag field.

  4. void ackrsp(bool v);

    Set the MIH Message Acknowledge Response Flag.

    Parameters:

    v

    The value of the MIH Message Acknowledge Response Flag field.

  5. void uir(bool v);

    Set the MIH Message Unauthenticated Information Request Flag.

    Parameters:

    v

    The value of the MIH Message Unauthenticated Information Request Flag.

  6. void m(bool v);

    Set the MIH Message More Fragment Flag.

    Parameters:

    v

    The value of the MIH Message More Fragment Flag.

  7. void fn(uint8 v);

    Set the MIH Message Fragment Number.

    Parameters:

    v

    The value of the MIH Message Fragment Number.

  8. void sid(service::type v);

    Set the MIH Message ID Service Identifier.

    Parameters:

    v

    The value of the MIH Message ID Service Identifier.

  9. void opcode(operation::type v);

    Set the MIH Message ID Operation Code.

    Parameters:

    v

    The value of the MIH Message ID Operation Code.

  10. void aid(action::type v);

    Set the MIH Message ID Action Identifier.

    Parameters:

    v

    The value of the MIH Message ID Action Identifier.

  11. void mid(uint16 v);

    Set the MIH Message ID.

    Parameters:

    v

    The value of the MIH Message Message ID.

  12. void tid(uint16 v);

    Set the MIH Message Transaction ID.

    Parameters:

    v

    The value of the MIH Message Transaction ID.

  13. void source(const id & id);

    Set the MIH Message Source ID.

    Parameters:

    id

    The value of the MIH Message Source MIHF ID.

  14. void destination(const id & id);

    Set the MIH Message Destination ID.

    Parameters:

    id

    The value of the MIH Message Destination MIHF ID.

  15. void payload(const message & msg);

    Set the message payload by copying it from another message.

    [Note] Note

    The source and destination TLVs are not copied.

    Parameters:

    msg

    The message from which extract the payload.

  16. uint8 version() const;

    Get the MIH Message Version.

    Returns:

    The value of the MIH Message Version field.

  17. bool ackreq() const;

    Get the MIH Message Acknowledge Request Flag.

    Returns:

    The value of the MIH Message Acknowledge Request Flag.

  18. bool ackrsp() const;

    Get the MIH Message Acknowledge Response Flag.

    Returns:

    The value of the MIH Message Acknowledge Response Flag field.

  19. bool uir() const;

    Get the MIH Message Unauthenticated Information Request Flag.

    Returns:

    The value of the MIH Message Unauthenticated Information Request Flag.

  20. bool m() const;

    Get the MIH Message More Fragment Flag.

    Returns:

    The value of the MIH Message More Fragment Flag.

  21. uint8 fn() const;

    Get the MIH Message Fragment Number.

    Returns:

    The value of the MIH Message Fragment Number.

  22. service::type sid() const;

    Get the MIH Message ID Service Identifier.

    Returns:

    The value of the MIH Message ID Service Identifier.

  23. operation::type opcode() const;

    Get the MIH Message ID Operation Code.

    Returns:

    The value of the MIH Message ID Operation Code.

  24. action::type aid() const;

    Get the MIH Message ID Action Identifier.

    Returns:

    The value of the MIH Message ID Action Identifier.

  25. uint16 mid() const;

    Get the MIH Message ID.

    Returns:

    The value of the MIH Message ID.

  26. uint16 tid() const;

    Get the MIH Message Transaction ID.

    Returns:

    The value of the MIH Message Transaction ID.

  27. const id & source() const;

    Get the MIH Message Source ID.

    Returns:

    The value of the MIH Message Source MIHF ID.

  28. const id & destination() const;

    Get the MIH Message Destination ID.

    Returns:

    The value of the MIH Message Destination MIHF ID.

  29. iarchive & input();

    Get the message's input archive.

    Returns:

    The message's input archive.

  30. oarchive & output();

    Get the message's output archive.

    Returns:

    The message's output archive.

  31. void get_frame(frame_vla & fm) const;

    Get the MIH Message Frame.

    Parameters:

    fm

    A dynamic frame buffer to store the information.

  32. bool has_service_specific_tlv();

    Check if the MIH Message has service specific TLVs

    Returns:

    True if has service specific TLVs or false otherwise.


PrevUpHomeNext