barectf.h.j2: add barectf_discarded_event_records_count()
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 23 Sep 2020 22:18:08 +0000 (18:18 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 23 Sep 2020 22:46:24 +0000 (18:46 -0400)
barectf_discarded_event_records_count() is an alias of
barectf_packet_events_discarded().

The count of discarded event records is not related to the current
packet; it's a data stream variable.

This change helps document the platform API.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
barectf/templates/c/barectf.c.j2
barectf/templates/c/barectf.h.j2

index 44d9b763a76041418f3026bc325ce199ac56567b..f7e7a397823a80529893f4650ff94de8df7cb69c 100644 (file)
@@ -90,6 +90,11 @@ uint32_t {{ prefix }}packet_events_discarded(const void * const vctx)
        return _FROM_VOID_PTR(const struct {{ ctx_struct_name }}, vctx)->events_discarded;
 }
 
+uint32_t {{ prefix }}discarded_event_records_count(const void * const vctx)
+{
+       return {{ prefix }}packet_events_discarded(vctx);
+}
+
 uint8_t *{{ prefix }}packet_buf(const void * const vctx)
 {
        return _FROM_VOID_PTR(const struct {{ ctx_struct_name }}, vctx)->buf;
index d8691f570af32a2be87817d7299f8c2d48324278..405e8258100203572a12f74f60632a923a2ab939 100644 (file)
@@ -68,6 +68,7 @@ uint32_t {{ prefix }}packet_size(const void *ctx);
 int {{ prefix }}packet_is_full(const void *ctx);
 int {{ prefix }}packet_is_empty(const void *ctx);
 uint32_t {{ prefix }}packet_events_discarded(const void *ctx);
+uint32_t {{ prefix }}discarded_event_records_count(const void * const ctx);
 uint8_t *{{ prefix }}packet_buf(const void *ctx);
 void {{ prefix }}packet_set_buf(void *ctx, uint8_t *buf, uint32_t buf_size);
 uint32_t {{ prefix }}packet_buf_size(const void *ctx);
This page took 0.024395 seconds and 4 git commands to generate.