AMU Library 3.0
C/C++ library for communicating with AMU (Aerospace Measurement Unit) devices
Loading...
Searching...
No Matches
scpi.c File Reference

TODO. More...

#include "scpi.h"
#include "amu_device.h"
#include "amu_regs.h"
#include "amu_config_internal.h"

Go to the source code of this file.

Macros

#define SCPI_Param_amu_pid_t(c, v, b)
#define SCPI_Result_amu_pid_t(c, v)
#define SCPI_Param_amu_coeff_t(c, v, b)
#define SCPI_Result_amu_coeff_t(c, v)
#define SCPI_Param_amu_notes_t(c, v, b)
#define SCPI_Result_amu_notes_t(c, v)
#define SCPI_Param_ss_angle_t(c, v, b)
#define SCPI_Result_ss_angle_t(c, v)
#define SCPI_Param_press_data_t(c, v, b)
#define SCPI_Result_press_data_t(c, v)
#define SCPI_Param_amu_int_volt_t(c, v, b)
#define SCPI_Result_amu_int_volt_t(c, v)
#define SCPI_Param_amu_meas_t(c, v, b)
#define SCPI_Result_amu_meas_t(c, v)
#define SCPI_CMD_RW(TYPE)
#define SCPI_CMD_EXEC_QRY(TYPE)
#define SCPI_COMMAND(P, C, T)

Functions

scpi_result_t scpi_cmd_rw_uint8_t (scpi_t *context)
scpi_result_t scpi_cmd_rw_uint16_t (scpi_t *context)
scpi_result_t scpi_cmd_rw_uint32_t (scpi_t *context)
scpi_result_t scpi_cmd_rw_int32_t (scpi_t *context)
scpi_result_t scpi_cmd_rw_float (scpi_t *context)
scpi_result_t scpi_cmd_rw_amu_pid_t (scpi_t *context)
scpi_result_t scpi_cmd_rw_amu_coeff_t (scpi_t *context)
scpi_result_t scpi_cmd_rw_amu_notes_t (scpi_t *context)
scpi_result_t scpi_cmd_rw_ss_angle_t (scpi_t *context)
scpi_result_t scpi_cmd_rw_press_data_t (scpi_t *context)
scpi_result_t scpi_cmd_rw_amu_int_volt_t (scpi_t *context)
scpi_result_t scpi_cmd_rw_amu_meas_t (scpi_t *context)
scpi_result_t scpi_cmd_exec_qry_uint8_t (scpi_t *context)
scpi_result_t scpi_cmd_exec_qry_uint16_t (scpi_t *context)
scpi_result_t scpi_cmd_exec_qry_uint32_t (scpi_t *context)
scpi_result_t scpi_cmd_exec_qry_float (scpi_t *context)
scpi_result_t scpi_cmd_execute (scpi_t *context)
scpi_result_t _scpi_read_ptr (scpi_t *context)
scpi_result_t _scpi_write_sweep_ptr (scpi_t *context)
scpi_result_t _scpi_write_config_ptr (scpi_t *context)
scpi_result_t _scpi_write_meta_ptr (scpi_t *context)
scpi_result_t _scpi_cmd_led (scpi_t *context)
scpi_result_t _scpi_cmd_measure_channel (scpi_t *context)
scpi_result_t _scpi_cmd_measure_active_ch (scpi_t *context)
scpi_result_t _scpi_cmd_measure_tsensors (scpi_t *context)
scpi_result_t _scpi_cmd_query_str (scpi_t *context)
scpi_result_t _scpi_cmd_twi_scan (scpi_t *context)
static size_t SCPI_Write (scpi_t *context, const char *data, size_t len)
static scpi_result_t SCPI_Write_Control (scpi_t *context, scpi_ctrl_name_t ctrl, scpi_reg_val_t val)
static scpi_result_t SCPI_Reset (scpi_t *context)
static scpi_result_t SCPI_Flush (scpi_t *context)
 sizeof ("\n"))
