add
添加entry to IVI configuration store object
Syntax
add(obj, '
type
', 'name', ...)
add(obj, 'DriverSession', 'name', 'ModuleName', 'HardwareAssetName', 'P1
', V1)
add(obj, 'HardwareAsset', 'name', 'IOResourceDescriptor', 'P1
', V1)
add(obj, 'LogicalName', 'name', 'SessionName', 'P1
', V1)
add(obj, struct)
Arguments
|
IVI®configuration store object |
|
Type of entry being added |
|
Name of the |
|
Tells the driver exactly how to locate the device this asset represents |
|
IVI instrument driver or software module |
|
Unique identifier for hardware asset |
|
Unique identifier for asset driver session |
|
First optional parameter for added entry. Other parameter-value pairs may follow. |
|
Value for first parameter |
|
Structure defining entry to be added; field names are the entry parameter names |
Description
add(obj, '
adds a new entry oftype
', 'name', ...)type
to the IVI configuration store object,obj
, with name,name
. If an entry of type,type
, with name,name
, already exists an error will occur. Based ontype
, additional arguments are required.type
can beHardwareAsset
,DriverSession
, orLogicalName
.
add(obj, 'DriverSession', 'name', 'ModuleName', 'HardwareAssetName', '
adds a new driver session entry to the IVI configuration store object,P1
', V1)obj
, with name,name
, using the specified software module name,ModuleName
and hardware asset name,HardwareAssetName
. Optional parameter-value pairs may be included.
Valid parameters forDriverSession
are listed below. The default value for on/off parameters isoff
.
Parameter |
Value |
Description |
---|---|---|
|
Any character vector |
Description of driver session |
|
structure |
A struct array containing virtual name mappings |
|
|
Enable caching if the driver supports it. |
|
Any character vector |
This value is software module dependent |
|
|
Enable driver interchangeability checking, if supported |
|
|
Enable instrument status querying by the driver |
|
|
Enable extended range checking by the driver, if supported |
|
|
Enable recording of coercions by the driver, if supported |
|
|
Enable simulation by the driver |
add(obj, 'HardwareAsset', 'name', 'IOResourceDescriptor', '
adds a new hardware asset entry to the IVI configuration store object,P1
', V1)obj
, with name,name
, and resource descriptor,IOResourceDescriptor
. Optional parameter-value pairs may be included.
Valid parameters forHardwareAsset
are
Parameter |
Value |
Description |
---|---|---|
|
Any character vector |
Description of hardware asset |
add(obj, 'LogicalName', 'name', 'SessionName', '
adds a new logical name entry to the IVI configuration store object,P1
', V1)obj
, with name,name
, and driver session name,SessionName
. Optional parameter-value pairs may be included.
Valid parameters forLogicalName
are
Parameter |
Value |
Description |
---|---|---|
|
Any character vector |
Description of logical name |
add(obj, struct)
, wherestruct
is a structure whose field names are the entry parameter names, adds an entry to the IVI configuration store object,obj
, of the specified type with the values contained in the structure.
添加itions made to the configuration store object,obj
, can be saved to the configuration store data file with the提交
function.
Note
To get a list of options you can use on a function, press theTabkey after entering a function on the MATLAB®command line. The list expands, and you can scroll to choose a property or value. For information about using this advanced tab completion feature, seeUsing Tab Completion for Functions.
Examples
Construct IVI configuration store object,c
.
c = iviconfigurationstore;
添加a hardware asset with namegpib1
, and resource descriptionGPIB0::1::INSTR
.
add(c, 'HardwareAsset', 'gpib1', 'GPIB0::1::INSTR');
添加a driver session with nameS1
, that uses the TekScope software module and the hardware asset with namegpib1
.
add(c, 'DriverSession', 'S1', 'TekScope', 'gpib1');
添加a logical name to configuration store objectc
, with nameMyScope
, driver session nameS1
, and descriptionA logical name
.
add(c, 'LogicalName', 'MyScope', 'S1', ... 'Description', 'A logical name');
添加a hardware asset with the namegpib3
, and resource descriptionGPIB0::3::ISNTR
.
s.Type = 'HardwareAsset'; s.Name = 'gpib3'; s.IOResourceDescriptor = 'GPIB0::3::INSTR'; add(c, s);
Save the changes to the IVI configuration store data file.
提交(c);