base
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
base::Pressure Class Reference

#include <Pressure.hpp>

Inheritance diagram for base::Pressure:
base::samples::Pressure

Public Member Functions

 Pressure ()
 
float toPa () const
 
float toBar () const
 
float toPSI () const
 

Static Public Member Functions

static Pressure fromPascal (float pascal)
 
static Pressure fromBar (float bar)
 
static Pressure fromPSI (float psi)
 

Public Attributes

float pascal
 

Detailed Description

Representation of a pressure value

It is internally normalized to a pressure in pascals (the SI unit for pressure), but provides accessors and initializers to convert to the most common pressure units (bar and PSI)

Constructor & Destructor Documentation

◆ Pressure()

base::Pressure::Pressure ( )

default constructor, which will initialize the value to unknown (NaN)

Member Function Documentation

◆ fromBar()

Pressure base::Pressure::fromBar ( float  bar)
static

Create a pressure object using a value in bars

◆ fromPascal()

Pressure base::Pressure::fromPascal ( float  pascal)
static

Create a pressure object using a value in pascals

◆ fromPSI()

Pressure base::Pressure::fromPSI ( float  psi)
static

Create a pressure object using a value in PSI

◆ toBar()

float base::Pressure::toBar ( ) const

Returns the raw pressure value in bar

◆ toPa()

float base::Pressure::toPa ( ) const

Returns the raw pressure value in pascals

◆ toPSI()

float base::Pressure::toPSI ( ) const

Returns the raw pressure value in psi

Member Data Documentation

◆ pascal

float base::Pressure::pascal

Pressure in pascals

This is made public so that it can be used directly in Rock components. You usually should not access it, but instead use one of the initializers / accessors


The documentation for this class was generated from the following files: