public final boolean tokenhood;
public final BitVector path;
+ private static final BitVector null_path = new BitVector(PATH_WIDTH, "null_path");
+ static {
+ null_path.set(0, PATH_WIDTH, false);
+ }
+
/** "parse" a token from the raw bits in the north proper stopper */
public MarinaPacket(BitVector singleBitVector) {
MarinaUtils.expectLength(singleBitVector,PACKET_WIDTH);
this.path = path;
}
+ /** another constructor which uses an all-zeroes path, for convenience */
+ public MarinaPacket(BitVector data, boolean tokenhood) {
+ this(data, tokenhood, null_path);
+ }
+
/** convert a packet into a single BitVector, suitable for insertion in the north proper stopper */
public BitVector toSingleBitVector() {
BitVector bv = new BitVector(PACKET_WIDTH, "marina packet");