Skip to content

Commit e6b553c

Browse files
committed
Updated docu
1 parent 7d63e97 commit e6b553c

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

README.md

+20-13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Linux GPIB
22

3-
The brand new General Purpose Interface Bus (GPIB, IEC-625-Bus), introduced by Hewlet-Packard in the late 1960s, can be accessed via [linux-gpib](http://linux-gpib.sourceforge.net/). This module offers native bindings to the very fundamental read and write methods (```ibrd()``` and ```ibwrt()```). So if you want to access your lab bench devices using JavaScript, this module will be your solution.
3+
The brand new General Purpose Interface Bus (GPIB, IEC-625-Bus), introduced by Hewlet-Packard in the late 1960s, can be accessed via [linux-gpib](http://linux-gpib.sourceforge.net/). This module offers native bindings to the very fundamental read and write methods (`ibrd()` and `ibwrt()`). So if you want to access your lab bench devices using JavaScript, this module will be your solution.
44

55
## Example
66

@@ -53,7 +53,7 @@ const GPIB = require( 'linux-gpib' );
5353
const gpib = GPIB( minor );
5454
```
5555

56-
Connects to a GPIB adapter available at ```/dev/gpib[minor]``` and returns an instance of GPIB.
56+
Connects to a GPIB adapter available at `/dev/gpib[minor]` and returns an instance of GPIB.
5757

5858
### Class: GPIB
5959

@@ -63,14 +63,14 @@ Connects to a GPIB adapter available at ```/dev/gpib[minor]``` and returns an in
6363
const dev = gpib.connect( device );
6464
```
6565

66-
Connects to the device described in ```device``` and returns an instance of Device.
66+
Connects to the device described in `device` and returns an instance of Device.
6767

68-
```device``` has the following properties:
69-
* ```pad```: Primary GPIB address of the device.
70-
* ```sad```: (optional) Secondary GPIB address.
71-
* ```timeout```: (optional) Timeout for I/O operations. Possible values: "TNONE", "T10us", "T30us", "T100us", "T300us", "T1ms", "T3ms", "T10ms", "T30ms", "T100ms", "T300ms", "T1s", "T3s", "T10s", "T30s", "T100s", "T300s", "T1000s". Default: "T300ms".
72-
* ```send_eoi```: (optional) Assert EOI line with last transmitted byte. Default: true.
73-
* ```eos```: (optional) end-of-string mode. Default: 0x0.
68+
`device` has the following properties:
69+
* `pad`: Primary GPIB address of the device.
70+
* `sad`: (optional) Secondary GPIB address.
71+
* `timeout`: (optional) Timeout for I/O operations. Possible values: "TNONE", "T10us", "T30us", "T100us", "T300us", "T1ms", "T3ms", "T10ms", "T30ms", "T100ms", "T300ms", "T1s", "T3s", "T10s", "T30s", "T100s", "T300s", "T1000s". Default: "T300ms".
72+
* `send_eoi`: (optional) Assert EOI line with last transmitted byte. Default: true.
73+
* `eos`: (optional) end-of-string mode. Default: 0x0.
7474

7575
#### Method: disconnectAll
7676

@@ -88,35 +88,42 @@ Disconnects from all connected devices. Returns a promise.
8888
dev.write( data ).then( ... );
8989
```
9090

91-
Sends data to the connected device. Returns a promise. If ```data``` is a string, it is just transmitted. If ```data``` is an array, each item is successively transmitted, starting with the first item.
91+
Sends data to the connected device. Returns a promise. If `data` is a string, it is just transmitted. If `data` is an array, each item is transmitted successively, starting with the first item.
9292

9393
#### Method: read
9494

9595
``` javascript
9696
dev.read().then( ... );
9797
```
9898

99-
Reads data from the connected device. Returns a promise that will be resolved with the recieved data.
99+
Reads data from the connected device. Returns a promise that will be resolved with the received data.
100100

101101
#### Method: query
102102

103103
``` javascript
104104
dev.query( data ).then( ... );
105105
```
106106

107-
Fristly writes data to and then reads data from the connected device. Returns a promise that will be resolved with the recieved data.
107+
Fristly writes data to and then reads data from the connected device. Returns a promise that will be resolved with the received data.
108108

109109
#### Method: disconnect
110110

111111
``` javascript
112112
dev.disconnect( goToLocalMode ).then( ... );
113113
```
114114

115-
Disconencts from device. Returns a promise. If ```goToLocalMode``` is true (default), it will bring the device back to local mode before disconnecting.
115+
Disconencts from device. Returns a promise. If `goToLocalMode` is true (default), it will bring the device back to local mode before disconnecting.
116116

117117

118118
## Requirements
119119

120120
Beside a GPIB-capbale measurement instrument you need a GPIB interface that is compatibile with linux-gpib. Furthermore linux-gpib must be installed and the GPIB-device must be fully configured. (Some of them need a firmware downloaded onto the device before beeing used. Google is your friend!)
121121

122122
Node.js must be available in version 4 or later.
123+
124+
## Acknowledgement
125+
126+
Special thanks to:
127+
128+
* [68ec020](https://github.com/68ec020) for establishing Node.js 12 compatibility.
129+

0 commit comments

Comments
 (0)