blob: 11f8389619a273fa6611bb202bdacad3c77a71d7 [file] [log] [blame]
Dave Barache5389bb2016-03-28 17:12:19 -04001;;; elog-one-datum-skel.el - single u32 datum elog skeleton
2
3(require 'skeleton)
4
5(define-skeleton skel-elog-one-datum
6"Insert a skeleton single datum event definition"
7nil
8'(setq function-name (skeleton-read "Function: "))
9'(setq label (skeleton-read "Label: "))
10
11"
12
13/* $$$ May or may not be needed */
14#include <vlib/vlib.h>
15#include <vppinfra/elog.h>
16
17static inline void " function-name " (u32 data)
18{
19 ELOG_TYPE_DECLARE (e) =
20 {
21 .format = \"" label ": %d\",
22 .format_args = \"i4\",
23 };
24
25 elog (&vlib_global_main.elog_main, &e, data);
26}
27
28")