API Reference v9.2.0

PvtBufferclass

Module: ZaberMotionAscii

Represents a PVT buffer with this number on a device. A PVT buffer is a place to store a queue of PVT actions.

The following example illustrates how you can obtain an instance of this type:

import ZaberMotionAscii

let connection = try await Connection.openSerialPort(portName: "COM3")
let device = try connection.getDevice(deviceAddress: 1)
let pvt = device.pvt
let pvtBuffer = try pvt.getBuffer(pvtBufferNumber: 1)

Properties

p

bufferNumber

readonly
pvtBuffer.bufferNumber
Int The number identifying the buffer on the device.
p

device

readonly
pvtBuffer.device
Device The Device this buffer exists on.

Methods

m

erase()

asyncthrows
try await pvtBuffer.erase()
Erases the contents of the buffer. This method fails if there is a PVT sequence writing to the buffer.
m

getContent()

asyncthrows
try await pvtBuffer.getContent()
Gets the buffer contents as an array of strings.
Return Value
[String] A string array containing all the PVT commands stored in the buffer.
m

retrieveSequenceData()

asyncthrows
try await pvtBuffer.retrieveSequenceData(axes = [], timeUnits = Units.native)
Gets the buffer contents as an array of PvtSequenceItem objects.
Arguments
NameTypeDescription
axes[PvtBufferAxisUnits]Per-axis unit conversion specification. The length must match the number of axes in the buffer. When omitted, position and velocity values are returned in native units.
timeUnitsUnitsUnits to convert time values to. Defaults to native.
Return Value
[PvtSequenceItem] The PVT data loaded from the buffer.