This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Except for 2-3 exception, the Newport 842-PE doesn't have real getter functions, but it has many setters. But is has a function (sta) that read device status for a lot of parameters. The previous file do a fake getter/setter. | |
def status | |
returns a dict where the key/value pairs correspond to each device parameter. | |
At device initialisation, the device's configuration is read and stored in self.DeviceStatus | |
The getter scale just read corresponding parameter in self.DeviceStatus and return it. | |
The setter scale actually write to the device to change its state. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global SampleRateUnit | |
SampleRateUnit = {'Seconds': '0', 'Minutes': '1', 'Hours': '2', | |
'Days': '3', '%': '4'} | |
global SamplePeriodUnit | |
SamplePeriodUnit = {'Seconds': '0', 'Minutes': '1', 'Hours': '2', | |
'Days': '3', 'Weeks': '4', 'Pulses': '5'} | |
global TotalDurationUnit | |
TotalDurationUnit = {'Period': '0', 'Seconds': '1', 'Minutes': '2', | |
'Hours': '3', 'Days': '4', 'Weeks': '5', 'Continuous': '6', | |
'predefinded': '7'} |