for_developers:signal_live_monitoring
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
for_developers:signal_live_monitoring [2016/08/15 16:35] – created gehrig | for_developers:signal_live_monitoring [2018/05/31 12:02] – [Overview] graf | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Live Monitoring of Signals ====== | ====== Live Monitoring of Signals ====== | ||
- | ===== Overview ===== | ||
- | With the following method a signal can be monitored while the application is running. | ||
- | But this method should be used with caution, because it ca degrade the real time performance of the system. For this reason only one or two signals can be monitored at a time, if the real time performance is needed. | ||
- | |||
- | To keep the real time performance on an acceptable level, // | ||
- | |||
- | ===== Implementation ===== | ||
- | Following example contains a timing measurement and monitoring of one signal. | ||
- | |||
- | In ControlSystem.cpp after creating task and before adding it to the executor: | ||
- | <code cpp> | ||
- | ... | ||
- | |||
- | eeros:: | ||
- | |||
- | td.monitors.push_back([& | ||
- | static int ticks = 0; // mseconds | ||
- | |||
- | if (++ticks < 1000) return; | ||
- | ticks = 0; | ||
- | |||
- | eeros:: | ||
- | c.reset(); | ||
- | std:cout << "CS: period max: " << setw(7) | ||
- | << " | ||
- | << std::endl; | ||
- | }); | ||
- | |||
- | eeros:: | ||
- | |||
- | ... | ||
- | </ |