MCPcopy Create free account
hub / github.com/ARMmbed/DAPLink / pack

Method pack

test/tests/usb_msd.py:271–279  ·  view source on GitHub ↗

Return a byte representation of this structure

(self)

Source from the content-addressed store, hash-verified

269 return desc
270
271 def pack(self):
272 """Return a byte representation of this structure"""
273 value_list = []
274 for field in self.field_list:
275 value = self.value_dict[field]
276 if self.fmt_dict[field].endswith('s'):
277 value = six.ensure_binary(value)
278 value_list.append(value)
279 return struct.pack(self.format_str, *value_list)
280
281
282class MBR(Struct):

Callers 6

create_hexFunction · 0.45
post_build_scriptFunction · 0.45
_msd_transferMethod · 0.45
packMethod · 0.45
test_msdFunction · 0.45
test_msd_stallFunction · 0.45

Calls

no outgoing calls

Tested by 2

test_msdFunction · 0.36
test_msd_stallFunction · 0.36