Enhancement #941

Support negative arguments to --{start,end}-index in bag-{cat,play}

Added by J. Moringen about 12 years ago. Updated over 10 years ago.

Status:ResolvedStart date:03/12/2012
Priority:LowDue date:
Assignee:J. Moringen% Done:

100%

Category:Commandline Tools
Target version:Robotics Service Bus - rsb-0.10

Description

For parity with --{start,end}-time.

Also, extend description of commandline options to mention this.

Associated revisions

Revision 53227c0f
Added by J. Moringen over 10 years ago

Improved --{start,end}-{index,time} in common/options.lisp

fixes #941

  • common/options.lisp (make-replay-options): allow negative integers for
    --{start,end}-index; describe interpretation of negative values for
    --{start,end}-{index,time} options; whitespace improvements
    (process-bounds-options): adjusted description

Revision 6d78fcb6
Added by J. Moringen over 10 years ago

Allow negative {start,end}-index in src/rsb/replay/strategy-mixins.lisp

refs #941

  • src/rsb/replay/strategy-mixins.lisp (bounds-mixin::start-index):
    changed type allow `integer' instead of only `non-negative-integer'
    (bounds-mixin::end-index): likewise
    (replay :before replay-bag-connection bounds-mixin): interpret
    negative values of start-index and end-index as offsets from the end
    of the sequence; check that start-index and end-index are within the
    bounds of the sequence
    (check-ordered-indices): handle cases of two positive indices and two
    negative indices separately
  • test/rsb/strategy-mixins.lisp
    (define-replay-strategy-construction-test bounds-mixin): expect
    negative start and end indices to work
  • test/rsb/as-fast-as-possible.lisp: minor cosmetic changes
  • test/rsb/recorded-timing.lisp: likewise
  • test/rsb/fixed-rate.lisp
    (define-replay-strategy-smoke-test fixed-rate): specify
    required-initargs
  • test/rsb/package.lisp (call-as-replay-strategy-test-case): support
    `replay-error'
    (define-replay-strategy-smoke-test): accept keyword parameter
    required-arguments; include cases with valid negative start and end
    indices; add cases with invalid start and end indices using
    required-arguments

Revision 36879c4d
Added by J. Moringen over 10 years ago

Mention negative values of --{start,end}-index in common.rst

refs #941

  • common.rst (Replay-related Options): discuss interpretation of
    negative values of --{start,end}-index

History

#1 Updated by J. Moringen almost 12 years ago

  • Target version changed from rsb-0.7 to rsb-0.9

#2 Updated by J. Moringen about 11 years ago

  • Target version changed from rsb-0.9 to rsb-0.10

#3 Updated by J. Moringen over 10 years ago

  • Target version changed from rsb-0.10 to rsb-0.11

#4 Updated by J. Moringen over 10 years ago

  • Description updated (diff)
  • Status changed from New to In Progress
  • % Done changed from 0 to 50

For timestamps, this seems to be supported since rsbag-cl|47f97dbb195255cbef5656260c94de14fb6a05b3.

#5 Updated by J. Moringen over 10 years ago

  • Category set to Commandline Tools
  • Target version changed from rsb-0.11 to rsb-0.10

#6 Updated by J. Moringen over 10 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 50 to 100

Applied in changeset rsbag-tools-cl|commit:53227c0fd7bce9cc94926227acb74d020d45d993.

Also available in: Atom PDF