|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttuwien.auto.calimero.link.KNXNetworkMonitorFT12
public class KNXNetworkMonitorFT12
Implementation of the KNX network monitor link based on the FT1.2 protocol, using a
FT12Connection
.
Once a monitor has been closed, it is not available for further link communication, i.e. it can't be reopened.
Constructor Summary | |
---|---|
KNXNetworkMonitorFT12(int portNumber,
KNXMediumSettings settings)
Creates a new network monitor based on the FT1.2 protocol for accessing the KNX network. |
|
KNXNetworkMonitorFT12(java.lang.String portID,
KNXMediumSettings settings)
Creates a new network monitor based on the FT1.2 protocol for accessing the KNX network. |
Method Summary | |
---|---|
void |
addMonitorListener(LinkListener l)
Adds the specified event listener l to receive events from this
network monitor. |
void |
close()
Ends monitoring the KNX network and closes the network monitor. |
KNXMediumSettings |
getKNXMedium()
Returns the KNX medium settings used by this monitor link. |
java.lang.String |
getName()
Returns the name of the monitor, a short textual representation to identify a network monitor. |
boolean |
isOpen()
Checks for open monitor link. |
void |
removeMonitorListener(LinkListener l)
Removes the specified event listener l , so it does no longer
receive events from this network monitor. |
void |
setDecodeRawFrames(boolean decode)
Sets whether the monitor should decode the raw frame on medium contained in received KNX bus monitor messages. |
void |
setKNXMedium(KNXMediumSettings settings)
Supplies medium information necessary for KNX communication. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public KNXNetworkMonitorFT12(int portNumber, KNXMediumSettings settings) throws KNXException
The port number is used to choose the serial port for communication. It is mapped to the default port identifier using that number on the platform.
portNumber
- port number of the serial communication port to usesettings
- medium settings defining the specific KNX medium needed for
decoding raw frames received from the KNX network
KNXException
public KNXNetworkMonitorFT12(java.lang.String portID, KNXMediumSettings settings) throws KNXException
The port identifier is used to choose the serial port for communication. These identifiers are usually device and platform specific.
portID
- identifier of the serial communication port to usesettings
- medium settings defining the specific KNX medium needed for
decoding raw frames received from the KNX network
KNXException
Method Detail |
---|
public void addMonitorListener(LinkListener l)
KNXNetworkMonitor
l
to receive events from this
network monitor.
If l
was already added as listener, no action is performed.
addMonitorListener
in interface KNXNetworkMonitor
l
- the listener to addpublic void close()
KNXNetworkMonitor
All registered monitor listeners get notified.
If no communication access was established in the first place, no action is
performed.
close
in interface KNXNetworkMonitor
public KNXMediumSettings getKNXMedium()
KNXNetworkMonitor
The returned object is a reference to the one used by this link (not a copy).
getKNXMedium
in interface KNXNetworkMonitor
public java.lang.String getName()
The name is unique for monitors with different remote endpoints.
The returned name is used by the monitor for the name of its log service. Supply
KNXNetworkMonitor.getName()
for LogManager.getLogService(String)
for example to get
the associated log service.
By default, "monitor " + address/ID of the remote endpoint is returned.
After closing the monitor, the returned name might differ, e.g. get reset to some
arbitrary default name.
The returned name is "monitor " + port identifier.
getName
in interface KNXNetworkMonitor
public boolean isOpen()
KNXNetworkMonitor
After a call to KNXNetworkMonitor.close()
or after the underlying protocol initiated the end
of the communication, this method always returns false
.
isOpen
in interface KNXNetworkMonitor
true
if this network monitor is open, false
on closedpublic void removeMonitorListener(LinkListener l)
KNXNetworkMonitor
l
, so it does no longer
receive events from this network monitor.
If l
was not added in the first place, no action is performed.
removeMonitorListener
in interface KNXNetworkMonitor
l
- the listener to removepublic void setDecodeRawFrames(boolean decode)
KNXNetworkMonitor
A decoded raw frame is of type RawFrame
and can be retrieved using
MonitorFrameEvent.getRawFrame()
within a link listener registered for this
monitor.
setDecodeRawFrames
in interface KNXNetworkMonitor
decode
- true
to enable decoding, false
to skip
decodingpublic void setKNXMedium(KNXMediumSettings settings)
KNXNetworkMonitor
These informations are differing between KNX media and depend on the KNX network
this link is communicating with.
The settings
medium type has to match the medium type supplied to
the link in the first place.
The settings
object is not copied internally to allow subsequent
changes to medium settings by the user which should take effect immediately.
setKNXMedium
in interface KNXNetworkMonitor
settings
- medium settings to use, the expected subtype is according to the
KNX network mediumpublic java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |