#!/usr/bin/env python
"""装置PCで撮影し、受信したPNGをクライアントの実行ディレクトリに保存する。"""

from pathlib import Path

from smartlab_studio_ctrl.config import Config
from smartlab_studio_ctrl.server_grpc.client import DeviceProxy


if __name__ == "__main__":
    config = Config(Path(__file__).with_name("config_smartlab.yaml"))
    smartlab = DeviceProxy("SmartLabCtrl", config=config)
    try:
        smartlab.capture_screenshot(output_directory=".")
    finally:
        smartlab.close()
