12 if header.version != 5:
13 print(
"DAQHeader version property test failed")
17 if header.det_id != 3:
18 print(
"DAQHeader det_id property test failed")
22 if header.crate_id != 100:
23 print(
"DAQHeader crate_id property test failed")
27 if header.slot_id != 7:
28 print(
"DAQHeader slot_id property test failed")
32 if header.link_id != 15:
33 print(
"DAQHeader link_id property test failed")
36 print(
"DAQHeader basic read/write property tests passed")
39 header.timestamp_1 = timestamp_1
42 header.timestamp_2 = timestamp_2
45 _ = header.timestamp_1
46 print(
"DAQHeader timestamp_1 read should have raised an exception")
49 print(
"DAQHeader timestamp_1 attempted read correctly raised an exception")
52 _ = header.timestamp_2
53 print(
"DAQHeader timestamp_2 read should have raised an exception")
56 print(
"DAQHeader timestamp_2 attempted read correctly raised an exception")
59 timestamp = header.get_timestamp()
60 expected_timestamp = 0x000007D0000003E8
61 if timestamp != expected_timestamp:
62 print(f
"DAQHeader get_timestamp() test failed: got {timestamp}, expected {expected_timestamp}")
65 print(
"DAQHeader get_timestamp() test passed")
67 print(
"\nAll DAQHeader Python binding tests passed")