User Tools

Site Tools


dictionary:more:setparsingparams

Set Parsing Params

The Set Parsing Params verb is used with the DIY plugin to make changes to the parsing provided by the lower level interface. If you have a simple protocol of fixed length packets, packets delineated by a known terminator or simply want to collect data for a specific amount of time you can use this verb to set those properties. If you have a more complex packet you will have to parse it yourself in the diy interface script.

In the 2.0 version of the DIY plugin you can set initial properties for parsing in the interface setup window. If you’re still using the 1.0 version of the plugin then you must call this verb at least once in the on init() handler if you wish to have the plugin help to parse your data.

Without any parsing you may receive partial data packets in several dataAvailable events or several packets in one dataAvailable event depending on the timing and speed of the connection and how busy XTension is at any moment.

The different parsing parameters are all exclusive, you can set only one at ay given time. Setting it to a new one will remove the previous settings.

Usage:

Set Parsing Params

[terminator text] optional: if there is a packet terminator string send it here. If your packet is terminated with a return you could pass “(ASCII character 13)” as this parameter
[length integer] optional: if the packet is a fixed length you can pass that here and the stream of data will be sent in chunks of this size.
[timeout integer milliseconds] optional: collect data for this many milliseconds and then send it as a single data available event.
[interface text] optional: the name of the interface to which to send the change in parsing parameters. If not specified then the value of (thisInterface) will be used.

dictionary/more/setparsingparams.txt · Last modified: 2023/02/13 14:52 by 127.0.0.1