Dave Barach | e5389bb | 2016-03-28 17:12:19 -0400 | [diff] [blame] | 1 | ;;; 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" |
| 7 | nil |
| 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 | |
| 17 | static 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 | ") |