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

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


    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);
    }

    // if (withData) {
View Full Code Here


      int quantity, boolean withData) {
    Buffer requestFrame = new Buffer(S);
    requestFrame.writeBytes(buildHeader(FC, group, variation));

    if (quantity < 256) {
      requestFrame.writeByte(QUANTITY_8);
      requestFrame.writeByte((byte) quantity);
    } else {
      requestFrame.writeByte(QUANTITY_16);
      requestFrame.writeBytes(quantity);
    }
View Full Code Here

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

    if (quantity < 256) {
      requestFrame.writeByte(QUANTITY_8);
      requestFrame.writeByte((byte) quantity);
    } else {
      requestFrame.writeByte(QUANTITY_16);
      requestFrame.writeBytes(quantity);
    }
View Full Code Here

    if (quantity < 256) {
      requestFrame.writeByte(QUANTITY_8);
      requestFrame.writeByte((byte) quantity);
    } else {
      requestFrame.writeByte(QUANTITY_16);
      requestFrame.writeBytes(quantity);
    }

    if (withData) {
      if (group == 50) {
View Full Code Here

      int[] values, boolean withData) {
    Buffer requestFrame = new Buffer(S);
    requestFrame.writeBytes(buildHeader(FC, group, variation));

    if (values[values.length - 1] < 256) {
      requestFrame.writeByte(INDEXES_8);
      requestFrame.writeByte((byte) values.length);

      if (withData) {
        // requestFrame.writeBytes(appRcv.getDataMap().get(group,
        // variation, values, (byte) 0x17));
View Full Code Here

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

    if (values[values.length - 1] < 256) {
      requestFrame.writeByte(INDEXES_8);
      requestFrame.writeByte((byte) values.length);

      if (withData) {
        // requestFrame.writeBytes(appRcv.getDataMap().get(group,
        // variation, values, (byte) 0x17));
      } else {
View Full Code Here

        byte[] byteValues = new byte[values.length];
        System.arraycopy(values, 0, byteValues, 0, values.length);
        requestFrame.writeBytes(byteValues);
      }
    } else {
      requestFrame.writeByte(INDEXES_16);
      requestFrame.writeBytes(values.length);

      if (withData) {
        // requestFrame.writeBytes(appRcv.getDataMap().get(group,
        // variation, values, (byte) 0x28));
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.