Package br.org.scadabr.dnp34j.master.common.utils

Examples of br.org.scadabr.dnp34j.master.common.utils.Buffer.writeByte()


        .buildRequestMsg(operateMode, ANALOG_OUTPUT_COMMAND, (byte) 2,
            new int[] { index }, WITH_DATA);

    byte[] valueOnBytes = toBytes(value, 2);
    commandFrame.setMarker(7);
    commandFrame.writeByte(valueOnBytes[0]);
    commandFrame.setMarker(8);
    commandFrame.writeByte(valueOnBytes[1]);
    commandFrame.writeByte((byte) 0x00);

    return commandFrame;
View Full Code Here


    byte[] valueOnBytes = toBytes(value, 2);
    commandFrame.setMarker(7);
    commandFrame.writeByte(valueOnBytes[0]);
    commandFrame.setMarker(8);
    commandFrame.writeByte(valueOnBytes[1]);
    commandFrame.writeByte((byte) 0x00);

    return commandFrame;
  }
View Full Code Here

    byte[] valueOnBytes = toBytes(value, 2);
    commandFrame.setMarker(7);
    commandFrame.writeByte(valueOnBytes[0]);
    commandFrame.setMarker(8);
    commandFrame.writeByte(valueOnBytes[1]);
    commandFrame.writeByte((byte) 0x00);

    return commandFrame;
  }

  public Buffer buildBinaryControlCommand(byte operateMode, int index,
View Full Code Here

    Buffer commandFrame = appSnd
        .buildRequestMsg(operateMode, BINARY_OUTPUT_COMMAND, (byte) 1,
            new int[] { index }, WITH_DATA);
    // int previous_marker = commandFrame.length();

    commandFrame.writeByte(toBytes(index, 1)[0]);
    commandFrame.setMarker(7);
    commandFrame.writeByte(controlCode);

    // commandFrame.setMarker(previous_marker);
View Full Code Here

            new int[] { index }, WITH_DATA);
    // int previous_marker = commandFrame.length();

    commandFrame.writeByte(toBytes(index, 1)[0]);
    commandFrame.setMarker(7);
    commandFrame.writeByte(controlCode);

    // commandFrame.setMarker(previous_marker);

    byte[] timeOnBytes = toBytes(timeOn, 4);
    commandFrame.setMarker(9);
View Full Code Here

    // commandFrame.setMarker(previous_marker);

    byte[] timeOnBytes = toBytes(timeOn, 4);
    commandFrame.setMarker(9);
    commandFrame.writeByte(timeOnBytes[0]);
    commandFrame.setMarker(10);
    commandFrame.writeByte(timeOnBytes[1]);
    commandFrame.setMarker(11);
    commandFrame.writeByte(timeOnBytes[2]);
    commandFrame.setMarker(12);
View Full Code Here

    byte[] timeOnBytes = toBytes(timeOn, 4);
    commandFrame.setMarker(9);
    commandFrame.writeByte(timeOnBytes[0]);
    commandFrame.setMarker(10);
    commandFrame.writeByte(timeOnBytes[1]);
    commandFrame.setMarker(11);
    commandFrame.writeByte(timeOnBytes[2]);
    commandFrame.setMarker(12);
    commandFrame.writeByte(timeOnBytes[3]);
View Full Code Here

    commandFrame.setMarker(9);
    commandFrame.writeByte(timeOnBytes[0]);
    commandFrame.setMarker(10);
    commandFrame.writeByte(timeOnBytes[1]);
    commandFrame.setMarker(11);
    commandFrame.writeByte(timeOnBytes[2]);
    commandFrame.setMarker(12);
    commandFrame.writeByte(timeOnBytes[3]);

    byte[] timeOffBytes = toBytes(timeOff, 4);
View Full Code Here

    commandFrame.setMarker(10);
    commandFrame.writeByte(timeOnBytes[1]);
    commandFrame.setMarker(11);
    commandFrame.writeByte(timeOnBytes[2]);
    commandFrame.setMarker(12);
    commandFrame.writeByte(timeOnBytes[3]);

    byte[] timeOffBytes = toBytes(timeOff, 4);

    commandFrame.setMarker(13);
    commandFrame.writeByte(timeOffBytes[0]);
View Full Code Here

    commandFrame.writeByte(timeOnBytes[3]);

    byte[] timeOffBytes = toBytes(timeOff, 4);

    commandFrame.setMarker(13);
    commandFrame.writeByte(timeOffBytes[0]);
    commandFrame.setMarker(14);
    commandFrame.writeByte(timeOffBytes[1]);
    commandFrame.setMarker(15);
    commandFrame.writeByte(timeOffBytes[2]);
    commandFrame.setMarker(16);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.