feat(scripting): add sprintf2 command and fix prompt-wait race (v0.1.2)
- Add TeraTerm-compatible sprintf2 (C printf formatting into a string var) - Fix SVOS power-cycle script racing ahead by gating prompt waits behind output-completion markers - Bump version to 0.1.2; docs and README updates
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
; test-pdu.ttl — PDU 控制指令測試(iPoMan II/III via SNMP)
|
||||
; 不需 active session 的回應;pduconnect / pductrl 走 SNMP 直連 PDU。
|
||||
; 執行前請改下方 ip / device / port 為實際值。執行中可按 Stop 中止。
|
||||
|
||||
ip = "192.168.1.21" ; PDU IP
|
||||
device = 1 ; PDU 裝置編號(iPoMan II/III 以 1 為預設)
|
||||
port = 1 ; 要測試的插座埠
|
||||
act_off = 0
|
||||
act_on = 1
|
||||
|
||||
|
||||
; ── 連線 ──
|
||||
pduconnect device ip
|
||||
if result == 0 then
|
||||
messagebox 'PDU connect failed — 檢查 IP / 網路 / community'
|
||||
endif
|
||||
|
||||
; ── 單埠 OFF → ON 電源循環 ──
|
||||
pductrl device port act_off
|
||||
pause 3
|
||||
pductrl device port act_on
|
||||
pause 3
|
||||
Reference in New Issue
Block a user