I am trying to understand how to convert a stream of byte-data to usable values.
But I do actually have a massive BrettVormKopf how to to this.
I get per data from a camera slider (eMotimo ST4 that is) formatted as follows:
So I receive a raw data stream looking somewhat like this:
And to be honest: I have no clue how to convert this to usable data. I do get some values by using “Get Bytes” and then converting the split bytes via asValue. But what to do next? I´m lost…
it should be smth like this to get the “currentFrame” assuming it is a (signed) int32, which your docs don’t specify. also i’m not sure about the endianness, could also be BigEndian.
@bjoern: sorry, not at the studio anymore.
I´ll attach the patch tomorrow.
@joreg: I tried Int32 but the only two formats that actually work are byte and sbyte. Thx for the hint about getting rid of ST_, though. I sorted that out later with some getspread-stuff but this is way more effective :-)
“Actually work” does mean “Not Undefined” in correct term I guess ;-)
Edit: this part was actually me not realizing that I do need to set offset to 7 and count to 4 (not 1 or 25) and set the AsValue behind a S+H… seems to work now, the remaining problem seems to be inconsistent data-flow coming from the slider.
To be honest, I have another problem, namely keeping the raw data stored inside the IOBox(Node). The moment I disconnect it, it looses the data and switches back to showing “any type ok”