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

Detailed Description

The CiA 890 technical report (version 1.0.0, January 2023) defines the coding of SI units (international system of units) and prefixes to be used in CiA specifications. It replaces the predecessor document CiA 303-2, which was limited to classic CANopen profiles.

The macro COS890_PHYSICAL_UNIT assembles the 32-bit unit configuration parameter from an SI prefix (Cos890_SI_Prefix_e), an SI numerator unit (Cos890_SI_Unit_e), an SI denominator unit, and a CiA-document-specific byte (profile byte, normally 0).

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) & 0xFF000000U) | \
(((uint32_t)SiNumerator << 16) & 0x00FF0000U) | \
(((uint32_t)SiDenominator << 8) & 0x0000FF00U) | \
(((uint32_t)Profile) & 0x000000FFU) \
))
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:170
@ eCOS890_SI_UNIT_NONE
dimensionless
Definition cos890.h:75
@ eCOS890_SI_UNIT_DEGREE_CELSIUS
Celsius temperature [°C].
Definition cos890.h:103
@ eCOS890_SI_UNIT_VOLT
electric potential difference [V]
Definition cos890.h:96
@ eCOS890_SI_PREFIX_NONE
no prefix, 100
Definition cos890.h:61
@ eCOS890_SI_PREFIX_MILLI
milli, 10-3 [m]
Definition cos890.h:62

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 (notation indexes per CiA 890, Tables 2–6).

Enumerator
eCOS890_SI_UNIT_NONE 

dimensionless

eCOS890_SI_UNIT_METRE 

length [m]

eCOS890_SI_UNIT_KILOGRAM 

mass [kg]

eCOS890_SI_UNIT_SECOND 

time [s]

eCOS890_SI_UNIT_AMPERE 

electric current [A]

eCOS890_SI_UNIT_KELVIN 

thermodynamic temperature [K]

eCOS890_SI_UNIT_MOLE 

amount of substance [mol]

eCOS890_SI_UNIT_CANDELA 

luminous intensity [cd]

eCOS890_SI_UNIT_RADIAN 

plane angle [rad]

eCOS890_SI_UNIT_STERADIAN 

solid angle [sr]

eCOS890_SI_UNIT_HERTZ 

frequency [Hz]

eCOS890_SI_UNIT_NEWTON 

force [N]

eCOS890_SI_UNIT_PASCAL 

pressure, stress [Pa]

eCOS890_SI_UNIT_JOULE 

energy, work, heat [J]

eCOS890_SI_UNIT_WATT 

power, radiant flux [W]

eCOS890_SI_UNIT_COULOMB 

electric charge [C]

eCOS890_SI_UNIT_VOLT 

electric potential difference [V]

eCOS890_SI_UNIT_FARAD 

capacitance [F]

eCOS890_SI_UNIT_OHM 

electric resistance [Ω]

eCOS890_SI_UNIT_SIEMENS 

electric conductance [S]

eCOS890_SI_UNIT_WEBER 

magnetic flux [Wb]

eCOS890_SI_UNIT_TESLA 

magnetic flux density [T]

eCOS890_SI_UNIT_HENRY 

inductance [H]

eCOS890_SI_UNIT_DEGREE_CELSIUS 

Celsius temperature [°C].

eCOS890_SI_UNIT_LUMEN 

luminous flux [lm]

eCOS890_SI_UNIT_LUX 

illuminance [lx]

eCOS890_SI_UNIT_BECQUEREL 

activity of a radionuclide [Bq]

eCOS890_SI_UNIT_GRAY 

absorbed dose, specific energy [Gy]

eCOS890_SI_UNIT_SIVERT 

dose equivalent [Sv] (note: enumerator name misspells "sievert")

eCOS890_SI_UNIT_ANGLE_GRADE 

plane angle, grade / gon [ga] (1/400 of full rotation)

eCOS890_SI_UNIT_ANGLE_DEGREE 

plane angle, degree [°a]

eCOS890_SI_UNIT_ANGLE_MINUTE 

plane angle, minute of arc [′a] (1/60 of degree)

eCOS890_SI_UNIT_ANGLE_SECOND 

plane angle, second of arc [″a] (1/3600 of degree)

eCOS890_SI_UNIT_LITRE 

volume [l]

eCOS890_SI_UNIT_ARE 

area [a] (= 100 m²)

eCOS890_SI_UNIT_HECTARE 

area [ha] (= 10 000 m²)

eCOS890_SI_UNIT_MINUTE 

time, minute [min]

eCOS890_SI_UNIT_HOUR 

time, hour [h]

eCOS890_SI_UNIT_DAY 

time, day [d]

eCOS890_SI_UNIT_YEAR 

time, year [a]

eCOS890_SI_UNIT_GRAM 

mass [g]

eCOS890_SI_UNIT_TONNE 

mass, metric ton [t]

eCOS890_SI_UNIT_BAR 

pressure [bar]

eCOS890_SI_UNIT_POISE 

dynamic viscosity [P]

eCOS890_SI_UNIT_STOKES 

kinematic viscosity [St]

eCOS890_SI_UNIT_ELECTRONVOLT 

electric charge, electron-volt [eV]

eCOS890_SI_UNIT_ATOMIC_MASS_UNIT 

atomic mass unit [u]

eCOS890_SI_UNIT_ASTRONOMIC_UNIT 

length, astronomic unit [AU]

eCOS890_SI_UNIT_PARSEC 

length, parsec [pc]

eCOS890_SI_UNIT_METER_PER_SQUARE_SECOND 

acceleration [m/s²]

eCOS890_SI_UNIT_NEWTON_METRE 

moment of force / torque [Nm]

eCOS890_SI_UNIT_SQUARE_SECOND 

square second [s²]

eCOS890_SI_UNIT_SQUARE_METRE 

area [m²]

eCOS890_SI_UNIT_QUBIC_METRE 

volume, cubic metre [m³] (note: enumerator name misspells "cubic")