- java.lang.Object
-
- org.refcodes.p2p.alt.serial.SerialPeerProxy
-
- All Implemented Interfaces:
SerialPeerRouter
,org.refcodes.p2p.PeerProxy<Integer,SerialP2PHeader,SerialP2PTail,SerialP2PMessage>
,org.refcodes.p2p.PeerRouter<Integer,SerialP2PHeader,SerialP2PTail,SerialP2PMessage>
public class SerialPeerProxy extends Object implements org.refcodes.p2p.PeerProxy<Integer,SerialP2PHeader,SerialP2PTail,SerialP2PMessage>, SerialPeerRouter
TheSerialPeerProxy
implements aPeerProxy
optimized for local area microcontroller wiring (networks) and microcontroller memory layout using serialPort
instances.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.refcodes.serial.ext.handshake.HandshakePortController<?>
_port
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getHopCount(Integer aLocator, Integer[] aHops)
void
sendMessage(SerialP2PMessage aMessage)
-
-
-
Method Detail
-
getHopCount
public int getHopCount(Integer aLocator, Integer[] aHops) throws IOException
- Specified by:
getHopCount
in interfaceorg.refcodes.p2p.PeerRouter<Integer,SerialP2PHeader,SerialP2PTail,SerialP2PMessage>
- Throws:
IOException
-
sendMessage
public void sendMessage(SerialP2PMessage aMessage) throws org.refcodes.p2p.NoSuchDestinationException, IOException
- Specified by:
sendMessage
in interfaceorg.refcodes.p2p.PeerRouter<Integer,SerialP2PHeader,SerialP2PTail,SerialP2PMessage>
- Throws:
org.refcodes.p2p.NoSuchDestinationException
IOException
-
-