Search in sources :

Example 11 with ByteBuf

use of sugar.free.sightparser.pipeline.ByteBuf in project SightRemote by TebbeUbben.

the class ReadConfigurationBlockMessage method getData.

@Override
protected byte[] getData() throws Exception {
    ByteBuf byteBuf = new ByteBuf(2);
    byteBuf.putShort(configurationBlockID);
    return byteBuf.getBytes();
}
Also used : ByteBuf(sugar.free.sightparser.pipeline.ByteBuf)

Example 12 with ByteBuf

use of sugar.free.sightparser.pipeline.ByteBuf in project SightRemote by TebbeUbben.

the class WriteConfigurationBlockMessage method getData.

@Override
protected byte[] getData() throws Exception {
    byte[] blockData = configurationBlock.getData();
    ByteBuf byteBuf = new ByteBuf(4 + blockData.length);
    byteBuf.putShort(configurationBlock.getID());
    byteBuf.putShort(restrictionLevel.getValue());
    byteBuf.putBytes(blockData);
    return byteBuf.getBytes();
}
Also used : ByteBuf(sugar.free.sightparser.pipeline.ByteBuf)

Example 13 with ByteBuf

use of sugar.free.sightparser.pipeline.ByteBuf in project SightRemote by TebbeUbben.

the class Cryptograph method processHeader.

private static byte[] processHeader(byte[] header) {
    ByteBuf byteBuf;
    byteBuf = new ByteBuf(2 + header.length);
    byteBuf.putShort((short) header.length);
    byteBuf.putBytes(header);
    return byteBuf.getBytes();
}
Also used : ByteBuf(sugar.free.sightparser.pipeline.ByteBuf)

Example 14 with ByteBuf

use of sugar.free.sightparser.pipeline.ByteBuf in project SightRemote by TebbeUbben.

the class VerifyConfirmRequest method getData.

@Override
protected byte[] getData() {
    ByteBuf byteBuf = new ByteBuf(2);
    byteBuf.putShort(pairingStatus.getValue());
    return byteBuf.getBytes();
}
Also used : ByteBuf(sugar.free.sightparser.pipeline.ByteBuf)

Example 15 with ByteBuf

use of sugar.free.sightparser.pipeline.ByteBuf in project SightRemote by TebbeUbben.

the class CustomTBRBlock method getData.

@Override
public byte[] getData() {
    ByteBuf byteBuf = new ByteBuf(6);
    byteBuf.putUInt16LE(amount);
    byteBuf.putUInt16LE(duration);
    byteBuf.putBoolean(configured);
    return byteBuf.getBytes();
}
Also used : ByteBuf(sugar.free.sightparser.pipeline.ByteBuf)

Aggregations

ByteBuf (sugar.free.sightparser.pipeline.ByteBuf)35 SuppressLint (android.annotation.SuppressLint)3 InvalidAuthCRCError (sugar.free.sightparser.error.InvalidAuthCRCError)2 InvalidNonceError (sugar.free.sightparser.error.InvalidNonceError)2 InvalidTrailerError (sugar.free.sightparser.error.InvalidTrailerError)2 CustomEvent (com.crashlytics.android.answers.CustomEvent)1 BigInteger (java.math.BigInteger)1 HistoryFrame (sugar.free.sightparser.applayer.descriptors.history_frames.HistoryFrame)1 AppLayerMessage (sugar.free.sightparser.applayer.messages.AppLayerMessage)1 AuthLayerMessage (sugar.free.sightparser.authlayer.AuthLayerMessage)1 CRCAuthLayerMessage (sugar.free.sightparser.authlayer.CRCAuthLayerMessage)1 DataMessage (sugar.free.sightparser.authlayer.DataMessage)1 InvalidAppCRCError (sugar.free.sightparser.error.InvalidAppCRCError)1 InvalidAppVersionError (sugar.free.sightparser.error.InvalidAppVersionError)1 InvalidAuthVersionError (sugar.free.sightparser.error.InvalidAuthVersionError)1 UnknownAppErrorCodeError (sugar.free.sightparser.error.UnknownAppErrorCodeError)1 UnknownAppMessageError (sugar.free.sightparser.error.UnknownAppMessageError)1 UnknownAuthMessageError (sugar.free.sightparser.error.UnknownAuthMessageError)1 UnknownServiceError (sugar.free.sightparser.error.UnknownServiceError)1