samples/net/sockets/txtime/README.html · samples/net/sockets/txtime/README.rst 공식 원문 ↗

Zephyr 3.7.0 · Samples · Networking · Timed transmit

SO_TXTIME을 사용하는 UDP sender

Packet interval과 현재 시각 기준 TXTIME offset을 설정하고 UDP 또는 AF_PACKET으로 전송합니다.

Official pathsamples/net/sockets/txtime/README.html
Source filesamples/net/sockets/txtime/README.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

본문 기준: Zephyr 3.7.0 LTS3 · 이후 유지보수 패치는 별도입니다.

Part 1

요약·해설

지원 board, PTP clock, 세 Kconfig option과 peer 제한을 구분해 설명합니다.

Socket option

SO_TXTIME

Clock

PTP

Modes

UDP · AF_PACKET

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 526D62BE947D74AB24FBF3DEB94560F287655BDB5306134F7F78096F341F606F
.. zephyr:code-sample:: so_txtime
   :name: UDP sender using SO_TXTIME
   :relevant-api: bsd_sockets ethernet

   Control the transmission time of a packet using SO_TXTIME socket option.

Overview
********

This sample is a simple UDP sender/receiver which will set the
SO_TXTIME socket option and expects the Ethernet driver to send
the data when the TX time is expected. The application requires
that the board has PTP clock support. A simulated PTP clock is
provided for qemu_x86 board. Also frdm_k64f and sam_e70_xplained/same70q21 boards
are supported. Other mcux or gmac Ethernet driver based boards should
work too.
User can control how long the application should wait between packets sent by
setting :kconfig:option:`CONFIG_NET_SAMPLE_PACKET_INTERVAL` option.
Also the TXTIME value can be specified in the config file by setting the
:kconfig:option:`CONFIG_NET_SAMPLE_PACKET_TXTIME` option. In this case the value is
used as an offset from the current time.

Building and Running
********************

When the application is run, it starts to send UDP packets. You can start
``echo-server`` application from `net-tools`_ project to catch these and
send the data back to this application. Optionally you can set
:kconfig:option:`CONFIG_NET_SAMPLE_PACKET_SOCKET` option, which makes the application
to create an ``AF_PACKET`` type socket. In this case, the ``echo-server``
application cannot be used as a peer.

This sample can be built and executed on qemu_x86 board as
described in :ref:`networking_with_host`.

.. _`net-tools`: https://github.com/zephyrproject-rtos/net-tools

Part 3

한국어 전문 번역

개요

이 sample은 SO_TXTIME socket option을 설정하고 지정된 TX time에 Ethernet driver가 data를 전송하기를 기대하는 간단한 UDP sender/receiver입니다.

Application을 실행하려면 board가 PTP clock을 지원해야 합니다. qemu_x86 board에는 simulated PTP clock이 제공됩니다. frdm_k64f와 sam_e70_xplained/same70q21 board도 지원하며, 다른 MCUX 또는 GMAC Ethernet driver 기반 board도 동작할 수 있습니다.

사용자는 CONFIG_NET_SAMPLE_PACKET_INTERVAL option으로 전송 packet 사이에서 application이 기다릴 시간을 제어할 수 있습니다.

CONFIG_NET_SAMPLE_PACKET_TXTIME option을 설정하면 configuration file에서 TXTIME 값을 지정할 수도 있습니다. 이 값은 현재 시간을 기준으로 한 offset으로 사용됩니다.

빌드 및 실행

Application을 실행하면 UDP packet 전송을 시작합니다. net-tools project의 echo-server application을 시작하면 packet을 받고 data를 이 application으로 다시 보낼 수 있습니다.

선택적으로 CONFIG_NET_SAMPLE_PACKET_SOCKET option을 설정하면 application이 AF_PACKET type socket을 생성합니다. 이 경우에는 echo-server application을 peer로 사용할 수 없습니다.

이 sample은 Host system과 networking에서 설명하는 방식으로 qemu_x86 board용으로 build하고 실행할 수 있습니다.

Source

출처

영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.