Atmel Data Visualizer definitions.
This file contains various definitions related to applications producing data streams expected by the Atmel Data Visualizer tool.
The Atmel Data Visualizer (ADV) tool is a standalone Windows application that provides a graphical display of data sent from a remote target. It is available as a separate download. For more information on downloading and installing the ADV tool, visit Atmel Data Visualizer
Copyright (c) 2011-2018 Microchip Technology Inc. and its subsidiaries.
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <stdlib.h>
Data Structures | |
struct | adv_config_end_t |
Atmel Data Visualizer end-of-configuration packet. More... | |
struct | adv_config_field_t |
Atmel Data Visualizer data field configuration packet. More... | |
struct | adv_config_stream_t |
Atmel Data Visualizer data stream configuration packet. More... | |
struct | adv_data_end_t |
struct | adv_data_field_t |
struct | adv_data_start_t |
Atmel Data Visualizer data packet components. More... | |
Macros | |
#define | ADV_PKT_CONFIG_END 0x02 |
#define | ADV_PKT_CONFIG_FIELD 0x04 |
#define | ADV_PKT_CONFIG_START 0x01 |
#define | ADV_PKT_CONFIG_STREAM 0x03 |
#define | ADV_PKT_DATA 0x05 |
#define | ADV_PKT_END 0x06 |
#define | ADV_PKT_HEADER_1 0xFF |
#define | ADV_PKT_HEADER_2 0x5A |
#define | FIELD_FORMAT_FLOAT 3 |
#define | FIELD_FORMAT_SIGNED 1 |
#define | FIELD_FORMAT_UNSIGNED 2 |
#define | FIELD_NAME_LEN 11 |
#define | FIELD_UNIT_LEN 20 |
#define | STREAM_NAME_LEN 25 |
Functions | |
void | adv_data_send_1 (uint8_t stream_num, uint32_t timestamp, int32_t value) |
Send Atmel Data Visualizer data packet with 1 data field. More... | |
void | adv_data_send_3 (uint8_t stream_num, uint32_t timestamp, int32_t value0, int32_t value1, int32_t value2) |
Send Atmel Data Visualizer data packet w/ 3 data fields. More... | |
COMPILER_PACK_RESET () void adv_write_buf(uint8_t *buf | |
Write Atmel Data Visualizer data buffer via USB or serial port. More... | |
COMPILER_PACK_SET (1) typedef struct | |
Atmel Data Visualizer start-of-configuration packet. More... | |
Variables | |
adv_config_start_t | |
int | num_bytes |
#define ADV_PKT_CONFIG_END 0x02 |
Referenced by visual_stream_init().
#define ADV_PKT_CONFIG_FIELD 0x04 |
Referenced by visual_stream_init().
#define ADV_PKT_CONFIG_START 0x01 |
Referenced by visual_stream_init().
#define ADV_PKT_CONFIG_STREAM 0x03 |
Referenced by visual_stream_init().
#define ADV_PKT_DATA 0x05 |
Referenced by adv_data_send_1(), and adv_data_send_3().
#define ADV_PKT_END 0x06 |
Referenced by adv_data_send_1(), adv_data_send_3(), and visual_stream_init().
#define ADV_PKT_HEADER_1 0xFF |
Referenced by adv_data_send_1(), adv_data_send_3(), and visual_stream_init().
#define ADV_PKT_HEADER_2 0x5A |
Referenced by adv_data_send_1(), adv_data_send_3(), and visual_stream_init().
#define FIELD_FORMAT_FLOAT 3 |
#define FIELD_FORMAT_SIGNED 1 |
Referenced by visual_stream_init().
#define FIELD_FORMAT_UNSIGNED 2 |
#define FIELD_NAME_LEN 11 |
#define FIELD_UNIT_LEN 20 |
#define STREAM_NAME_LEN 25 |
void adv_data_send_1 | ( | uint8_t | stream_num, |
uint32_t | timestamp, | ||
int32_t | value | ||
) |
Send Atmel Data Visualizer data packet with 1 data field.
This routine constructs a data visualizer data packet with one data value field and then transmits it. All multi-byte transmitted values use little endian byte order.
stream_num | The ID number of the visualizer data stream |
timestamp | A 32-bit timestamp value, in microseconds |
value | The data value to include in the transmitted packet |
Send Atmel Data Visualizer data packet with 1 data field.
This routine constructs a data visualizer data packet with one data value field and then transmits it. All multi-byte transmitted values use little endian byte order.
stream_num | The ID number of the visualizer data stream |
timestamp | A 32-bit timestamp value, in microseconds |
value | The data value to include in the transmitted packet |
References ADV_PKT_DATA, ADV_PKT_END, ADV_PKT_HEADER_1, ADV_PKT_HEADER_2, cpu_to_le16, and cpu_to_le32.
Referenced by main().
void adv_data_send_3 | ( | uint8_t | stream_num, |
uint32_t | timestamp, | ||
int32_t | value0, | ||
int32_t | value1, | ||
int32_t | value2 | ||
) |
Send Atmel Data Visualizer data packet w/ 3 data fields.
This routine constructs a data visualizer data packet with three data value fields and then transmits it. All multi-byte transmitted values use little endian byte order.
stream_num | The ID number of the visualizer data stream |
timestamp | A 32-bit timestamp value, in microseconds |
value0 | Data field 0 value |
value1 | Data field 1 value |
value2 | Data field 2 value |
Send Atmel Data Visualizer data packet w/ 3 data fields.
This routine constructs a data visualizer data packet with three data value fields and then transmits it. All multi-byte transmitted values use little endian byte order.
stream_num | The ID number of the visualizer data stream |
timestamp | A 32-bit timestamp value, in microseconds |
value0 | Data field 0 value |
value1 | Data field 1 value |
value2 | Data field 2 value |
References ADV_PKT_DATA, ADV_PKT_END, ADV_PKT_HEADER_1, ADV_PKT_HEADER_2, cpu_to_le16, and cpu_to_le32.
Referenced by main().
COMPILER_PACK_RESET | ( | ) |
Write Atmel Data Visualizer data buffer via USB or serial port.
This application uses a serial or USB connection to transmit sensor data. This routine takes the specified input buffer and writes each byte to the appropriate output device.
buffer | The address of a buffer containing the data to transmit |
num_bytes | The number of bytes to transmit |
COMPILER_PACK_SET | ( | 1 | ) |
Atmel Data Visualizer start-of-configuration packet.
adv_config_start_t |
Referenced by visual_stream_init().
int num_bytes |