com.h3c.sdn.common

## Interface PacketModel

- All Known Implementing Classes:
    DiagPacket

      public interface PacketModel

  Contains the packet, packet identifier and last sent time stamp.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getId(String sid)` Returns the packet identifier as an integer.
    `Set<DataPathId>` | `getRegisteredPosts()` Returns the set of registered observation posts.
    `long` | `lastSent()` Returns the time stamp when the packet was last sent.
    `Map<String,OfmPacketIn>` | `observationsPosts()` Retrieves the map of device dpid and the packet-in message received from that dpid.
    `Packet` | `packet()` Returns the packet associated with this packet model.
    `void` | `registerObservationPost(DataPathId dataPathId)` Registers the observation with the specified data path identifier.
    `void` | `stampTime()` Sets the time stamp to the current system time when the packet is sent out to the network.
    `String` | `uid()` Returns the unique packet model identifier.
    `void` | `unregisterObservationPost(DataPathId dataPathId)` Unregisters the observation with the specified data path identifier.
    `void` | `updateObservationPost(DataPathId dataPathId, OfmPacketIn ofmPacketIn)` Updates the observation post with the corresponding open flow packet in.

- - ### Method Detail

    - #### uid

          String uid()

      Returns the unique packet model identifier.
      Returns:
        the packet model identifier

    - #### packet

          Packet packet()

      Returns the packet associated with this packet model.
      Returns:
        the packet of this model object

    - #### lastSent

          long lastSent()

      Returns the time stamp when the packet was last sent.
      Returns:
        time stamp it was last sent

    - #### stampTime

          void stampTime()

      Sets the time stamp to the current system time when the packet is sent out to the network.

    - #### getId

          int getId(String sid)

      Returns the packet identifier as an integer.
      Parameters:
        `sid` - the identifier that was supposed to be generated by nextId()
      Returns:
        the identifier number

    - #### observationsPosts

          Map<String,OfmPacketIn> observationsPosts()

      Retrieves the map of device dpid and the packet-in message received from that dpid.
      Returns:
        the map of dpid and packet-in message

    - #### updateObservationPost

          void updateObservationPost(DataPathId dataPathId,
                                   OfmPacketIn ofmPacketIn)

      Updates the observation post with the corresponding open flow packet in.
      Parameters:
        `dataPathId` - the data path identifier of the observation post
        `ofmPacketIn` - the test open flow packet in received from this post

    - #### registerObservationPost

          void registerObservationPost(DataPathId dataPathId)

      Registers the observation with the specified data path identifier.
      Parameters:
        `dataPathId` - the data path identifier of the observation post

    - #### unregisterObservationPost

          void unregisterObservationPost(DataPathId dataPathId)

      Unregisters the observation with the specified data path identifier.
      Parameters:
        `dataPathId` - the data path identifier of the observation post

    - #### getRegisteredPosts

          Set<DataPathId> getRegisteredPosts()

      Returns the set of registered observation posts.
      Returns:
        the set of registered observation posts

Copyright © 2014. All Rights Reserved.