Class TrafficMonitor
- All Implemented Interfaces:
Runnable
Traffic monitor is a Runnable tool implementation allowing to monitor network traffic in a KNX network. It
supports KNX network access using a KNXnet/IP, KNX IP, USB, FT1.2, or TP-UART connection.
When running this tool from the terminal, method main of this class is invoked; otherwise, use this
class in the context appropriate to a Runnable. In console mode, KNX network traffic data as well as status
information are written to System.out.
Note that communication will use default settings if not specified otherwise using command line options. Since these settings might be system dependent (for example, the local host) and not always predictable, a user may want to specify particular settings using the available options.
-
Constructor Summary
ConstructorsConstructorDescriptionTrafficMonitor(String[] args) Creates a new instance using the supplied options. -
Method Summary
-
Constructor Details
-
TrafficMonitor
Creates a new instance using the supplied options.- Parameters:
args- list with options- Throws:
tuwien.auto.calimero.KNXIllegalArgumentException- on unknown/invalid options
-
-
Method Details
-
main
Entry point for running the traffic monitor. The endpoint for KNX network access is either an IP host or port identifier for IP, USB, FT1.2 or TP-UART communication. Use the command line option--help(or-h) to show the usage of this tool.Command line options are treated case sensitive. Available options for communication:
--help -hshow help message--versionshow tool/library version and exit--compact -cshow incoming process communication data in compact format--localhostid local IP/host name--localportnumber local UDP port (default system assigned)--port -pnumber UDP port on host (default 3671)--nat -nenable Network Address Translation--ft12 -fuse FT1.2 serial communication--usb -uuse KNX USB communication--tpuartuse TP-UART communication--medium -mid KNX medium [tp1|p110|knxip|rf] (defaults to tp1)--domainaddress domain address on open KNX medium (PL or RF)
For common datapoint types (DPTs) the following name aliases can be used instead of the general DPT number string:
switchfor DPT 1.001, with valuesoff,onboolfor DPT 1.002, with valuesfalse,truedimmerfor DPT 3.007, with valuesdecrease 0..7,increase 0..7blindsfor DPT 3.008, with valuesup 0..7,down 0..7percentfor DPT 5.001, with values0..100%for DPT 5.001, with values0..100anglefor DPT 5.003, with values0..360ucountfor DPT 5.010, with values0..255tempfor DPT 9.001, with values-273..+670760floatorfloat2for DPT 9.002float4for DPT 14.005intfor DPT 13.001stringfor DPT 16.001
- Parameters:
args- command line options for traffic monitoring
-
run
public void run() -
quit
public void quit()Quits traffic monitoring and closes the network link. -
onCompletion
Called by this tool on completion.- Parameters:
thrown- the thrown exception if operation completed due to a raised exception,nullotherwisecanceled- whether the operation got canceled before its planned end
-