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

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


        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));
      } else {
View Full Code Here


      if (withData) {
        // requestFrame.writeBytes(appRcv.getDataMap().get(group,
        // variation, values, (byte) 0x28));
      } else {
        requestFrame.writeBytes(values);
      }
    }

    return requestFrame;
  }
View Full Code Here

      int size = 0;

      while ((frameRcv.length() > 0) && (!error)) {
        size = Math.min(18, frameRcv.length());
        error |= !DnpCrc.checkCRC(frameRcv.value(0, size - 1));
        trsFrame.writeBytes(frameRcv.readBytes(size - 2));
        frameRcv.incrOffset(2);
      }

      // check if a confirmation is requiered
      if ((control & 0x0F) < 4) {
View Full Code Here

   * function
   */
  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

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.