Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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:
-
*d Pointer on a CAN object data structure command *dat1 *dat2 Callback The 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
| UNS8 getConfigResultNetworkNode | ( | CO_Data * | d, |
| UNS8 | command, | ||
| UNS32 * | dat1, | ||
| UNS8 * | dat2 | ||
| ) |
Use this function after a configNetworkNode or configNetworkNodeCallBack to get the result.
- Parameters:
-
*d Pointer on a CAN object data structure command The 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);
Generated on Tue Jul 12 2022 17:11:51 by
1.7.2