Quantcast
Channel: All Open Tickets - Tera Term on OSDN
Viewing all articles
Browse latest Browse all 2128

waitregex inputstr does not contain recieved line when command timesout - Tera Term Ticket #37524 on OSDN

$
0
0

waitregex inputstr does not contain recieved line when command timesout

Eröffnet am: 2017-09-20 03:05

Letztes Update: 2017-11-30 07:34

Auswertung:scbreymanVerantwortlicher:(Keine)
Priorität:5 - MittelMeilenstein:(Keine)
Typ:FehlerSchweregrad:5 - Mittel
Komponente:Tera Term MacroStatus:Offen
LösungKeine

Einzelheiten

I created a snippet of code to demonstrate what I am doing. I have a pass through device that sends SDI-12 commands to a sensor and the sensor responds to the commands.
When the response matches the regular expression the returned value is placed in the inputstr and the matchstr variables.
When the response does not match the regular expression the previous responses that did match are located in the inpustr and matchstr variables.
I was expecting the inputstr and all matchstr variables would be set to null and then the received string would be captured to the inputstr and if the regular expression matched it would also be copied to the matchstr variable.

; waitregex demonstrates how inputstr does not contain most recent result but contains last matched result
; Description:
; Updated: 09/19/2017 Initial release
; Author: Scott Breyman

timeout = 1
send '?R0!'

;expected result
waitregex '0\+\d+\.\d{2}+-\d+\.\d\+0-9+\r'
sprintf2 strMessage 'inputstr "%s"\nmatchstr "%s"' inputstr matchstr
strspecial strMessage
messagebox strMessage 'match'

send '?R0!'

;expected result
waitregex '0\+\d+\.\d{2}+-\d+\.\d\r'
sprintf2 strMessage 'inputstr "%s"\nmatchstr "%s"' inputstr matchstr
strspecial strMessage
messagebox strMessage 'no match'

end

Letzte Aktualisierung für dieses Ticket

2017-11-30 07:34 Aktualisiert von: maya


Viewing all articles
Browse latest Browse all 2128