How to use the XScope continuous event type
version
1.0.0beta1
scope
Example.
This code is provided as example code for a user to base their code on.
description
How to use the XScope continuous event type
Provides a simple example of the integration of XScope into an application and the use of the Continuous event type for data logging.
Include the XScope header file
#include <xscope.h>
Send contents of variable value to output event id 0
void output_data_1(unsigned int value) { xscope_probe_data(0, value); }
Send contents of variable value to output event id 1
void output_data_2(unsigned int value) { xscope_probe_data(1, value); }
Register 2 events of type XSCOPE_CONTINUOUS
xscope_register(2, XSCOPE_CONTINUOUS, "Continuous Value 1", XSCOPE_UINT, "Value", XSCOPE_CONTINUOUS, "Continuous Value 2", XSCOPE_UINT, "Value");
Output 100 data values to each event type
for (i = 0; i < 100; i++) { output_data_1(i*i); output_data_2(i*i*2); }