Acquisition

This resource allows the client to get or set the acquisition state devices connected to the NIC.

Resource

api/nic/acquisition

Returns

acquisition state structure

Supported methods

  • GET: Read the acquisition state.

  • PUT: Set the acquisition state.

Attributes

Field

Type

Option

Description

state

integer

0

Stop data acquisition and reset the trace numbering.

1

Start data acquisition.

2

Pause data acquisition, does not reset trace number. Start acquisition again to resume.

Read the acquisition state

Sample request

response = requests.get("http://192.168.20.221:8080/api/nic/acquisition")

Sample response data

{
"data": {
 "state": 0
}

Start data acquisition

Sample request

Python

acq_state = json.dumps({"state": 1})
response = requests.put("http://192.168.20.221:8080/api/nic/acquisition", data={"data": acq_state})

Sample response

{
"data": {
 "state": 1
}

Errors

Invalid Parameter Format

(Status Code: 0011)

Returned if any of the input parameters have a type mismatch from the expected format.

GPR Not Powered

(Status Code: 4001)

The connected GPR device is not powered on.

GPR Not Running

(Status Code: 4003)

Returned when the connected GPR device is not running and a stop or pause state is input.

GPR Already Running

(Status Code: 4004)

Returned when the connected GPR device is already running and a start state is input.

GPR Not Initialized

(Status Code: 4005)

Returned when a start state is input, but the connected GPR device has not been initialized with the setup command first.