Constructor
new SdoClient(eds)
- Source:
- Implements:
- See:
-
- CiA301 'Service data object (SDO)' (ยง7.2.4)
Parameters:
Name | Type | Description |
---|---|---|
eds |
Eds | Eds object. |
Members
blockSize :number
- Description:
Number of segments per block when serving block transfers.
- Source:
Number of segments per block when serving block transfers.
Type:
- number
Methods
_getServer(args) → {object|null}
- Description:
Returns the first SDO server matching deviceId.
- Source:
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
args |
object | SDO client parameters. Properties
|
Returns:
server object if found.
- Type
- object | null
addServer(serverId, cobIdTx, cobIdRx)
- Description:
Add an SDO client parameter entry.
- Source:
- Deprecated:
- Use Eds#addSdoClientParameter instead.
Parameters:
Name | Type | Description |
---|---|---|
serverId |
number | server COB-ID to add. |
cobIdTx |
number | Sdo COB-ID for outgoing messages (to server). |
cobIdRx |
number | Sdo COB-ID for incoming messages (from server). |
(async) download(args)
- Description:
Service: SDO download.
Write data to an SDO server.
- Source:
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
args |
object | arguments to destructure. Properties
|
Fires:
getServer(serverId) → {DataObject|null}
- Description:
Get an SDO client parameter entry.
- Source:
- Deprecated:
- Use Eds.getSdoClientParameters instead.
Parameters:
Name | Type | Description |
---|---|---|
serverId |
number | server COB-ID of the entry to get. |
Returns:
the matching entry.
- Type
- DataObject | null
init()
- Description:
Initialize the device and audit the object dictionary.
- Source:
- Deprecated:
- Use SdoClient#start() instead.
receive(message)
- Description:
Call when a new CAN message is received.
- Source:
- Implements:
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
message |
object | CAN frame. Properties
|
removeServer(serverId)
- Description:
Remove an SDO client parameter entry.
- Source:
- Deprecated:
- Use Eds#removeSdoClientParameter instead.
Parameters:
Name | Type | Description |
---|---|---|
serverId |
number | server COB-ID of the entry to remove. |
setBlockSize(value)
- Description:
Set the number of segments per block when serving block transfers.
- Source:
- Since:
- 6.0.0
Parameters:
Name | Type | Description |
---|---|---|
value |
number | block size [1-127]. |
start()
- Description:
Start the module.
- Source:
- Implements:
Fires:
stop()
- Description:
Stop the module.
- Source:
- Implements:
Fires:
(async) upload(args) → {Promise.<(Buffer|number|bigint|string|Date)>}
- Description:
Service: SDO upload
Read data from an SDO server.
- Source:
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
args |
object | arguments to destructure. Properties
|
Fires:
Returns:
resolves when the upload is complete.
- Type
- Promise.<(Buffer|number|bigint|string|Date)>