new datafeed packet format

struct sr_datafeed_packet now has timeoffset and duration fields,
expressed in picoseconds (1/10^12 seconds)
length and unitsize are now in a separate struct sr_datafeed_logic
This commit is contained in:
Bert Vermeulen 2011-06-19 02:35:23 +02:00
parent 60eb1eb582
commit 38ab3ee79d
1 changed files with 16 additions and 7 deletions

View File

@ -84,10 +84,6 @@ enum {
SR_T_NULL, SR_T_NULL,
}; };
enum {
SR_PROTO_RAW,
};
#if 0 #if 0
/* (Unused) protocol decoder stack entry */ /* (Unused) protocol decoder stack entry */
struct sr_protocol { struct sr_protocol {
@ -109,8 +105,10 @@ enum {
struct sr_datafeed_packet { struct sr_datafeed_packet {
uint16_t type; uint16_t type;
uint64_t length; /* timeoffset since start, in picoseconds */
uint16_t unitsize; uint64_t timeoffset;
/* duration of data in this packet, in picoseconds */
uint64_t duration;
void *payload; void *payload;
}; };
@ -118,11 +116,22 @@ struct sr_datafeed_header {
int feed_version; int feed_version;
struct timeval starttime; struct timeval starttime;
uint64_t samplerate; uint64_t samplerate;
int protocol_id;
int num_analog_probes; int num_analog_probes;
int num_logic_probes; int num_logic_probes;
}; };
struct sr_datafeed_logic {
uint64_t length;
uint16_t unitsize;
unsigned char *data;
};
struct sr_datafeed_pd {
char *protocol;
char *annotation;
unsigned char *data;
};
#if defined(HAVE_LA_ALSA) #if defined(HAVE_LA_ALSA)
struct sr_analog_probe { struct sr_analog_probe {
uint8_t att; uint8_t att;