CANopenNode
CO_LSS.h File Reference

CANopen Layer Setting Services protocol (common). More...

#include "301/CO_driver.h"

Go to the source code of this file.

Data Structures

union  CO_LSS_address_t
 The LSS address is a 128 bit number, uniquely identifying each node. More...
 

Macros

#define CO_LSS_BIT_TIMING_VALID(index)   (index != 5 && (index >= CO_LSS_BIT_TIMING_1000 && index <= CO_LSS_BIT_TIMING_AUTO))
 Macro to check if index contains valid bit timing.
 
#define CO_LSS_NODE_ID_ASSIGNMENT   0xFFU
 Invalid node ID triggers node ID assignment.
 
#define CO_LSS_NODE_ID_VALID(nid)   ((nid >= 1 && nid <= 0x7F) || nid == CO_LSS_NODE_ID_ASSIGNMENT)
 Macro to check if node id is valid.
 
#define CO_LSS_ADDRESS_EQUAL(a1, a2)
 Macro to check if two LSS addresses are equal.
 

Enumerations

enum  CO_LSS_cs_t {
  CO_LSS_SWITCH_STATE_GLOBAL = 0x04U, CO_LSS_SWITCH_STATE_SEL_VENDOR = 0x40U, CO_LSS_SWITCH_STATE_SEL_PRODUCT = 0x41U, CO_LSS_SWITCH_STATE_SEL_REV = 0x42U,
  CO_LSS_SWITCH_STATE_SEL_SERIAL = 0x43U, CO_LSS_SWITCH_STATE_SEL = 0x44U, CO_LSS_CFG_NODE_ID = 0x11U, CO_LSS_CFG_BIT_TIMING = 0x13U,
  CO_LSS_CFG_ACTIVATE_BIT_TIMING = 0x15U, CO_LSS_CFG_STORE = 0x17U, CO_LSS_IDENT_SLAVE = 0x4FU, CO_LSS_IDENT_FASTSCAN = 0x51U,
  CO_LSS_INQUIRE_VENDOR = 0x5AU, CO_LSS_INQUIRE_PRODUCT = 0x5BU, CO_LSS_INQUIRE_REV = 0x5CU, CO_LSS_INQUIRE_SERIAL = 0x5DU,
  CO_LSS_INQUIRE_NODE_ID = 0x5EU
}
 LSS protocol command specifiers. More...
 
enum  CO_LSS_cfgNodeId_t { CO_LSS_CFG_NODE_ID_OK = 0x00U, CO_LSS_CFG_NODE_ID_OUT_OF_RANGE = 0x01U, CO_LSS_CFG_NODE_ID_MANUFACTURER = 0xFFU }
 Error codes for Configure node ID protocol. More...
 
enum  CO_LSS_cfgBitTiming_t { CO_LSS_CFG_BIT_TIMING_OK = 0x00U, CO_LSS_CFG_BIT_TIMING_OUT_OF_RANGE = 0x01U, CO_LSS_CFG_BIT_TIMING_MANUFACTURER = 0xFFU }
 Error codes for Configure bit timing parameters protocol. More...
 
enum  CO_LSS_cfgStore_t { CO_LSS_CFG_STORE_OK = 0x00U, CO_LSS_CFG_STORE_NOT_SUPPORTED = 0x01U, CO_LSS_CFG_STORE_FAILED = 0x02U, CO_LSS_CFG_STORE_MANUFACTURER = 0xFFU }
 Error codes for Store configuration protocol. More...
 
enum  CO_LSS_fastscan_bitcheck { CO_LSS_FASTSCAN_BIT0 = 0x00U, CO_LSS_FASTSCAN_BIT31 = 0x1FU, CO_LSS_FASTSCAN_CONFIRM = 0x80U }
 Fastscan BitCheck. More...
 
enum  CO_LSS_fastscan_lss_sub_next { CO_LSS_FASTSCAN_VENDOR_ID = 0, CO_LSS_FASTSCAN_PRODUCT = 1, CO_LSS_FASTSCAN_REV = 2, CO_LSS_FASTSCAN_SERIAL = 3 }
 Fastscan LSSsub, LSSnext. More...
 
enum  CO_LSS_state_t { CO_LSS_STATE_WAITING = 0, CO_LSS_STATE_CONFIGURATION = 1 }
 LSS finite state automaton. More...
 
enum  CO_LSS_bitTimingTable_t {
  CO_LSS_BIT_TIMING_1000 = 0, CO_LSS_BIT_TIMING_800 = 1, CO_LSS_BIT_TIMING_500 = 2, CO_LSS_BIT_TIMING_250 = 3,
  CO_LSS_BIT_TIMING_125 = 4, CO_LSS_BIT_TIMING_50 = 6, CO_LSS_BIT_TIMING_20 = 7, CO_LSS_BIT_TIMING_10 = 8,
  CO_LSS_BIT_TIMING_AUTO = 9
}
 Definition of table_index for /CiA301/ bit timing table. More...
 

Variables

static const uint16_t CO_LSS_bitTimingTableLookup []
 Lookup table for conversion between bit timing table and numerical bit rate.
 

Detailed Description

CANopen Layer Setting Services protocol (common).

Author
Martin Wagner

This file is part of CANopenNode, an opensource CANopen Stack. Project home page is https://github.com/CANopenNode/CANopenNode. For more information on CANopen see http://www.can-cia.org/.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.