int16_t _scpi_get_channelList (scpi_t *context)

Variables

static uint8_t scpi_channel_list [16+1]
static volatile amu_device_tscpi_amu_dev
static char scpi_input_buffer [1024]
static scpi_error_t scpi_error_queue_data [16]
static scpi_t scpi_context
static scpi_interface_t scpi_interface
static size_t o_count = 1
amu_notes_tnotes_ptr

Detailed Description

TODO.

Author
CJM28241
Date
5/7/2019 7:16:32 PM

Definition in file scpi.c.

Macro Definition Documentation

◆ SCPI_CMD_EXEC_QRY

#define SCPI_CMD_EXEC_QRY ( TYPE)

Definition at line 108 of file scpi.c.

◆ SCPI_CMD_RW

#define SCPI_CMD_RW ( TYPE)

Definition at line 52 of file scpi.c.

◆ SCPI_COMMAND

#define SCPI_COMMAND ( P,
C,
T )
Value:
{C ## _ ## T ## _pattern, C, T},

◆ SCPI_Param_amu_coeff_t

#define SCPI_Param_amu_coeff_t ( c,
v,
b )
Value:
scpi_bool_t SCPI_ParamArrayFloat(scpi_t *context, float *data, size_t i_count, size_t *o_count, scpi_array_format_t format, scpi_bool_t mandatory)
Definition parser.c:1903
static size_t o_count
Definition scpi.c:26
@ SCPI_FORMAT_ASCII
Definition types.h:401

Definition at line 31 of file scpi.c.

◆ SCPI_Param_amu_int_volt_t

#define SCPI_Param_amu_int_volt_t ( c,
v,
b )
Value:

Definition at line 43 of file scpi.c.

◆ SCPI_Param_amu_meas_t

#define SCPI_Param_amu_meas_t ( c,
v,
b )
Value:

Definition at line 46 of file scpi.c.

◆ SCPI_Param_amu_notes_t

#define SCPI_Param_amu_notes_t ( c,
v,
b )
Value:
#define AMU_NOTES_SIZE
Definition amu_types.h:26
scpi_bool_t SCPI_ParamCopyText(scpi_t *context, char *buffer, size_t buffer_len, size_t *copy_len, scpi_bool_t mandatory)
Definition parser.c:1263

Definition at line 34 of file scpi.c.

◆ SCPI_Param_amu_pid_t

#define SCPI_Param_amu_pid_t ( c,
v,
b )
Value:

Definition at line 28 of file scpi.c.

◆ SCPI_Param_press_data_t

#define SCPI_Param_press_data_t ( c,
v,
b )
Value:

Definition at line 40 of file scpi.c.

◆ SCPI_Param_ss_angle_t

#define SCPI_Param_ss_angle_t ( c,
v,
b )
Value:

Definition at line 37 of file scpi.c.

◆ SCPI_Result_amu_coeff_t

#define SCPI_Result_amu_coeff_t ( c,
v )
Value:
size_t SCPI_ResultArrayFloat(scpi_t *context, const float *array, size_t count, scpi_array_format_t format)
Definition parser.c:1812

Definition at line 32 of file scpi.c.

◆ SCPI_Result_amu_int_volt_t

#define SCPI_Result_amu_int_volt_t ( c,
v )
Value:

Definition at line 44 of file scpi.c.

◆ SCPI_Result_amu_meas_t

#define SCPI_Result_amu_meas_t ( c,
v )
Value:

Definition at line 47 of file scpi.c.

◆ SCPI_Result_amu_notes_t

#define SCPI_Result_amu_notes_t ( c,
v )
Value:
SCPI_ResultText(c, (char *)v)
size_t SCPI_ResultText(scpi_t *context, const char *data)
Definition parser.c:600

Definition at line 35 of file scpi.c.

◆ SCPI_Result_amu_pid_t

#define SCPI_Result_amu_pid_t ( c,
v )
Value:

Definition at line 29 of file scpi.c.

◆ SCPI_Result_press_data_t

#define SCPI_Result_press_data_t ( c,
v )
Value:

Definition at line 41 of file scpi.c.

◆ SCPI_Result_ss_angle_t

#define SCPI_Result_ss_angle_t ( c,
v )
Value:

Definition at line 38 of file scpi.c.

Function Documentation

◆ _scpi_cmd_led()

scpi_result_t _scpi_cmd_led ( scpi_t * context)

Definition at line 270 of file scpi.c.

◆ _scpi_cmd_measure_active_ch()

scpi_result_t _scpi_cmd_measure_active_ch ( scpi_t * context)

Definition at line 322 of file scpi.c.

◆ _scpi_cmd_measure_channel()

scpi_result_t _scpi_cmd_measure_channel ( scpi_t * context)

< Root command for I2C/USB commands

Definition at line 283 of file scpi.c.

◆ _scpi_cmd_measure_tsensors()

scpi_result_t _scpi_cmd_measure_tsensors ( scpi_t * context)

Definition at line 348 of file scpi.c.

◆ _scpi_cmd_query_str()

scpi_result_t _scpi_cmd_query_str ( scpi_t * context)

< Root command for I2C/USB commands

< Root command for I2C/USB commands

Definition at line 362 of file scpi.c.

◆ _scpi_cmd_twi_scan()

scpi_result_t _scpi_cmd_twi_scan ( scpi_t * context)

Definition at line 416 of file scpi.c.

◆ _scpi_get_channelList()

int16_t _scpi_get_channelList ( scpi_t * context)

Definition at line 647 of file scpi.c.

◆ _scpi_read_ptr()

scpi_result_t _scpi_read_ptr ( scpi_t * context)

Definition at line 166 of file scpi.c.

◆ _scpi_write_config_ptr()

scpi_result_t _scpi_write_config_ptr ( scpi_t * context)

Definition at line 231 of file scpi.c.

◆ _scpi_write_meta_ptr()

scpi_result_t _scpi_write_meta_ptr ( scpi_t * context)

Definition at line 256 of file scpi.c.

◆ _scpi_write_sweep_ptr()

scpi_result_t _scpi_write_sweep_ptr ( scpi_t * context)

Definition at line 215 of file scpi.c.

◆ scpi_cmd_exec_qry_float()

scpi_result_t scpi_cmd_exec_qry_float ( scpi_t * context)

< Root command for I2C/USB commands

Definition at line 145 of file scpi.c.

◆ scpi_cmd_exec_qry_uint16_t()

scpi_result_t scpi_cmd_exec_qry_uint16_t ( scpi_t * context)

< Root command for I2C/USB commands

Definition at line 143 of file scpi.c.

◆ scpi_cmd_exec_qry_uint32_t()

scpi_result_t scpi_cmd_exec_qry_uint32_t ( scpi_t * context)

< Root command for I2C/USB commands

Definition at line 144 of file scpi.c.

◆ scpi_cmd_exec_qry_uint8_t()

scpi_result_t scpi_cmd_exec_qry_uint8_t ( scpi_t * context)

< Root command for I2C/USB commands

Definition at line 142 of file scpi.c.

◆ scpi_cmd_execute()

scpi_result_t scpi_cmd_execute ( scpi_t * context)

Definition at line 149 of file scpi.c.

◆ scpi_cmd_rw_amu_coeff_t()

scpi_result_t scpi_cmd_rw_amu_coeff_t ( scpi_t * context)

< Root command for I2C/USB commands

Definition at line 101 of file scpi.c.

◆ scpi_cmd_rw_amu_int_volt_t()

scpi_result_t scpi_cmd_rw_amu_int_volt_t ( scpi_t * context)

< Root command for I2C/USB commands

