AUTOSAR SOME/IP container: Ruby parsing library

KS implementation details

License: CC0-1.0
Minimal Kaitai Struct required: 0.9

This page hosts a formal specification of AUTOSAR SOME/IP container using Kaitai Struct. This specification can be automatically translated into a variety of programming languages to get a parsing library.


Runtime library

All parsing code for Ruby generated by Kaitai Struct depends on the Ruby runtime library. You have to install it before you can parse data.

The Ruby runtime library can be installed from RubyGems:

gem install kaitai-struct


Parse a local file and get structure in memory:

data = SomeIpContainer.from_file("path/to/local/file.AUTOSAR SOME/IP container")

Or parse structure from a string of bytes:

bytes = "\x00\x01\x02..."
data =

After that, one can get various attributes from the structure by invoking getter methods like:

data.some_ip_packages # => get some ip packages

Ruby source code to parse AUTOSAR SOME/IP container


# This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild

require 'kaitai/struct/struct'

unless >='0.9')
  raise "Incompatible Kaitai Struct Ruby API: 0.9 or later is required, but you have #{Kaitai::Struct::VERSION}"

class SomeIpContainer < Kaitai::Struct::Struct
  def initialize(_io, _parent = nil, _root = self)
    super(_io, _parent, _root)

  def _read
    @some_ip_packages = []
    i = 0
    while not @_io.eof?
      @some_ip_packages <<
      i += 1
  attr_reader :some_ip_packages