You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a single driver is going to handle multiple models, I'll need to implement one or possibly multiple of the following new functions:
Have specific new functions for each supported model, such as NewE3631A(inst) instead of New(inst)
Have a NewQuery(inst) function that queries the instrument and confirms it is supported.
Have a New(inst, model) function that specifies the model of the instrument to create.
In all of these, how do I handle passing in an option to reset the device? Is that always a boolean that is provided? What if I want to specify NewE3631A(inst) and I also want to query the device to ensure it actually that? I could simply mandate that a query is always performed.
The text was updated successfully, but these errors were encountered:
Thoughts on the API to create a new DC power supply in the case where one IVI driver supports multiple models, such as handling models with different number of outputs.
type inst ivi.Instrument
type Config struct {
model string
queryId bool
reset bool
}
config := Config{"E3631A", true, false}
dc, err := agilente36xx.New(inst, config)
If a single driver is going to handle multiple models, I'll need to implement one or possibly multiple of the following new functions:
NewE3631A(inst)
instead ofNew(inst)
NewQuery(inst)
function that queries the instrument and confirms it is supported.New(inst, model)
function that specifies the model of the instrument to create.In all of these, how do I handle passing in an option to reset the device? Is that always a boolean that is provided? What if I want to specify
NewE3631A(inst)
and I also want to query the device to ensure it actually that? I could simply mandate that a query is always performed.The text was updated successfully, but these errors were encountered: