(uatype, val)
| 287 | |
| 288 | |
| 289 | def list_to_binary(uatype, val): |
| 290 | if val is None: |
| 291 | return Primitives.Int32.pack(-1) |
| 292 | if hasattr(Primitives1, uatype): |
| 293 | dataType = getattr(Primitives1, uatype) |
| 294 | return dataType.pack_array(val) |
| 295 | datasize = Primitives.Int32.pack(len(val)) |
| 296 | pack = [to_binary(uatype, el) for el in val] |
| 297 | pack.insert(0, datasize) |
| 298 | return b''.join(pack) |
| 299 | |
| 300 | |
| 301 | def nodeid_to_binary(nodeid): |
no test coverage detected