OpenETS Plugin Reference/en

Aus expecco Wiki (Version 2.x)
(Weitergeleitet von OpenETS Plugin Reference)
Zur Navigation springen Zur Suche springen

Protocol[Bearbeiten]

Expecco connects to the client which listens on its OpenETS port. The default port is 8866.

Every request packet is surrounded by SOF (Start of Frame) and EOF (End of Frame) bytes. SOF is 0x00 / EOF is 0xFF.

Widget Addressing[Bearbeiten]

A subset of XPath is used to address widgets. The application should support the following XPath elements:

/                - refers to the root
xxx              - matches the element with className="xxx" under the parent
*                - matches any element under the parent
xxx[n]           - matches the n'th child with className="xxx"
xxx[@attr="val"] - matches children with className="xxx" and attribute value
*[n]             - matches the n'th child
*[@attr="val"]   - matches the child with attribute value

Attribute values can be quoted with either a single or double quote.

Request Packet Format (Expecco -> Application)[Bearbeiten]

0x00
<id>            8 bytes of widget ID (opaque to expecco; see below)
<requestID>     4 bytes request-Nr (sequential nr, MSB)
<xPathLen>      4 bytes of length of path, MSB
<reqTypeLen>    4 bytes of length of request type, MSB
<argsLen>       4 bytes of length of arguments, MSB
<xPath>         xPathLen bytes
<reqType>       reqTypeLen bytes
<args>          argsLen bytes
0xFF

Response Packet Format (Application -> Expecco)[Bearbeiten]

0x00
<errCode>         2 bytes error code MSB (0 = ok; more codes below)
<requestID>       4 bytes request-Nr (sequential nr, MSB)
<dataSize>        4 bytes of length of uncompressed data, MSB
<xmittedSize>     4 bytes of length of transmitted data, MSB
<data>            xmittedSize bytes
0xFF
  • If (dataSize == 0) and (xmittedSize > 0), then the response data is uncompressed and data is xmittedSize number of bytes.
  • Otherwise, data is zlib-compressed, and xmittedSize is the size of the compressed data, whereas dataSize is the size of the uncompressed data.

Requests[Bearbeiten]

ProtocolVersion[Bearbeiten]

Request:

<id>            - ignored -
<requestID>     - see above -
<xPath>         - ignored -
<requestType>   'OpenEts::ProtocolVersion'
<args>          - ignored -

Response Data:

protocolVersion as string (i.e. '3' or '4')

GetWidgets[Bearbeiten]

To retrieve the list of children of a widget. The widget is addressed via its xPath. The response consist of a flattened list of child-infos, each preceeded by a 0xFF byte.

Request:

<id>            - ignored -
<requestID>     - see above -
<xPath>         path if parent
<requestType>   'OpenEts::GetWidgets'
<args>          - ignored -

Response Data:

0xFF                  
<type or className>          0-terminated name of widget type
<info>                       0-terminated info string
<name>                       0-terminated id of the widget
<index>                      child index as string

info string:

'+' if it has children

GetPropertyList[Bearbeiten]

To retrieve the list of properties of a widget. The widget is addressed via its xPath. The response consist of a flattened list of property-infos, each preceeded by a 0xFF byte.

Request:

<id>            - ignored -
<requestID>     - see above -
<xPath>         path if parent
<requestType>   'OpenEts::GetWidgets'
<args>          - ignored -

Response Data:

0xFF                  
<group>         0-terminated group name
<name>          0-terminated property name
<type>          0-terminated property type
<value>         0-terminated value string

group name can be empty. If not, properties will be shown grouped by this identifier (eg. to show properties as inherited by superclasses of a widget's class).

type can currently be either "String" or "Integer". The value-string will be converted accordingly.

Error Codes[Bearbeiten]

Success                          = 0
InvalidRequest                   = 1
InvalidArguments                 = 2
ScriptFailed                     = 3
ReceiverWithIdNotExisting        = 4
ReceiverIsInvisible              = 5
ReceiverIsNotWidgetType          = 6
PropertyNotExisting              = 7
PropertyNotReadable              = 8
PropertyNotWritable              = 9
PropertyNotScriptable            = 10
ReceiverNotSupportsOperation     = 11



Copyright © 2014-2024 eXept Software AG