문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 다음 판 | 이전 판 | ||
comfilehmi:webapi:index [2023/04/15 06:39] Comfile Technology [1) HMI 클라이언트에서 응답 처리하는 방법] |
comfilehmi:webapi:index [2023/07/26 10:17] (현재) Comfile Technology [6) 웹브라우저 주소창에서 사용시 제약 사항] |
||
---|---|---|---|
줄 61: | 줄 61: | ||
'#' -> '%23' \\ '%' -> '%25' \\ '\' -> '%5C' (파일 경로일 경우 간단하게 '/'로도 치환 가능) | '#' -> '%23' \\ '%' -> '%25' \\ '\' -> '%5C' (파일 경로일 경우 간단하게 '/'로도 치환 가능) | ||
- | 예1) 192.168.0.20:9138/script/<html></html>/$a="3 나누기 5는 백분율로 60<html><font color="#ff0000">%25</font></html>입니다.";vars_to_json("$a") \\ 예2) 192.168.0.20:9138/open/<html></html>/storage card<html><font color="#ff0000">/</font></html>web_hmi.html \\ 예3) 192.168.0.20:9138/download/<html></html>/storage card<html><font color="#ff0000">/</font>sub<font color="#ff0000">/</font></html>data.bin \\ 예4) 192.168.0.20:9138/script/filenames_to_json("storage card<html><font color="#ff0000">/</font></html>dir") | + | 예1) 192.168.0.20:9138/script/<html></html>/$a="3 나누기 5는 백분율로 60<html><font color="#ff0000">%25</font></html>입니다.";vars_to_json("$a") \\ 예2) 192.168.0.20:9138/open/<html></html>/storage card<html><font color="#ff0000">/</font></html>web_hmi.html \\ 예3) 192.168.0.20:9138/download/<html></html>/storage card<html><font color="#ff0000">/</font>sub<font color="#ff0000">/</font></html>data.bin \\ 예4) 192.168.0.20:9138/script/<html></html>/filenames_to_json("storage card<html><font color="#ff0000">/</font></html>dir") |
===== 2. 응답 처리하는 방법 ===== | ===== 2. 응답 처리하는 방법 ===== | ||
줄 95: | 줄 95: | ||
^ 필드명 ^ 타입 | 내용 | | ^ 필드명 ^ 타입 | 내용 | | ||
| success | boolean | 성공 여부. true이면 성공. false이면 실패 | | | success | boolean | 성공 여부. true이면 성공. false이면 실패 | | ||
- | | vars.{HMI 변수명} | number | vars_to_json() 함수로 요청한 원격지 HMI 숫자 변수의 값. | | + | | vars.{내부 변수명} | number | vars_to_json() 함수로 요청한 원격지 //내부 변수//의 값. | |
- | | vars.{HMI 문자열 변수명} | string | vars_to_json() 함수로 요청한 원격지 HMI 문자열 변수의 값. \\ 문자열 변수명은 '$'로 시작함. | | + | | vars.{내부 문자열 변수명} | string | vars_to_json() 함수로 요청한 원격지 //내부 문자열 변수//의 값. \\ //내부 문자열 변수//명은 '$'로 시작함. | |
- | | mem.{HMI 메모리 시작 번지} | array | mem_to_json() 함수로 요청한 원격지 HMI 메모리의 주소 연속적인 값들 | | + | | mem.{내부 메모리 시작 번지} | array | mem_to_json() 함수로 요청한 원격지 내부 메모리의 주소 연속적인 값들 | |
| error.code | number | 오류 코드 | | | error.code | number | 오류 코드 | | ||
| error.message | string | 오류 메세지. 언어는 프로젝트 기본 언어 설정에 따라 | | | error.message | string | 오류 메세지. 언어는 프로젝트 기본 언어 설정에 따라 | |