lcm-gen(1)

πŸ“¦
version 1.5.0 Β· 2 versions
  • 1.5.0 Β· debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.5.2 Β· nixpkgs unstable
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ lcm-gen(1) ✨

okay bestie, grab a snack because we're about to talk about lcm-gen from the Lightweight Communications and Marshalling (LCM) project πŸ’– she's the code generation tool and she is, honestly, so iconic.


🌸 NAME 🌸

lcm-gen β€” the code generation tool. that's it, that's her whole job, and she does it flawlessly πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

lcm-gen [options] FILE...

πŸŽ€ DESCRIPTION πŸŽ€

so lcm-gen is the Lightweight Communications and Marshalling code generation utility. you hand her one or more .lcm files (those are the ones holding your LCM message type definitions, iykyk), and she generates language-specific bindings for marshalling and unmarshalling messages of the types you specified. no cap. she just does that. πŸ‘‘

and rn she can generate language bindings for C, C++, Java, Python, Lua, and C#. six languages, one girl, main character energy fr fr ✨


🌈 GENERAL OPTIONS 🌈

the universal ones, the ones that work no matter what language you're living in 🫢

  • -h β€” prints some help text and dips out. cute, informative, quick.
  • -t, --tokenize β€” shows the tokenization. like, the behind-the-scenes of how she's reading your file πŸ‘€
  • -d, --debug β€” shows the parsed files. for when you wanna peek at what she actually understood.
  • --lazy β€” generates the output file only if the .lcm file is newer than the output file (or if the output file doesn't already exist yet). so unserious of her, but honestly? valid. why do work you don't need to do πŸ’…
  • --package-prefix PFX β€” adds the package name PFX as a prefix to the declared package. a little name tag, a little accessory ✨
  • --version β€” shows version information and exits. quick lil flex.

πŸ’œ C OPTIONS πŸ’œ

the C crew, we love them, we respect them πŸŽ€

  • -c, --c β€” emit C code. yes ma'am.
  • --c-cpath DIR β€” destination directory for the generated .c files. (default: current directory)
  • --c-hpath DIR β€” destination directory for the generated .h files. (default: current directory)
  • --cinclude DIR β€” the generated #include lines reference this directory.
  • --c-no-pubsub DIR β€” do not generate _publish and _subscribe functions. this gives you .c and .h files with no linking dependencies that you can use for just marshalling, totally separate from liblcm. but heads up bestie: they still #include <lcm/lcm_coretypes.h>, so you'll need to copy that file over to the appropriate include path yourself πŸ™ˆ
  • --c-typeinfo β€” generates typeinfo functions for each type. it's experimental, so like, she's trying something new, be nice πŸ’…

⭐ C++ OPTIONS ⭐

  • -x, --cpp β€” emit C++ code.
  • --cpp-hpath DIR β€” destination directory for the generated .hpp files. (default: current directory)
  • --cpp-include DIR β€” the generated C++ #include lines reference this directory.
  • --cpp-std STD β€” the generated files comply with the specified C++ standard. supported values are: c++98, c++11. default is c++98. choose your era, bestie πŸ•°οΈ

β˜• JAVA OPTIONS β˜•

  • -j, --java β€” emit Java code.
  • --jpath DIR β€” destination base directory for the generated Java files. (default: current directory)
  • --jmkdir <true|false> β€” automatically create Java source directories. (default: true)
  • --jdecl STR β€” a string added to class declarations. (default: implements lcm.lcm.LCMEncodable)
  • --jdefaultpkg PKG β€” the default Java package if the LCM type has no package. (default: lcmtypes)

🐍 PYTHON OPTIONS 🐍

  • -p, --python β€” emit Python code.
  • --ppath DIR β€” destination base directory for the generated Python files. (default: current directory)

πŸŒ™ LUA OPTIONS πŸŒ™

  • -l, --lua β€” emit Lua code.
  • --lpath DIR β€” Lua destination directory.

πŸ’€ C#.NET OPTIONS πŸ’€

  • --csharp β€” emit C#.NET code
  • --csharp-path DIR β€” C#.NET destination directory
  • --csharp-mkdir <true|false> β€” make C#.NET source directories automatically. (default: true)
  • --csharp-strip-dirs <true|false> β€” do not generate folders for default and root namespace. (default: false)
  • --csharp-decl STR β€” a string added to class declarations. (default: " : LCM.LCM.LCMEncodable")
  • --csharp-root-nsp NSP β€” root C#.NET namespace (wrapper) added before the LCM package. (default: "")
  • --csharp-default-nsp NSP β€” default C#.NET namespace if the LCM type has no package. (default: LCMTypes)

lcm-gen is part of the Lightweight Communications and Marshalling (LCM) project. permission is granted to copy, distribute and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. see the file COPYING in the LCM distribution for more details regarding distribution πŸ“œ

LCM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. see the GNU Lesser General Public License for more details. you should have received a copy of the GNU Lesser General Public License along with LCM; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

🫢 AUTHOR 🫢

this manual page was written by Albert Huang. thank you for your service, legend πŸ’–


and that's the whole vibe, bestie πŸ¦‹ this is LCM, dated 2007-12-13, living her best life as lcm-gen(1). go generate something iconic βœ¨πŸ’…πŸŽ€