# Core messages with semantic\_id

**URL:** <https://forum.opencyphal.org/t/core-messages-with-semantic-id/1367>\
**Category:** General\
**Created:** [July 22, 2021, 12:32am UTC](https://forum.opencyphal.org/t/core-messages-with-semantic-id/1367 "2021-07-22T00:32:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tridge](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/tridge/32/119_2.png) [@tridge](https://forum.opencyphal.org/u/tridge)\
**Post date:** [July 22, 2021, 12:32am UTC](https://forum.opencyphal.org/t/core-messages-with-semantic-id/1367/1 "2021-07-22T00:32:55Z")

</div>

Following on from my semantic\_id proposal, here are some illustrative messages.

> [@Port type safety enforcement](https://forum.opencyphal.org/t/port-type-safety-enforcement/1303/39):
>
> Here is another idea. We have several reserved bits in the current v1 beta spec that are reserved. Here is the current packet format: Bit 23 is marked as discard if bit isn’t 1. We could change that to be that when bit 23 is 0 the subject ID is used as a semantic ID. Then we’d have DSDL like this: # GNSS message @semantic\_id 17 uint3 instance uint3 status uint32 time\_week\_ms uint16 time\_week int36 latitude int36 longitude float32 altitude float32 yaw uint16 hdop uint16 vdop uint8 …

GNSS

```auto
@semantic_id 1

uint3 instance
uint3 status
uint32 time_week_ms
uint16 time_week
int36 latitude # in 1e-8 degrees
int36 longitude # in 1e-8 degrees
float32 altitude
float32 yaw
uint16 hdop
uint16 vdop
uint8 num_sats
float32 velocity[3]
float16 speed_accuracy
float16 horizontal_accuracy
float16 vertical_accuracy
float16 yaw_accuracy

```

Magnetometer message

```auto
@semantic_id 2
uint3 instance
int16 field_mgauss[3] # in milliGauss

```

Barometer message

```auto
@semantic_id 3
uint3 instance
float32 pressure # Pa
int16 temperature_cdeg # centidegrees C

```

Differential pressure

```auto
@semantic_id 4
uint3 instance
float32 diff_pressure # Pa
int16 temperature_cdeg # centidegrees C

```

---

<div class="post-metadata">

**Author:** ![scottdixon](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/scottdixon/32/39_2.png) [@scottdixon](https://forum.opencyphal.org/u/scottdixon)\
**Post date:** [July 22, 2021, 3:50am UTC](https://forum.opencyphal.org/t/core-messages-with-semantic-id/1367/2 "2021-07-22T03:50:21Z")

</div>

Heh, posts passed in the night. I just replied to your other post on this:

> [@Port type safety enforcement](https://forum.opencyphal.org/t/port-type-safety-enforcement/1303/40):
>
> Noooooooo! Not our precious reserved bit!?! @kjetilkjeka, Andrew wants our reserved bit! Do you have any idea how hard we fought @pavel.kirienko to get that bit? grinning Seriously though, I think the idea of just having a smattering of fixed port identifiers as part of a super-simple profile is the best way forward and I really don’t want to touch the UAVCAN V1 core specification to make this work (while I don’t expect to use UDRAL I also don’t want it to conflict with other profiles I will …

---

<div class="post-metadata">

**Author:** ![scottdixon](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/scottdixon/32/39_2.png) [@scottdixon](https://forum.opencyphal.org/u/scottdixon)\
**Post date:** [July 22, 2021, 3:57am UTC](https://forum.opencyphal.org/t/core-messages-with-semantic-id/1367/3 "2021-07-22T03:57:55Z")

</div>

So, joining our two proposals would not require the reserved bit (just carve off a small semantic address space in UAVCAN) and add alternates:

```auto
@semantic_id 4
@alternate_semantic_id_0 5
@alternate_semantic_id_1 6

```

Now if a bad actor steps on a given port identifier the system integrator can manually (and grumpily) deconflict other sensors then go post negative reviews online about the part she purchased:

> **two stars, would not buy again**. Used the same UAVCAN port identifier as the GNSS message my Acme MegaStar receiver sends. I had spent two hours on the phone with their terrible tech support to get it to work!
