Part 1
요약·해설
Platform networking, host server와 QEMU·native_sim 실행 가정을 명시합니다.
SNTP
Unix epoch
Status 0
Part 2
접을 수 있는 영어 원문 전체
영어 원문 전체 펼치기
0146FFEEA2A563EDFA20C25DB11D4CB9B9F33ED6C9C59615681A5BEEB3602840
.. zephyr:code-sample:: sntp-client
:name: SNTP client
:relevant-api: bsd_sockets sntp
Use SNTP to get the current time from the host.
Overview
********
This sample is a simple SNTP client showing how to retrieve the current
time in seconds since 1st January 1970.
This demo assumes that the platform of choice has networking support,
some adjustments to the configuration may be needed. It also assumes
SNTP server is running on the host.
Building and Running
********************
When the application runs, it issues an SNTP request to the host and waits
for a response. When the response is received, the current epoch time, in
seconds, as well as the status code of the response (0 on success), is
printed.
See the `net-tools`_ project for more details.
This sample can be built and executed on QEMU or native_sim board as
described in :ref:`networking_with_qemu`.
.. _`net-tools`: https://github.com/zephyrproject-rtos/net-tools
Part 3
한국어 전문 번역
개요
이 sample은 1970년 1월 1일부터 지난 초 단위로 현재 시간을 가져오는 방법을 보여 주는 간단한 SNTP client입니다.
Demo는 선택한 platform이 networking을 지원한다고 가정하며 configuration 조정이 필요할 수 있습니다. 또한 host에서 SNTP server가 실행 중이라고 가정합니다.
빌드 및 실행
Application을 실행하면 host에 SNTP request를 보내고 response를 기다립니다. Response를 받으면 현재 epoch time을 초 단위로 출력하고 response status code도 함께 출력합니다. 성공한 경우 status code는 0입니다.
자세한 내용은 net-tools project를 참고하십시오.
이 sample은 Networking with QEMU에서 설명하는 방식으로 QEMU 또는 native_sim board용으로 build하고 실행할 수 있습니다.
Source
출처
영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.