# devices.electronicsmeasurements:BOSS


Class for controlling the Electronics Measurement Inc.


Usage

``` python
devices.electronicsmeasurements:BOSS(
    interface,
    **kwargs,
)
```


BOSS-20-5 power supply.


## Methods

| Name | Description |
|----|----|
| [__init__()](#__init__) | Initialize BOSS device. |
| [getControl()](#getControl) | Get current control mode. |
| [getCurrent()](#getCurrent) | Get current amperage. |
| [getVoltage()](#getVoltage) | Get current voltage. |
| [id()](#id) | Get device identifier. |
| [query()](#query) | Send a command to the device and get the response. |
| [read_very_eager()](#read_very_eager) | Read all available data from device buffer. |
| [setControl()](#setControl) | Set control mode. |
| [setSource()](#setSource) | Set source value. |
| [set_local()](#set_local) | Set device to local mode. |

------------------------------------------------------------------------


### \_\_init\_\_()


Initialize BOSS device.


Usage

``` python
__init__(
    interface,
    **kwargs,
)
```


#### Parameters


`interface: str`  
VISA resource name.

`**kwargs: dict`  
Additional keyword arguments for VisaDevice.


------------------------------------------------------------------------


### getControl()


Get current control mode.


Usage

``` python
getControl()
```


#### Returns


`int`  
0 for current mode, 1 for voltage mode.


------------------------------------------------------------------------


### getCurrent()


Get current amperage.


Usage

``` python
getCurrent()
```


#### Returns


`float`  
Current amperage in Amps.


------------------------------------------------------------------------


### getVoltage()


Get current voltage.


Usage

``` python
getVoltage()
```


#### Returns


`float`  
Current voltage in Volts.


------------------------------------------------------------------------


### id()


Get device identifier.


Usage

``` python
id()
```


#### Returns


`str`  
Device identifier.


------------------------------------------------------------------------


### query()


Send a command to the device and get the response.


Usage

``` python
query(
    msg,
    attempts=0,
)
```


#### Parameters


`msg: str`  
Command to send.

`attempts: int = ``0`  
Number of retry attempts.


#### Returns


`str`  
Device response.


#### Raises


`OSError`  
If too many attempts to query.


------------------------------------------------------------------------


### read_very_eager()


Read all available data from device buffer.


Usage

``` python
read_very_eager(attempts=0)
```


#### Parameters


`attempts: int = ``0`  
Number of retry attempts.


#### Returns


`str`  
Data read from device buffer.


#### Raises


`OSError`  
If too many attempts to read eagerly.


------------------------------------------------------------------------


### setControl()


Set control mode.


Usage

``` python
setControl(mode)
```


#### Parameters


`mode: int`  
0 for current mode, 1 for voltage mode.


------------------------------------------------------------------------


### setSource()


Set source value.


Usage

``` python
setSource(source)
```


#### Parameters


`source: float`  
Source value to set.


------------------------------------------------------------------------


### set_local()


Set device to local mode.


Usage

``` python
set_local()
```
