Scan for pattern pattern
with applied mask mask
in the adapter data, starting from offset offset
.
If a match is found, the value that matched is returned through value
, otherwise value
is left untouched.
The bytes in pattern
and mask
are interpreted left-to-right, regardless of endianness. All four bytes of the
pattern must be present in the adapter for it to match, even if the first or last bytes are masked out.
It is an error to call this function without making sure that there is enough data (offset+size bytes) in the adapter.
this |
a Adapter |
mask |
mask to apply to data before matching against |
pattern |
pattern to match (after mask is applied) |
offset |
offset into the adapter data from which to start scanning, returns the last scanned position. |
size |
number of bytes to scan from offset |
value |
pointer to uint32 to return matching data |
offset of the first match, or -1 if no match was found. |