Class PacketPlayer

All Implemented Interfaces:
PcapProConfigurator.PreRxProcessor, PcapProConfigurator.RxProcessor

public class PacketPlayer extends PcapProConfigurator<PacketPlayer> implements PcapProConfigurator.PreRxProcessor
The Class PacketPlayer.
Author:
Sly Technologies Inc, repos@slytechs.com
  • Field Details

    • PROPERTY_PACKET_PLAYER_ENABLE

      public static final String PROPERTY_PACKET_PLAYER_ENABLE
      The Constant PROPERTY_PACKET_PLAYER_ENABLE.
      See Also:
    • PROPERTY_PACKET_PLAYER_SYNC

      public static final String PROPERTY_PACKET_PLAYER_SYNC
      The Constant PROPERTY_PACKET_PLAYER_SYNC.
      See Also:
    • PROPERTY_PACKET_PLAYER_SPEED

      public static final String PROPERTY_PACKET_PLAYER_SPEED
      The Constant PROPERTY_PACKET_PLAYER_SPEED.
      See Also:
  • Constructor Details

    • PacketPlayer

      public PacketPlayer()
      Instantiates a new packet player.
  • Method Details

    • useCurrentTime

      public PacketPlayer useCurrentTime()
      Use current time.
      Returns:
      the packet player
    • setReferenceTimeNano

      public PacketPlayer setReferenceTimeNano(long timeNano)
      Sets the reference time nano.
      Parameters:
      timeNano - the time nano
      Returns:
      the packet player
    • setReferenceTime

      public PacketPlayer setReferenceTime(long time, TimeUnit unit)
      Sets the reference time.
      Parameters:
      time - the time
      unit - the unit
      Returns:
      the packet player
    • setTimestampUnit

      public PacketPlayer setTimestampUnit(com.slytechs.jnet.jnetruntime.time.TimestampUnit unit)
      Sets the timestamp unit.
      Parameters:
      unit - the unit
      Returns:
      the packet player
    • getReferenceTimeNano

      public long getReferenceTimeNano()
      Gets the reference time nano.
      Returns:
      the reference time nano
    • syncTimestamp

      public PacketPlayer syncTimestamp(boolean sync)
      Sync timestamp.
      Parameters:
      sync - the sync
      Returns:
      the packet player
    • preserveIfg

      public PacketPlayer preserveIfg(boolean sync)
      Preserve ifg.
      Parameters:
      sync - the sync
      Returns:
      the packet player
    • setMinIfg

      public PacketPlayer setMinIfg(long duration, TimeUnit unit)
      Sets the min ifg.
      Parameters:
      duration - the duration
      unit - the unit
      Returns:
      the packet player
    • setMaxIfg

      public PacketPlayer setMaxIfg(long duration, TimeUnit unit)
      Sets the max ifg.
      Parameters:
      duration - the duration
      unit - the unit
      Returns:
      the packet player
    • play

      public PacketPlayer play(double speed)
      Play.
      Parameters:
      speed - the speed
      Returns:
      the packet player
    • getSpeed

      public double getSpeed()
      Gets the speed.
      Returns:
      the speed
    • isSync

      public boolean isSync()
      Checks if is sync.
      Returns:
      true, if is sync
    • getTimestampUnit

      public com.slytechs.jnet.jnetruntime.time.TimestampUnit getTimestampUnit()
      Gets the timestamp unit.
      Returns:
      the timestampUnit
    • getAbi

      public org.jnetpcap.internal.PcapHeaderABI getAbi()
      Gets the abi.
      Returns:
      the abi