Reply To: How To Receive very long and complex ACK?

Home Forums V-Control General How To Receive very long and complex ACK? Reply To: How To Receive very long and complex ACK?

#13064
Jens Plappert
Participant

Solved it now this way (ACK at 0A. It steel seems not to be fired everytime the ACK appears, but as i now parse for specific pairs and not for offset-indices it works. Feels a bit like an workaround anyway):

// Nach senden von “read” kommt folgendes als Antwort:
//
//FW version:V1.1.105
//Out01: In01, Out ON , CEC OFF,
//Out02: In02, Out ON , CEC OFF,
//Out03: In03, Out ON, CEC OFF,
//Out04: In04, Out ON, CEC OFF
//EDID mode:default
//Echo OFF
//Pod OFF
//Button ON
//Command OK
Dim TempArr() as string
Dim ReceiveStr as string
Dim TestStr as String

ReceiveStr = ioResult

TempArr = ReceiveStr.Split(“:”)

For Each Ding as String in TempArr
dim ValIndex as integer
ValIndex = TempArr.IndexOf(Ding)+1

Dim TempVal as string

if Ding.Right(10) = “FW version” then
Tempval = TempArr(ValIndex)
Tempval = Tempval.left(8)
SetDeviceVar(“FW_ver”, Tempval)
end if

if Ding.Right(5) = “Out01” then
Tempval = TempArr(ValIndex)
Tempval = Tempval.mid(5,1)
SetDeviceVar(“Out_1”, Tempval)
end if

if Ding.Right(5) = “Out02” then
Tempval = TempArr(ValIndex)
Tempval = Tempval.mid(5,1)
SetDeviceVar(“Out_2”, Tempval)
end if

if Ding.Right(5) = “Out03” then
Tempval = TempArr(ValIndex)
Tempval = Tempval.mid(5,1)
SetDeviceVar(“Out_3”, Tempval)
end if

if Ding.Right(5) = “Out04” then
Tempval = TempArr(ValIndex)
Tempval = Tempval.mid(5,1)
SetDeviceVar(“Out_4”, Tempval)
end if
showmessage(Ding.Right(5))
next

Scroll to top