You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
175 lines
6.5 KiB
175 lines
6.5 KiB
|
1 month ago
|
{
|
||
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
|
|
"$id": "https://dpworld/schemas/device_v3.json",
|
||
|
|
"title": "Device configuration (schema v3 — nested 재설계)",
|
||
|
|
"description": "Web Configurator ↔ dpworldapp 옵션 C (Aggressive). v2 의 type 정규화 + naming 일관 + Nested grouping. ★ 큰 BC break — 양쪽 소비자 전면 재설계 필요. 협의 통과 가능성 낮음. future ideal 로 제시.",
|
||
|
|
"type": "object",
|
||
|
|
"required": ["schema_version", "network", "servers"],
|
||
|
|
"additionalProperties": false,
|
||
|
|
"properties": {
|
||
|
|
"schema_version": {
|
||
|
|
"type": "integer",
|
||
|
|
"const": 3,
|
||
|
|
"description": "본 schema 버전 (nested 재설계)."
|
||
|
|
},
|
||
|
|
|
||
|
|
"network": {
|
||
|
|
"type": "object",
|
||
|
|
"required": ["wifi", "eth"],
|
||
|
|
"additionalProperties": false,
|
||
|
|
"properties": {
|
||
|
|
"wifi": {
|
||
|
|
"type": "object",
|
||
|
|
"additionalProperties": false,
|
||
|
|
"properties": {
|
||
|
|
"static": {"type": "boolean", "default": false, "description": "정적 IP 사용 여부."},
|
||
|
|
"ip": {"type": "string", "format": "ipv4"},
|
||
|
|
"netmask": {"type": "string", "format": "ipv4"},
|
||
|
|
"gateway": {"type": "string", "format": "ipv4"},
|
||
|
|
"dns1": {"type": "string", "format": "ipv4"},
|
||
|
|
"dns2": {"type": "string", "format": "ipv4"},
|
||
|
|
"country_code": {"type": "string", "pattern": "^[A-Z]{2}$", "default": "KR"},
|
||
|
|
"ssid_list": {
|
||
|
|
"type": "array",
|
||
|
|
"description": "WiFi 연결 후보 SSID 목록.",
|
||
|
|
"items": {
|
||
|
|
"type": "object",
|
||
|
|
"required": ["ssid", "security"],
|
||
|
|
"additionalProperties": false,
|
||
|
|
"properties": {
|
||
|
|
"ssid": {"type": "string", "description": "SSID 이름."},
|
||
|
|
"password": {"type": "string", "description": "WiFi 비밀번호."},
|
||
|
|
"security": {
|
||
|
|
"type": "string",
|
||
|
|
"enum": ["wpa/wpa2", "wpa3", "wep", "none"]
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"eth": {
|
||
|
|
"type": "object",
|
||
|
|
"additionalProperties": false,
|
||
|
|
"properties": {
|
||
|
|
"ip": {"type": "string", "format": "ipv4"},
|
||
|
|
"netmask": {"type": "string", "format": "ipv4"},
|
||
|
|
"gateway": {"type": "string", "format": "ipv4"}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"lte": {
|
||
|
|
"type": "object",
|
||
|
|
"additionalProperties": false,
|
||
|
|
"properties": {
|
||
|
|
"ip": {"type": "string", "format": "ipv4"},
|
||
|
|
"netmask": {"type": "string", "format": "ipv4"},
|
||
|
|
"gateway": {"type": "string", "format": "ipv4"},
|
||
|
|
"port": {"type": "integer", "minimum": 1, "maximum": 65535, "description": "LTE 모뎀 포트."},
|
||
|
|
"server": {
|
||
|
|
"type": "object",
|
||
|
|
"additionalProperties": false,
|
||
|
|
"properties": {
|
||
|
|
"ip": {"type": "string", "format": "ipv4"},
|
||
|
|
"port": {"type": "integer", "minimum": 1, "maximum": 65535}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
|
||
|
|
"servers": {
|
||
|
|
"type": "object",
|
||
|
|
"additionalProperties": false,
|
||
|
|
"description": "원격 서버 엔드포인트 (server.ip + server.port 쌍).",
|
||
|
|
"properties": {
|
||
|
|
"protocol": {"$ref": "#/$defs/ServerEndpoint", "description": "Protocol 데이터 송신 서버."},
|
||
|
|
"update": {"$ref": "#/$defs/ServerEndpoint", "description": "Firmware/Config 업데이트 서버."},
|
||
|
|
"rtcm": {"$ref": "#/$defs/ServerEndpoint", "description": "RTCM 보정 서버."},
|
||
|
|
"opc_ua": {"$ref": "#/$defs/ServerEndpoint", "description": "OPC-UA 서버."},
|
||
|
|
"modbus": {"$ref": "#/$defs/ServerEndpoint", "description": "Modbus 서버."}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
|
||
|
|
"serial": {
|
||
|
|
"type": "object",
|
||
|
|
"additionalProperties": false,
|
||
|
|
"properties": {
|
||
|
|
"can": {
|
||
|
|
"type": "object",
|
||
|
|
"additionalProperties": false,
|
||
|
|
"properties": {
|
||
|
|
"bus_type": {"type": "string", "enum": ["extended", "standard"], "default": "extended"},
|
||
|
|
"baudrate": {"type": "integer", "enum": [100, 250, 500, 1000]}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"rs485": {
|
||
|
|
"type": "object",
|
||
|
|
"additionalProperties": false,
|
||
|
|
"properties": {
|
||
|
|
"mode": {"type": "string", "enum": ["half", "full"], "default": "half"},
|
||
|
|
"baudrate": {"type": "integer", "default": 9600},
|
||
|
|
"databits": {"type": "integer", "enum": [5,6,7,8,9], "default": 8},
|
||
|
|
"parity": {"type": "string", "enum": ["no","even","odd"], "default": "no"},
|
||
|
|
"stopbits": {"type": "integer", "enum": [0,1,2], "default": 1}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
|
||
|
|
"hardware": {
|
||
|
|
"type": "object",
|
||
|
|
"additionalProperties": false,
|
||
|
|
"properties": {
|
||
|
|
"imu": {
|
||
|
|
"type": "object",
|
||
|
|
"additionalProperties": false,
|
||
|
|
"description": "IMU 축 매핑 + 부호.",
|
||
|
|
"properties": {
|
||
|
|
"remap": {
|
||
|
|
"type": "object",
|
||
|
|
"additionalProperties": false,
|
||
|
|
"properties": {
|
||
|
|
"x": {"type": "string", "enum": ["x","y","z"], "default": "x"},
|
||
|
|
"y": {"type": "string", "enum": ["x","y","z"], "default": "y"},
|
||
|
|
"z": {"type": "string", "enum": ["x","y","z"], "default": "z"}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"sign": {
|
||
|
|
"type": "object",
|
||
|
|
"additionalProperties": false,
|
||
|
|
"properties": {
|
||
|
|
"x": {"type": "string", "enum": ["plus","minus"], "default": "plus"},
|
||
|
|
"y": {"type": "string", "enum": ["plus","minus"], "default": "plus"},
|
||
|
|
"z": {"type": "string", "enum": ["plus","minus"], "default": "plus"}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
|
||
|
|
"log": {
|
||
|
|
"type": "object",
|
||
|
|
"additionalProperties": false,
|
||
|
|
"properties": {
|
||
|
|
"save": {"type": "boolean", "default": true, "description": "로그 저장 여부."},
|
||
|
|
"max_size": {"type": "integer", "minimum": 1, "description": "최대 크기 (MB)."},
|
||
|
|
"max_duration": {"type": "integer", "minimum": 1, "description": "최대 보관 기간 (일)."}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
|
||
|
|
"$defs": {
|
||
|
|
"ServerEndpoint": {
|
||
|
|
"type": "object",
|
||
|
|
"required": ["ip", "port"],
|
||
|
|
"additionalProperties": false,
|
||
|
|
"properties": {
|
||
|
|
"ip": {"type": "string", "format": "ipv4"},
|
||
|
|
"port": {"type": "integer", "minimum": 1, "maximum": 65535}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|