It’s all in the docs, but it sure does help to write it out..
This is the first byte, the Fmt byte. Use it to know how much data there is to capture.

0 = optional length byte present, no address bytes
1 to 3f = subtract 0 to get the length, no address bytes

40 = optional length byte present, ?? address bytes unsure [exception mode (CARB)]
41 to 7f – subtract 40 to get length, ?? address bytes unsure [exception mode (CARB)]

80 = optional length byte present, address bytes present [physical addressing]
81 to bf – subtract 80 to get length, address bytes present [physical addressing]

c0 = optional length byte present, address bytes present [functional addressing]
c1 to FF = subtract c0 to get length, address bytes present [functional addressing]

Length = service id bytes (included) to checksum (not included)
Checksum = All bytes except the checksum itself, sum, mod 256.