- java.lang.Object
-
- org.refcodes.p2p.AbstractP2PHeader<Integer>
-
- org.refcodes.p2p.alt.serial.SerialP2PHeader
-
- All Implemented Interfaces:
org.refcodes.mixin.DestinationAccessor<Integer>,org.refcodes.mixin.MagicBytesAccessor,org.refcodes.mixin.SourceAccessor<Integer>,org.refcodes.p2p.HopsAccessor<Integer>,org.refcodes.p2p.P2PHeader<Integer>
public class SerialP2PHeader extends org.refcodes.p2p.AbstractP2PHeader<Integer> implements org.refcodes.p2p.P2PHeader<Integer>, org.refcodes.mixin.MagicBytesAccessor
TheSerialP2PHeaderrepresents aP2PHeaderoptimized for local microcontroller wiring (networks) and microcontroller memory layout.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.DestinationAccessor
org.refcodes.mixin.DestinationAccessor.DestinationMutator<DEST extends Object>, org.refcodes.mixin.DestinationAccessor.DestinationProperty<DEST extends Object>
-
Nested classes/interfaces inherited from interface org.refcodes.p2p.HopsAccessor
org.refcodes.p2p.HopsAccessor.HopsBuilder<LOCATOR extends Object,B extends org.refcodes.p2p.HopsAccessor.HopsBuilder<LOCATOR,B>>, org.refcodes.p2p.HopsAccessor.HopsMutator<LOCATOR extends Object>, org.refcodes.p2p.HopsAccessor.HopsProperty<LOCATOR extends Object>
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.MagicBytesAccessor
org.refcodes.mixin.MagicBytesAccessor.MagicBytesBuilder<B extends org.refcodes.mixin.MagicBytesAccessor.MagicBytesBuilder<B>>, org.refcodes.mixin.MagicBytesAccessor.MagicBytesMutator, org.refcodes.mixin.MagicBytesAccessor.MagicBytesProperty
-
-
Constructor Summary
Constructors Constructor Description SerialP2PHeader(byte[] aMagicBytes, Integer aDestination)SerialP2PHeader(Integer aDestination)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getMagicBytes()protected voidsetHops(int[] aHops)Hook to set the stop-over trail e.g. upon receiving serial data from a port.protected voidsetHops(Integer[] aHops)Hook to set the stop-over trail e.g. upon receiving serial data from a port.-
Methods inherited from class org.refcodes.p2p.AbstractP2PHeader
appendHop, getDestination, getHops, getSource, toString
-
-
-
-
Method Detail
-
getMagicBytes
public byte[] getMagicBytes()
- Specified by:
getMagicBytesin interfaceorg.refcodes.mixin.MagicBytesAccessor
-
setHops
protected void setHops(int[] aHops)
Hook to set the stop-over trail e.g. upon receiving serial data from a port.- Parameters:
aHops- The stop over trail to be set.
-
setHops
protected void setHops(Integer[] aHops)
Hook to set the stop-over trail e.g. upon receiving serial data from a port.- Parameters:
aHops- The stop over trail to be set.
-
-