Connection¤
Connection
¤
Connection(
address: str,
*,
backend: Literal["MSL", "PyVISA", "NIDAQ"] | Backend = MSL,
eid: str = "",
manufacturer: str = "",
model: str = "",
serial: str = "",
**properties: Any
)
Information about how to interface with equipment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
address
|
str
|
The VISA-style address of the connection (see here for examples). |
required |
backend
|
Literal['MSL', 'PyVISA', 'NIDAQ'] | Backend
|
The backend to use to communicate with the equipment. |
MSL
|
eid
|
str
|
The equipment id to associate with the Connection instance. |
''
|
manufacturer
|
str
|
The name of the manufacturer of the equipment. |
''
|
model
|
str
|
The model number of the equipment. |
''
|
serial
|
str
|
The serial number (or unique identifier) of the equipment. |
''
|
properties
|
Any
|
Additional key-value pairs to use when communicating with the equipment. For example, the baud_rate and parity values for an RS-232 connection. |
{}
|
Source code in src/msl/equipment/schema.py
3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 | |
address
instance-attribute
¤
address: str = address
The VISA-style address of the connection (see here for examples).
manufacturer
instance-attribute
¤
manufacturer: str = manufacturer
The name of the manufacturer of the equipment.
properties
instance-attribute
¤
Additional key-value pairs to use when communicating with the equipment.
For example, the baud_rate and parity values for an RS-232 connection.
serial
instance-attribute
¤
serial: str = serial
The serial number (or unique identifier) of the equipment.
connect
¤
connect() -> Any
Connect to the equipment for computer control.
The following sequence is used to decide how the connection is established.
- If a Connection has a specified backend,
that is not
MSL, that Backend is used. - If the Connection has the appropriate manufacturer and model values for one of the Resources, that Resource is used.
- If the Connection has an address that is supported by one of the Interfaces, that Interface is used.
Source code in src/msl/equipment/schema.py
3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 | |