SdoServer

SdoServer

CANopen SDO protocol handler (Server).

The service data object (SDO) protocol uses a client-server structure where a client can initiate the transfer of data from the server's object dictionary. An SDO is transfered as a sequence of segments with basic error checking.

Constructor

new SdoServer(eds)

Source:
Implements:
See:
  • CiA301 'Service data object (SDO)' (ยง7.2.4)
Parameters:
Name Type Description
eds Eds

parent device.

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

addClient(clientId, cobIdTx, cobIdRx)

Description:
  • Add an SDO server parameter entry.

Source:
Deprecated:
Parameters:
Name Type Description
clientId number

client COB-ID to add.

cobIdTx number

Sdo COB-ID for outgoing messages (to client).

cobIdRx number

Sdo COB-ID for incoming messages (from client).

getClient(clientId) → {DataObject|null}

Description:
  • Get an SDO client parameter entry.

Source:
Deprecated:
Parameters:
Name Type Description
clientId 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:

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;

removeClient(clientId)

Description:
  • Remove an SDO server parameter entry.

Source:
Deprecated:
Parameters:
Name Type Description
clientId number

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