BinaryEncoding enum BinaryEncoding { DefiniteLengthBlockData = 0, IndefiniteLengthBlockData = 1, RawLittleEndian = 2, RawBigEndian = 3 } The BinaryEncoding enumeration indicates, for formatted I/O operations, the default format of binary data used in formatted I/O. The formats include IEEE definite and indefinite blocks and raw binary data with little or big endian byte ordering. The following table describes the enumeration members. Value Description DefiniteLengthBlockData IEEE-488.2 definite block format. IndefiniteLengthBlockData IEEE-488.2 indefinite block format. RawLittleEndian Raw binary data with little endian byte order. RawBigEndian Raw binary data with big endian byte order.
ByteOrder public enum ByteOrder { BigEndian = 0, LittleEndian = 1 } The ByteOrder enumeration indicates the byte order used in various VXI operations. The ByteOrder enumeration corresponds to the defined values for VISA’s VI_ATTR_SRC_BYTE_ORDER, VI_ATTR_DEST_BYTE_ORDER, and VI_ATTR_WIN_BYTE_ORDER attributes.
HardwareInterfaceType public enum HardwareInterfaceType { Custom = 0, Gpib = 1, Vxi = 2, GpibVxi = 3, Serial = 4, Pxi = 5, Tcp = 6, Usb = 7 }; The HardwareInterfaceType enumeration indicates the hardware interface type of the current session. This enumeration corresponds to the defined values for VI_ATTR_INTF_TYPE. The value Custom has been added to allow for vendor-specific types.
IOProtocol public enum IOProtocol { Normal = 0, Fdc = 1, HS488 = 2, Ieee4882 = 3, UsbTmcVendor = 4 } The IOProtocol enumeration indicates which protocol to use on a particular session. Choices are dependent on the session. This enumeration corresponds to the defined values for VISA’s VI_ATTR_IO_PROT attribute.
VxiCommandMode public enum VxiCommandMode { Command16Bit = 0, Command32Bit = 1, Command32BitResponse16Bit = 2, CommandResponse16Bit = 3, CommandResponse32Bit = 4, Response16Bit = 5, Response32Bit = 6 } The VxiCommandMode enumeration indicates whether to VISA should issue a command and/or retrieve a response, and what type or size of command and/or response to use. This enumeration corresponds to the defined values for the mode parameter of VISA’s viVxiCommandQuery function.
VxiUtilitySignal public enum VxiUtilitySignal { AssertSystemReset = 0, AssertSystemFailure = 1, DeassertSystemFailure = 2, } The VxiUtilitySignal enumeration indicates the utility bus signal to assert. This is valid only for VXI BACKPLANE sessions. This enumeration corresponds to the defined values for the line parameter of VISA’s viAssertUtilSignal function.
For a particular asynchronous write operation, IVisaAsyncResult.Buffer shall contain the bytes that will actually be written to the instrument. For overloads of BeginWrite that take string buffer arguments, IVisaAsyncResult.Buffer contains the equivalent ASCII string after it has been converted from UNICODE. For a particular asynchronous read or write operation, IAsyncResult.AsyncWaitHandle shall be signaled after the operation completes.
EndWrite Waits for the pending asynchronous write to complete. This method is always blocking. void EndWrite(IVisaAsyncResult result); The following table reflects the value of the result parameter upon completion of this method. Name Description Type result The reference to the asynchronous request. The meaning of IVisaAsyncResult members after the call completes is listed below: IVisaAsyncResult .AsyncState Unaffected by this method. Object .AsyncWaitHandle Not specified after this method completes. WaitHandle Unaffected by this method. Boolean .IsCompleted IsCompleted is always true when returned by this method since this method waits until the asynchronous operation ends. Boolean .IsAborted Unaffected by this method. Boolean .Buffer The buffer that was passed into the call to BeginWrite that initiated this asynchronous operation, or a buffer that includes only the bytes that were actually to be written by this asynchronous operation. Byte[] .Count The number of bytes actually written by this operation. Int64 Some exceptions (such as argument exceptions) are thrown immediately from this method. In addition, any errors detected during the asynchronous operation will be thrown as exceptions from this method. This method uses the Ivi.Visa.IoTimeoutException to report a timeout. The Buffer value returned as part of the IVisaAsyncResult return value for this method is the same as the Buffer value returned as part of the IVisaAsyncResult return value for BeginWrite().
ToString Returns a string representation of obj that is suitable for use in a string that is formatted by Printf. String ToString(Object obj); Name Description Type obj The object to be formatted as a string. Object Return Value Description Type return value The string to which the object has been formatted. String This method throws the Ivi.Visa. TypeFormatterException when obj cannot be formatted as a string by the type formatter object.
Parse Returns an object of type type, the value of which is determined by parsing the data string. Object Parse(Type objectType, String data); Name Description Type type The data type of the returned object. Type data The string data which is parsed to create the object returned by this method. The type formatter object must be able to parse data and convert it to an object of type type. String Return Value Description Type return value An object of type type, the value of which is determined by parsing the data string. Object This method throws the Ivi.Visa. TypeFormatterException when data cannot be parsed to an object of type type by the type formatter object.
TypeFormatter A reference to the ITypeFormatter interface implemented by the type formatter that will be used by Printf and Scanf to format and parse the types that it supports. ITypeFormatter TypeFormatter { get; set; }
ReadString Reads a string from the formatted read buffer. String ReadString(); String ReadString(Int32 count); Int32 ReadString(StringBuilder data); Int32 ReadString(StringBuilder data, Int32 count); Name Description Type data A StringBuilder object created by the calling program to hold the string to be read from the formatted read buffer. This method appends the output string to data. StringBuilder count The number of characters to be read from the read buffer. Int32 RETURN Type Description String The string actually read from the formatted read buffer. Int32 The number of characters actually appended to the StringBuilder parameter. The ReadString method implementations exhibit exactly the same behavior (but not necessarily implementated exactly as shown) as a corresponding call to Scanf, as shown in the following table. ReadString Method Equivalent Scanf Call String ReadString(); Scanf(“%s”, out result); (return result) Int32 ReadString(StringBuilder data); Scanf(“%s”, out data); (return data.Length) String ReadString(Int32 count); Scanf(“%#s”, count, out result); (return result) Int32 ReadString(StringBuilder data, Int32 count); Scanf(“%#s”, count, out data); (return data.Length)
ReadLine (String) Reads a string from the formatted read buffer. The read stops when an EOL character is reached. String ReadLine(); Int32 ReadLine(StringBuilder data); Name Description Type data A StringBuilder object created by the calling program to hold the string to be read from the formatted read buffer. This method appends the output string to data. StringBuilder RETURN Type Description String The string actually read from the formatted read buffer. Int32 The number of characters actually appended to the StringBuilder parameter. The ReadLine method implementations exhibit exactly the same behavior (but not necessarily implementated exactly as shown) as a corresponding call to Scanf, as shown in the following table. ReadLine Method Equivalent Scanf Call String ReadLine(); Scanf(“%T”, out result); (return result) Int32 ReadLine(StringBuilder data); Scanf(“%T”, out data); (return data.Length)
Type Description Byte[], SByte[], Int16[], UInt16[], Int32[], UInt32[], Int64[], UInt64[], Single[], Double[] The values read from the formatted read buffer, converted to the specified type. Int64 The number of elements in the list actually read from the formatted read buffer. The ReadLineListOfType method implementations exhibit exactly the same behavior (but not necessarily implementated exactly as shown) as a corresponding call to Scanf, as shown in the following table. ReadLineListOfType Method Equivalent Scanf Call Byte[] ReadLineListOfByte(); UInt16[] ReadLineListOfUInt16(); UInt32[] ReadLineListOfUInt32(); UInt64[] ReadLineListOfUInt64(); Scanf(“%,u%*T”, out result); (return result) SByte[] ReadLineListOfSByte(); Int16[] ReadLineListOfInt16(); Int32[] ReadLineListOfInt32(); Int64[] ReadLineListOfInt64(); Scanf(“%,d%*T”, out result); (return result) Single[] ReadLineListOfSingle(); Double[] ReadLineListOfDouble(); Scanf(“%,g%*T”, out result); (return result)
IF a vendor-specific resource manager can create any particular resource on a given hardware interface, THEN it SHALL be capable of creating all available resources on that interface. The vendor-specific resource manager’s Find() method, with an pattern argument equal to “*”, will return all of the available resources for the vendor’s VISA.NET implementation. The vendor-specific resource manager SHALL be registered as described in Section 18.2.3, .