Protocol Documentation

Table of Contents

acq_protocol.proto

Top

ACQCommand

Generic ACQ Commands

ACQCommand.BoardInformation

Obtains board spesific information

ACQCommand.BoardInformation.Request

FieldTypeLabelDescription
dummy bool

dummy object

ACQCommand.BoardInformation.Response

FieldTypeLabelDescription
status Types.ResponseStatus

status

firmware_version float

Firmware version (ex: 3.5f)

sample_size uint32

Maximum sample size

adc_clock_frequency uint32

ADC clock frequency

ACQCommand.CalculateSTFT

Calculates S-TFT for frequency range

ACQCommand.CalculateSTFT.Request

FieldTypeLabelDescription
nfft uint32

FFT size

n_window uint32

Window (FFT shift)

frequency_range Types.Range

Frequency Range (bin index)

ACQCommand.CalculateSTFT.Response

FieldTypeLabelDescription
status Types.ResponseStatus

status

ACQCommand.Configure

Configures sample size,

sample time and active channels

ACQCommand.Configure.Request

FieldTypeLabelDescription
sample_size uint32

Sample size

sample_time Types.SampleTime

Sample time

channels Types.Channels

Active channels

ACQCommand.Configure.Response

FieldTypeLabelDescription
status Types.ResponseStatus

status

ACQCommand.SetAcquisition

Starts / stops acquisition based on the mode provided

ACQCommand.SetAcquisition.Request

FieldTypeLabelDescription
mode Types.AcquisitionMode

mode (circular / oneshot / stop)

ACQCommand.SetAcquisition.Response

FieldTypeLabelDescription
status Types.ResponseStatus

status

ACQCommand.SetBuffers

Obtains board spesific information

ACQCommand.SetBuffers.Request

FieldTypeLabelDescription
amplitude uint32

Amplitude of given function

frequency uint32

Frequency of signal

function_type Types.FunctionType

Function type

offset_period float

Time offset x, t_off = x * period

repeat_period float

Repeat period x, t_signal = x * period

reference uint32

Reference value

channels Types.Channels

ACQCommand.SetBuffers.Response

FieldTypeLabelDescription
status Types.ResponseStatus

status

ACQCommand.Transfer

Transfers buffer data of given channels,

from start_position to start_position + size

ACQCommand.Transfer.Request

FieldTypeLabelDescription
start_position uint32

Start index of buffer

size uint32

Length of transfer

channels Types.Channels

Channels to be transferred

ACQCommand.Transfer.Response

FieldTypeLabelDescription
status Types.ResponseStatus

status

ch0 bytes

channel 0 data stream

ch1 bytes

channel 1 data stream

ch2 bytes

channel 2 data stream

ACQRequest

FieldTypeLabelDescription
configure ACQCommand.Configure.Request

transfer ACQCommand.Transfer.Request

set_acquisition ACQCommand.SetAcquisition.Request

calculate_stft ACQCommand.CalculateSTFT.Request

board_info ACQCommand.BoardInformation.Request

set_buffers ACQCommand.SetBuffers.Request

ACQResponse

FieldTypeLabelDescription
configure ACQCommand.Configure.Response

transfer ACQCommand.Transfer.Response

set_acquisition ACQCommand.SetAcquisition.Response

calculate_stft ACQCommand.CalculateSTFT.Response

board_info ACQCommand.BoardInformation.Response

set_buffers ACQCommand.SetBuffers.Response

Types

Generic Message Types for ACQ Protocol

Types.Channels

Channel Configuration

FieldTypeLabelDescription
ch0 bool

Channel-0 Enabled/Disabled

ch1 bool

Channel-1 Enabled/Disabled

ch2 bool

Channel-2 Enabled/Disabled

Types.Range

Generic range type primarily used in

specifying frequency range indexes

FieldTypeLabelDescription
low uint32

Lower bound value

high uint32

Upper bound value

Types.ResponseStatus

Generic message response status

contains success or fail flag,

also an error message if failed.

FieldTypeLabelDescription
success bool

success/fail flag

msg string

Error message (if failed)

Types.AcquisitionMode

Acquisition Mode is used to configure

stream/capturing behaviour.

NameNumberDescription
INVALID 0

No valid type, will return error message

ONESHOT 1

Once buffer is filled, acquisition will stop

CIRCULAR 2

Once buffer is filled, it circles back and overwrites

STOP 3

Stops acquisition

Types.FunctionType

Function type used in setting buffers

NameNumberDescription
SINE 0

Sine wave

SQUARE 1

Square wave

TRIANGLE 2

Triangle wave

SAWTOOTH 3

Sawtooth wave

Types.SampleTime

Sampling Time Configuration

NameNumberDescription
ADC_SAMPLETIME_1CYCLE_5 0

1.5 cycle period

ADC_SAMPLETIME_2CYCLES_5 1

2.5 cycle period

ADC_SAMPLETIME_8CYCLES_5 2

8.5 cycle period

ADC_SAMPLETIME_16CYCLES_5 3

16.5 cycle period

ADC_SAMPLETIME_32CYCLES_5 4

32.5 cycle period

ADC_SAMPLETIME_64CYCLES_5 5

64.5 cycle period

ADC_SAMPLETIME_387CYCLES_5 6

387.5 cycle period

ADC_SAMPLETIME_810CYCLES_5 7

810.5 cycle period

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)