The original thread is closed and I can't figure out how to re-open
it. Starting again:
I notice that Aleksey uses a different model again in his RMobus
example mapping to XPCA. Quoting code from
https://github.com/flipback/rmodbus/blob/master/examples/simple-xpca-gateway.rb
# Calc a GET request
# @example
#
http://127.0.0.1:4567/mb/127.0.0.1/8502/1/coils/6/17
#
# HTTP route: GET
http://localhost/mb/:ip/:port/:slave/:dataplace/:firstaddr/:lastaddr
#
# :ip - ip addr of ModBus TCP Server
# :port - port of ModBUs TCP Server
# :slave - id of slave device
# :dataplace - valid values: coils, discrete_inputs, input_registers,
holding_registers
# :firstaddr - first addr of registers(contacts)
# :lastaddr - last addr of registers(contacts)
Here he's using /:firstaddr/:lastaddr as the way to express ranges. I
think this is natural and fits in with the general RESTful approach -
and XPCA as well.. it doesn't try to reinvent anything. It expresses
the range as simply as it can - no markup or conventions.
I vote for this approach to ranges.