$search
| def genmsg_java::base_type_deserialization_code | ( | type | ) |
Definition at line 137 of file genmsg_java.py.
| def genmsg_java::base_type_serialization_code | ( | type | ) |
Definition at line 134 of file genmsg_java.py.
| def genmsg_java::base_type_to_java | ( | base_type | ) |
Definition at line 115 of file genmsg_java.py.
| def genmsg_java::builtin_type_size | ( | type | ) |
Definition at line 112 of file genmsg_java.py.
| def genmsg_java::compute_full_text_escaped | ( | gen_deps_dict | ) |
Same as roslib.gentools.compute_full_text, except that the resulting text is escaped to be safe for C++ double quotes @param get_deps_dict: dictionary returned by get_dependencies call @type get_deps_dict: dict @return: concatenated text for msg/srv file and embedded msg/srv types. Text will be escaped for double quotes @rtype: str
Definition at line 560 of file genmsg_java.py.
| def genmsg_java::escape_string | ( | str | ) |
Definition at line 295 of file genmsg_java.py.
| def genmsg_java::generate | ( | msg_path, | ||
output_base_path = None | ||||
| ) |
Generate a message @param msg_path: The path to the .msg file @type msg_path: str
Definition at line 592 of file genmsg_java.py.
| def genmsg_java::generate_messages | ( | argv | ) |
Definition at line 628 of file genmsg_java.py.
| def genmsg_java::msg_decl_to_java | ( | field, | ||
default_val = None | ||||
| ) |
Converts a message type (e.g. uint32, std_msgs/String, etc.) to the Java declaration for that type. @param type: The message type @type type: str @return: The Java declaration @rtype: str
Definition at line 154 of file genmsg_java.py.
| def genmsg_java::ros_version | ( | ) |
Definition at line 582 of file genmsg_java.py.
| def genmsg_java::type_initializer | ( | type, | ||
default_val = None | ||||
| ) |
Definition at line 140 of file genmsg_java.py.
| def genmsg_java::write_begin | ( | s, | ||
| spec, | ||||
| file | ||||
| ) |
Writes the beginning of the header file: a comment saying it's auto-generated and the include guards @param s: The stream to write to @type s: stream @param spec: The spec @type spec: roslib.msgs.MsgSpec @param file: The file this message is being generated for @type file: str
Definition at line 182 of file genmsg_java.py.
| def genmsg_java::write_class | ( | s, | ||
| spec, | ||||
extra_metadata_methods = {}, |
||||
static = False | ||||
| ) |
Writes the entire message struct: declaration, constructors, members, constants and member functions @param s: The stream to write to @type s: stream @param spec: The message spec @type spec: roslib.msgs.MsgSpec
Definition at line 220 of file genmsg_java.py.
| def genmsg_java::write_clone_methods | ( | s, | ||
| spec | ||||
| ) |
Definition at line 327 of file genmsg_java.py.
| def genmsg_java::write_compare_methods | ( | s, | ||
| spec | ||||
| ) |
Definition at line 545 of file genmsg_java.py.
| def genmsg_java::write_constant_declaration | ( | s, | ||
| constant | ||||
| ) |
Write a constant value as a static member @param s: The stream to write to @type s: stream @param constant: The constant @type constant: roslib.msgs.Constant
Definition at line 300 of file genmsg_java.py.
| def genmsg_java::write_constant_declarations | ( | s, | ||
| spec | ||||
| ) |
Write all the constants from a spec as static members @param s: The stream to write to @type s: stream @param spec: The message spec @type spec: roslib.msgs.MsgSpec
Definition at line 314 of file genmsg_java.py.
| def genmsg_java::write_constructor | ( | s, | ||
| spec | ||||
| ) |
Definition at line 252 of file genmsg_java.py.
| def genmsg_java::write_deserialization_method | ( | s, | ||
| spec | ||||
| ) |
Definition at line 426 of file genmsg_java.py.
| def genmsg_java::write_end | ( | s, | ||
| spec | ||||
| ) |
Writes the end of the header file: the ending of the include guards @param s: The stream to write to @type s: stream @param spec: The spec @type spec: roslib.msgs.MsgSpec
Definition at line 197 of file genmsg_java.py.
| def genmsg_java::write_equals_method | ( | s, | ||
| spec | ||||
| ) |
Definition at line 502 of file genmsg_java.py.
| def genmsg_java::write_hash_code_method | ( | s, | ||
| spec | ||||
| ) |
Definition at line 525 of file genmsg_java.py.
| def genmsg_java::write_imports | ( | s, | ||
| spec | ||||
| ) |
Writes the message-specific imports @param s: The stream to write to @type s: stream @param spec: The message spec to iterate over @type spec: roslib.msgs.MsgSpec
Definition at line 208 of file genmsg_java.py.
| def genmsg_java::write_member | ( | s, | ||
| field | ||||
| ) |
Writes a single member's declaration and type typedef @param s: The stream to write to @type s: stream @param type: The member type @type type: str @param name: The name of the member @type name: str
Definition at line 270 of file genmsg_java.py.
| def genmsg_java::write_member_functions | ( | s, | ||
| spec, | ||||
| msg_metadata_methods | ||||
| ) |
The the default member functions
Definition at line 549 of file genmsg_java.py.
| def genmsg_java::write_members | ( | s, | ||
| spec | ||||
| ) |
Write all the member declarations @param s: The stream to write to @type s: stream @param spec: The message spec @type spec: roslib.msgs.MsgSpec
Definition at line 284 of file genmsg_java.py.
| def genmsg_java::write_msg_metadata_method | ( | s, | ||
| name, | ||||
| return_value | ||||
| ) |
Definition at line 497 of file genmsg_java.py.
| def genmsg_java::write_serialization_length | ( | s, | ||
| spec | ||||
| ) |
Definition at line 341 of file genmsg_java.py.
| def genmsg_java::write_serialization_method | ( | s, | ||
| spec | ||||
| ) |
Definition at line 384 of file genmsg_java.py.
| def genmsg_java::write_serialization_methods | ( | s, | ||
| spec | ||||
| ) |
Definition at line 491 of file genmsg_java.py.
| dictionary genmsg_java::BUILTIN_TYPE_SIZES |
{'bool': 1, 'int8': 1, 'byte': 1, 'int16': 2, 'int32': 4, 'int64': 8,
'char': 1, 'uint8': 1, 'uint16': 2, 'uint32': 4, 'uint64': 8,
'float32': 4, 'float64': 8, 'time': 8, 'duration': 8}
Definition at line 96 of file genmsg_java.py.
| dictionary genmsg_java::JAVA_HASH_CODES |
{
'char': '%(value)s',
'byte': '%(value)s',
'short': '%(value)s',
'int': '%(value)s',
'long': '(int)(%(value)s ^ (%(value)s >>> 32))',
'boolean': '(%(value)s ? 1231 : 1237)', # stolen from eclipse autogenerated code
'float': 'Float.floatToIntBits(%(value)s)',
'double': '(int)((tmp = Double.doubleToLongBits(%(value)s)) ^ (tmp >>> 32))'}
Definition at line 102 of file genmsg_java.py.
| list genmsg_java::JAVA_PRIMITIVE_TYPES = ['char', 'byte', 'short', 'int', 'long', 'boolean', 'float', 'double'] |
Definition at line 100 of file genmsg_java.py.
{
'bool': '%s.get() != 0 ? true : false',
'char': '(char)(%s.get() & 0xff)',
'byte': '(short)(%s.get() & 0xff)',
'uint8': '(short)(%s.get() & 0xff)',
'int8': '%s.get()',
'uint16': '(int)(%s.getShort() & 0xffff)',
'int16': '%s.getShort()',
'uint32': '(long)(%s.getInt() & 0xffffffff)',
'int32': '%s.getInt()',
'uint64': '%s.getLong()',
'int64': '%s.getLong()',
'float32': '%s.getFloat()',
'float64': '%s.getDouble()',
'string': 'Serialization.readString(%s)',
'time': 'Serialization.readTime(%s)',
'duration': 'Serialization.readDuration(%s)'}
Definition at line 78 of file genmsg_java.py.
| dictionary genmsg_java::MSG_TYPE_TO_JAVA |
{'bool': 'boolean',
'char': 'char',
'byte': 'short',
'uint8': 'short', 'int8': 'byte',
'uint16': 'int', 'int16': 'short',
'uint32': 'long', 'int32': 'int',
'uint64': 'long', 'int64': 'long',
'float32': 'float',
'float64': 'double',
'string': 'java.lang.String',
'time': 'ros.communication.Time',
'duration': 'ros.communication.Duration'}
Definition at line 47 of file genmsg_java.py.
| dictionary genmsg_java::MSG_TYPE_TO_SERIALIZATION_CODE |
{
'bool': '%(buffer)s.put((byte)(%(name)s ? 1 : 0))',
'char': '%(buffer)s.put((byte)%(name)s)',
'byte': '%(buffer)s.put((byte)%(name)s)',
'uint8': '%(buffer)s.put((byte)%(name)s)',
'int8': '%(buffer)s.put(%(name)s)',
'uint16': '%(buffer)s.putShort((short)%(name)s)',
'int16': '%(buffer)s.putShort(%(name)s)',
'uint32': '%(buffer)s.putInt((int)%(name)s)',
'int32': '%(buffer)s.putInt(%(name)s)',
'uint64': '%(buffer)s.putLong(%(name)s)',
'int64': '%(buffer)s.putLong(%(name)s)',
'float32': '%(buffer)s.putFloat(%(name)s)',
'float64': '%(buffer)s.putDouble(%(name)s)',
'string': 'Serialization.writeString(%(buffer)s, %(name)s)',
'time': 'Serialization.writeTime(%(buffer)s, %(name)s)',
'duration': 'Serialization.writeDuration(%(buffer)s, %(name)s)'}
Definition at line 60 of file genmsg_java.py.