Menu

famouso::mw::nl::CAN::detail Namespace Reference

Data Structures

struct  ETAGS
 Predefined etags for ccp and etag exchange. More...
struct  constants
 some constants that are used in the CCP More...

Functions

template<typename IDStruct >
union __attribute__ ((packed)) ID
 The union defines the CAN-ID and getter/setter methods.

Function Documentation

template<typename IDStruct >
struct famouso::mw::nl::CAN::detail::__attribute__ ( (packed)   )  [read, write]

The union defines the CAN-ID and getter/setter methods.

CAN-ID parts description for little endian machines.

CAN-ID parts description for avr that is also little endian, but has additional padding.

In the FAMOUSO middleware the canID has a clear structure and it is devided into three parts:

  • 8 bit priority
  • 7 bit node identifier
  • 14 bit etag that is the short network representation of the subject of an event.

However, the CAN-Configuration-Protocol (famouso::mw::nl::CAN::ccp) uses the ID in a slightly different way. For that purpose, IDStruct contains also the description of the CCP-parts. The union itself provides methods for accessing these parts too.

Template Parameters:
IDStruct defines the bit-postions of the parts

get etag of the CAN-ID

set etag of the CAN-ID

get the node-ID out of CAN-ID

set the node-ID on the CAN-ID

determines if the CAN message is a fragment of a bigger message

set the fragment bit if the CAN message is a fragment of a bigger one

get priority of the CAN message

set priority of the CAN message

determines the current CCP stage

set the current CCP stage

get the node-ID nibble for the CCP stage

get the node-ID nibble for the CCP stage

operator provides a byte-wise access to the CAN-ID

Referenced by StaticCreatorPolicy::process(), and LocalCreatorPolicy::process().