public static class InspcDataExchangeAccess.Inspcitem
extends ByteDataAccessBase
Inspcitem::= <@0+2#?SIZE> <@2+2#?cmd> <@4+4#?order> .An information entry contains this header and may be some childs. The childs may be simple integer or String childs getting and setting with the methodes to add
ByteDataAccessBase#addChildInteger(int, long)
or ByteDataAccessBase#addChildString(String)
.
and the methods to get
ByteDataAccessBase#getChildInteger(int)
or ByteDataAccessBase#getChildString(int)
.
The childs may be described by a named-here class, forex InspcDataExchangeAccess.InspcSetValue
In this case 8 Bytes are added after the head. The length stored in the head is 16. TheExample
Modifier and Type | Field and Description |
---|---|
static int |
kAccessCheck |
static int |
kAnswerFieldMethod
Antwort auf Aufforderung zur Rueckgabe einer Liste von Attributen, Assoziationen oder Methoden.
|
static int |
kAnswerMsg |
static int |
kAnswerRegisterHandle
Answer cmd to
kRegisterHandle . |
static int |
kAnswerRemoveMsgNok |
static int |
kAnswerRemoveMsgOk |
static int |
kAnswerValue
Answer cmd to
kGetValueByPath . |
static int |
kAnswerValueByHandle
Answer cmd to
kGetValueByHandle . |
static int |
kAnswervaluedata
This item sets a value with a given position:
<@8+4#?
|
private static int |
kbyteOrder |
static int |
kFailedCommand |
static int |
kFailedHandle
Answer cmd for a
kGetValueByHandle which is a faulty handle. |
static int |
kFailedPath |
static int |
kFailedRegisterRepeat |
static int |
kFailedValue |
static int |
kGetAddressByPath |
static int |
kGetFields
Aufforderung zur Rueckgabe einer Liste aller Attribute und Assoziationen des adressierten Objektes.
|
static int |
kGetMsg
Request to get all messages
|
static int |
kGetValueByHandle |
static int |
kGetValueByPath |
static int |
kNoRessource |
static int |
kRegisterHandle |
static int |
kRemoveMsg
Remove gotten messages.
|
static int |
kSetStringByPath
Sets a string value.
|
static int |
kSetValueByPath
Sets a value with given path.
|
static int |
kSetvaluedata
This item sets a value with a given position:
<@8+4#?
|
static int |
sizeofHead |
Modifier | Constructor and Description |
---|---|
|
Inspcitem() |
protected |
Inspcitem(int sizeHeadDerived)
Constructor for derived items with other head size.
|
Modifier and Type | Method and Description |
---|---|
int |
getCmd()
Returns the cmd in a Reflitem.
|
int |
getLenInfo() |
int |
getOrder()
Gets the order number of the info block.
|
void |
infoFormattedAppend(StringFormatter u) |
void |
setCmd(int cmd) |
void |
setInfoHead(int length,
int cmd,
int order)
Sets the head data and sets the length of the ByteDataAccess-element.
|
void |
setLength(int length) |
private static final int kbyteOrder
public static final int sizeofHead
public static final int kGetFields
public static final int kAccessCheck
public static final int kAnswerFieldMethod
public static final int kRegisterHandle
public static final int kAnswerRegisterHandle
kRegisterHandle
.
+------head-8---------+-int-4--+-byte-+-int 4-+--------+ |kAnswerRegisterHandle| handle | type | value | 0 0 0 | +---------------------+--------+------+-------+--------+The handle can be used now. The type is the type byte with encoding see
InspcDataExchangeAccess.kScalarTypes
.
The type determines the number of bytes used by the value in the answer 37. It should be stored
to help evaluating the answer correctly. The current value is sent additionally.
Type and value are stored in the same way like kAnswerValue
.public static final int kFailedRegisterRepeat
public static final int kGetValueByHandle
public static final int kAnswerValueByHandle
kGetValueByHandle
.
+------head-8---------+-int2-+----------n---------------+ |kAnswerValueByHandle | ixVal| values ........... | +---------------------+------+--------------------------+
kAnswerValueByHandle
with the type information.
public static final int kAnswerValue
kGetValueByPath
.
+------head-8---------+-byte-+-int 4-+--------+ |kAnswerValue | type | value | 0 0 0 | +---------------------+------+-------+--------+The child after the item contains the type byte and the value following immediately. The rest to 4-byte-Alignment may be filled with 0 for newer telegrams or the length of the item may be not 4-aligned (older implementations).
public static final int kFailedValue
public static final int kFailedHandle
kGetValueByHandle
which is a faulty handle.
+------head-8---------+-int-2---+-int-2-+ |kFailedHandle |ixHandle | ixEnd | +---------------------+---------+-------+The ixHandle is the index of the handle in the request. The ixEnd is the index of the next correct handle or the length of the handle array in request if all handles till end are faulty. If only one handle is faulty, ixEnd is ixHandle +1.
public static final int kGetValueByPath
public static final int kGetAddressByPath
public static final int kSetValueByPath
setValueByPath::=<@SIZE=head.nrofBytesItem> <@ReflitemHead !cmdItem=0x35 ?head> <@8-(SIZE-17):String04?!accesspath> <@(SIZE-16)?InspcSetValue> .Example:
+---------+---------+---------'---------+----+----+----+----+----+----+----+----+ | 0x1c | 0x30 | order | r o o t . a c c | +----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+ | e s s . p a t h . 0 0 0 | password | +---------+----+----+-------------------+-------------------+-------------------| |password | | e4 | 0 0 0 0 | int32 big endian | +---------+----+----+-------------------+-------------------+see
InspcDataExchangeAccess.InspcSetValue
.public static final int kSetStringByPath
< inspcitem> <@+2#?strlen> <@+strlen$?value> <@a4> <@strlen..SIZE$?path> <@a4>
public static final int kGetMsg
, +------head-----------+ , |kGetMs | , +---------------------+, Answer:
, +------head-----------+---------+---------+---------+---------+
, |kAnswerMsg | Msg | Msg | Msg | Msg |
, +---------------------+---------+---------+---------+---------+
Any Message has 16 to 80 Bytes. The structure of a message is described with InspcMsgDataExchg
.
This structure should be used as child. All values of the message are children of that child.
public static final int kAnswerMsg
public static final int kRemoveMsg
kGetMsg
contains all messages in a proper sequence order from..to. This Telegram removes the messages from..to sequence.
, Cmd:, +------head-----------+--int-----+--int-----+ , |kRemoveMsg | from seq | to seq | , +---------------------+----------+----------+, Answer:
, +------head-----------+ , |kAnswerRemoveMsg | , +---------------------+
public static final int kAnswerRemoveMsgOk
public static final int kAnswerRemoveMsgNok
public static final int kSetvaluedata
<@8+4#?position> <@12+4#?length> <@16..SIZE#?bitImageValue>The position may be a memory address which is known in the client proper to the target or it may be a relative offset in any target's data. The type of data is target-specific.
public static final int kAnswervaluedata
<@8+4#?position> <@12+4#?length> <@16..SIZE#?bitImageValue>The position may be a memory address which is known in the client proper to the target or it may be a relative offset in any target's data. The type of data is target-specific.
public static final int kFailedPath
public static final int kNoRessource
public static final int kFailedCommand
protected Inspcitem(int sizeHeadDerived)
sizeHeadDerived
- public Inspcitem()
public final void setInfoHead(int length, int cmd, int order)
ByteDataAccessBase#bExpand
is set to false.
That is because the length in head should match to the real length of the element.length
- The length in head, the length of the info elementcmd
- The cmd of the info elementorder
- The order number to assign the answer.public final void setLength(int length)
public final void setCmd(int cmd)
public final int getCmd()
kFailedCommand
, kAnswerFieldMethod
etc.public final int getLenInfo()
public final int getOrder()
setInfoHead(int, int, int)
with any order identification number which is unified for the target
in a proper time. The received info returns the same order ident.public void infoFormattedAppend(StringFormatter u)