1lcm-gen(1) Lightweight Communications and Marshalling (LCM) lcm-gen(1)
2
3
4
6 lcm-gen - code generation tool.
7
9 lcm-gen [options] FILE...
10
11
13 lcm-gen is the Lightweight Communications and Marshalling code genera‐
14 tion utility. It takes as input one or more .lcm files containing LCM
15 message type definitions, and generates language-specific bindings for
16 marshalling and unmarshalling messages of the specified types.
17
18 Currently, lcm-gen is capable of generating language bindings for C,
19 C++, Java, Python, Lua, and C#.
20
21
23 -h Prints some help text and exits.
24
25 -t, --tokenize
26 Show tokenization.
27
28 -d, --debug
29 Show parsed files.
30
31 --lazy Generate output file only if .lcm is newer than output file (or
32 if output file does not already exist).
33
34 --package-prefix PFX
35 Add package name PFX as a prefix to the declared package.
36
37 --version
38 Shows version information and exits.
39
40
42 -c, --c
43 Emit C code.
44
45 --c-cpath DIR
46 Destination directory for generated .c files. (default: current
47 directory)
48
49 --c-hpath DIR
50 Destination directory for generated .h files. (default: current
51 directory)
52
53 --cinclude DIR
54 Generated #include lines reference this directory
55
56 --c-no-pubsub DIR
57 Do not generate _publish and _subscribe functions. This results
58 in .c and .h files that have no linking dependencies and can be
59 used for just marshalling, separately from liblcm. They still
60 #include <lcm/lcm_coretypes.h>, so you will need to copy that
61 file to the appropriate include path.
62
63 --c-typeinfo
64 Generate typeinfo functions for each type (experimental).
65
66
68 -x, --cpp
69 Emit C++ code.
70
71 --cpp-hpath DIR
72 Destination directory for generated .hpp files. (default: cur‐
73 rent directory)
74
75 --cpp-include DIR
76 Generated C++ #include lines reference this directory
77
78 --cpp-std STD
79 Generated files comply with the specified C++ standard. Sup‐
80 ported values are: c++98, c++11. Default is c++98.
81
82
84 -j, --java
85 Emit Java code.
86
87 --jpath DIR
88 Destination base directory for generated Java files. (default:
89 current directory)
90
91 --jmkdir <true|false>
92 Automatically create Java source directories (default: true)
93
94 --jdecl STR
95 String added to class declarations (default: implements
96 lcm.lcm.LCMEncodable)
97
98 --jdefaultpkg PKG
99 Default Java package if LCM type has no package (default: lcm‐
100 types)
101
102
104 -p, --python
105 Emit Python code.
106
107 --ppath DIR
108 Destination base directory for generated Python files. (default:
109 current directory)
110
111
113 -l, --lua
114 Emit Lua code.
115
116 --lpath DIR
117 Lua destination directory.
118
119
121 --csharp
122 Emit C#.NET code
123
124 --csharp-path DIR
125 C#.NET destination directory
126
127 --csharp-mkdir <true|false>
128 Make C#.NET source directories automatically (default: true)
129
130 --csharp-strip-dirs <true|false>
131 Do not generate folders for default and root namespace (default:
132 false)
133
134 --csharp-decl STR
135 String added to class declarations (default: " : LCM.LCM.LCMEn‐
136 codable")
137
138 --csharp-root-nsp NSP
139 Root C#.NET namespace (wrapper) added before LCM package
140 (default: "")
141
142 --csharp-default-nsp NSP
143 Default C#.NET namespace if LCM type has no package (default:
144 LCMTypes)
145
146
148 lcm-gen is part of the Lightweight Communications and Marshalling (LCM)
149 project. Permission is granted to copy, distribute and/or modify it
150 under the terms of the GNU Lesser General Public License as published
151 by the Free Software Foundation; either version 2.1 of the License, or
152 (at your option) any later version. See the file COPYING in the LCM
153 distribution for more details regarding distribution.
154
155 LCM is distributed in the hope that it will be useful, but WITHOUT ANY
156 WARRANTY; without even the implied warranty of MERCHANTABILITY or FIT‐
157 NESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
158 License for more details. You should have received a copy of the GNU
159 Lesser General Public License along with LCM; if not, write to the Free
160 Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
161 02110-1301 USA
162
163
165 This manual page was written by Albert Huang.
166
167
168
169LCM 2007-12-13 lcm-gen(1)