
MessagePack February 13, 2018 | Quick Intro Giovanni Vergine This work is licensed under a Creative Commons Attribution-Share Alike 4.0 (CC BY-SA 4.0) GENIVI is a registered trademark of the GENIVI Alliance in the USA and other countries. Copyright © GENIVI Alliance 2018. MessagePack • binary serialization format • supported by over 50 programming languages and environments • No schema/generators • https://msgpack.org/ Json/MsgPack comparison “It's like JSON. but fast and small.” MsgPack JSON -- https://msgpack.org/ Integer Number Nil null Boolean true/false Float Number Array Array Map (any key) Object (str key) String String Byte Array Base64 String 3 | February 13, 2018 | Copyright © GENIVI Alliance 2018 MsgPack C++ types https://github.com/msgpack/msgpack-c/wiki/v2_0_cpp_object 4 | February 13, 2018 | Copyright © GENIVI Alliance 2018 MsgPack “extensions” • An extension is 1 Integer + 1 Byte Array • The Integer represent the kind of types [0-127] • This is for custom types/format • [-128,-1] is reserved for predefined types. • The only one for now is “Timestamp” (-1) Ex. Timestamp: 0xd7 -1 0x00 0x00 0xc6 … fixext-8 Ex. 4-bytes bytearray of custom type 42 with max size 2^16-1 0xc8 0x00 0x04 42 0x01 0x02 0x03 0x04 ext-16 5 | February 13, 2018 | Copyright © GENIVI Alliance 2018 MsgPack • Widely supported by community • C/C++ versions supported by the author himself • Not “really” famous • Easier to use when you have your IDL (e.g. Franca) instead of intermediate step (e.g. generate .proto from .fidl and then call protoc) 6 | February 13, 2018 | Copyright © GENIVI Alliance 2018 Thank you! Links: Spec: https://github.com/msgpack/msgpack/blob/master/spec.md Wiki: https://github.com/msgpack/msgpack-c/wiki Visit GENIVI at http://www.genivi.org or http://projects.genivi.org Contact us: [email protected] This work is licensed under a Creative Commons Attribution-Share Alike 4.0 (CC BY-SA 4.0) GENIVI is a registered trademark of the GENIVI Alliance in the USA and other countries. Copyright © GENIVI Alliance 2017..
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages7 Page
-
File Size-