AUTOSAR SOME/IP Service Discovery Entries: GraphViz block diagram (.dot) source

The entries are used to synchronize the state of services instances and the Publish/-Subscribe handling.

KS implementation details

License: CC0-1.0
Minimal Kaitai Struct required: 0.9

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

GraphViz block diagram source

some_ip_sd_entries.dot

digraph {
	rankdir=LR;
	node [shape=plaintext];
	subgraph cluster__some_ip_sd_entries {
		label="SomeIpSdEntries";
		graph[style=dotted];

		some_ip_sd_entries__seq [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
			<TR><TD BGCOLOR="#E0FFE0">pos</TD><TD BGCOLOR="#E0FFE0">size</TD><TD BGCOLOR="#E0FFE0">type</TD><TD BGCOLOR="#E0FFE0">id</TD></TR>
			<TR><TD PORT="entries_pos">0</TD><TD PORT="entries_size">...</TD><TD>SdEntry</TD><TD PORT="entries_type">entries</TD></TR>
			<TR><TD COLSPAN="4" PORT="entries__repeat">repeat to end of stream</TD></TR>
		</TABLE>>];
		subgraph cluster__sd_entry {
			label="SomeIpSdEntries::SdEntry";
			graph[style=dotted];

			sd_entry__seq [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
				<TR><TD BGCOLOR="#E0FFE0">pos</TD><TD BGCOLOR="#E0FFE0">size</TD><TD BGCOLOR="#E0FFE0">type</TD><TD BGCOLOR="#E0FFE0">id</TD></TR>
				<TR><TD PORT="header_pos">0</TD><TD PORT="header_size">12</TD><TD>SdEntryHeader</TD><TD PORT="header_type">header</TD></TR>
				<TR><TD PORT="content_pos">12</TD><TD PORT="content_size">...</TD><TD>switch (header.type)</TD><TD PORT="content_type">content</TD></TR>
			</TABLE>>];
sd_entry__seq_content_switch [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
	<TR><TD BGCOLOR="#F0F2E4">case</TD><TD BGCOLOR="#F0F2E4">type</TD></TR>
	<TR><TD>:entry_types_find</TD><TD PORT="case0">SdServiceEntry</TD></TR>
	<TR><TD>:entry_types_offer</TD><TD PORT="case1">SdServiceEntry</TD></TR>
	<TR><TD>:entry_types_subscribe</TD><TD PORT="case2">SdEventgroupEntry</TD></TR>
	<TR><TD>:entry_types_subscribe_ack</TD><TD PORT="case3">SdEventgroupEntry</TD></TR>
</TABLE>>];
			subgraph cluster__sd_entry_header {
				label="SomeIpSdEntries::SdEntry::SdEntryHeader";
				graph[style=dotted];

				sd_entry_header__seq [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
					<TR><TD BGCOLOR="#E0FFE0">pos</TD><TD BGCOLOR="#E0FFE0">size</TD><TD BGCOLOR="#E0FFE0">type</TD><TD BGCOLOR="#E0FFE0">id</TD></TR>
					<TR><TD PORT="type_pos">0</TD><TD PORT="type_size">1</TD><TD>u1→EntryTypes</TD><TD PORT="type_type">type</TD></TR>
					<TR><TD PORT="index_first_options_pos">1</TD><TD PORT="index_first_options_size">1</TD><TD>u1</TD><TD PORT="index_first_options_type">index_first_options</TD></TR>
					<TR><TD PORT="index_second_options_pos">2</TD><TD PORT="index_second_options_size">1</TD><TD>u1</TD><TD PORT="index_second_options_type">index_second_options</TD></TR>
					<TR><TD PORT="number_first_options_pos">3</TD><TD PORT="number_first_options_size">4b</TD><TD>b4</TD><TD PORT="number_first_options_type">number_first_options</TD></TR>
					<TR><TD PORT="number_second_options_pos">3:4</TD><TD PORT="number_second_options_size">4b</TD><TD>b4</TD><TD PORT="number_second_options_type">number_second_options</TD></TR>
					<TR><TD PORT="service_id_pos">4</TD><TD PORT="service_id_size">2</TD><TD>u2be</TD><TD PORT="service_id_type">service_id</TD></TR>
					<TR><TD PORT="instance_id_pos">6</TD><TD PORT="instance_id_size">2</TD><TD>u2be</TD><TD PORT="instance_id_type">instance_id</TD></TR>
					<TR><TD PORT="major_version_pos">8</TD><TD PORT="major_version_size">1</TD><TD>u1</TD><TD PORT="major_version_type">major_version</TD></TR>
					<TR><TD PORT="ttl_pos">9</TD><TD PORT="ttl_size">3</TD><TD>b24</TD><TD PORT="ttl_type">ttl</TD></TR>
				</TABLE>>];
			}
			subgraph cluster__sd_service_entry {
				label="SomeIpSdEntries::SdEntry::SdServiceEntry";
				graph[style=dotted];

				sd_service_entry__seq [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
					<TR><TD BGCOLOR="#E0FFE0">pos</TD><TD BGCOLOR="#E0FFE0">size</TD><TD BGCOLOR="#E0FFE0">type</TD><TD BGCOLOR="#E0FFE0">id</TD></TR>
					<TR><TD PORT="minor_version_pos">0</TD><TD PORT="minor_version_size">4</TD><TD>u4be</TD><TD PORT="minor_version_type">minor_version</TD></TR>
				</TABLE>>];
			}
			subgraph cluster__sd_eventgroup_entry {
				label="SomeIpSdEntries::SdEntry::SdEventgroupEntry";
				graph[style=dotted];

				sd_eventgroup_entry__seq [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
					<TR><TD BGCOLOR="#E0FFE0">pos</TD><TD BGCOLOR="#E0FFE0">size</TD><TD BGCOLOR="#E0FFE0">type</TD><TD BGCOLOR="#E0FFE0">id</TD></TR>
					<TR><TD PORT="reserved_pos">0</TD><TD PORT="reserved_size">1</TD><TD>u1</TD><TD PORT="reserved_type">reserved</TD></TR>
					<TR><TD PORT="initial_data_requested_pos">1</TD><TD PORT="initial_data_requested_size">1b</TD><TD>BitsType1(BigBitEndian)</TD><TD PORT="initial_data_requested_type">initial_data_requested</TD></TR>
					<TR><TD PORT="reserved2_pos">1:1</TD><TD PORT="reserved2_size">3b</TD><TD>b3</TD><TD PORT="reserved2_type">reserved2</TD></TR>
					<TR><TD PORT="counter_pos">1:4</TD><TD PORT="counter_size">4b</TD><TD>b4</TD><TD PORT="counter_type">counter</TD></TR>
					<TR><TD PORT="event_group_id_pos">2</TD><TD PORT="event_group_id_size">2</TD><TD>u2be</TD><TD PORT="event_group_id_type">event_group_id</TD></TR>
				</TABLE>>];
			}
		}
	}
	some_ip_sd_entries__seq:entries_type -> sd_entry__seq [style=bold];
	sd_entry__seq:header_type -> sd_entry_header__seq [style=bold];
	sd_entry__seq:content_type -> sd_entry__seq_content_switch [style=bold];
	sd_entry__seq_content_switch:case0 -> sd_service_entry__seq [style=bold];
	sd_entry__seq_content_switch:case1 -> sd_service_entry__seq [style=bold];
	sd_entry__seq_content_switch:case2 -> sd_eventgroup_entry__seq [style=bold];
	sd_entry__seq_content_switch:case3 -> sd_eventgroup_entry__seq [style=bold];
	sd_entry_header__seq:type_type -> sd_entry__seq:content_type [color="#404040"];
}