@Override public void visitSignedInteger(String name, long id, int value) { needsClose = true; if (Pipe.takeInt(expectedInput) != value) { throw new AssertionError(); } }
@Override public void visitSignedInteger(String name, long id, int value) { needsClose = true; if (Pipe.takeInt(expectedInput) != value) { throw new AssertionError(); } }
@Override public void visitUnsignedInteger(String name, long id, long value) { needsClose = true; int temp; if ((temp = Pipe.takeInt(expectedInput)) != value) { throw new AssertionError("expected integer "+temp+" but found "+value); } }
@Override public void visitUnsignedInteger(String name, long id, long value) { needsClose = true; int temp; if ((temp = Pipe.takeInt(expectedInput)) != value) { throw new AssertionError("expected integer "+temp+" but found "+value); } }
@Override public void visitSignedInteger(String name, long id, int value) { needsClose = true; if (Pipe.takeInt(expectedInput) != value) { throw new AssertionError(); } }
@Deprecated //use takeInt public static <S extends MessageSchema<S>> int takeValue(Pipe<S> pipe) { return takeInt(pipe); }
@Override public void visitUnsignedInteger(String name, long id, long value) { needsClose = true; int temp; if ((temp = Pipe.takeInt(expectedInput)) != value) { throw new AssertionError("expected integer "+temp+" but found "+value); } }
@Deprecated //use takeInt public static <S extends MessageSchema<S>> int takeValue(Pipe<S> pipe) { return takeInt(pipe); }
@Override public void visitDecimal(String name, long id, int exp, long mant) { needsClose = true; int tempExp; if ((tempExp = Pipe.takeInt(expectedInput)) != exp) { //TODO; AAAAAAA, decimal support is broken here must fix... // throw new AssertionError("expected integer exponent "+tempExp+" but found "+exp); } long tempMant; if ((tempMant=Pipe.takeLong(expectedInput)) != mant) { // throw new AssertionError("expected long mantissa: "+Long.toHexString(tempMant)+" but got "+Long.toHexString(mant)); } }
@Override public void visitDecimal(String name, long id, int exp, long mant) { needsClose = true; int tempExp; if ((tempExp = Pipe.takeInt(expectedInput)) != exp) { //TODO; AAAAAAA, decimal support is broken here must fix... // throw new AssertionError("expected integer exponent "+tempExp+" but found "+exp); } long tempMant; if ((tempMant=Pipe.takeLong(expectedInput)) != mant) { // throw new AssertionError("expected long mantissa: "+Long.toHexString(tempMant)+" but got "+Long.toHexString(mant)); } }
@Override public void visitDecimal(String name, long id, int exp, long mant) { needsClose = true; int tempExp; if ((tempExp = Pipe.takeInt(expectedInput)) != exp) { //TODO; AAAAAAA, decimal support is broken here must fix... // throw new AssertionError("expected integer exponent "+tempExp+" but found "+exp); } long tempMant; if ((tempMant=Pipe.takeLong(expectedInput)) != mant) { // throw new AssertionError("expected long mantissa: "+Long.toHexString(tempMant)+" but got "+Long.toHexString(mant)); } }
@Override public void visitSequenceOpen(String name, long id, int length) { int tempLen; if ((tempLen=Pipe.takeInt(expectedInput))!=length) { throw new AssertionError("expected length: "+Long.toHexString(tempLen)+" but got "+Long.toHexString(length)); } needsClose = false; Pipe.confirmLowLevelRead(expectedInput, Pipe.sizeOf(expectedInput, activeCursor)); Pipe.releaseReadLock(expectedInput); }
@Override public void visitSequenceOpen(String name, long id, int length) { int tempLen; if ((tempLen=Pipe.takeInt(expectedInput))!=length) { throw new AssertionError("expected length: "+Long.toHexString(tempLen)+" but got "+Long.toHexString(length)); } needsClose = false; Pipe.confirmLowLevelRead(expectedInput, Pipe.sizeOf(expectedInput, activeCursor)); Pipe.releaseReadLock(expectedInput); }
@Override public void visitSequenceOpen(String name, long id, int length) { int tempLen; if ((tempLen=Pipe.takeInt(expectedInput))!=length) { throw new AssertionError("expected length: "+Long.toHexString(tempLen)+" but got "+Long.toHexString(length)); } needsClose = false; Pipe.confirmLowLevelRead(expectedInput, Pipe.sizeOf(expectedInput, activeCursor)); Pipe.releaseReadLock(expectedInput); }
public static <S extends MessageSchema<S>> int readI(Pipe<S> pipe) { int msgIdx = Pipe.takeMsgIdx(pipe); assert(3==Pipe.from(pipe).fragDataSize[msgIdx]) : "This constant does not this fragment size"; int value = Pipe.takeInt(pipe); Pipe.confirmLowLevelRead(pipe, 3); Pipe.releaseReadLock(pipe); return value; }
public static <S extends MessageSchema<S>> int readI(Pipe<S> pipe) { int msgIdx = Pipe.takeMsgIdx(pipe); assert(3==Pipe.from(pipe).fragDataSize[msgIdx]) : "This constant does not this fragment size"; int value = Pipe.takeInt(pipe); Pipe.confirmLowLevelRead(pipe, 3); Pipe.releaseReadLock(pipe); return value; }
public static <S extends MessageSchema<S>> int readI(Pipe<S> pipe) { int msgIdx = Pipe.takeMsgIdx(pipe); assert(3==Pipe.from(pipe).fragDataSize[msgIdx]) : "This constant does not this fragment size"; int value = Pipe.takeInt(pipe); Pipe.confirmLowLevelRead(pipe, 3); Pipe.releaseReadLock(pipe); return value; }
private void writeBegin(Pipe<NetPayloadSchema> pipe) { int msgIdx = Pipe.takeMsgIdx(pipe); int seq = Pipe.takeInt(pipe); Pipe.confirmLowLevelRead(pipe, Pipe.sizeOf(pipe, NetPayloadSchema.MSG_BEGIN_208)); Pipe.releaseReadLock(pipe); }
private void buildPublishMessage(DataOutputBlobWriter<NetPayloadSchema> output, int qos, int packetId) { buildPublishMessage(output, qos, packetId, Pipe.takeInt(input), Pipe.takeByteArrayMetaData(input), Pipe.takeByteArrayLength(input), Pipe.takeByteArrayMetaData(input), Pipe.takeByteArrayLength(input)); }
public static void loadNextPacketIdRange(Pipe<MQTTIdRangeSchema> idGenIn, IdGenCache genCache) { int msgIdx = Pipe.takeMsgIdx(idGenIn); int range = Pipe.takeInt(idGenIn); genCache.nextFreeRange(range); Pipe.releaseReadLock(idGenIn); Pipe.confirmLowLevelRead(idGenIn, Pipe.sizeOf(idGenIn, msgIdx)); }