Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "BaSyx / Documentation / VAB / TCP Mapping"
(TCP mapping of VAB primitives) |
m |
||
Line 37: | Line 37: | ||
= Primitive Mapping = | = Primitive Mapping = | ||
For a detailed description of the primitives, see the VAB [https://wiki.eclipse.org/BaSyx_/_Documentation_/_VAB#Technology_independent_VAB_element_interface documentation]. | For a detailed description of the primitives, see the VAB [https://wiki.eclipse.org/BaSyx_/_Documentation_/_VAB#Technology_independent_VAB_element_interface documentation]. | ||
− | == | + | == RETRIEVE == |
=== Request === | === Request === | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 69: | Line 69: | ||
− | == | + | == UPDATE == |
=== Request === | === Request === |
Revision as of 10:38, 26 August 2019
BaSyx defines a mapping of the VAB primitives to a TCP protocol, called BaSyx Native.
Contents
General Frame Format
Each BaSyx Native frame is divided into two fields. These fields define message size and message payload. Due to this, the receiver can create a appropriate sized buffer.
If a message is received with size > Message Length, an error is assumed and the message it is discarded.
Length | Field |
---|---|
4 Byte, LSB first | Message Length |
Variable, as defined in Message Length | Message payload |
String Encoding
Strings are encoded in the following scheme:
Length | Field |
---|---|
4 Byte, LSB first | String Length |
Variable, as defined in String Length | String content, without null termination |
Object Encoding
Collections/Maps are serialized to a string as defined in the JSON serialization and send as a string as defined above.
Primitive Mapping
For a detailed description of the primitives, see the VAB documentation.
RETRIEVE
Request
Length | Field | Value |
---|---|---|
1 Byte | Command | 0x01 |
<variable> | Path to element as string |
Response
Length | Field |
---|---|
1 Byte | Result |
<variable> | Value serialized as JSON |
Currently, the result will always be 0x00 with exceptions encoded in the returned string.
UPDATE
Request
Length | Field | Value |
---|---|---|
1 Byte | Command | 0x02 |
<variable> | Path to element as string | |
<variable> | Value serialized as JSON |
Response
Length | Field |
---|---|
1 Byte | Result |
<variable> | Value serialized as JSON |
Currently, the result will always be 0x00 with exceptions encoded in the returned string.
CREATE
Request
Length | Field | Value |
---|---|---|
1 Byte | Command | 0x03 |
<variable> | Path to element as string | |
<variable> | Value serialized as JSON |
Response
Length | Field |
---|---|
1 Byte | Result |
<variable> | Value serialized as JSON |
Currently, the result will always be 0x00 with exceptions encoded in the returned string.
DELETE
Request
Length | Field | Value |
---|---|---|
1 Byte | Command | 0x04 |
<variable> | Path to element as string |
Response
Length | Field |
---|---|
1 Byte | Result |
Currently, the result will always be 0x00 with exceptions encoded in the returned string.
INVOKE
Request
Length | Field | Value |
---|---|---|
1 Byte | Command | 0x05 |
<variable> | Path to operations as string | |
<variable> | Return value serialized as JSON |
Response
Length | Field |
---|---|
1 Byte | Result |
<variable> | Value serialized as JSON |
Currently, the result will always be 0x00 with exceptions encoded in the returned string.