Sam Grove / Mbed 2 deprecated canopen_masternode

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Layer Setting Services Object

Layer Setting Services Object
[Communication Objects]

LSS offers the possibility to inquire and change the settings of certain parameters of the local layers on a CANopen module with LSS Slave capabilities by a CANopen module with LSS Master capabilities via the CAN Network. More...

Functions

UNS8 configNetworkNode (CO_Data *d, UNS8 command, void *dat1, void *dat2, LSSCallback_t Callback)
 Used by the Master application to send a LSS command, WITHOUT response, to the slave.
UNS8 getConfigResultNetworkNode (CO_Data *d, UNS8 command, UNS32 *dat1, UNS8 *dat2)
 Use this function after a configNetworkNode or configNetworkNodeCallBack to get the result.

Detailed Description

LSS offers the possibility to inquire and change the settings of certain parameters of the local layers on a CANopen module with LSS Slave capabilities by a CANopen module with LSS Master capabilities via the CAN Network.

The following parameters can be inquired and/or changed by the use of LSS:

  • Node-ID of the CANopen Slave
  • Bit timing parameters of the physical layer (baud rate)
  • LSS address (/2/ Identity Object, Index 1018H)

Function Documentation

UNS8 configNetworkNode ( CO_Data d,
UNS8  command,
void *  dat1,
void *  dat2,
LSSCallback_t  Callback 
)

Used by the Master application to send a LSS command, WITHOUT response, to the slave.

command: the LSS command. LSS_... dat1 and dat2: pointers to optional data (depend on command). return sendLSS(d,command,dat1,dat2)

Used by the Master application to send a LSS command, WITH response, to the slave.

Parameters:
*dPointer on a CAN object data structure
command
*dat1
*dat2
CallbackThe function Callback, which must be defined in the user code, is called at the end of the exchange (on succes or abort) and can be NULL.
Returns:
sendLSS(d,command,dat1,dat2) The LSS_MSG_TIMER timer is started to control the timeout

Definition at line 996 of file lss.c.

UNS8 getConfigResultNetworkNode ( CO_Data d,
UNS8  command,
UNS32 *  dat1,
UNS8 *  dat2 
)

Use this function after a configNetworkNode or configNetworkNodeCallBack to get the result.

Parameters:
*dPointer on a CAN object data structure
commandThe LSS command (unused).
*dat1
*dat2
Returns:
:
  • LSS_RESET // Transmission not started. Init state.
  • LSS_FINISHED // data are available
  • LSS_ABORTED_INTERNAL // Aborted but not because of an abort message.
  • LSS_TRANS_IN_PROGRESS // Data not yet available
     example:
     UNS32 dat1;
     UNS8 dat2;
     res=configNetworkNodeCallBack(&_Data,LSS_INQ_NODE_ID,0,0,NULL); // inquire the nodeID
     while (getConfigResultNetworkNode (&_Data, LSS_INQ_NODE_ID, &dat1, &dat2) != LSS_TRANS_IN_PROGRESS);
    

Definition at line 1008 of file lss.c.