Tasks #932

Implement --start-time and --end-time for bag-{cat,play}

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

Status:ResolvedStart date:03/08/2012
Priority:NormalDue date:
Assignee:J. Moringen% Done:

100%

Category:-
Target version:Robotics Service Bus - rsb-0.7

Description

These are more convenient than --start-index and --end-index but functionally equivalent. However, I think Vasil or somebody would have liked to use --start-time yesterday. Is a backport to 0.6 necessary?


Related issues

Related to RSBag - Enhancement #933: bag-cat should use the same replay machinery as bag-play Resolved 03/08/2012

Associated revisions

Revision 926727ce
Added by J. Moringen about 12 years ago

Added time-bounds-mixin in src/rsb/replay/bounds-mixin.lisp
refs #932
  • src/rsb/construction.lisp (bag->events bag uri): accept start-time
    and end-time keyword parameters; only pass {start,end}-{index,time}
    to `make-replay-strategy' if the respective parameter has actually
    been supplied
  • src/rsb/replay/bounds-mixin.lisp (bounds-mixin::start-index): allow
    value nil
    (bounds-mixin): updated documentation string
    (shared-initialize :before bounds-mixin t): new method check
    consistency of supplied initargs
    (strategy-start-index bounds-mixin): substitute nil with 0, if
    necessary
    (replay :before replay-bag-connection bounds-mixin): new method;
    check consistency of indices
    (print-object bounds-mixin t): improved and fixed format
    (time-bounds-mixin): new class; mixin class for time-based bounds
    specification
    (replay :before replay-bag-connection time-bounds-mixin): new
    method; translate timestamps into indices, if necessary
    (check-ordered-indices): new function; utility function for checking
    ordered indices
    (check-ordered-timestamps): similar for timestamps
  • src/rsb/replay/sequential-mixin.lisp (sequential-mixin): changed
    superclass `bounds-mixin' -> `time-bounds-mixin'
  • src/rsb/replay/package.lisp (package rsbag.rsb.replay): added
    exported symbols strategy-start-time, strategy-end-time and
    time-bounds-mixin

Revision 833c63b7
Added by J. Moringen about 12 years ago

Support {start,end}-time in bag-play/main.lisp
refs #932
  • bag-play/main.lisp (update-synopsis): updated and extended
    descriptions of {start,end}-{time,index} commandline options
    (process-bounds-options): new function; process and check {start,end}-{time,index} commandline options
    (main): use `process-bounds-options'

Revision 80293124
Added by J. Moringen about 12 years ago

Selector parameter in src/rsb/replay/view-creation-mixin.lisp
refs #932
  • src/rsb/replay/view-creation-mixin.lisp
    (make-view replay-bag-connection view-creation-mixin): added
    selector keyword parameter

Revision 491839fd
Added by J. Moringen about 12 years ago

Fixed initargs in src/rsb/replay/bounds-mixin.lisp
refs #932
  • src/rsb/replay/bounds-mixin.lisp (time-bounds-mixin::start-time):
    fixed initarg
    (time-bounds-mixin::end-time): likewise

Revision 1cde3a14
Added by J. Moringen about 12 years ago

Improved error reports in src/rsb/replay/bounds-mixin.lisp
refs #932
  • src/rsb/replay/bounds-mixin.lisp (check-ordered-indices): improved
    error reports
    (check-ordered-timestamps): likewise

Revision ffaa689f
Added by J. Moringen about 12 years ago

Improved timestamp parsing in bag-cat/main.lisp
refs #932
  • bag-cat/main.lisp (main): limit modification of readtable for
    local-time to option parsing phase

Revision b675917b
Added by J. Moringen about 12 years ago

Fixed make-replay-strategy-help-string in bag-play/help.lisp
refs #932
  • bag-play/help.lisp (make-replay-strategy-help-string): added
    :start-time and :end-time to initarg-blacklist

Revision 20f10877
Added by J. Moringen about 12 years ago

Added module for common functions in common/
refs #932
  • common/options.lisp: new file; commandline option utilities
  • common/help.lisp: new file; help text generation
  • common/package.lisp: new file; package definition for common
    module
  • cl-rsbag-common.asd: new file; system definition for system
    cl-rsbag-common

Revision a7802bae
Added by J. Moringen about 12 years ago

Use rsbag.common utilities in bag-{play,cat}/main.lisp
refs #932
  • bag-play/help.lisp (make-replay-strategy-help-string): removed;
    provided by rsbag.common
  • bag-play/main.lisp (update-synopsis): removed replay-related
    options; use `make-replay-options' provided by rsbag.common
    (process-bounds-options): removed; provided by rsbag.common
    (main): use `process-bounds-options' from rsbag.common; removed
    commandline option checks
  • bag-play/package.lisp (header): updated copyright
    (package rsbag.tools.play): added used package rsbag.common
  • cl-rsbag-tools-play.asd (system cl-rsbag-tools-play): added system
    dependency on cl-rsbag-common
  • bag-cat/main.lisp (update-synopsis): removed replay-related options;
    use `make-replay-options' provided by rsbag.common
    (main): use `process-bounds-options' from rsbag.common; removed
    commandline option checks
  • bag-cat/package.lisp (header): updated copyright
    (package rsbag.tools.cat): added used package rsbag.common
  • cl-rsbag-tools-cat.asd (system cl-rsbag-tools-cat): added system
    dependency on cl-rsbag-common

Revision e80eb1f3
Added by J. Moringen about 12 years ago

Fixed bag->events in src/rsb/{protocol,construction}.lisp
refs #932
  • src/rsb/protocol.lisp (bag->events): added keyword parameters
    start-time and end-time; extended documentation string accordingly
  • src/rsb/construction.lisp (bag->events bag uri): removed unused
    keyword parameter {start,end}-{time,index}

Revision 433cc133
Added by J. Moringen about 12 years ago

Support function sinks in bag->events in src/rsb/construction.lisp
refs #932, #933
  • src/rsb/construction.lisp (define-open-bag-method): generated
    methods accept transform keyword parameter which gets passed to
    `open-bag'
    (bag->events bag t): changed specializer uri > t
    (bag
    >events t string): changed specializer bag > t
    (bag
    >events channel uri): changed channel connection class
    `channel-connection' > `participant-channel-connection'
    (bag
    >events channel function): new method; use a function as the
    sink of a bag connection and its channel connections
  • src/rsb/channel-connection.lisp (close channel-connection): fixed
    keyword parameters; do nothing
    (participant-channel-connection): new class; specialized channel
    connection for cases in which the sink is a RSB participant
    (close participant-channel-connection): new method; detach the
    participant
  • src/rsb/package.lisp (header): updated copyright
    (package rsbag.rsb): added exported symbol
    participant-channel-connection
  • src/rsb/replay/sequential-mixin.lisp
    (process-event replay-bag-connection sequential-mixin t t t function):
    new method; use a function as sink

Revision b7af1d7e
Added by J. Moringen about 12 years ago

Customizable defaults in make-replay-options common/options.lisp
refs #932, #933
  • common/options.lisp (make-replay-options): added keyword parameter
    replay-strategy-default; use as default value of replay-strategy
    option

Revision b12dae52
Added by J. Moringen about 12 years ago

Use bag->events in bag-cat/main.lisp
refs #932, fixes #933
  • bag-cat/main.lisp (update-synopsis): set default value of replay
    strategy to as-fast-as-possible
    (main): instead of manually setting up a serialized view of the
    requested channels, use `bag->events' to create replay bag
    connection; support for {start,end}-{time,index} comes for free
  • bag-cat/package.lisp (package rsbag.tools.cat): added used package
    rsbag.rsb

Revision 47f97dbb
Added by J. Moringen about 12 years ago

Support real start/end times in src/rsb/replay/bounds-mixin.lisp
refs #932
  • src/rsb/replay/types.lisp: new file; contains type
    `range-boundary/timestamp'
  • src/rsb/replay/bounds-mixin.lisp (time-bounds-mixin::start-time):
    changed type to range-boundary/timestamp
    (time-bounds-mixin::end-time): likewise
    (replay :before replay-bag-connection time-bounds-mixin): handle
    real start/end times
  • src/rsb/replay/package.lisp (package rsbag.rsb.replay): added
    exported symbol range-boundary/timestamp
  • cl-rsbag.asd (system cl-rsbag): added file src/rsb/replay/types.lisp

Revision d2b1b248
Added by J. Moringen about 12 years ago

Fixed start/end time handling in src/rsb/replay/bounds-mixin.lisp
refs #932
  • src/rsb/replay/bounds-mixin.lisp
    (replay :before replay-bag-connection time-bounds-mixin): do not
    fail if the bag does not have start and end times; warn instead

Revision 8994a5ce
Added by J. Moringen about 12 years ago

Accept real values in for {start,end}-time in common/options.lisp
fixes #932
  • common/options.lisp (make-replay-options): changed type of
    start-time and end-time options to range-boundary/timestamp
  • common/package.lisp (package rsbag.common): added used package
    rsbag.rsb.replay
  • CMakeLists.txt: simplified test definitions; test {start,end}-{time,index} for bag-{cat,play}

Revision 961585b8
Added by J. Moringen about 12 years ago

Improved explanations of {start,end}-{time,index} in manual/common.rst
refs #932
  • manual/common.rst: improved explanations of {start,end}-{time,index}

Revision ab98f0aa
Added by J. Moringen about 12 years ago

merged proper support for {start,end}-{time,index} in bag-{cat,play} from trunk (r387, r386, r385, r384, r383, r382, r381, r378, r369, r368, r367, r366, r365, r364, r363, r362, r361, r360, r358) refs #932, #933

Revision cdffa1c8
Added by J. Moringen about 12 years ago

merged proper support for {start,end}-{time,index} in bag-{cat,play} from trunk (r387, r386, r385, r384, r383, r382, r381, r378, r369, r368, r367, r366, r365, r364, r363, r362, r361, r360, r358) refs #932, #933

Revision 7a558e0f
Added by J. Moringen about 12 years ago

merged proper support for {start,end}-{time,index} in bag-{cat,play} from trunk (r387, r386, r385, r384, r383, r382, r381, r378, r369, r368, r367, r366, r365, r364, r363, r362, r361, r360, r358) refs #932, #933

History

#1 Updated by J. Moringen about 12 years ago

  • Description updated (diff)

#2 Updated by J. Wienke about 12 years ago

i would like to have this for 0.6 as well

#3 Updated by J. Moringen about 12 years ago

  • % Done changed from 20 to 60

Works in the trunk version of bag-play. bag-cat and backport for 0.6 pending.

#4 Updated by J. Moringen about 12 years ago

  • % Done changed from 60 to 80

#5 Updated by J. Moringen about 12 years ago

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

Applied in changeset r386.

Also available in: Atom PDF