File: string_fixed_deser.txt

package info (click to toggle)
ros-genpy 0.6.18-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 588 kB
  • sloc: python: 2,830; makefile: 107; xml: 33
file content (12 lines) | stat: -rw-r--r-- 254 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
data = []
for i in range(0, 2):
  start = end
  end += 4
  (length,) = _struct_I.unpack(str[start:end])
  start = end
  end += length
  if python3:
    val0 = str[start:end].decode('utf-8', 'rosmsg')
  else:
    val0 = str[start:end]
  data.append(val0)