com.flightpanels.scs
Class UDPConnector
java.lang.Object
com.flightpanels.scs.UDPConnector
- All Implemented Interfaces:
- INetworkConnector<can_t>
public class UDPConnector
- extends java.lang.Object
- implements INetworkConnector<can_t>
Implementation of the INetworkConnector for CAN aerospace messages using
asynchronous, threaded communication.
This class is reentrant. There is no guarantee the receiver callback will be
called from the main thread. Receiving callbacks must be thread-safe.
- Version:
- 1.1
- Author:
- (c) 2009,2010 by Philipp Münzel, Technische Universität Darmstadt,
Department of Mathematics
|
Constructor Summary |
UDPConnector(java.lang.String host_addr,
int incoming_port,
int outgoing_port)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UDPConnector
public UDPConnector(java.lang.String host_addr,
int incoming_port,
int outgoing_port)
- Parameters:
host_addr - the multicast group to communicate withincoming_port - port for incoming messagesoutgoing_port - port for outgoing messages
send
public void send(can_t msg)
- Description copied from interface:
INetworkConnector
- To be called synchronously.
- Specified by:
send in interface INetworkConnector<can_t>
- Parameters:
msg - pointer to data for sending
setListener
public void setListener(IBusConnector<can_t> listener)
- Specified by:
setListener in interface INetworkConnector<can_t>
- Parameters:
listener - pointer to instance to be notified of arriving messages