output modules now register the DF type they can use

This commit is contained in:
Bert Vermeulen 2011-01-09 23:22:48 +01:00
parent 8d67255061
commit f0411b1d17
6 changed files with 7 additions and 1 deletions

View File

@ -64,6 +64,7 @@ static int data(struct output *o, char *data_in, uint64_t length_in,
struct output_format output_binary = {
"binary",
"Raw binary",
DF_LOGIC,
NULL,
data,
event,

View File

@ -193,6 +193,7 @@ static int data(struct output *o, char *data_in, uint64_t length_in,
struct output_format output_gnuplot = {
"gnuplot",
"Gnuplot",
DF_LOGIC,
init,
data,
event,

View File

@ -40,6 +40,7 @@ static int event(struct output *o, int event_type, char **data_out,
struct output_format output_foo = {
"foo",
"The foo format",
DF_LOGIC,
init,
data,
event,

View File

@ -307,6 +307,7 @@ static int data_hex(struct output *o, char *data_in, uint64_t length_in,
struct output_format output_text_bits = {
"bits",
"Text (bits)",
DF_LOGIC,
init_bits,
data_bits,
event,
@ -315,6 +316,7 @@ struct output_format output_text_bits = {
struct output_format output_text_hex = {
"hex",
"Text (hexadecimal)",
DF_LOGIC,
init_hex,
data_hex,
event,

View File

@ -217,6 +217,7 @@ static int data(struct output *o, char *data_in, uint64_t length_in,
struct output_format output_vcd = {
"vcd",
"Value Change Dump (VCD)",
DF_LOGIC,
init,
data,
event,

View File

@ -95,7 +95,6 @@ enum {
DF_TRIGGER,
DF_LOGIC,
DF_PD,
DF_PA,
};
struct datafeed_packet {
@ -145,6 +144,7 @@ struct output {
struct output_format {
char *extension;
char *description;
int df_type;
int (*init) (struct output *o);
int (*data) (struct output *o, char *data_in, uint64_t length_in,
char **data_out, uint64_t *length_out);