Documentation ¶
Index ¶
Constants ¶
const ( MsgIdDevDepMsgOut msgIDtype = 1 // DEV_DEP_MSG_OUT MsgIdRequestDevDepMsgIn msgIDtype = 2 // REQUEST_DEV_DEP_MSG_IN MsgIdDevDepMsgIn msgIDtype = 2 // DEV_DEP_MSG_IN MsgIdVendorSpecificOut msgIDtype = 126 // VENDOR_SPECIFIC_OUT MsgIdRequestVendorSpecificIn msgIDtype = 127 // REQUEST_VENDOR_SPECIFIC_IN MsgIdVendorSpecificIn msgIDtype = 127 // VENDOR_SPECIFIC_IN MsgIdTrigger msgIDtype = 128 // TRIGGER )
The following msgID values are found in Table 2 under the MACRO column of the USBTMC Specificiation 1.0, April 14, 2003. The end of line comment shows the MACRO names as given in the USBTMC specification. The trigger msgID comes from Table 1 -- USB488 defined msgID values of the USBTMC-USB488 Specification 1.0, April 14, 2003.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Device ¶ added in v0.0.6
type Device struct { BulkInEndpoint *gousb.InEndpoint BulkInMaxPktSize int BulkOutEndpoint *gousb.OutEndpoint InterruptInEndpoint *gousb.InEndpoint // contains filtered or unexported fields }
func NewDevice ¶ added in v0.0.6
NewDevice searches for device matching vid, pid and serial number. Serial number can be omitted by passing empty string If serial number is omitted it will look for first device matching vid & pid If a device is detected, it will go over configurations to see if thare is a TMC configuration.
type UsbTmc ¶
type UsbTmc struct { UsbDevice *Device // contains filtered or unexported fields }
UsbTmc models a USBTMC device, which includes a USB device and the required USBTMC attributes and methods.
func (*UsbTmc) Query ¶
Query writes the given string to the USBTMC device and returns the returned value as a string. A newline character is automatically added to the query command sent to the instrument.