com.pnfsoftware.jeb.core.units.code.simatic.IS7Block |
Interface for S7 blocks. Implementations of this interface are private. They represent different concrete implementations of a PLC block.
Currently, two implementations exist:
- binary format 1 (little-endian): used by Step 7 internally
- binary format 2 (big-endian): used during networks communication between a PLC and the
Programming Station (header starts with 'pp')
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract INativeType | generateNativeHeaderType(ITypeManager typeman) | ||||||||||
abstract INativeType | generateNativeTrailerType(ITypeManager typeman) | ||||||||||
abstract int | getBlockByte(int offset) | ||||||||||
abstract byte[] | getBlockBytes() | ||||||||||
abstract int |
getBlockFormatVersion()
Retrieve the block format version.
| ||||||||||
abstract int | getBlockSize() | ||||||||||
abstract int | getCrc() | ||||||||||
abstract byte[] | getInterfaceBytes() | ||||||||||
abstract long | getInterfaceModificationTimestamp() | ||||||||||
abstract int | getInterfaceOffset() | ||||||||||
abstract int | getInterfaceSize() | ||||||||||
abstract int | getKey() | ||||||||||
abstract String | getMetadataAuthorName() | ||||||||||
abstract String | getMetadataBlockName() | ||||||||||
abstract String | getMetadataFamilyName() | ||||||||||
abstract long | getModificationTimestamp() | ||||||||||
abstract String |
getName()
Generate this block's normal name, that is
<BLOCK_TYPE><BLOCK_NUMBER> . | ||||||||||
abstract int | getNumber() | ||||||||||
abstract byte[] | getOtherBytes() | ||||||||||
abstract int | getOtherOffset() | ||||||||||
abstract int | getOtherSize() | ||||||||||
abstract byte[] |
getPayloadBytes()
Retrieve the block's payload.
| ||||||||||
abstract int |
getPayloadOffset()
Get the payload offset within the block bytes.
| ||||||||||
abstract int |
getPayloadSize()
Get the payload size in bytes.
| ||||||||||
abstract S7.LangType | getSourceLanguage() | ||||||||||
abstract int | getSourceLanguageId() | ||||||||||
abstract int | getTrailerOffset() | ||||||||||
abstract S7.BlockType | getType() | ||||||||||
abstract int | getTypeId() | ||||||||||
abstract int[] | getVersion() | ||||||||||
abstract boolean |
isInstanceDataBlock()
Determine whether this block is an instance data block.
|
Retrieve the block format version.
Generate this block's normal name, that is <BLOCK_TYPE><BLOCK_NUMBER>
. Examples:
OB1
, FB5
, DB10
.
Retrieve the block's payload.
For a logic block, the payload bytes are the MC7 bytecode of the function. For a data block, the payload bytes are the current values of the interface elements (which may differ from the initial values, if any).
Get the payload offset within the block bytes.
Get the payload size in bytes.
Determine whether this block is an instance data block. The block type may be DB
or
DI
.