Simplified protocol
This commit is contained in:
parent
7c69b81045
commit
16b604673c
3 changed files with 160 additions and 202 deletions
|
@ -1,5 +1,5 @@
|
|||
/* Automatically generated nanopb constant definitions */
|
||||
/* Generated by nanopb-0.3.5-dev at Wed Dec 9 01:51:00 2015. */
|
||||
/* Generated by nanopb-0.3.5-dev at Thu Dec 10 20:30:59 2015. */
|
||||
|
||||
#include "criterion.pb.h"
|
||||
|
||||
|
@ -7,150 +7,146 @@
|
|||
#error Regenerate this file with the current version of nanopb generator.
|
||||
#endif
|
||||
|
||||
const int32_t criterion_msg_version_default = 1;
|
||||
const criterion_msg_id_msg_id_type criterion_msg_id_msg_type_default = criterion_msg_id_msg_id_type_PID;
|
||||
const int32_t criterion_protocol_msg_version_default = 1;
|
||||
|
||||
|
||||
const pb_field_t criterion_msg_fields[5] = {
|
||||
PB_FIELD( 1, INT32 , REQUIRED, STATIC , FIRST, criterion_msg, version, version, &criterion_msg_version_default),
|
||||
PB_FIELD( 2, MESSAGE , REQUIRED, STATIC , OTHER, criterion_msg, id, version, &criterion_msg_id_msg_fields),
|
||||
PB_FIELD( 3, UENUM , REQUIRED, STATIC , OTHER, criterion_msg, type, id, 0),
|
||||
PB_FIELD(100, EXTENSION, OPTIONAL, CALLBACK, OTHER, criterion_msg, extensions, type, 0),
|
||||
const pb_field_t criterion_protocol_msg_fields[4] = {
|
||||
PB_FIELD( 1, INT32 , REQUIRED, STATIC , FIRST, criterion_protocol_msg, version, version, &criterion_protocol_msg_version_default),
|
||||
PB_FIELD( 2, MESSAGE , REQUIRED, STATIC , OTHER, criterion_protocol_msg, id, version, &criterion_protocol_msg_mid_fields),
|
||||
PB_FIELD(100, EXTENSION, OPTIONAL, CALLBACK, OTHER, criterion_protocol_msg, extensions, id, 0),
|
||||
PB_LAST_FIELD
|
||||
};
|
||||
|
||||
const pb_field_t criterion_msg_id_msg_fields[4] = {
|
||||
PB_FIELD( 1, UENUM , REQUIRED, STATIC , FIRST, criterion_msg_id_msg, type, type, &criterion_msg_id_msg_type_default),
|
||||
PB_FIELD( 2, INT64 , OPTIONAL, STATIC , OTHER, criterion_msg_id_msg, id_int, type, 0),
|
||||
PB_FIELD( 3, STRING , OPTIONAL, CALLBACK, OTHER, criterion_msg_id_msg, id_str, id_int, 0),
|
||||
const pb_field_t criterion_protocol_msg_mid_fields[2] = {
|
||||
PB_FIELD( 1, INT64 , OPTIONAL, STATIC , FIRST, criterion_protocol_msg_mid, pid, pid, 0),
|
||||
PB_LAST_FIELD
|
||||
};
|
||||
|
||||
const pb_field_t criterion_birth_fields[1] = {
|
||||
const pb_field_t criterion_protocol_birth_fields[1] = {
|
||||
PB_LAST_FIELD
|
||||
};
|
||||
|
||||
const pb_field_t criterion_pre_init_fields[1] = {
|
||||
const pb_field_t criterion_protocol_pre_init_fields[1] = {
|
||||
PB_LAST_FIELD
|
||||
};
|
||||
|
||||
const pb_field_t criterion_pre_test_fields[2] = {
|
||||
PB_FIELD( 1, INT64 , OPTIONAL, STATIC , FIRST, criterion_pre_test, timestamp, timestamp, 0),
|
||||
const pb_field_t criterion_protocol_pre_test_fields[2] = {
|
||||
PB_FIELD( 1, INT64 , OPTIONAL, STATIC , FIRST, criterion_protocol_pre_test, timestamp, timestamp, 0),
|
||||
PB_LAST_FIELD
|
||||
};
|
||||
|
||||
const pb_field_t criterion_post_test_fields[2] = {
|
||||
PB_FIELD( 1, INT64 , OPTIONAL, STATIC , FIRST, criterion_post_test, timestamp, timestamp, 0),
|
||||
const pb_field_t criterion_protocol_post_test_fields[2] = {
|
||||
PB_FIELD( 1, INT64 , OPTIONAL, STATIC , FIRST, criterion_protocol_post_test, timestamp, timestamp, 0),
|
||||
PB_LAST_FIELD
|
||||
};
|
||||
|
||||
const pb_field_t criterion_post_fini_fields[1] = {
|
||||
const pb_field_t criterion_protocol_post_fini_fields[1] = {
|
||||
PB_LAST_FIELD
|
||||
};
|
||||
|
||||
const pb_field_t criterion_death_fields[3] = {
|
||||
PB_FIELD( 1, UENUM , OPTIONAL, STATIC , FIRST, criterion_death, result, result, 0),
|
||||
PB_FIELD( 2, INT64 , OPTIONAL, STATIC , OTHER, criterion_death, status, result, 0),
|
||||
const pb_field_t criterion_protocol_death_fields[3] = {
|
||||
PB_FIELD( 1, UENUM , OPTIONAL, STATIC , FIRST, criterion_protocol_death, result, result, 0),
|
||||
PB_FIELD( 2, INT64 , OPTIONAL, STATIC , OTHER, criterion_protocol_death, status, result, 0),
|
||||
PB_LAST_FIELD
|
||||
};
|
||||
|
||||
const pb_field_t criterion_assert_fields[5] = {
|
||||
PB_FIELD( 1, STRING , REQUIRED, CALLBACK, FIRST, criterion_assert, message, message, 0),
|
||||
PB_FIELD( 2, BOOL , REQUIRED, STATIC , OTHER, criterion_assert, passed, message, 0),
|
||||
PB_FIELD( 3, STRING , OPTIONAL, CALLBACK, OTHER, criterion_assert, file, passed, 0),
|
||||
PB_FIELD( 4, INT64 , OPTIONAL, STATIC , OTHER, criterion_assert, line, file, 0),
|
||||
const pb_field_t criterion_protocol_assert_fields[5] = {
|
||||
PB_FIELD( 1, STRING , REQUIRED, CALLBACK, FIRST, criterion_protocol_assert, message, message, 0),
|
||||
PB_FIELD( 2, BOOL , REQUIRED, STATIC , OTHER, criterion_protocol_assert, passed, message, 0),
|
||||
PB_FIELD( 3, STRING , OPTIONAL, CALLBACK, OTHER, criterion_protocol_assert, file, passed, 0),
|
||||
PB_FIELD( 4, INT64 , OPTIONAL, STATIC , OTHER, criterion_protocol_assert, line, file, 0),
|
||||
PB_LAST_FIELD
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
criterion_birth data;
|
||||
} criterion_birth_data_struct;
|
||||
criterion_protocol_birth data;
|
||||
} criterion_protocol_birth_data_struct;
|
||||
|
||||
static const pb_field_t criterion_birth_data_field =
|
||||
PB_FIELD(100, MESSAGE , OPTEXT, STATIC , FIRST, criterion_birth_data_struct, data, data, &criterion_birth_fields);
|
||||
static const pb_field_t criterion_protocol_birth_data_field =
|
||||
PB_FIELD(100, MESSAGE , OPTEXT, STATIC , FIRST, criterion_protocol_birth_data_struct, data, data, &criterion_protocol_birth_fields);
|
||||
|
||||
const pb_extension_type_t criterion_birth_data = {
|
||||
const pb_extension_type_t criterion_protocol_birth_data = {
|
||||
NULL,
|
||||
NULL,
|
||||
&criterion_birth_data_field
|
||||
&criterion_protocol_birth_data_field
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
criterion_pre_init data;
|
||||
} criterion_pre_init_data_struct;
|
||||
criterion_protocol_pre_init data;
|
||||
} criterion_protocol_pre_init_data_struct;
|
||||
|
||||
static const pb_field_t criterion_pre_init_data_field =
|
||||
PB_FIELD(101, MESSAGE , OPTEXT, STATIC , FIRST, criterion_pre_init_data_struct, data, data, &criterion_pre_init_fields);
|
||||
static const pb_field_t criterion_protocol_pre_init_data_field =
|
||||
PB_FIELD(101, MESSAGE , OPTEXT, STATIC , FIRST, criterion_protocol_pre_init_data_struct, data, data, &criterion_protocol_pre_init_fields);
|
||||
|
||||
const pb_extension_type_t criterion_pre_init_data = {
|
||||
const pb_extension_type_t criterion_protocol_pre_init_data = {
|
||||
NULL,
|
||||
NULL,
|
||||
&criterion_pre_init_data_field
|
||||
&criterion_protocol_pre_init_data_field
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
criterion_pre_test data;
|
||||
} criterion_pre_test_data_struct;
|
||||
criterion_protocol_pre_test data;
|
||||
} criterion_protocol_pre_test_data_struct;
|
||||
|
||||
static const pb_field_t criterion_pre_test_data_field =
|
||||
PB_FIELD(102, MESSAGE , OPTEXT, STATIC , FIRST, criterion_pre_test_data_struct, data, data, &criterion_pre_test_fields);
|
||||
static const pb_field_t criterion_protocol_pre_test_data_field =
|
||||
PB_FIELD(102, MESSAGE , OPTEXT, STATIC , FIRST, criterion_protocol_pre_test_data_struct, data, data, &criterion_protocol_pre_test_fields);
|
||||
|
||||
const pb_extension_type_t criterion_pre_test_data = {
|
||||
const pb_extension_type_t criterion_protocol_pre_test_data = {
|
||||
NULL,
|
||||
NULL,
|
||||
&criterion_pre_test_data_field
|
||||
&criterion_protocol_pre_test_data_field
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
criterion_post_test data;
|
||||
} criterion_post_test_data_struct;
|
||||
criterion_protocol_post_test data;
|
||||
} criterion_protocol_post_test_data_struct;
|
||||
|
||||
static const pb_field_t criterion_post_test_data_field =
|
||||
PB_FIELD(103, MESSAGE , OPTEXT, STATIC , FIRST, criterion_post_test_data_struct, data, data, &criterion_post_test_fields);
|
||||
static const pb_field_t criterion_protocol_post_test_data_field =
|
||||
PB_FIELD(103, MESSAGE , OPTEXT, STATIC , FIRST, criterion_protocol_post_test_data_struct, data, data, &criterion_protocol_post_test_fields);
|
||||
|
||||
const pb_extension_type_t criterion_post_test_data = {
|
||||
const pb_extension_type_t criterion_protocol_post_test_data = {
|
||||
NULL,
|
||||
NULL,
|
||||
&criterion_post_test_data_field
|
||||
&criterion_protocol_post_test_data_field
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
criterion_post_fini data;
|
||||
} criterion_post_fini_data_struct;
|
||||
criterion_protocol_post_fini data;
|
||||
} criterion_protocol_post_fini_data_struct;
|
||||
|
||||
static const pb_field_t criterion_post_fini_data_field =
|
||||
PB_FIELD(104, MESSAGE , OPTEXT, STATIC , FIRST, criterion_post_fini_data_struct, data, data, &criterion_post_fini_fields);
|
||||
static const pb_field_t criterion_protocol_post_fini_data_field =
|
||||
PB_FIELD(104, MESSAGE , OPTEXT, STATIC , FIRST, criterion_protocol_post_fini_data_struct, data, data, &criterion_protocol_post_fini_fields);
|
||||
|
||||
const pb_extension_type_t criterion_post_fini_data = {
|
||||
const pb_extension_type_t criterion_protocol_post_fini_data = {
|
||||
NULL,
|
||||
NULL,
|
||||
&criterion_post_fini_data_field
|
||||
&criterion_protocol_post_fini_data_field
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
criterion_death data;
|
||||
} criterion_death_data_struct;
|
||||
criterion_protocol_death data;
|
||||
} criterion_protocol_death_data_struct;
|
||||
|
||||
static const pb_field_t criterion_death_data_field =
|
||||
PB_FIELD(105, MESSAGE , OPTEXT, STATIC , FIRST, criterion_death_data_struct, data, data, &criterion_death_fields);
|
||||
static const pb_field_t criterion_protocol_death_data_field =
|
||||
PB_FIELD(105, MESSAGE , OPTEXT, STATIC , FIRST, criterion_protocol_death_data_struct, data, data, &criterion_protocol_death_fields);
|
||||
|
||||
const pb_extension_type_t criterion_death_data = {
|
||||
const pb_extension_type_t criterion_protocol_death_data = {
|
||||
NULL,
|
||||
NULL,
|
||||
&criterion_death_data_field
|
||||
&criterion_protocol_death_data_field
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
criterion_assert data;
|
||||
} criterion_assert_data_struct;
|
||||
criterion_protocol_assert data;
|
||||
} criterion_protocol_assert_data_struct;
|
||||
|
||||
static const pb_field_t criterion_assert_data_field =
|
||||
PB_FIELD(106, MESSAGE , OPTEXT, STATIC , FIRST, criterion_assert_data_struct, data, data, &criterion_assert_fields);
|
||||
static const pb_field_t criterion_protocol_assert_data_field =
|
||||
PB_FIELD(106, MESSAGE , OPTEXT, STATIC , FIRST, criterion_protocol_assert_data_struct, data, data, &criterion_protocol_assert_fields);
|
||||
|
||||
const pb_extension_type_t criterion_assert_data = {
|
||||
const pb_extension_type_t criterion_protocol_assert_data = {
|
||||
NULL,
|
||||
NULL,
|
||||
&criterion_assert_data_field
|
||||
&criterion_protocol_assert_data_field
|
||||
};
|
||||
|
||||
|
||||
|
@ -163,7 +159,7 @@ const pb_extension_type_t criterion_assert_data = {
|
|||
* numbers or field sizes that are larger than what can fit in 8 or 16 bit
|
||||
* field descriptors.
|
||||
*/
|
||||
PB_STATIC_ASSERT((pb_membersize(criterion_msg, id) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_criterion_msg_criterion_msg_id_msg_criterion_birth_criterion_pre_init_criterion_pre_test_criterion_post_test_criterion_post_fini_criterion_death_criterion_assert)
|
||||
PB_STATIC_ASSERT((pb_membersize(criterion_protocol_msg, id) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_criterion_protocol_msg_criterion_protocol_msg_mid_criterion_protocol_birth_criterion_protocol_pre_init_criterion_protocol_pre_test_criterion_protocol_post_test_criterion_protocol_post_fini_criterion_protocol_death_criterion_protocol_assert)
|
||||
#endif
|
||||
|
||||
#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
|
||||
|
@ -174,7 +170,7 @@ PB_STATIC_ASSERT((pb_membersize(criterion_msg, id) < 65536), YOU_MUST_DEFINE_PB_
|
|||
* numbers or field sizes that are larger than what can fit in the default
|
||||
* 8 bit descriptors.
|
||||
*/
|
||||
PB_STATIC_ASSERT((pb_membersize(criterion_msg, id) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_criterion_msg_criterion_msg_id_msg_criterion_birth_criterion_pre_init_criterion_pre_test_criterion_post_test_criterion_post_fini_criterion_death_criterion_assert)
|
||||
PB_STATIC_ASSERT((pb_membersize(criterion_protocol_msg, id) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_criterion_protocol_msg_criterion_protocol_msg_mid_criterion_protocol_birth_criterion_protocol_pre_init_criterion_protocol_pre_test_criterion_protocol_post_test_criterion_protocol_post_fini_criterion_protocol_death_criterion_protocol_assert)
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Automatically generated nanopb header */
|
||||
/* Generated by nanopb-0.3.5-dev at Wed Dec 9 01:51:00 2015. */
|
||||
/* Generated by nanopb-0.3.5-dev at Thu Dec 10 20:30:59 2015. */
|
||||
|
||||
#ifndef PB_CRITERION_PB_H_INCLUDED
|
||||
#define PB_CRITERION_PB_H_INCLUDED
|
||||
|
@ -14,153 +14,133 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
/* Enum definitions */
|
||||
typedef enum _criterion_msg_msg_type {
|
||||
criterion_msg_msg_type_BIRTH = 0,
|
||||
criterion_msg_msg_type_PRE_INIT = 1,
|
||||
criterion_msg_msg_type_PRE_TEST = 2,
|
||||
criterion_msg_msg_type_POST_TEST = 3,
|
||||
criterion_msg_msg_type_POST_FINI = 4,
|
||||
criterion_msg_msg_type_DEATH = 5,
|
||||
criterion_msg_msg_type_ASSERT = 6
|
||||
} criterion_msg_msg_type;
|
||||
|
||||
typedef enum _criterion_msg_id_msg_id_type {
|
||||
criterion_msg_id_msg_id_type_PID = 0
|
||||
} criterion_msg_id_msg_id_type;
|
||||
|
||||
typedef enum _criterion_death_result_type {
|
||||
criterion_death_result_type_NORMAL = 0,
|
||||
criterion_death_result_type_CRASH = 1,
|
||||
criterion_death_result_type_TIMEOUT = 2
|
||||
} criterion_death_result_type;
|
||||
typedef enum _criterion_protocol_death_result_type {
|
||||
criterion_protocol_death_result_type_NORMAL = 0,
|
||||
criterion_protocol_death_result_type_CRASH = 1,
|
||||
criterion_protocol_death_result_type_TIMEOUT = 2
|
||||
} criterion_protocol_death_result_type;
|
||||
|
||||
/* Struct definitions */
|
||||
typedef struct _criterion_birth {
|
||||
typedef struct _criterion_protocol_birth {
|
||||
uint8_t dummy_field;
|
||||
} criterion_birth;
|
||||
} criterion_protocol_birth;
|
||||
|
||||
typedef struct _criterion_post_fini {
|
||||
typedef struct _criterion_protocol_post_fini {
|
||||
uint8_t dummy_field;
|
||||
} criterion_post_fini;
|
||||
} criterion_protocol_post_fini;
|
||||
|
||||
typedef struct _criterion_pre_init {
|
||||
typedef struct _criterion_protocol_pre_init {
|
||||
uint8_t dummy_field;
|
||||
} criterion_pre_init;
|
||||
} criterion_protocol_pre_init;
|
||||
|
||||
typedef struct _criterion_assert {
|
||||
typedef struct _criterion_protocol_assert {
|
||||
pb_callback_t message;
|
||||
bool passed;
|
||||
pb_callback_t file;
|
||||
bool has_line;
|
||||
int64_t line;
|
||||
} criterion_assert;
|
||||
} criterion_protocol_assert;
|
||||
|
||||
typedef struct _criterion_death {
|
||||
typedef struct _criterion_protocol_death {
|
||||
bool has_result;
|
||||
criterion_death_result_type result;
|
||||
criterion_protocol_death_result_type result;
|
||||
bool has_status;
|
||||
int64_t status;
|
||||
} criterion_death;
|
||||
} criterion_protocol_death;
|
||||
|
||||
typedef struct _criterion_msg_id_msg {
|
||||
criterion_msg_id_msg_id_type type;
|
||||
bool has_id_int;
|
||||
int64_t id_int;
|
||||
pb_callback_t id_str;
|
||||
} criterion_msg_id_msg;
|
||||
typedef struct _criterion_protocol_msg_mid {
|
||||
bool has_pid;
|
||||
int64_t pid;
|
||||
} criterion_protocol_msg_mid;
|
||||
|
||||
typedef struct _criterion_post_test {
|
||||
typedef struct _criterion_protocol_post_test {
|
||||
bool has_timestamp;
|
||||
int64_t timestamp;
|
||||
} criterion_post_test;
|
||||
} criterion_protocol_post_test;
|
||||
|
||||
typedef struct _criterion_pre_test {
|
||||
typedef struct _criterion_protocol_pre_test {
|
||||
bool has_timestamp;
|
||||
int64_t timestamp;
|
||||
} criterion_pre_test;
|
||||
} criterion_protocol_pre_test;
|
||||
|
||||
typedef struct _criterion_msg {
|
||||
typedef struct _criterion_protocol_msg {
|
||||
int32_t version;
|
||||
criterion_msg_id_msg id;
|
||||
criterion_msg_msg_type type;
|
||||
criterion_protocol_msg_mid id;
|
||||
pb_extension_t *extensions;
|
||||
} criterion_msg;
|
||||
} criterion_protocol_msg;
|
||||
|
||||
/* Extensions */
|
||||
extern const pb_extension_type_t criterion_birth_data; /* field type: criterion_birth data; */
|
||||
extern const pb_extension_type_t criterion_pre_init_data; /* field type: criterion_pre_init data; */
|
||||
extern const pb_extension_type_t criterion_pre_test_data; /* field type: criterion_pre_test data; */
|
||||
extern const pb_extension_type_t criterion_post_test_data; /* field type: criterion_post_test data; */
|
||||
extern const pb_extension_type_t criterion_post_fini_data; /* field type: criterion_post_fini data; */
|
||||
extern const pb_extension_type_t criterion_death_data; /* field type: criterion_death data; */
|
||||
extern const pb_extension_type_t criterion_assert_data; /* field type: criterion_assert data; */
|
||||
extern const pb_extension_type_t criterion_protocol_birth_data; /* field type: criterion_protocol_birth data; */
|
||||
extern const pb_extension_type_t criterion_protocol_pre_init_data; /* field type: criterion_protocol_pre_init data; */
|
||||
extern const pb_extension_type_t criterion_protocol_pre_test_data; /* field type: criterion_protocol_pre_test data; */
|
||||
extern const pb_extension_type_t criterion_protocol_post_test_data; /* field type: criterion_protocol_post_test data; */
|
||||
extern const pb_extension_type_t criterion_protocol_post_fini_data; /* field type: criterion_protocol_post_fini data; */
|
||||
extern const pb_extension_type_t criterion_protocol_death_data; /* field type: criterion_protocol_death data; */
|
||||
extern const pb_extension_type_t criterion_protocol_assert_data; /* field type: criterion_protocol_assert data; */
|
||||
|
||||
/* Default values for struct fields */
|
||||
extern const int32_t criterion_msg_version_default;
|
||||
extern const criterion_msg_id_msg_id_type criterion_msg_id_msg_type_default;
|
||||
extern const int32_t criterion_protocol_msg_version_default;
|
||||
|
||||
/* Initializer values for message structs */
|
||||
#define criterion_msg_init_default {1, criterion_msg_id_msg_init_default, (criterion_msg_msg_type)0, NULL}
|
||||
#define criterion_msg_id_msg_init_default {criterion_msg_id_msg_id_type_PID, false, 0, {{NULL}, NULL}}
|
||||
#define criterion_birth_init_default {0}
|
||||
#define criterion_pre_init_init_default {0}
|
||||
#define criterion_pre_test_init_default {false, 0}
|
||||
#define criterion_post_test_init_default {false, 0}
|
||||
#define criterion_post_fini_init_default {0}
|
||||
#define criterion_death_init_default {false, (criterion_death_result_type)0, false, 0}
|
||||
#define criterion_assert_init_default {{{NULL}, NULL}, 0, {{NULL}, NULL}, false, 0}
|
||||
#define criterion_msg_init_zero {0, criterion_msg_id_msg_init_zero, (criterion_msg_msg_type)0, NULL}
|
||||
#define criterion_msg_id_msg_init_zero {(criterion_msg_id_msg_id_type)0, false, 0, {{NULL}, NULL}}
|
||||
#define criterion_birth_init_zero {0}
|
||||
#define criterion_pre_init_init_zero {0}
|
||||
#define criterion_pre_test_init_zero {false, 0}
|
||||
#define criterion_post_test_init_zero {false, 0}
|
||||
#define criterion_post_fini_init_zero {0}
|
||||
#define criterion_death_init_zero {false, (criterion_death_result_type)0, false, 0}
|
||||
#define criterion_assert_init_zero {{{NULL}, NULL}, 0, {{NULL}, NULL}, false, 0}
|
||||
#define criterion_protocol_msg_init_default {1, criterion_protocol_msg_mid_init_default, NULL}
|
||||
#define criterion_protocol_msg_mid_init_default {false, 0}
|
||||
#define criterion_protocol_birth_init_default {0}
|
||||
#define criterion_protocol_pre_init_init_default {0}
|
||||
#define criterion_protocol_pre_test_init_default {false, 0}
|
||||
#define criterion_protocol_post_test_init_default {false, 0}
|
||||
#define criterion_protocol_post_fini_init_default {0}
|
||||
#define criterion_protocol_death_init_default {false, (criterion_protocol_death_result_type)0, false, 0}
|
||||
#define criterion_protocol_assert_init_default {{{NULL}, NULL}, 0, {{NULL}, NULL}, false, 0}
|
||||
#define criterion_protocol_msg_init_zero {0, criterion_protocol_msg_mid_init_zero, NULL}
|
||||
#define criterion_protocol_msg_mid_init_zero {false, 0}
|
||||
#define criterion_protocol_birth_init_zero {0}
|
||||
#define criterion_protocol_pre_init_init_zero {0}
|
||||
#define criterion_protocol_pre_test_init_zero {false, 0}
|
||||
#define criterion_protocol_post_test_init_zero {false, 0}
|
||||
#define criterion_protocol_post_fini_init_zero {0}
|
||||
#define criterion_protocol_death_init_zero {false, (criterion_protocol_death_result_type)0, false, 0}
|
||||
#define criterion_protocol_assert_init_zero {{{NULL}, NULL}, 0, {{NULL}, NULL}, false, 0}
|
||||
|
||||
/* Field tags (for use in manual encoding/decoding) */
|
||||
#define criterion_assert_message_tag 1
|
||||
#define criterion_assert_passed_tag 2
|
||||
#define criterion_assert_file_tag 3
|
||||
#define criterion_assert_line_tag 4
|
||||
#define criterion_death_result_tag 1
|
||||
#define criterion_death_status_tag 2
|
||||
#define criterion_msg_id_msg_type_tag 1
|
||||
#define criterion_msg_id_msg_id_int_tag 2
|
||||
#define criterion_msg_id_msg_id_str_tag 3
|
||||
#define criterion_post_test_timestamp_tag 1
|
||||
#define criterion_pre_test_timestamp_tag 1
|
||||
#define criterion_msg_version_tag 1
|
||||
#define criterion_msg_id_tag 2
|
||||
#define criterion_msg_type_tag 3
|
||||
#define criterion_birth_data_tag 100
|
||||
#define criterion_pre_init_data_tag 101
|
||||
#define criterion_pre_test_data_tag 102
|
||||
#define criterion_post_test_data_tag 103
|
||||
#define criterion_post_fini_data_tag 104
|
||||
#define criterion_death_data_tag 105
|
||||
#define criterion_assert_data_tag 106
|
||||
#define criterion_protocol_assert_message_tag 1
|
||||
#define criterion_protocol_assert_passed_tag 2
|
||||
#define criterion_protocol_assert_file_tag 3
|
||||
#define criterion_protocol_assert_line_tag 4
|
||||
#define criterion_protocol_death_result_tag 1
|
||||
#define criterion_protocol_death_status_tag 2
|
||||
#define criterion_protocol_msg_mid_pid_tag 1
|
||||
#define criterion_protocol_post_test_timestamp_tag 1
|
||||
#define criterion_protocol_pre_test_timestamp_tag 1
|
||||
#define criterion_protocol_msg_version_tag 1
|
||||
#define criterion_protocol_msg_id_tag 2
|
||||
#define criterion_protocol_birth_data_tag 100
|
||||
#define criterion_protocol_pre_init_data_tag 101
|
||||
#define criterion_protocol_pre_test_data_tag 102
|
||||
#define criterion_protocol_post_test_data_tag 103
|
||||
#define criterion_protocol_post_fini_data_tag 104
|
||||
#define criterion_protocol_death_data_tag 105
|
||||
#define criterion_protocol_assert_data_tag 106
|
||||
|
||||
/* Struct field encoding specification for nanopb */
|
||||
extern const pb_field_t criterion_msg_fields[5];
|
||||
extern const pb_field_t criterion_msg_id_msg_fields[4];
|
||||
extern const pb_field_t criterion_birth_fields[1];
|
||||
extern const pb_field_t criterion_pre_init_fields[1];
|
||||
extern const pb_field_t criterion_pre_test_fields[2];
|
||||
extern const pb_field_t criterion_post_test_fields[2];
|
||||
extern const pb_field_t criterion_post_fini_fields[1];
|
||||
extern const pb_field_t criterion_death_fields[3];
|
||||
extern const pb_field_t criterion_assert_fields[5];
|
||||
extern const pb_field_t criterion_protocol_msg_fields[4];
|
||||
extern const pb_field_t criterion_protocol_msg_mid_fields[2];
|
||||
extern const pb_field_t criterion_protocol_birth_fields[1];
|
||||
extern const pb_field_t criterion_protocol_pre_init_fields[1];
|
||||
extern const pb_field_t criterion_protocol_pre_test_fields[2];
|
||||
extern const pb_field_t criterion_protocol_post_test_fields[2];
|
||||
extern const pb_field_t criterion_protocol_post_fini_fields[1];
|
||||
extern const pb_field_t criterion_protocol_death_fields[3];
|
||||
extern const pb_field_t criterion_protocol_assert_fields[5];
|
||||
|
||||
/* Maximum encoded size of messages (where known) */
|
||||
#define criterion_msg_size (19 + criterion_msg_id_msg_size)
|
||||
#define criterion_birth_size 0
|
||||
#define criterion_pre_init_size 0
|
||||
#define criterion_pre_test_size 11
|
||||
#define criterion_post_test_size 11
|
||||
#define criterion_post_fini_size 0
|
||||
#define criterion_death_size 13
|
||||
#define criterion_protocol_msg_size 24
|
||||
#define criterion_protocol_msg_mid_size 11
|
||||
#define criterion_protocol_birth_size 0
|
||||
#define criterion_protocol_pre_init_size 0
|
||||
#define criterion_protocol_pre_test_size 11
|
||||
#define criterion_protocol_post_test_size 11
|
||||
#define criterion_protocol_post_fini_size 0
|
||||
#define criterion_protocol_death_size 13
|
||||
|
||||
/* Message IDs (where set with "msgid" option) */
|
||||
#ifdef PB_MSGID
|
||||
|
|
|
@ -1,31 +1,13 @@
|
|||
package criterion;
|
||||
package criterion.protocol;
|
||||
|
||||
message msg {
|
||||
|
||||
enum msg_type {
|
||||
BIRTH = 0;
|
||||
PRE_INIT = 1;
|
||||
PRE_TEST = 2;
|
||||
POST_TEST = 3;
|
||||
POST_FINI = 4;
|
||||
DEATH = 5;
|
||||
ASSERT = 6;
|
||||
}
|
||||
|
||||
message id_msg {
|
||||
|
||||
enum id_type {
|
||||
PID = 0;
|
||||
}
|
||||
|
||||
required id_type type = 1 [default = PID];
|
||||
optional int64 id_int = 2;
|
||||
optional string id_str = 3;
|
||||
message mid {
|
||||
optional int64 pid = 1;
|
||||
}
|
||||
|
||||
required int32 version = 1 [default = 1];
|
||||
required id_msg id = 2;
|
||||
required msg_type type = 3;
|
||||
required mid id = 2;
|
||||
|
||||
extensions 100 to max;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue