콘텐츠로 이동

hfVisualizer 원격 제어 Sensor

sensor

hfVisualizer --remote [--target <id>] sensor <Point|Line|TrackTwist> <name> (--content <text> | --content-file <file>)
  • *Sensor, TYPE=<type>, Name=<name> 정의 하나를 생성하거나 갱신합니다.
  • --content--content-file 중 정확히 하나가 필요합니다.
  • sensor는 preprocessing mode에서만 동작합니다.
  • <type>, <name>은 비어 있으면 안 됩니다.
  • 지원 sensor type:
  • Point
  • Line
  • TrackTwist
  • IPC 계층이 *Sensor keyword line을 앞에 붙인 뒤 내용을 readSensorModification()으로 전달합니다.
  • --content 안에서는 줄바꿈을 \n으로 씁니다. \\n은 문자 그대로 유지됩니다.
  • 빈 내용은 허용되지 않습니다.
  • 성공적으로 적용되면 GUI Define Sensor 위젯과 같이 생성/수정된 sensor가 현재 sensor selection이 됩니다.
  • 검증은 기존 sensor reader 규칙을 따릅니다.
  • Point: 첫 데이터 줄은 <field>, <hostElset>, 이후 줄은 id, x, y, z, dx, dy, dz
  • Line: 첫 데이터 줄은 <field>, <hostElset>, <spline>[, <startId>]
  • TrackTwist: 단일 데이터 줄은 <line1Elset>, <line2Elset>, <spacing>, <advance>[, <startId>]

예시:

hfVisualizer --remote sensor Point SG1 --content "Strain, girder\n1, 1, 0.0, 0, 1, 0, 0"
hfVisualizer --remote sensor Line LVDT1 --content-file D:\Work\line-sensor.txt
hfVisualizer --remote sensor TrackTwist TW1 --content "leftRail, rightRail, 3, 0.5, 1"

sensor-rename

hfVisualizer --remote [--target <id>] sensor-rename <old-name> <new-name>
  • preprocessing mode에서만 사용할 수 있습니다.
  • 두 이름 모두 비어 있으면 안 되며 GUI 편집과 같은 single-token 정규화를 적용합니다.
  • 기존 이름이 실제로 존재해야 합니다.
  • 새 이름이 다른 sensor와 충돌하면 실패하며, 정규화 후 같은 이름이면 no-op으로 성공합니다.
  • 성공하면 script-save에 canonical sensor-rename ... tail이 기록됩니다.

예시:

hfVisualizer --remote sensor-rename SG1 SG_MAIN

sensor-delete

hfVisualizer --remote [--target <id>] sensor-delete <name>
  • preprocessing mode에서만 사용할 수 있습니다.
  • name은 비어 있으면 안 되며 기존 sensor를 가리켜야 합니다.
  • ModelTree delete와 같은 삭제 경로를 사용하므로 관련 output request와 post target도 함께 정리됩니다.
  • 성공하면 script-save에 canonical sensor-delete ... tail이 기록됩니다.

예시:

hfVisualizer --remote sensor-delete SG_MAIN