pub struct DefaultRM(_);
Expand description

Default Resource Manager for VISA

Implementations

returns a session to the Default Resource Manager resource.

The first call to this function initializes the VISA system, including the Default Resource Manager resource, and also returns a session to that resource. Subsequent calls to this function return unique sessions to the same Default Resource Manager resource.

When a Resource Manager session is dropped, not only is that session closed, but also all find lists and device sessions (which that Resource Manager session was used to create) are closed.

Queries a VISA system to locate the resources associated with a specified interface.

The viFindRsrc() operation matches the value specified in the expr parameter with the resources available for a particular interface. A regular expression is a string consisting of ordinary characters as well as special characters. You use a regular expression to specify patterns to match in a given string; in other words, it is a search criterion. The viFindRsrc() operation uses a case-insensitive compare feature when matching resource names against the regular expression specified in expr. For example, calling viFindRsrc() with “VXI?*INSTR” would return the same resources as invoking it with “vxi?*instr”.

All resource strings returned by viFindRsrc() will always be recognized by viOpen(). However, viFindRsrc() will not necessarily return all strings that you can pass to viParseRsrc() or viOpen(). This is especially true for network and TCPIP resources.

The search criteria specified in the expr parameter has two parts: a regular expression over a resource string, and an optional logical expression over attribute values. The regular expression is matched against the resource strings of resources known to the VISA Resource Manager. If the resource string matches the regular expression, the attribute values of the resource are then matched against the expression over attribute values. If the match is successful, the resource has met the search criteria and gets added to the list of resources found.

Special Characters and OperatorsMeaning
?Matches any one character.
\Makes the character that follows it an ordinary character instead of special character. For example, when a question mark follows a backslash (?), it matches the ? character instead of any one character.
[list]Matches any one character from the enclosed list. You can use a hyphen to match a range of characters.
[^list]Matches any character not in the enclosed list. You can use a hyphen to match a range of characters.
*Matches 0 or more occurrences of the preceding character or expression.
+Matches 1 or more occurrences of the preceding character or expression.
Exp|expMatches either the preceding or following expression. The or operator
(exp)Grouping characters or expressions.
Regular ExpressionSample Matches
GPIB?*INSTRGPIB0::2::INSTR, and GPIB1::1::1::INSTR.
GPIB[0-9]*::?*INSTRGPIB0::2::INSTR and GPIB1::1::1::INSTR.
GPIB[^0]::?*INSTRGPIB1::1::1::INSTR but not GPIB0::2::INSTR or GPIB12::8::INSTR.
VXI?*INSTRVXI0::1::INSTR.
?*VXI[0-9]*::?*INSTRVXI0::1::INSTR.
ASRL[0-9]*::?*INSTRASRL1::INSTR but not VXI0::5::INSTR.
ASRL1+::INSTRASRL1::INSTR and ASRL11::INSTR but not ASRL2::INSTR.
(GPIB|VXI)?*INSTRGPIB1::5::INSTR and VXI0::3::INSTR but not ASRL2::INSTR.
(GPIB0|VXI0)::1::INSTRGPIB0::1::INSTR and VXI0::1::INSTR.
?*INSTRall INSTR (device) resources.
?*VXI[0-9]*::?*MEMACCVXI0::MEMACC.
VXI0::?*VXI0::1::INSTR, VXI0::2::INSTR, and VXI0::MEMACC.
?*all resources.
visa://hostname/?*all resources on the specified remote system. The hostname can be represented as either an IP address (dot-notation) or network machine name. This remote system need not be a conf igured remote system.
/?*all resources on the local machine. Configured remote systems are not queried.
visa:/ASRL?*INSTRall ASRL resources on the local machine and returns them in URL format (for example, visa:/ASRL1::INSTR).

see also official doc

Queries a VISA system to locate the resources associated with a specified interface, return the first resource matched

Parse a resource string to get the interface information.

Parse a resource string to get extended interface information.

the returned three VisaStrings are:

  • Specifies the resource class (for example, “INSTR”) of the given resource string.

  • This is the expanded version of the given resource string. The format should be similar to the VISA-defined canonical resource name.

  • Specifies the user-defined alias for the given resource string.

Opens a session to the specified resource.

For the parameter accessMode, the value VI_EXCLUSIVE_LOCK (1) is used to acquire an exclusive lock immediately upon opening a session; if a lock cannot be acquired, the session is closed and an error is returned. The value VI_LOAD_CONFIG (4) is used to configure attributes to values specified by some external configuration utility. Multiple access modes can be used simultaneously by specifying a bit-wise OR of the values other than VI_NULL.

NI-VISA currently supports VI_LOAD_CONFIG only on Serial INSTR sessions.

Trait Implementations

Formats the value using the given formatter. Read more

if want a specific attribute, use AttrInner::get_from

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.