aboutsummaryrefslogtreecommitdiff
path: root/src/platforms/ros/perf_counter.cpp
diff options
context:
space:
mode:
authorRoman Bapst <romanbapst@yahoo.de>2014-11-11 16:01:01 +0100
committerRoman Bapst <romanbapst@yahoo.de>2014-11-11 16:01:01 +0100
commit647ec65bd0a164b4bdb38cfc5073e01695676263 (patch)
treefc1cb15f83967ee1b753d5e1ff97a813e476f0fe /src/platforms/ros/perf_counter.cpp
parent076c1e6238127b7ae14ea9119c79bc286394be8f (diff)
downloadpx4-firmware-647ec65bd0a164b4bdb38cfc5073e01695676263.tar.gz
px4-firmware-647ec65bd0a164b4bdb38cfc5073e01695676263.tar.bz2
px4-firmware-647ec65bd0a164b4bdb38cfc5073e01695676263.zip
added ros specific source file for performance_counter
Diffstat (limited to 'src/platforms/ros/perf_counter.cpp')
-rwxr-xr-xsrc/platforms/ros/perf_counter.cpp142
1 files changed, 142 insertions, 0 deletions
diff --git a/src/platforms/ros/perf_counter.cpp b/src/platforms/ros/perf_counter.cpp
new file mode 100755
index 000000000..aa8d85c60
--- /dev/null
+++ b/src/platforms/ros/perf_counter.cpp
@@ -0,0 +1,142 @@
+/*
+ * perf_counter.c
+
+ *
+ * Created on: Sep 24, 2014
+ * Author: roman
+ */
+#include <stdlib.h>
+#include <stdio.h>
+#include <systemlib/perf_counter.h>
+
+
+
+perf_counter_t perf_alloc(enum perf_counter_type type, const char *name)
+{
+ return NULL;
+}
+
+/**
+ * Free a counter.
+ *
+ * @param handle The performance counter's handle.
+ */
+void perf_free(perf_counter_t handle)
+{
+
+}
+
+/**
+ * Count a performance event.
+ *
+ * This call only affects counters that take single events; PC_COUNT, PC_INTERVAL etc.
+ *
+ * @param handle The handle returned from perf_alloc.
+ */
+void perf_count(perf_counter_t handle)
+{
+
+}
+
+/**
+ * Begin a performance event.
+ *
+ * This call applies to counters that operate over ranges of time; PC_ELAPSED etc.
+ *
+ * @param handle The handle returned from perf_alloc.
+ */
+void perf_begin(perf_counter_t handle)
+{
+
+}
+
+/**
+ * End a performance event.
+ *
+ * This call applies to counters that operate over ranges of time; PC_ELAPSED etc.
+ * If a call is made without a corresopnding perf_begin call, or if perf_cancel
+ * has been called subsequently, no change is made to the counter.
+ *
+ * @param handle The handle returned from perf_alloc.
+ */
+void perf_end(perf_counter_t handle)
+{
+
+}
+
+/**
+ * Cancel a performance event.
+ *
+ * This call applies to counters that operate over ranges of time; PC_ELAPSED etc.
+ * It reverts the effect of a previous perf_begin.
+ *
+ * @param handle The handle returned from perf_alloc.
+ */
+void perf_cancel(perf_counter_t handle)
+{
+
+}
+
+/**
+ * Reset a performance counter.
+ *
+ * This call resets performance counter to initial state
+ *
+ * @param handle The handle returned from perf_alloc.
+ */
+void perf_reset(perf_counter_t handle)
+{
+
+}
+
+/**
+ * Print one performance counter to stdout
+ *
+ * @param handle The counter to print.
+ */
+void perf_print_counter(perf_counter_t handle)
+{
+
+}
+
+/**
+ * Print one performance counter to a fd.
+ *
+ * @param fd File descriptor to print to - e.g. 0 for stdout
+ * @param handle The counter to print.
+ */
+void perf_print_counter_fd(int fd, perf_counter_t handle)
+{
+
+}
+
+/**
+ * Print all of the performance counters.
+ *
+ * @param fd File descriptor to print to - e.g. 0 for stdout
+ */
+void perf_print_all(int fd)
+{
+
+}
+
+/**
+ * Reset all of the performance counters.
+ */
+void perf_reset_all(void)
+{
+
+}
+
+/**
+ * Return current event_count
+ *
+ * @param handle The counter returned from perf_alloc.
+ * @return event_count
+ */
+uint64_t perf_event_count(perf_counter_t handle)
+{
+
+}
+
+