2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 19:28:26 +08:00

analyzer: report DDS channel number

This commit is contained in:
Sebastien Bourdeauducq 2015-12-21 18:37:53 +08:00
parent 8691f69a3c
commit 007a7170e1
2 changed files with 10 additions and 3 deletions

View File

@ -58,8 +58,9 @@ def decode_message(data):
def decode_dump(data): def decode_dump(data):
parts = struct.unpack(">IQI", data[:16]) parts = struct.unpack(">IQbbbb", data[:16])
sent_bytes, total_byte_count, overflow_occured = parts (sent_bytes, total_byte_count,
overflow_occured, log_channel, dds_channel, _) = parts
if sent_bytes + 16 != len(data): if sent_bytes + 16 != len(data):
raise ValueError("analyzer dump has incorrect length") raise ValueError("analyzer dump has incorrect length")

View File

@ -10,7 +10,10 @@
struct analyzer_header { struct analyzer_header {
unsigned int sent_bytes; unsigned int sent_bytes;
unsigned long long int total_byte_count; unsigned long long int total_byte_count;
unsigned int overflow_occured; unsigned char overflow_occured;
unsigned char log_channel;
unsigned char dds_channel;
unsigned char padding;
} __attribute__((packed)); } __attribute__((packed));
@ -68,6 +71,9 @@ void analyzer_start(void)
analyzer_header.sent_bytes = analyzer_header.total_byte_count; analyzer_header.sent_bytes = analyzer_header.total_byte_count;
analyzer_header.overflow_occured = rtio_analyzer_message_encoder_overflow_read(); analyzer_header.overflow_occured = rtio_analyzer_message_encoder_overflow_read();
analyzer_header.log_channel = 0;
analyzer_header.dds_channel = CONFIG_RTIO_DDS_CHANNEL;
analyzer_header.padding = 0;
offset_consumed = 0; offset_consumed = 0;
offset_sent = 0; offset_sent = 0;