# Sending sequence of frames via CAN

**URL:** <https://forum.opencyphal.org/t/sending-sequence-of-frames-via-can/915>\
**Category:** Applications & Usage\
**Created:** [August 13, 2020, 2:05pm UTC](https://forum.opencyphal.org/t/sending-sequence-of-frames-via-can/915 "2020-08-13T14:05:32Z")\
**Posts on this page:** 1\
**Showing post:** 17

<div class="post-metadata">

**Author:** ![pavel.kirienko](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/pavel.kirienko/32/9_2.png) [@pavel.kirienko](https://forum.opencyphal.org/u/pavel.kirienko)\
**Post date:** [August 15, 2020, 3:34am UTC](https://forum.opencyphal.org/t/sending-sequence-of-frames-via-can/915/17 "2020-08-15T03:34:12Z")

</div>

> [@nacansino](#):
>
> Replying because I also want to know if there is a “recommended” way of consuming the canard RX frames other than switch.

Your preferred methods of data handling are entirely out of the scope of the library (and Specification). If you’re dealing with a large number of ports, declarative approaches based on a handler registry might be preferred, where you define a dictionary mapping port-ID to handler functions, and traverse it whenever you receive a new transfer. Up to you.

> [@nacansino](#):
>
> Which made me think that it must mean that all DSDL datatypes that will be used at an application-level must be labeled with port\_ids.

No.

A port-ID identifies a specific service within the system, like, say, airspeed measurement, or a radar sensor, or a motor drive. The service requires a data type definition to facilitate data transactions. A data type may be used with different service instances (e.g., multiple cameras) or even completely different services (e.g., the same type can be used to report an estimation and to command a setpoint). Excepting few edge cases, most of which are already addressed by the standard data type set (`uavcan.*`), data types defined by vendors/developers will not need a fixed port-ID at all. Instead, the mapping between subjects/services and their identifiers will be established according to the design of the system at a later stage. As I wrote earlier, it helps to reason about subject-IDs as topics, they are basically identical in their purpose.

There is a short explanation in [Choosing Message and Service IDs](https://forum.opencyphal.org/t/choosing-message-and-service-ids/889). If you are building a UAVCAN-powered system, you really need to read [the Guide](https://uavcan.org/guide/), where this question is explored in-depth.

---

_[View the full topic](https://forum.opencyphal.org/t/sending-sequence-of-frames-via-can/915)._
