Constructor
new Lss(eds)
- Source:
- Implements:
- See:
-
- CiA305 "Layer Settings Services and Protocol (LSS)"
Parameters:
Name | Type | Description |
---|---|---|
eds |
Eds | Eds object. |
Members
mode :LssMode
- Description:
Device LSS Mode.
- Source:
Device LSS Mode.
Type:
productCode :number
- Description:
Product code.
- Source:
- Deprecated:
- Use Eds#getIdentity instead.
Product code.
Type:
- number
productCode :number
- Description:
Product code.
- Source:
- Deprecated:
- Use Eds#setIdentity instead.
Product code.
Type:
- number
revisionNumber :number
- Description:
Revision number.
- Source:
- Deprecated:
- Use Eds#getIdentity instead.
Revision number.
Type:
- number
revisionNumber :number
- Description:
Revision number.
- Source:
- Deprecated:
- Use Eds#setIdentity instead.
Revision number.
Type:
- number
serialNumber :number
- Description:
Serial number.
- Source:
- Deprecated:
- Use Eds#getIdentity instead.
Serial number.
Type:
- number
serialNumber :number
- Description:
Serial number.
- Source:
- Deprecated:
- Use Eds#setIdentity instead.
Serial number.
Type:
- number
vendorId :number
- Description:
Vendor id.
- Source:
- Deprecated:
- Use Eds#getIdentity instead.
Vendor id.
Type:
- number
vendorId :number
- Description:
Vendor id.
- Source:
- Deprecated:
- Use Eds#setIdentity instead.
Vendor id.
Type:
- number
Methods
activateBitTiming(delay)
- Description:
Service: activate bit timing parameters.
- Source:
- See:
-
- CiA305 "Activate Bit Timing Parameters Protocol" (§3.10.3)
Parameters:
Name | Type | Description |
---|---|---|
delay |
number | switch delay in ms. |
(async) configureBitTiming(tableSelect, tableIndex, timeout) → {Promise}
- Description:
Service: configure bit timing parameters.
- Source:
- See:
-
- CiA305 "Configure Bit Timing Parameters Protocol" (§3.10.2)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
tableSelect |
number | which bit timing parameters table to use. |
|
tableIndex |
number | the entry in the selected table to use. |
|
timeout |
number |
20
|
time until promise is rejected. |
Returns:
resolves when the service is finished.
- Type
- Promise
(async) configureNodeId(nodeId, timeout) → {Promise}
- Description:
Service: configure node-id.
- Source:
- See:
-
- CiA305 "Configure Node-ID Protocol" (§3.10.1)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
nodeId |
number | new node-id |
|
timeout |
number |
20
|
time until promise is rejected. |
Returns:
resolves when the service is finished.
- Type
- Promise
(async) fastscan(argsopt) → {Promise.<(null|object)>}
- Description:
LSS Fastscan protocol.
Identifies exactly one LSS consumer device and switches it to configuration mode.
- Source:
- See:
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
args |
object |
<optional> |
arguments. Properties
|
Returns:
resolves to the discovered device's id (or null).
- Type
- Promise.<(null|object)>
init()
- Description:
Initialize the device and audit the object dictionary.
- Source:
- Deprecated:
- Use Lss#start instead.
(async) inquireProductCode(timeout) → {Promise.<number>}
- Description:
Service: inquire identity product-code.
- Source:
- See:
-
- CiA305 "Inquire Identity Product-Code Protocol" (§3.11.1.2)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
timeout |
number |
20
|
time until promise is rejected. |
Returns:
- LSS consumer product-code.
- Type
- Promise.<number>
(async) inquireRevisionNumber(timeout) → {Promise.<number>}
- Description:
Service: inquire identity revision-number.
- Source:
- See:
-
- CiA305 "Inquire Identity Revision-Number Protocol" (§3.11.1.3)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
timeout |
number |
20
|
time until promise is rejected. |
Returns:
- LSS consumer revision-number.
- Type
- Promise.<number>
(async) inquireSerialNumber(timeout) → {Promise.<number>}
- Description:
Service: inquire identity serial-number.
- Source:
- See:
-
- CiA305 "Inquire Identity Serial-Number Protocol" (§3.11.1.4)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
timeout |
number |
20
|
time until promise is rejected. |
Returns:
- LSS consumer serial-number.
- Type
- Promise.<number>
(async) inquireVendorId(timeout) → {Promise.<number>}
- Description:
Service: inquire identity vendor-id.
- Source:
- See:
-
- CiA305 "Inquire Identity Vendor-ID Protocol" (§3.11.1.1)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
timeout |
number |
20
|
time until promise is rejected. |
Returns:
- LSS consumer vendor-id.
- Type
- Promise.<number>
receive(message)
- Description:
Call when a new CAN message is received.
- Source:
- Implements:
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
message |
object | CAN frame. Properties
|
Fires:
setMode(mode)
- Description:
Set the LSS mode.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
mode |
LssMode | new mode. |
Fires:
start()
- Description:
Start the module.
- Source:
- Implements:
Fires:
stop()
- Description:
Stop the module.
- Source:
- Implements:
Fires:
(async) storeConfiguration(timeout) → {Promise}
- Description:
Service: store configuration.
- Source:
- See:
-
- CiA305 "Store Configuration Protocol" (§3.10.4)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
timeout |
number |
20
|
time until promise is rejected. |
Returns:
resolves when the service is finished.
- Type
- Promise
switchModeGlobal(mode)
- Description:
Service: switch mode global.
- Source:
- See:
-
- CiA305 "Switch Mode Global" (§3.9.1)
Parameters:
Name | Type | Description |
---|---|---|
mode |
LssMode | LSS mode to switch to. |
switchModeSelective(…args) → {Promise.<LssMode>}
- Description:
Service: switch mode selective.
- Source:
- See:
-
- CiA305 "Switch Mode Selective" (§3.9.2)
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
args |
object |
<repeatable> |
arguments. Properties
|
Returns:
- the actual mode of the LSS consumer.
- Type
- Promise.<LssMode>
Events
changeDeviceId
- Description:
LssCommand.CONFIGURE_NODE_ID was received.
- Source:
Type:
- number
changeMode
- Description:
The LSS mode changed.
- Source: