lcm-proj / lcm

Lightweight Communications and Marshalling
GNU Lesser General Public License v2.1
944 stars 385 forks source link

Lcm-spy: Add cli params for the window title #389

Closed judfs closed 1 year ago

judfs commented 1 year ago

I use LCM with multiple multicast addresses at the same time. It'd be useful for my team if there were option to have more detailed window titles than just "LCM Spy" when using multiple windows.

  -t, --title [LABEL]    Display LABEL in the window title
  --title-url            Display the LCM URL in the title

Example usages:

./lcm-java/lcm-spy --title 'Alice' --title-url
./lcm-java/lcm-spy -l 'udpm://239.255.76.67:8888' --title-url
./lcm-java/lcm-spy -t Bob

Added public static LCM.getDefaultURL.

I made and used WindowTitleOptions as I would in C. I find this clean enough, but if desired I can add java style boilerplate and maybe follow a builder pattern or something.

After feedback, I'd like to add these options [and maybe also --title-filename] to lcm-logplayer-gui.

kyonifer commented 1 year ago

Looks good, thanks.