Definition at line 105 of file scpi.c.

◆ scpi_cmd_rw_amu_meas_t()

scpi_result_t scpi_cmd_rw_amu_meas_t ( scpi_t * context)

< Root command for I2C/USB commands

Definition at line 106 of file scpi.c.

◆ scpi_cmd_rw_amu_notes_t()

scpi_result_t scpi_cmd_rw_amu_notes_t ( scpi_t * context)

< Root command for I2C/USB commands

Definition at line 102 of file scpi.c.

◆ scpi_cmd_rw_amu_pid_t()

scpi_result_t scpi_cmd_rw_amu_pid_t ( scpi_t * context)

< Root command for I2C/USB commands

Definition at line 100 of file scpi.c.

◆ scpi_cmd_rw_float()

scpi_result_t scpi_cmd_rw_float ( scpi_t * context)

< Root command for I2C/USB commands

Definition at line 99 of file scpi.c.

◆ scpi_cmd_rw_int32_t()

scpi_result_t scpi_cmd_rw_int32_t ( scpi_t * context)

< Root command for I2C/USB commands

Definition at line 98 of file scpi.c.

◆ scpi_cmd_rw_press_data_t()

scpi_result_t scpi_cmd_rw_press_data_t ( scpi_t * context)

< Root command for I2C/USB commands

Definition at line 104 of file scpi.c.

◆ scpi_cmd_rw_ss_angle_t()

scpi_result_t scpi_cmd_rw_ss_angle_t ( scpi_t * context)

< Root command for I2C/USB commands

Definition at line 103 of file scpi.c.

◆ scpi_cmd_rw_uint16_t()

scpi_result_t scpi_cmd_rw_uint16_t ( scpi_t * context)

< Root command for I2C/USB commands

Definition at line 96 of file scpi.c.

◆ scpi_cmd_rw_uint32_t()

scpi_result_t scpi_cmd_rw_uint32_t ( scpi_t * context)

< Root command for I2C/USB commands

Definition at line 97 of file scpi.c.

◆ scpi_cmd_rw_uint8_t()

scpi_result_t scpi_cmd_rw_uint8_t ( scpi_t * context)

< Root command for I2C/USB commands

Definition at line 95 of file scpi.c.

◆ SCPI_Flush()

scpi_result_t SCPI_Flush ( scpi_t * context)
static

Definition at line 482 of file scpi.c.

◆ SCPI_Reset()

scpi_result_t SCPI_Reset ( scpi_t * context)
static

Definition at line 476 of file scpi.c.

◆ SCPI_Write()

size_t SCPI_Write ( scpi_t * context,
const char * data,
size_t len )
static

Definition at line 439 of file scpi.c.

◆ SCPI_Write_Control()

scpi_result_t SCPI_Write_Control ( scpi_t * context,
scpi_ctrl_name_t ctrl,
scpi_reg_val_t val )
static

Definition at line 444 of file scpi.c.

◆ sizeof()

sizeof ( "\n" )

Variable Documentation

◆ notes_ptr

amu_notes_t* notes_ptr

Definition at line 49 of file scpi.c.

◆ o_count

size_t o_count = 1
static

Definition at line 26 of file scpi.c.

◆ scpi_amu_dev

volatile amu_device_t* scpi_amu_dev
static

Definition at line 15 of file scpi.c.

◆ scpi_channel_list

uint8_t scpi_channel_list[16+1]
static

Definition at line 14 of file scpi.c.

◆ scpi_context

scpi_t scpi_context
static

Definition at line 23 of file scpi.c.

◆ scpi_error_queue_data

scpi_error_t scpi_error_queue_data[16]
static

Definition at line 20 of file scpi.c.

◆ scpi_input_buffer

char scpi_input_buffer[1024]
static

Definition at line 19 of file scpi.c.

◆ scpi_interface

scpi_interface_t scpi_interface
static

Definition at line 24 of file scpi.c.