Class S7Params

java.lang.Object
javaforce.controls.s7.S7Params

public class S7Params extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final byte
     
    byte
     
    byte[]
     
    static final byte
     
    static final byte
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Create a packet to setup communications (connect) .
    void
    Create a packet to read single tag.
    void
    Create a packet to read multiple tags.
    void
    makeWrite(byte block_type, int block_number, byte data_type, int off, int len, byte[] data)
    Create a packet to write data.
    boolean
    read(byte[] data, int offset, S7Data out)
    Reads params from packet and fills in S7Data.
    boolean
    read(byte[] data, int offset, S7Data[] outs)
    Reads params from packet and fills in S7Data.
    int
    Returns size of params.
    void
    write(byte[] data, int offset)
    Write params to packet.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • S7Params

      public S7Params()
  • Method Details

    • makeConnect

      public void makeConnect()
      Create a packet to setup communications (connect) .
    • makeRead

      public void makeRead(S7Data s7)
      Create a packet to read single tag.
    • makeRead

      public void makeRead(S7Data[] s7s)
      Create a packet to read multiple tags.
    • makeWrite

      public void makeWrite(byte block_type, int block_number, byte data_type, int off, int len, byte[] data)
      Create a packet to write data.
    • size

      public int size()
      Returns size of params.
    • write

      public void write(byte[] data, int offset)
      Write params to packet.
    • read

      public boolean read(byte[] data, int offset, S7Data out) throws Exception
      Reads params from packet and fills in S7Data.
      Throws:
      Exception
    • read

      public boolean read(byte[] data, int offset, S7Data[] outs) throws Exception
      Reads params from packet and fills in S7Data.
      Throws:
      Exception