CANopen Slave Protocol Stack 
Version 7.06.00
Loading...
Searching...
No Matches
cos890.h File Reference

Detailed Description

The CiA 890 technical report defines the coding of SI units (international system of units) and prefixes to be used in CiA specifications. The predecessor document (CiA 303-2) was limited to CANopen documents.

This file holds definitions for the CiA 890 specification.

Include dependency graph for cos890.h:

Macros

#define COS890_PHYSICAL_UNIT(SiPrefix, SiNumerator, SiDenominator, Profile)

Enumerations

enum  Cos890_SI_Prefix_e
enum  Cos890_SI_Unit_e

Macro Definition Documentation

◆ COS890_PHYSICAL_UNIT

#define COS890_PHYSICAL_UNIT ( SiPrefix,
SiNumerator,
SiDenominator,
Profile )
Value:
((uint32_t)( \
(((uint32_t)SiPrefix << 24) & 0xFF000000) | \
(((uint32_t)SiNumerator << 16) & 0x00FF0000) | \
(((uint32_t)SiDenominator << 8) & 0x0000FF00) | \
(((uint32_t)Profile) & 0x000000FF) \
))


Parameters
[in]SiPrefixvalue defined by Cos890_SI_Prefix_e
[in]SiNumeratorvalue defined by Cos890_SI_Unit_e
[in]SiDenominatorvalue defined by Cos890_SI_Unit_e
[in]Profilereserved, always 0

The notation indexes represent hexadecimal code values for the ISO 80000 series’ physical units and prefixes in CiA documents, especially in device, interface and application profiles. The value structure of a configuration parameter, which determines the physical unit, should contain a notation index for SI prefix and notation indexes for SI unit as SI unit numerator and denominator.

Examples

uiint32_t ulDegreeCelsiusT = COS890_PHYSICAL_UNIT(eCOS890_SI_PREFIX_NONE,
0);
0);
#define COS890_PHYSICAL_UNIT(SiPrefix, SiNumerator, SiDenominator, Profile)
Definition cos890.h:157
@ eCOS890_SI_UNIT_NONE
dimensionless
Definition cos890.h:70
@ eCOS890_SI_UNIT_DEGREE_CELSIUS
degree celsius [°C]
Definition cos890.h:95
@ eCOS890_SI_UNIT_VOLT
volt [V]
Definition cos890.h:88
@ eCOS890_SI_PREFIX_NONE
no prefix, 100
Definition cos890.h:58
@ eCOS890_SI_PREFIX_MILLI
milli, 10-3 [m]
Definition cos890.h:59

Enumeration Type Documentation

◆ Cos890_SI_Prefix_e

Representation of SI prefixes

Enumerator
eCOS890_SI_PREFIX_GIGA 

giga, 109, [G]

eCOS890_SI_PREFIX_MEGA 

mega, 106, [M]

eCOS890_SI_PREFIX_KILO 

kilo, 103, [k]

eCOS890_SI_PREFIX_NONE 

no prefix, 100

eCOS890_SI_PREFIX_MILLI 

milli, 10-3 [m]

eCOS890_SI_PREFIX_MICRO 

micro, 10-6 [µ]

eCOS890_SI_PREFIX_NANO 

nano, 10-9 [n]

◆ Cos890_SI_Unit_e

Representation of SI units

Enumerator
eCOS890_SI_UNIT_NONE 

dimensionless

eCOS890_SI_UNIT_METRE 

meter [m]

eCOS890_SI_UNIT_KILOGRAM 

kilogram [kg]

eCOS890_SI_UNIT_SECOND 

second [s]

eCOS890_SI_UNIT_AMPERE 

ampere [A]

eCOS890_SI_UNIT_KELVIN 

kelvin [K]

eCOS890_SI_UNIT_MOLE 

mole [mol]

eCOS890_SI_UNIT_CANDELA 

candela [cd]

eCOS890_SI_UNIT_RADIAN 

radian [rad]

eCOS890_SI_UNIT_STERADIAN 

steradian [sr]

eCOS890_SI_UNIT_HERTZ 

hertz [Hz]

eCOS890_SI_UNIT_NEWTON 

newton [N]

eCOS890_SI_UNIT_PASCAL 

pascal [Pa]

eCOS890_SI_UNIT_JOULE 

joule [J]

eCOS890_SI_UNIT_WATT 

watt [W]

eCOS890_SI_UNIT_COULOMB 

coulomb [C]

eCOS890_SI_UNIT_VOLT 

volt [V]

eCOS890_SI_UNIT_FARAD 

farad [F]

eCOS890_SI_UNIT_OHM 

ohm [Ω]

eCOS890_SI_UNIT_SIEMENS 

siemens [S]

eCOS890_SI_UNIT_WEBER 

weber [Wb]

eCOS890_SI_UNIT_TESLA 

tesla [T]

eCOS890_SI_UNIT_HENRY 

henry [H]

eCOS890_SI_UNIT_DEGREE_CELSIUS 

degree celsius [°C]

eCOS890_SI_UNIT_LUMEN 

lumen [lm]

eCOS890_SI_UNIT_LUX 

lux [lx]

eCOS890_SI_UNIT_LITRE 

litre [l]

eCOS890_SI_UNIT_HOUR 

hour [h]

eCOS890_SI_UNIT_DAY 

day [d]

eCOS890_SI_UNIT_YEAR 

year [a]

eCOS890_SI_UNIT_GRAM 

gram [g]

eCOS890_SI_UNIT_TONNE 

tonne [t]

eCOS890_SI_UNIT_PARSEC 

parsec [pc]

eCOS890_SI_UNIT_METER_PER_SQUARE_SECOND 

acceleration [m/s^2]