OpenETS Plugin Reference/en
Inhaltsverzeichnis
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.
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 == xmittedSize, then the data is uncompressed. Otherwise, it 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> '+' if it has children <name> 0-terminated id of the widget <index> child index as string
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