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

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


    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

    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);
    commandFrame.writeByte(timeOffBytes[3]);
View Full Code Here

    commandFrame.setMarker(13);
    commandFrame.writeByte(timeOffBytes[0]);
    commandFrame.setMarker(14);
    commandFrame.writeByte(timeOffBytes[1]);
    commandFrame.setMarker(15);
    commandFrame.writeByte(timeOffBytes[2]);
    commandFrame.setMarker(16);
    commandFrame.writeByte(timeOffBytes[3]);

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

    commandFrame.setMarker(14);
    commandFrame.writeByte(timeOffBytes[1]);
    commandFrame.setMarker(15);
    commandFrame.writeByte(timeOffBytes[2]);
    commandFrame.setMarker(16);
    commandFrame.writeByte(timeOffBytes[3]);

    commandFrame.setMarker(previous_marker);
    return commandFrame;
  }
View Full Code Here

      DataObject[] newDataObjects, byte qualifier) {
    Buffer getData = new Buffer(S);

    for (int i = 0; i < values.length; i++) {
      if ((qualifier & 0xF0) == 0x10) {
        getData.writeByte((byte) values[i]);
      } else {
        getData.writeBytes(values[i]);
      }

      getData.writeBytes(newDataObjects[i].data);
View Full Code Here

   */
  public Buffer buildRequestMsg(byte FC, byte group, byte variation,
      boolean withData) {
    Buffer requestFrame = new Buffer(S);
    requestFrame.writeBytes(buildHeader(FC, group, variation));
    requestFrame.writeByte(ALL_POINTS);

    // if (withData) {
    // requestFrame.writeBytes(dataMap.get(group, variation, dataMap
    // .getIndexMin(group), dataMap.getIndexMax(group)));
    // }
View Full Code Here

      int start, int stop, boolean withData) throws Exception {
    Buffer requestFrame = new Buffer(S);
    requestFrame.writeBytes(buildHeader(FC, group, variation));

    if (stop < 256) {
      requestFrame.writeByte(START_STOP_8);
      requestFrame.writeByte((byte) start);
      requestFrame.writeByte((byte) stop);
    } else {
      requestFrame.writeByte(START_STOP_16);
      requestFrame.writeBytes(start);
View Full Code Here

    Buffer requestFrame = new Buffer(S);
    requestFrame.writeBytes(buildHeader(FC, group, variation));

    if (stop < 256) {
      requestFrame.writeByte(START_STOP_8);
      requestFrame.writeByte((byte) start);
      requestFrame.writeByte((byte) stop);
    } else {
      requestFrame.writeByte(START_STOP_16);
      requestFrame.writeBytes(start);
      requestFrame.writeBytes(stop);
View Full Code Here

    requestFrame.writeBytes(buildHeader(FC, group, variation));

    if (stop < 256) {
      requestFrame.writeByte(START_STOP_8);
      requestFrame.writeByte((byte) start);
      requestFrame.writeByte((byte) stop);
    } else {
      requestFrame.writeByte(START_STOP_16);
      requestFrame.writeBytes(start);
      requestFrame.writeBytes(stop);
    }
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.