Types » History » Version 6

Version 4 (J. Moringen, 03/18/2011 02:36 PM) → Version 6/13 (S. Wrede, 05/19/2011 03:51 PM)

h1. Types

h2. Wire Schema <-> Programming Language Types Mapping

This section documents the mapping between wire schemas, designators of which are included in RSB's notifications, and corresponding programming language types. The values that are actually contained in notifications are called "String Designators" of wire schemas here.

h3. Fundamental Types

For "fundamental" types, the mapping is based on "the type mapping used by Google's protocol buffers":http://code.google.com/apis/protocolbuffers/docs/proto.html#scalar.

|_.Wire Schema |_.String Designator |_.C++ |_.Python |_.Java |_.Common Lisp |
| Double precision float | "double" | double | | double | double-float |
| Single precision float | "float" | float | float | float | single-float |
| 32 bit signed integer | "int32" | int32 | | int | (signed-byte 32) |
| 64 bit signed integer | "int64" | int64 | | long | (signed-byte 64) |
| 32 bit unsigned integer | "uint32" | uint32 | | int | (unsigned-byte 32) |
| 64 bit unsigned integer | "uint64" | uint64 | | long | (unsigned-byte 64) |
| bool | "bool" | bool | bool | boolean | boolean |
| UTF-8 string | "string" | string | str | String | string |
| Sequence of Bytes | "bytes" | string | | ByteString | (simple-array (unsigned-byte 8) (*)) |

h3. Structured Data

* GBP for notification serialization (not exposed to user)
* A single serialization mechanism
_This section is applied for every transport in just a single system proposal._

For structured data types using more sophisticated serialization mechanisms, the resulting wire schemas could be designated by something like @MECHANISM:MECHANISM-SPECIFIC-DESIGNATOR@. For example

* No composite support at this level &lt;pre&gt;
* TODO Extend converter selection with wildcard mechnism to ease introspection and implementation of generic converters protocol-buffer:.rst.ImageMessage
boost_serialization:sound::pcm::Buffer
&lt;/pre&gt;