SIDE_DYNAMIC_TYPE_S16,
SIDE_DYNAMIC_TYPE_S32,
SIDE_DYNAMIC_TYPE_S64,
+ SIDE_DYNAMIC_TYPE_BLOB,
SIDE_DYNAMIC_TYPE_FLOAT_BINARY16,
SIDE_DYNAMIC_TYPE_FLOAT_BINARY32,
int16_t side_s16;
int32_t side_s32;
int64_t side_s64;
+ uint8_t side_blob;
#if __HAVE_FLOAT16
_Float16 side_float_binary16;
.side_s64 = (_val), \
}, \
}
+#define side_arg_dynamic_blob(_val, _attr) \
+ { \
+ .dynamic_type = SIDE_DYNAMIC_TYPE_BLOB, \
+ .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
+ .attr = _attr, \
+ .u = { \
+ .side_blob = (_val), \
+ }, \
+ }
#define side_arg_dynamic_float_binary16(_val, _attr) \
{ \
static uint8_t blob_fixint[] = { 0x55, 0x44, 0x33, 0x22, 0x11 };
-static side_define_event(my_provider_event_blob, "myprovider", "myeventblob", SIDE_LOGLEVEL_DEBUG,
+static side_define_event_variadic(my_provider_event_blob, "myprovider", "myeventblob", SIDE_LOGLEVEL_DEBUG,
side_field_list(
side_field_blob("blobfield", side_attr_list()),
side_field_array("arrayblob", side_elem(side_type_blob(side_attr_list())), 3, side_attr_list()),
my_provider_event_blob.enabled = 1;
side_event_cond(&my_provider_event_blob) {
side_arg_define_vec(myarray, side_arg_list(side_arg_blob(1), side_arg_blob(2), side_arg_blob(3)));
- side_event_call(&my_provider_event_blob,
+ side_arg_dynamic_define_vec(myvla,
+ side_arg_list(
+ side_arg_dynamic_blob(0x22, side_attr_list()),
+ side_arg_dynamic_blob(0x33, side_attr_list()),
+ )
+ );
+ side_event_call_variadic(&my_provider_event_blob,
side_arg_list(
side_arg_blob(0x55),
side_arg_array(&myarray),
side_arg_array_blob(blob_fixint),
side_arg_vla_blob(blob_fixint, SIDE_ARRAY_SIZE(blob_fixint)),
+ ),
+ side_arg_list(
+ side_arg_dynamic_field("varblobfield",
+ side_arg_dynamic_blob(0x55, side_attr_list())
+ ),
+ side_arg_dynamic_field("varblobvla",
+ side_arg_dynamic_vla(&myvla, side_attr_list())
+ ),
)
);
}
case SIDE_DYNAMIC_TYPE_S64:
printf("%" PRId64, item->u.side_s64);
break;
+ case SIDE_DYNAMIC_TYPE_BLOB:
+ printf("0x%" PRIx8, item->u.side_blob);
+ break;
+
case SIDE_DYNAMIC_TYPE_FLOAT_BINARY16:
#if __HAVE_FLOAT16
printf("%g", (double) item->u.side_float_binary16);