Skip to content

TCP통신

설정네트워크매개변수

0x4180 MSGCOMM_PARAM_SET

고객端

요청 매개변수

필드유형설명
frameHeaderstring帧头
ipstringIP 주소
numberSystemint0: 10진수, 1: 16진수
portint포트 번호
separatorstring分隔符
terminatorstring종료符
craftint프로세스번호 (1~9)
robotint로봇 번호
typeint0: 서버, 1: 고객端

요청 예시

json
{
  "client": {
    "frameHeader": "@",
    "ip": "192.168.1.111",
    "numberSystem": 1,
    "port": 9000,
    "separator": ",",
    "terminator": "!"
  },
  "craft": 1,
  "robot": 1,
  "type": 1
}

服务端

요청 매개변수

필드유형설명
frameHeaderstring帧头
ipstringIP 주소
numberSystemint0: 10진수, 1: 16진수
portint포트 번호
separatorstring分隔符
terminatorstring종료符
craftint프로세스번호 (1~9)
robotint로봇 번호
typeint0: 서버, 1: 고객端

요청 예시

json
{
  "craft": 3,
  "robot": 1,
  "server": {
    "frameHeader": "@A",
    "ip": "192.168.1.14",
    "numberSystem": 0,
    "port": 9001,
    "separator": "B",
    "terminator": "C"
  },
  "type": 0
}

조회네트워크매개변수

0x4181 MSGCOMM_PARAM_INQUIRE

요청 매개변수

필드유형설명
robotint로봇 번호
craftint프로세스번호
typeint0: 서버, 1: 고객端

요청 예시

json
{
  "robot": 1,
  "craft": 1,
  "type": 2
}

응답네트워크매개변수조회

0x4182 MSGCOMM_PARAM_RESPOND

고객端

응답 매개변수

필드유형설명
frameHeaderstring帧头
ipstringIP 주소
numberSystemint0: 10진수, 1: 16진수
portint포트 번호
separatorstring分隔符
terminatorstring종료符
craftint프로세스번호
netStatebooltrue: 연결, false: 연결 해제
robotint로봇 번호
typeint0: 서버, 1: 고객端

응답 예시

json
{
  "client": {
    "frameHeader": "@",
    "ip": "192.168.1.111",
    "numberSystem": 0,
    "port": 9000,
    "separator": ",",
    "terminator": "!"
  },
  "craft": 1,
  "netState": false,
  "robot": 1,
  "type": 1
}

服务端

응답 매개변수

필드유형설명
frameHeaderstring帧头
ipstringIP 주소
numberSystemint0: 10진수, 1: 16진수
portint포트 번호
separatorstring分隔符
terminatorstring종료符
craftint프로세스번호
netStatebooltrue: 연결, false: 연결 해제
robotint로봇 번호
typeint0: 서버, 1: 고객端

응답 예시

json
{
  "craft": 1,
  "netState": false,
  "robot": 1,
  "server": {
    "frameHeader": "@",
    "ip": "192.168.1.14",
    "numberSystem": 0,
    "port": 22,
    "separator": ",",
    "terminator": "!"
  },
  "type": 0
}

연결MSGCOMM네트워크

0x4183 MSGCOMM_DEVICE_CONNECT

요청 매개변수

필드유형설명
robotint로봇 번호
craftint프로세스번호

요청 예시

json
{
  "robot": 1,
  "craft": 1
}

닫기MSGCOMM네트워크

0x4184 MSGCOMM_DEVICE_CLOSE

요청 매개변수

필드유형설명
robotint로봇 번호
craftint프로세스번호

요청 예시

json
{
  "robot": 1,
  "craft": 1
}