com.flightpanels.scs
Class ConnectedClient
java.lang.Object
com.flightpanels.scs.ConnectedClient
- All Implemented Interfaces:
- java.lang.Comparable<ConnectedClient>
public class ConnectedClient
- extends java.lang.Object
- implements java.lang.Comparable<ConnectedClient>
Java port of the ConnectedClient class in libcanaero. Clients on the CAN bus
that have identfied themselves with an IDS are stored in this format.
They are identified by their node id. If they remain silent, they are dropped
after a timeout. This class is used for internal housekeeping of
CanAeroBusConnector.
- Version:
- 1.0
- Author:
- (c) 2009, 2010 by Philipp Münzel, Technische Universität Darmstadt,
Department of Mathematics
|
Constructor Summary |
ConnectedClient(short node_id,
short hardware_revision,
short software_revision,
short identifier_distribution,
short header_type)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConnectedClient
public ConnectedClient(short node_id,
short hardware_revision,
short software_revision,
short identifier_distribution,
short header_type)
- Parameters:
node_id - unique id on the CAN bus, either hard-wired or auto-assigned
via NCS node servicehardware_revision - for software nodes this is their software version numbersoftware_revision - for all nodes this is the config file revision number they
requireidentifier_distribution - according to SCS or CAN Aerospace specificationheader_type - according to CAN Aerospace specification
resetTimer
public void resetTimer()
- Will be called to reset timeout after reception of data.
hasTimedOut
public boolean hasTimedOut()
- Returns:
- True when client has been silent for longer than
ConnectedClient::time_out seconds.
nodeId
public short nodeId()
- Returns:
- Node id
compareTo
public int compareTo(ConnectedClient rhs)
- Specified by:
compareTo in interface java.lang.Comparable<ConnectedClient>