genicam_c / pygenicam / genicam_web 개발에 사용한 표준·규격 문서 목록
=====================================

문서 버전: 1.0 (2026-11-21)
용도: 구현이 따르는 규격과 참고한 공식 문서의 출처(URL)를 한곳에 모은다. 회원 등록이 필요한 규격(GigE Vision 본문)은
공식 배포 페이지를 적었다. URL 은 작성일 기준이며 버전은 각 다운로드 페이지에서 확인한다.

1. 머신비전 규격 (프로토콜·기능 모델)
--------------------------------------
| 규격 | 발행처 | 사용처 (소스) | URL |
|------|--------|---------------|-----|
| GigE Vision (GVCP 제어 채널, GVSP 스트림 채널, 부트스트랩 레지스터, DISCOVERY/FORCEIP, PACKETRESEND, CCP 제어권, 하트비트) | A3 (구 AIA) | src/gvcp/*, src/gvsp/*, src/camera/*, python/src/* | https://www.automate.org/vision/vision-standards/vision-standards-gige-vision (규격 본문은 A3 회원/등록 후 내려받기) |
| GenICam 표준 소개·다운로드 (GenApi, SFNC, PFNC, GenTL 묶음) | EMVA | 아래 세 항목 공통 | https://www.emva.org/standards-technology/genicam/ , 다운로드: https://www.emva.org/standards-technology/genicam/genicam-downloads/ |
| GenICam GenApi (카메라 XML 기능 기술 스키마, 노드 종류 Integer/Float/Enumeration/Command/Boolean, IntReg 등 레지스터 매핑) | EMVA | src/genicam/* (cameleon-genapi 로 해석), 기능 읽기/쓰기, 웹 controls.rs | GenApi 규격·XML 스키마: 위 다운로드 페이지 "GenApi" 항목 |
| GenICam SFNC (Standard Features Naming Convention: TriggerMode, TriggerSource, TriggerSoftware, ExposureTime, Gain, ReverseX/ReverseY, PixelFormat, AcquisitionStart/Stop, GevSCPSPacketSize, GevSCPHostPort, GevCCP 등) | EMVA | 기능 이름 후보 목록 (web/src/controls.rs, src/camera/mod.rs, python/pygenicam) | 위 다운로드 페이지 "SFNC" 항목 |
| GenICam PFNC (Pixel Format Naming Convention: Mono8/10/12/16, BayerGR/RG/GB/BG 8/10/12, RGB8/BGR8, YUV422 의 32비트 코드와 비트 깊이) | EMVA | src/pixel.rs (코드 상수·이름·변환), web/src/encode.rs | 위 다운로드 페이지 "PFNC" 항목 |
| GenICam GenTL (시험용 시뮬레이터 "GenTL test pattern" 의 근거 규격; 본 구현은 GenTL 을 쓰지 않음) | EMVA | python/tests/test_web_live.py (시뮬레이터 식별만) | 위 다운로드 페이지 "GenTL" 항목 |

2. 네트워크 규격
----------------
| 규격 | 사용처 | URL |
|------|--------|-----|
| RFC 768 UDP (GVCP 3956 포트, GVSP 데이터그램) | src/gvcp, src/gvsp | https://www.rfc-editor.org/rfc/rfc768 |
| RFC 791 IPv4, RFC 919/922 브로드캐스트 (DISCOVERY 255.255.255.255, 서브넷 판정) | src/gvcp (broadcast_socket, device_for_ip), web/src/found.rs | https://www.rfc-editor.org/rfc/rfc791 , https://www.rfc-editor.org/rfc/rfc919 , https://www.rfc-editor.org/rfc/rfc922 |
| RFC 826 ARP (FORCEIP 후 새 IP 로의 도달성, 다른 대역 카메라 응답 경로) | 운용 이해(코드 없음) | https://www.rfc-editor.org/rfc/rfc826 |
| RFC 2131 DHCP (카메라 IP 설정 모드 비트, 호스트 랜포트 DHCP) | src/gvcp/ipcfg.rs, web/src/lan.rs | https://www.rfc-editor.org/rfc/rfc2131 |
| IEEE 802.3 이더넷 (MTU 1500, 패킷 크기 GevSCPSPacketSize 와의 관계; 점보 프레임은 비표준) | src/camera/stream.rs (--packet-size) | https://standards.ieee.org/ieee/802.3/ |
| RFC 9110 HTTP 의미론, RFC 9112 HTTP/1.1 (웹 API 상태코드 400/409/422/502) | web/src/api.rs | https://www.rfc-editor.org/rfc/rfc9110 , https://www.rfc-editor.org/rfc/rfc9112 |
| RFC 6455 WebSocket (프레임·상태 전송 /ws) | web/src/api.rs, web/static/index.html | https://www.rfc-editor.org/rfc/rfc6455 |
| RFC 8259 JSON (API 본문·상태) | web/src/api.rs, state.rs | https://www.rfc-editor.org/rfc/rfc8259 |

3. 영상 부호화·표시 규격
------------------------
| 규격 | 사용처 | URL |
|------|--------|-----|
| ITU-T T.81 (JPEG 기본 부호화, 4:2:0 색차 부표본) | web/src/encode.rs (libjpeg-turbo), web/src/hwjpeg.rs (MPP) | https://www.w3.org/Graphics/JPEG/itu-t81.pdf |
| JFIF 1.02 (JPEG 파일 구조, 브라우저 복호) | 위와 같음 | https://www.w3.org/Graphics/JPEG/jfif3.pdf |
| X Window System Protocol (X11R7.7: CreateWindow, PutImage, ImageText8, 비주얼/깊이) | web/src/display.rs | https://www.x.org/releases/current/doc/xproto/x11protocol.html |
| MIT-SHM 확장 (ShmAttach/ShmPutImage, 공유 메모리로 화소 전달) | web/src/display.rs | https://www.x.org/releases/current/doc/xextproto/shm.html |
| ICCCM (WM_PROTOCOLS / WM_DELETE_WINDOW, WM_NAME, WM_CLASS) | web/src/display.rs | https://www.x.org/releases/current/doc/xorg-docs/icccm/icccm.html |
| EWMH (_NET_WM_STATE_FULLSCREEN 전체 화면) | web/src/display.rs | https://specifications.freedesktop.org/wm-spec/latest/ |
| X Logical Font Description (코어 글꼴 12x24/10x20/fixed 오버레이) | web/src/display.rs | https://www.x.org/releases/current/doc/xorg-docs/xlfd/xlfd.html |

4. 운영체제 인터페이스 (Linux)
------------------------------
| 인터페이스 | 사용처 | URL |
|------------|--------|-----|
| recvmmsg(2) 일괄 수신 | src/gvsp/receiver.rs | https://man7.org/linux/man-pages/man2/recvmmsg.2.html |
| socket(7) SO_BINDTODEVICE, SO_RCVBUF, SO_BROADCAST; ip(7) | src/gvcp (장치 바인드 탐색), src/gvsp | https://man7.org/linux/man-pages/man7/socket.7.html , https://man7.org/linux/man-pages/man7/ip.7.html |
| getifaddrs(3) (NIC IP → 장치명) | src/gvcp, web/src/lan.rs | https://man7.org/linux/man-pages/man3/getifaddrs.3.html |
| sched_setaffinity(2) 스레드 코어 고정 | src/affinity.rs | https://man7.org/linux/man-pages/man2/sched_setaffinity.2.html |
| shmget(2)/shmat(2)/shmctl(2) System V 공유 메모리 (X 서버와 공유) | web/src/display.rs | https://man7.org/linux/man-pages/man2/shmget.2.html , https://man7.org/linux/man-pages/man2/shmat.2.html , https://man7.org/linux/man-pages/man2/shmctl.2.html |
| /proc/irq/*/smp_affinity_list 인터럽트 친화도 | scripts/nic-irq-affinity.sh, src/affinity.rs (effective_affinity 읽기) | https://www.kernel.org/doc/html/latest/core-api/irq/irq-affinity.html |
| /sys/class/net/<if>/napi_defer_hard_irqs, gro_flush_timeout (소프트웨어 인터럽트 합치기) | scripts/nic-irq-affinity.sh | https://www.kernel.org/doc/html/latest/networking/napi.html , https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-net |
| /proc/stat, /proc/softirqs, /proc/<pid>/task/*/stat (CPU 측정) | 시험 스크립트, affinity.rs(cpu_capacity) | https://man7.org/linux/man-pages/man5/proc.5.html |
| systemd.service(5) 부팅 시 IRQ 설정 유닛 | scripts/genicam-nic-irq.service | https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html |
| NetworkManager nmcli (랜포트 탭 DHCP/고정 IP 적용), polkit 권한 | web/src/lan.rs | https://networkmanager.dev/docs/api/latest/nmcli.html |
| iproute2 ip(8) -j JSON 출력 (주소·경로 조회) | web/src/lan.rs | https://man7.org/linux/man-pages/man8/ip.8.html |

5. 하드웨어 가속 (Rockchip RK3588)
----------------------------------
| 항목 | 사용처 | URL |
|------|--------|-----|
| Rockchip MPP (Media Process Platform) — rk_mpi.h MppApi, MPP_ENC_SET_CFG, jpeg:q_factor, rc:mode, DRM/DMA 버퍼, 입력 포맷 RGBA8888·NV12 | web/src/hwjpeg.rs | https://github.com/rockchip-linux/mpp (문서: 저장소 doc/ 디렉터리, 개발 가이드 "Rockchip_Developer_Guide_MPP") |
| librga (RGA 2D 가속: 축소·포맷 변환; Bayer 미지원으로 미사용, 검토 기록) | 결과서 §4.10·§4.11 | https://github.com/airockchip/librga |
| RK3588 big.LITTLE 코어 구성 (cpu_capacity, A55/A76) | src/affinity.rs | https://www.kernel.org/doc/html/latest/admin-guide/pm/cpufreq.html (sysfs cpu_capacity 는 Documentation/ABI/testing/sysfs-devices-system-cpu) |

6. 언어·라이브러리 규격과 공식 문서
----------------------------------
| 항목 | 사용처 | URL |
|------|--------|-----|
| Rust 언어·표준 라이브러리 (1.100), Cargo | 전체 | https://doc.rust-lang.org/stable/ , https://doc.rust-lang.org/cargo/ |
| cameleon-genapi 0.1.14 (GenApi XML 해석기) | src/genicam | https://crates.io/crates/cameleon-genapi , https://docs.rs/cameleon-genapi |
| nix 0.32 (recvmmsg, getifaddrs, sched) | src/gvsp, src/gvcp, src/affinity | https://docs.rs/nix |
| clap 4 (CLI 인자) | src/cli, web/src/main.rs | https://docs.rs/clap |
| axum 0.8 / tokio 1 (HTTP·WebSocket 서버) | web/src/api.rs, main.rs | https://docs.rs/axum , https://tokio.rs |
| serde / serde_json (상태 JSON) | web/src | https://serde.rs |
| mozjpeg 0.10 → libjpeg-turbo (소프트웨어 JPEG, NEON) | web/src/encode.rs | https://docs.rs/mozjpeg , https://github.com/libjpeg-turbo/libjpeg-turbo |
| x11rb 0.14 (순수 Rust X11 프로토콜, shm 기능) | web/src/display.rs | https://docs.rs/x11rb , https://github.com/psychon/x11rb |
| PyO3 0.29 + maturin (Python 바인딩, abi3) | python/src, python/pyproject.toml | https://pyo3.rs , https://www.maturin.rs |
| PEP 384 안정 ABI (abi3-py310 휠), PEP 427 휠 형식 | python/dist/*.whl | https://peps.python.org/pep-0384/ , https://peps.python.org/pep-0427/ |
| Python 3.10+, NumPy (to_numpy), pytest, ruff | python/ | https://docs.python.org/3/ , https://numpy.org/doc/ , https://docs.pytest.org/ , https://docs.astral.sh/ruff/ |
| HTML Living Standard / Canvas 2D, createImageBitmap (브라우저 화면) | web/static/index.html | https://html.spec.whatwg.org/multipage/canvas.html , https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html |

7. 규격 적용 범위 메모
----------------------
- GigE Vision 은 1.x 의 GVCP/GVSP 를 구현하고, 2.x 확장 ID(EI) 헤더는 파싱·재조립만 한다(재전송 요청은 1.x 형식). 멀티캐스트,
  Action Command, 이벤트 채널, Chunk 데이터는 범위 밖(docs/01_개요.txt 3절).
- PFNC 는 8/10/12/16비트 Mono, Bayer 8/10/12, RGB8/BGR8, YUV422(UYVY/YUYV)만 변환하고 Packed 형식은 미지원.
- SFNC 이름은 카메라마다 달라(IMC-751GS: ExposureTimeAbs/GainRaw/ImageFlip, 시뮬레이터: ExposureTime/Gain/ReverseY) 후보 목록으로 찾는다.
- 웹 뷰어 프레임 헤더(GCJ2, 28바이트)와 상태 JSON 은 이 프로젝트의 자체 형식이며 표준이 아니다(README "HTTP API").
