Lss

Lss

CANopen LSS protocol handler.

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:

Product code.

Type:
  • number

productCode :number

Description:
  • Product code.

Source:
Deprecated:

Product code.

Type:
  • number

revisionNumber :number

Description:
  • Revision number.

Source:
Deprecated:

Revision number.

Type:
  • number

revisionNumber :number

Description:
  • Revision number.

Source:
Deprecated:

Revision number.

Type:
  • number

serialNumber :number

Description:
  • Serial number.

Source:
Deprecated:

Serial number.

Type:
  • number

serialNumber :number

Description:
  • Serial number.

Source:
Deprecated:

Serial number.

Type:
  • number

vendorId :number

Description:
  • Vendor id.

Source:
Deprecated:

Vendor id.

Type:
  • number

vendorId :number

Description:
  • Vendor id.

Source:
Deprecated:

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
Name Type Attributes Description
vendorId number <optional>

vendor-id hint.

productCode number <optional>

product-code hint.

revisionNumber number <optional>

revision-number hint.

serialNumber number <optional>

serial-number hint.

timeout number <optional>

how long to wait for nodes to respond.

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:

(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
Name Type Description
id number

CAN message identifier.

data Buffer

CAN message data;

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
Name Type Attributes Description
vendorId number

LSS consumer vendor-id.

productCode number

LSS consumer product-code.

revisionNumber number

LSS consumer revision-number.

serialNumber number

LSS consumer serial-number.

timeout number <optional>

time until promise is rejected.

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:
Type: