java.lang.Object
com.slytechs.jnet.jnetpcap.PcapProConfigurator<PacketPlayer>
com.slytechs.jnet.jnetpcap.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
-
Nested Class Summary
Nested classes/interfaces inherited from class com.slytechs.jnet.jnetpcap.PcapProConfigurator
PcapProConfigurator.PostRxProcessor, PcapProConfigurator.PostRxProcessorFactory<T extends PcapProConfigurator.PostRxProcessor>, PcapProConfigurator.PreRxProcessor, PcapProConfigurator.PreRxProcessorFactory<T extends PcapProConfigurator.PreRxProcessor>, PcapProConfigurator.RxProcessor, PcapProConfigurator.TxProcessor -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.jnetpcap.internal.PcapHeaderABIgetAbi()Gets the abi.longGets the reference time nano.doublegetSpeed()Gets the speed.com.slytechs.jnet.jnetruntime.time.TimestampUnitGets the timestamp unit.booleanisSync()Checks if is sync.play(double speed) Play.preserveIfg(boolean sync) Preserve ifg.Sets the max ifg.Sets the min ifg.setReferenceTime(long time, TimeUnit unit) Sets the reference time.setReferenceTimeNano(long timeNano) Sets the reference time nano.setTimestampUnit(com.slytechs.jnet.jnetruntime.time.TimestampUnit unit) Sets the timestamp unit.syncTimestamp(boolean sync) Sync timestamp.Use current time.Methods inherited from class com.slytechs.jnet.jnetpcap.PcapProConfigurator
enable, enableIf, getPcapContext, isEnabled
-
Field Details
-
PROPERTY_PACKET_PLAYER_ENABLE
The Constant PROPERTY_PACKET_PLAYER_ENABLE.- See Also:
-
PROPERTY_PACKET_PLAYER_SYNC
The Constant PROPERTY_PACKET_PLAYER_SYNC.- See Also:
-
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
Use current time.- Returns:
- the packet player
-
setReferenceTimeNano
Sets the reference time nano.- Parameters:
timeNano- the time nano- Returns:
- the packet player
-
setReferenceTime
Sets the reference time.- Parameters:
time- the timeunit- the unit- Returns:
- the packet player
-
setTimestampUnit
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
Sync timestamp.- Parameters:
sync- the sync- Returns:
- the packet player
-
preserveIfg
Preserve ifg.- Parameters:
sync- the sync- Returns:
- the packet player
-
setMinIfg
Sets the min ifg.- Parameters:
duration- the durationunit- the unit- Returns:
- the packet player
-
setMaxIfg
Sets the max ifg.- Parameters:
duration- the durationunit- the unit- Returns:
- the packet player
-
play
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
-