Skip to content

Commit 0deeff3

Browse files
committed
docs: update documentation to use unit ID terminology
1 parent 815d60c commit 0deeff3

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

README.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,20 +165,20 @@ type.
165165

166166
TCP
167167
^^^
168-
The following is how to open and initialize a TCP Device, where the slave ID is set to 1, the IP address of the TCP
168+
The following is how to open and initialize a TCP Device, where the Unit ID is set to 1, the IP address of the TCP
169169
device is
170170
127.0.0.1, and the port is 8502::
171171

172172
>>> import sunspec2.modbus.client as client
173-
>>> d = client.SunSpecModbusClientDeviceTCP(slave_id=1, ipaddr='127.0.0.1', ipport=8502)
173+
>>> d = client.SunSpecModbusClientDeviceTCP(unit_id=1, ipaddr='127.0.0.1', ipport=8502)
174174

175175
RTU
176176
^^^
177-
The following to open and initialize a RTU Device, where the slave ID is set to 1, and the name of the serial port is
177+
The following to open and initialize a RTU Device, where the Unit ID is set to 1, and the name of the serial port is
178178
COM2::
179179

180180
>>> import sunspec2.modbus.client as client
181-
>>> d = client.SunSpecModbusClientDeviceRTU(slave_id=1, name="COM2")
181+
>>> d = client.SunSpecModbusClientDeviceRTU(unit_id=1, name="COM2")
182182

183183
Device Image
184184
^^^^^^^^^^^^
@@ -209,7 +209,7 @@ model ID. The first key is the model ID as an int, the second key is the model n
209209
that a device may contain more than one model with the same model ID, the dictionary keys refer to a list of model
210210
objects with that ID. Both keys refer to the same model list for a model ID.
211211

212-
>>> d = client.SunSpecModbusClientDeviceTCP(slave_id=1, ipaddr='127.0.0.1', ipport=8502)
212+
>>> d = client.SunSpecModbusClientDeviceTCP(unit_id=1, ipaddr='127.0.0.1', ipport=8502)
213213
>>> d.scan()
214214

215215

@@ -296,7 +296,7 @@ This section will go over the full steps on how to set a volt-var curve.
296296

297297
Initialize device, and run device discovery with scan(): ::
298298

299-
>>> d = client.SunSpecModbusClientDeviceRTU(slave_id=1, name="COM2")
299+
>>> d = client.SunSpecModbusClientDeviceRTU(unit_id=1, name="COM2")
300300
>>> d.scan()
301301

302302
Confirm that model 705 (DERVoltVar) is on the device: ::

sunspec2/docs/pysunspec.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,20 +146,20 @@ type.
146146

147147
TCP
148148
^^^
149-
The following is how to open and initialize a TCP Device, where the slave ID is set to 1, the IP address of the TCP
149+
The following is how to open and initialize a TCP Device, where the Unit ID is set to 1, the IP address of the TCP
150150
device is
151151
127.0.0.1, and the port is 8502::
152152

153153
>>> import sunspec2.modbus.client as client
154-
>>> d = client.SunSpecModbusClientDeviceTCP(slave_id=1, ipaddr='127.0.0.1', ipport=8502)
154+
>>> d = client.SunSpecModbusClientDeviceTCP(unit_id=1, ipaddr='127.0.0.1', ipport=8502)
155155

156156
RTU
157157
^^^
158-
The following to open and initialize a RTU Device, where the slave ID is set to 1, and the name of the serial port is
158+
The following to open and initialize a RTU Device, where the Unit ID is set to 1, and the name of the serial port is
159159
COM2::
160160

161161
>>> import sunspec2.modbus.client as client
162-
>>> d = client.SunSpecModbusClientDeviceRTU(slave_id=1, name="COM2")
162+
>>> d = client.SunSpecModbusClientDeviceRTU(unit_id=1, name="COM2")
163163

164164
Device Image
165165
^^^^^^^^^^^^
@@ -190,7 +190,7 @@ model ID. The first key is the model ID as an int, the second key is the model n
190190
that a device may contain more than one model with the same model ID, the dictionary keys refer to a list of model
191191
objects with that ID. Both keys refer to the same model list for a model ID.
192192

193-
>>> d = client.SunSpecModbusClientDeviceTCP(slave_id=1, ipaddr='127.0.0.1', ipport=8502)
193+
>>> d = client.SunSpecModbusClientDeviceTCP(unit_id=1, ipaddr='127.0.0.1', ipport=8502)
194194
>>> d.scan()
195195

196196

@@ -277,7 +277,7 @@ This section will go over the full steps on how to set a volt-var curve.
277277

278278
Initialize device, and run device discovery with scan(): ::
279279

280-
>>> d = client.SunSpecModbusClientDeviceRTU(slave_id=1, name="COM2")
280+
>>> d = client.SunSpecModbusClientDeviceRTU(unit_id=1, name="COM2")
281281
>>> d.scan()
282282

283283
Confirm that model 705 (DERVoltVar) is on the device: ::

0 commit comments

Comments
 (0)