AgIsoStack++
A control-function-focused implementation of the major ISOBUS and J1939 protocols
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
isobus::LanguageCommandInterface Class Reference

An interface for requesting and parsing the ISO11783 language command PGN, 0xFE0F. More...

#include <isobus_language_command_interface.hpp>

Public Types

enum class  DecimalSymbols : std::uint8_t { Comma = 0 , Point = 1 , Reserved = 2 , NoAction = 3 }
 Command sent to all CFs that determines whether a point or a comma will be displayed as the decimal symbol. (SPN 2411) More...
 
enum class  DateFormats : std::uint8_t {
  ddmmyyyy = 0 , ddyyyymm = 1 , mmyyyydd = 2 , mmddyyyy = 3 ,
  yyyymmdd = 4 , yyyyddmm = 5 , ReservedStart = 6 , ReservedEnd = 250
}
 Command sent to all CFs specifying the displayed format of the date. (SPN 2412) More...
 
enum class  TimeFormats : std::uint8_t { TwentyFourHour = 0 , TwelveHourAmPm = 1 , Reserved = 2 , NoAction = 3 }
 Command sent to all CFs specifying the displayed format of the time. (SPN 2413) More...
 
enum class  DistanceUnits : std::uint8_t { Metric = 0 , ImperialUS = 1 , Reserved = 2 , NoAction = 3 }
 Command specifying a distance unit. (SPN 2414) More...
 
enum class  AreaUnits : std::uint8_t { Metric = 0 , ImperialUS = 1 , Reserved = 2 , NoAction = 3 }
 Command specifying an area unit. (SPN 2415) More...
 
enum class  VolumeUnits : std::uint8_t { Metric = 0 , Imperial = 1 , US = 2 , NoAction = 3 }
 Command specifying a volume unit. (SPN 2416) More...
 
enum class  MassUnits : std::uint8_t { Metric = 0 , Imperial = 1 , US = 2 , NoAction = 3 }
 Command specifying a mass unit. (SPN 2417) More...
 
enum class  TemperatureUnits : std::uint8_t { Metric = 0 , ImperialUS = 1 , Reserved = 2 , NoAction = 3 }
 Command specifying a temperature unit. (SPN 5194) More...
 
enum class  PressureUnits : std::uint8_t { Metric = 0 , ImperialUS = 1 , Reserved = 2 , NoAction = 3 }
 Command specifying a pressure unit (SPN 5195) More...
 
enum class  ForceUnits : std::uint8_t { Metric = 0 , ImperialUS = 1 , Reserved = 2 , NoAction = 3 }
 Command specifying a force unit (SPN 5196) More...
 
enum class  UnitSystem : std::uint8_t { Metric = 0 , Imperial = 1 , US = 2 , NoAction = 3 }
 May be used for the display of any unit, or a unit other than those explicitly specified (SPN 5197) More...
 

Public Member Functions

 LanguageCommandInterface (std::shared_ptr< InternalControlFunction > sourceControlFunction, bool shouldRespondToRequests=false)
 Constructor for a LanguageCommandInterface.
 
 LanguageCommandInterface (std::shared_ptr< InternalControlFunction > sourceControlFunction, std::shared_ptr< PartneredControlFunction > filteredControlFunction)
 Constructor for a LanguageCommandInterface.
 
 LanguageCommandInterface (LanguageCommandInterface &)=delete
 Deleted copy constructor for LanguageCommandInterface.
 
 ~LanguageCommandInterface ()
 Destructor for the LanguageCommandInterface.
 
void initialize ()
 Initializes the interface.
 
void set_partner (std::shared_ptr< PartneredControlFunction > filteredControlFunction)
 Changes the partner being used by the interface to a new partner.
 
std::shared_ptr< PartneredControlFunctionget_partner () const
 Returns the current partner being used by the interface.
 
bool get_initialized () const
 Returns if initialize has been called yet.
 
bool send_request_language_command () const
 Sends a PGN request for the language command PGN to the interface's partner, or the global address depending on if you set a partner when constructing the object.
 
bool send_language_command ()
 Sends a language command based on the current content of this class as a broadcast.
 
std::string get_country_code () const
 Returns the commanded country code parsed from the last language command specifying the operator's desired language dialect.
 
void set_country_code (std::string country)
 Sets the country code specifying the operator's desired language dialect.
 
std::string get_language_code () const
 Returns the commanded language code parsed from the last language command.
 
void set_language_code (std::string language)
 Sets the language.
 
std::uint32_t get_language_command_timestamp () const
 Returns a timestamp (in ms) corresponding to when the interface last received a language command.
 
DecimalSymbols get_commanded_decimal_symbol () const
 Returns the commanded decimal symbol parsed from the last language command.
 
void set_commanded_decimal_symbol (DecimalSymbols decimals)
 Sets the decimal symbol to be used.
 
TimeFormats get_commanded_time_format () const
 Returns the commanded time format parsed from the last language command.
 
void set_commanded_time_format (TimeFormats format)
 Sets the commanded time format.
 
DateFormats get_commanded_date_format () const
 Returns the commanded date format parsed from the last language command.
 
void set_commanded_date_format (DateFormats format)
 Sets the commanded date format.
 
DistanceUnits get_commanded_distance_units () const
 Returns the commanded distance units parsed from the last language command.
 
void set_commanded_distance_units (DistanceUnits units)
 Sets the commanded distance units.
 
AreaUnits get_commanded_area_units () const
 Returns the commanded area units parsed from the last received language command.
 
void set_commanded_area_units (AreaUnits units)
 Sets the commanded area units.
 
VolumeUnits get_commanded_volume_units () const
 Returns the commanded volume units parsed from the last received language command.
 
void set_commanded_volume_units (VolumeUnits units)
 Sets the commanded volume units.
 
MassUnits get_commanded_mass_units () const
 Returns the commanded mass units parsed from the last received language command.
 
void set_commanded_mass_units (MassUnits units)
 Sets the commanded mass units.
 
TemperatureUnits get_commanded_temperature_units () const
 Returns the commanded temperature units parsed from the last received language command.
 
void set_commanded_temperature_units (TemperatureUnits units)
 Sets the commanded temperature units.
 
PressureUnits get_commanded_pressure_units () const
 Returns the commanded pressure units parsed from the last received language command.
 
void set_commanded_pressure_units (PressureUnits units)
 Sets the commanded pressure units.
 
ForceUnits get_commanded_force_units () const
 Returns the commanded force units parsed from the last received language command.
 
void set_commanded_force_units (ForceUnits units)
 Sets the commanded force units.
 
UnitSystem get_commanded_generic_units () const
 Returns the commanded "unit system" generic value that was parsed from the last received language command.
 
void set_commanded_generic_units (UnitSystem units)
 Sets the commanded generic unit system.
 
const std::array< std::uint8_t, 7 > get_localization_raw_data () const
 Returns The raw bytes that comprise the current localization data as defined in ISO11783-7.
 

Static Public Member Functions

static void process_rx_message (const CANMessage &message, void *parentPointer)
 Parses incoming CAN messages into usable unit and language settings.
 

Static Private Member Functions

static bool on_language_request (std::uint32_t parameterGroupNumber, std::shared_ptr< ControlFunction > requestingControlFunction, bool &acknowledge, AcknowledgementType &acknowledgeType, void *parentPointer)
 This is a callback to handle clients requesting the content of our language data for things like VT/TC servers.
 

Private Attributes

std::shared_ptr< InternalControlFunctionmyControlFunction
 The control function to send messages as.
 
std::shared_ptr< PartneredControlFunctionmyPartner
 The partner to talk to, or nullptr to listen to all CFs.
 
std::string countryCode
 The last received alpha-2 country code as specified by ISO 3166-1, such as "NL, FR, GB, US, DE".
 
std::string languageCode
 The last received language code, such as "en", "es", "de", etc.
 
std::uint32_t languageCommandTimestamp_ms = 0
 A millisecond timestamp correlated to the last received language command message.
 
DecimalSymbols decimalSymbol = DecimalSymbols::Point
 The decimal symbol that was commanded by the last language command message.
 
TimeFormats timeFormat = TimeFormats::TwelveHourAmPm
 The time format that was commanded by the last language command message.
 
DateFormats dateFormat = DateFormats::mmddyyyy
 The date format that was commanded by the last language command message.
 
DistanceUnits distanceUnitSystem = DistanceUnits::Metric
 The distance units that were commanded by the last language command message.
 
AreaUnits areaUnitSystem = AreaUnits::Metric
 The area units that were commanded by the last language command message.
 
VolumeUnits volumeUnitSystem = VolumeUnits::Metric
 The volume units that were commanded by the last language command message.
 
MassUnits massUnitSystem = MassUnits::Metric
 The mass units that were commanded by the last language command message.
 
TemperatureUnits temperatureUnitSystem = TemperatureUnits::Metric
 The temperature units that were commanded by the last language command message.
 
PressureUnits pressureUnitSystem = PressureUnits::Metric
 The pressure units that were commanded by the last language command message.
 
ForceUnits forceUnitSystem = ForceUnits::Metric
 The force units that were commanded by the last language command message.
 
UnitSystem genericUnitSystem = UnitSystem::Metric
 The "unit system" that was commanded by the last language command message.
 
bool initialized = false
 Tracks if initialize has been called yet for this interface.
 
bool respondToRequests = false
 Stores if the class should respond to PGN requests for the language command.
 

Detailed Description

An interface for requesting and parsing the ISO11783 language command PGN, 0xFE0F.

This is a class that's meant to provide an easy interface for dealing with the ISOBUS language command message. This is meant for use inside the VT Client and TC Client classes, however you can also use it standalone if you want.

Definition at line 31 of file isobus_language_command_interface.hpp.

Member Enumeration Documentation

◆ AreaUnits

enum class isobus::LanguageCommandInterface::AreaUnits : std::uint8_t
strong

Command specifying an area unit. (SPN 2415)

Enumerator
Metric 

Hectares or m^2.

ImperialUS 

Acres or ft^2.

Reserved 

Reserved.

NoAction 

Take No Action.

Definition at line 77 of file isobus_language_command_interface.hpp.

◆ DateFormats

enum class isobus::LanguageCommandInterface::DateFormats : std::uint8_t
strong

Command sent to all CFs specifying the displayed format of the date. (SPN 2412)

Enumerator
ddmmyyyy 

31/12/2023

ddyyyymm 

31/2023/12

mmyyyydd 

12/2023/31

mmddyyyy 

12/31/2023

yyyymmdd 

2023/12/31

yyyyddmm 

2023/31/12

ReservedStart 

Reserved range begins here.

ReservedEnd 

Reserved range ends here.

Definition at line 45 of file isobus_language_command_interface.hpp.

◆ DecimalSymbols

enum class isobus::LanguageCommandInterface::DecimalSymbols : std::uint8_t
strong

Command sent to all CFs that determines whether a point or a comma will be displayed as the decimal symbol. (SPN 2411)

Enumerator
Comma 

A comma ',' is used.

Point 

A decimal point '.' is used.

Reserved 

Reserved.

NoAction 

Take No Action.

Definition at line 36 of file isobus_language_command_interface.hpp.

◆ DistanceUnits

enum class isobus::LanguageCommandInterface::DistanceUnits : std::uint8_t
strong

Command specifying a distance unit. (SPN 2414)

Enumerator
Metric 

Kilometers, meters.

ImperialUS 

Miles, feet.

Reserved 

Reserved.

NoAction 

Take No Action.

Definition at line 68 of file isobus_language_command_interface.hpp.

◆ ForceUnits

enum class isobus::LanguageCommandInterface::ForceUnits : std::uint8_t
strong

Command specifying a force unit (SPN 5196)

Enumerator
Metric 

Newtons.

ImperialUS 

Pounds force.

Reserved 

Reserved.

NoAction 

Take No Action.

Definition at line 122 of file isobus_language_command_interface.hpp.

◆ MassUnits

enum class isobus::LanguageCommandInterface::MassUnits : std::uint8_t
strong

Command specifying a mass unit. (SPN 2417)

Enumerator
Metric 

Tonnes, Kilograms.

Imperial 

Long Tons, Pounds.

US 

Short Tons, Pounds.

NoAction 

Take No Action.

Definition at line 95 of file isobus_language_command_interface.hpp.

◆ PressureUnits

enum class isobus::LanguageCommandInterface::PressureUnits : std::uint8_t
strong

Command specifying a pressure unit (SPN 5195)

Enumerator
Metric 

Kilopascals, pascals.

ImperialUS 

Pounds per square inch.

Reserved 

Reserved.

NoAction 

Take No Action.

Definition at line 113 of file isobus_language_command_interface.hpp.

◆ TemperatureUnits

enum class isobus::LanguageCommandInterface::TemperatureUnits : std::uint8_t
strong

Command specifying a temperature unit. (SPN 5194)

Enumerator
Metric 

Degrees Celsius, Degrees Kelvin.

ImperialUS 

Degrees Fahrenheit.

Reserved 

Reserved.

NoAction 

Take No Action.

Definition at line 104 of file isobus_language_command_interface.hpp.

◆ TimeFormats

enum class isobus::LanguageCommandInterface::TimeFormats : std::uint8_t
strong

Command sent to all CFs specifying the displayed format of the time. (SPN 2413)

Enumerator
TwentyFourHour 

24 h

TwelveHourAmPm 

12 h (am/pm)

Reserved 

Reserved.

NoAction 

Take No Action.

Definition at line 59 of file isobus_language_command_interface.hpp.

◆ UnitSystem

enum class isobus::LanguageCommandInterface::UnitSystem : std::uint8_t
strong

May be used for the display of any unit, or a unit other than those explicitly specified (SPN 5197)

Enumerator
Metric 

Generic metric.

Imperial 

Generic imperial.

US 

Generis US.

NoAction 

Take No Action.

Definition at line 132 of file isobus_language_command_interface.hpp.

◆ VolumeUnits

enum class isobus::LanguageCommandInterface::VolumeUnits : std::uint8_t
strong

Command specifying a volume unit. (SPN 2416)

Enumerator
Metric 

Litre.

Imperial 

Imperial Gallon.

US 

US Gallon.

NoAction 

Take No Action.

Definition at line 86 of file isobus_language_command_interface.hpp.

Constructor & Destructor Documentation

◆ LanguageCommandInterface() [1/2]

isobus::LanguageCommandInterface::LanguageCommandInterface ( std::shared_ptr< InternalControlFunction > sourceControlFunction,
bool shouldRespondToRequests = false )

Constructor for a LanguageCommandInterface.

This constructor will make a version of the class that will accept the message from any source

Parameters
[in]sourceControlFunctionThe internal control function that the interface should communicate from
[in]shouldRespondToRequestsSet this to true if you want this interface to respond to requests for the language command PGN (used in VT/TC servers)

Definition at line 24 of file isobus_language_command_interface.cpp.

◆ LanguageCommandInterface() [2/2]

isobus::LanguageCommandInterface::LanguageCommandInterface ( std::shared_ptr< InternalControlFunction > sourceControlFunction,
std::shared_ptr< PartneredControlFunction > filteredControlFunction )

Constructor for a LanguageCommandInterface.

This constructor will make a version of the class that will filter the message to be only from the specified control function.

Parameters
sourceControlFunctionThe internal control function that the interface should communicate from
filteredControlFunctionThe control function you want to explicitly communicate with

Definition at line 31 of file isobus_language_command_interface.cpp.

◆ ~LanguageCommandInterface()

isobus::LanguageCommandInterface::~LanguageCommandInterface ( )

Destructor for the LanguageCommandInterface.

Definition at line 37 of file isobus_language_command_interface.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ get_commanded_area_units()

LanguageCommandInterface::AreaUnits isobus::LanguageCommandInterface::get_commanded_area_units ( ) const

Returns the commanded area units parsed from the last received language command.

Returns
The area units that were last commanded

Definition at line 228 of file isobus_language_command_interface.cpp.

◆ get_commanded_date_format()

LanguageCommandInterface::DateFormats isobus::LanguageCommandInterface::get_commanded_date_format ( ) const

Returns the commanded date format parsed from the last language command.

Returns
The date format that was last commanded

Definition at line 208 of file isobus_language_command_interface.cpp.

◆ get_commanded_decimal_symbol()

LanguageCommandInterface::DecimalSymbols isobus::LanguageCommandInterface::get_commanded_decimal_symbol ( ) const

Returns the commanded decimal symbol parsed from the last language command.

Returns
The decimal symbol that was last commanded

Definition at line 188 of file isobus_language_command_interface.cpp.

◆ get_commanded_distance_units()

LanguageCommandInterface::DistanceUnits isobus::LanguageCommandInterface::get_commanded_distance_units ( ) const

Returns the commanded distance units parsed from the last language command.

Returns
The distance units that were last commanded

Definition at line 218 of file isobus_language_command_interface.cpp.

◆ get_commanded_force_units()

LanguageCommandInterface::ForceUnits isobus::LanguageCommandInterface::get_commanded_force_units ( ) const

Returns the commanded force units parsed from the last received language command.

Returns
The force units that were last commanded

Definition at line 278 of file isobus_language_command_interface.cpp.

◆ get_commanded_generic_units()

LanguageCommandInterface::UnitSystem isobus::LanguageCommandInterface::get_commanded_generic_units ( ) const

Returns the commanded "unit system" generic value that was parsed from the last received language command.

Returns
The commanded unit system

Definition at line 288 of file isobus_language_command_interface.cpp.

◆ get_commanded_mass_units()

LanguageCommandInterface::MassUnits isobus::LanguageCommandInterface::get_commanded_mass_units ( ) const

Returns the commanded mass units parsed from the last received language command.

Returns
The mass units that were last commanded

Definition at line 248 of file isobus_language_command_interface.cpp.

◆ get_commanded_pressure_units()

LanguageCommandInterface::PressureUnits isobus::LanguageCommandInterface::get_commanded_pressure_units ( ) const

Returns the commanded pressure units parsed from the last received language command.

Returns
The pressure units that were last commanded

Definition at line 268 of file isobus_language_command_interface.cpp.

◆ get_commanded_temperature_units()

LanguageCommandInterface::TemperatureUnits isobus::LanguageCommandInterface::get_commanded_temperature_units ( ) const

Returns the commanded temperature units parsed from the last received language command.

Returns
The temperature units that were last commanded

Definition at line 258 of file isobus_language_command_interface.cpp.

◆ get_commanded_time_format()

LanguageCommandInterface::TimeFormats isobus::LanguageCommandInterface::get_commanded_time_format ( ) const

Returns the commanded time format parsed from the last language command.

Returns
The time format that was last commanded

Definition at line 198 of file isobus_language_command_interface.cpp.

◆ get_commanded_volume_units()

LanguageCommandInterface::VolumeUnits isobus::LanguageCommandInterface::get_commanded_volume_units ( ) const

Returns the commanded volume units parsed from the last received language command.

Returns
The volume units that were last commanded

Definition at line 238 of file isobus_language_command_interface.cpp.

◆ get_country_code()

std::string isobus::LanguageCommandInterface::get_country_code ( ) const

Returns the commanded country code parsed from the last language command specifying the operator's desired language dialect.

Note
ISO 11783 networks shall use the alpha-2 country codes in accordance with ISO 3166-1.
Returns
The commanded country code, or an empty string if none specified.

Definition at line 137 of file isobus_language_command_interface.cpp.

◆ get_initialized()

bool isobus::LanguageCommandInterface::get_initialized ( ) const

Returns if initialize has been called yet.

Returns
true if initialize has been called, otherwise false

Definition at line 85 of file isobus_language_command_interface.cpp.

Here is the caller graph for this function:

◆ get_language_code()

std::string isobus::LanguageCommandInterface::get_language_code ( ) const

Returns the commanded language code parsed from the last language command.

Note
If you do not support the returned language, your default shall be used
Returns
The commanded language code (usually 2 characters length)

Definition at line 160 of file isobus_language_command_interface.cpp.

Here is the caller graph for this function:

◆ get_language_command_timestamp()

std::uint32_t isobus::LanguageCommandInterface::get_language_command_timestamp ( ) const

Returns a timestamp (in ms) corresponding to when the interface last received a language command.

Returns
timestamp in milliseconds corresponding to when the interface last received a language command

Definition at line 183 of file isobus_language_command_interface.cpp.

Here is the caller graph for this function:

◆ get_localization_raw_data()

const std::array< std::uint8_t, 7 > isobus::LanguageCommandInterface::get_localization_raw_data ( ) const

Returns The raw bytes that comprise the current localization data as defined in ISO11783-7.

Returns
The raw bytes that comprise the current localization data

Definition at line 298 of file isobus_language_command_interface.cpp.

◆ get_partner()

std::shared_ptr< PartneredControlFunction > isobus::LanguageCommandInterface::get_partner ( ) const

Returns the current partner being used by the interface.

Returns
The current partner being used by the interface, or nullptr if none

Definition at line 80 of file isobus_language_command_interface.cpp.

Here is the caller graph for this function:

◆ initialize()

void isobus::LanguageCommandInterface::initialize ( )

Initializes the interface.

This needs to be called before the interface is useable. It registers its PGN callback and sets up the PGN request interface if needed.

Definition at line 50 of file isobus_language_command_interface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_language_request()

bool isobus::LanguageCommandInterface::on_language_request ( std::uint32_t parameterGroupNumber,
std::shared_ptr< ControlFunction > requestingControlFunction,
bool & acknowledge,
AcknowledgementType & acknowledgeType,
void * parentPointer )
staticprivate

This is a callback to handle clients requesting the content of our language data for things like VT/TC servers.

Parameters
[in]parameterGroupNumberThe PGN to handle in the callback
[in]requestingControlFunctionThe control function that is requesting the PGN
[out]acknowledgeTells the stack if we want to send an ACK or NACK
[out]acknowledgeTypeTells the stack exactly how we want to do an ACK
[in]parentPointerA generic context pointer to locate the specific instance of this class we want
Returns
true if the message was handled, otherwise false

Definition at line 370 of file isobus_language_command_interface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ process_rx_message()

void isobus::LanguageCommandInterface::process_rx_message ( const CANMessage & message,
void * parentPointer )
static

Parses incoming CAN messages into usable unit and language settings.

Parameters
messageThe CAN message to parse
parentPointerA generic context variable, usually the this pointer for this interface instance

Definition at line 327 of file isobus_language_command_interface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_language_command()

bool isobus::LanguageCommandInterface::send_language_command ( )

Sends a language command based on the current content of this class as a broadcast.

Note
This is only meant to be used by a VT server or TC/DL server
Returns
true if the message was sent, otherwise false

Definition at line 106 of file isobus_language_command_interface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_request_language_command()

bool isobus::LanguageCommandInterface::send_request_language_command ( ) const

Sends a PGN request for the language command PGN to the interface's partner, or the global address depending on if you set a partner when constructing the object.

Returns
true if the message was sent, otherwise false

Definition at line 90 of file isobus_language_command_interface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_commanded_area_units()

void isobus::LanguageCommandInterface::set_commanded_area_units ( AreaUnits units)

Sets the commanded area units.

Attention
This is meant for servers only!
Parameters
[in]unitsThe area units to set

Definition at line 233 of file isobus_language_command_interface.cpp.

◆ set_commanded_date_format()

void isobus::LanguageCommandInterface::set_commanded_date_format ( DateFormats format)

Sets the commanded date format.

Attention
This is meant for servers only!
Parameters
[in]formatThe date format to set

Definition at line 213 of file isobus_language_command_interface.cpp.

◆ set_commanded_decimal_symbol()

void isobus::LanguageCommandInterface::set_commanded_decimal_symbol ( DecimalSymbols decimals)

Sets the decimal symbol to be used.

Attention
This is meant for servers only!
Parameters
[in]decimalsThe decimal symbol that was last commanded

Definition at line 193 of file isobus_language_command_interface.cpp.

◆ set_commanded_distance_units()

void isobus::LanguageCommandInterface::set_commanded_distance_units ( DistanceUnits units)

Sets the commanded distance units.

Attention
This is meant for servers only!
Parameters
[in]unitsThe commanded distance units to set

Definition at line 223 of file isobus_language_command_interface.cpp.

◆ set_commanded_force_units()

void isobus::LanguageCommandInterface::set_commanded_force_units ( ForceUnits units)

Sets the commanded force units.

Attention
This is meant for servers only!
Parameters
[in]unitsThe commanded force unit system to command

Definition at line 283 of file isobus_language_command_interface.cpp.

◆ set_commanded_generic_units()

void isobus::LanguageCommandInterface::set_commanded_generic_units ( UnitSystem units)

Sets the commanded generic unit system.

Attention
This is meant for servers only!
Parameters
[in]unitsThe commanded generic unit system to command

Definition at line 293 of file isobus_language_command_interface.cpp.

◆ set_commanded_mass_units()

void isobus::LanguageCommandInterface::set_commanded_mass_units ( MassUnits units)

Sets the commanded mass units.

Attention
This is meant for servers only!
Parameters
[in]unitsThe commanded mass units

Definition at line 253 of file isobus_language_command_interface.cpp.

◆ set_commanded_pressure_units()

void isobus::LanguageCommandInterface::set_commanded_pressure_units ( PressureUnits units)

Sets the commanded pressure units.

Attention
This is meant for servers only!
Parameters
[in]unitsThe commanded pressure unit system to command

Definition at line 273 of file isobus_language_command_interface.cpp.

◆ set_commanded_temperature_units()

void isobus::LanguageCommandInterface::set_commanded_temperature_units ( TemperatureUnits units)

Sets the commanded temperature units.

Attention
This is meant for servers only!
Parameters
[in]unitsThe commanded temperature unit system

Definition at line 263 of file isobus_language_command_interface.cpp.

◆ set_commanded_time_format()

void isobus::LanguageCommandInterface::set_commanded_time_format ( TimeFormats format)

Sets the commanded time format.

Attention
This is meant for servers only!
Parameters
[in]formatThe time format to set

Definition at line 203 of file isobus_language_command_interface.cpp.

◆ set_commanded_volume_units()

void isobus::LanguageCommandInterface::set_commanded_volume_units ( VolumeUnits units)

Sets the commanded volume units.

Attention
This is meant for servers only!
Parameters
[in]unitsThe commanded volume units

Definition at line 243 of file isobus_language_command_interface.cpp.

◆ set_country_code()

void isobus::LanguageCommandInterface::set_country_code ( std::string country)

Sets the country code specifying the operator's desired language dialect.

Attention
This is meant for servers only
Note
ISO 11783 networks shall use the alpha-2 country codes in accordance with ISO 3166-1.
Parameters
[in]countryThe country code to set

Definition at line 142 of file isobus_language_command_interface.cpp.

◆ set_language_code()

void isobus::LanguageCommandInterface::set_language_code ( std::string language)

Sets the language.

Attention
This is meant for servers only!
Parameters
[in]languageThe language code to set

Definition at line 165 of file isobus_language_command_interface.cpp.

◆ set_partner()

void isobus::LanguageCommandInterface::set_partner ( std::shared_ptr< PartneredControlFunction > filteredControlFunction)

Changes the partner being used by the interface to a new partner.

Parameters
[in]filteredControlFunctionThe new partner to communicate with

Definition at line 75 of file isobus_language_command_interface.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ areaUnitSystem

AreaUnits isobus::LanguageCommandInterface::areaUnitSystem = AreaUnits::Metric
private

The area units that were commanded by the last language command message.

Definition at line 343 of file isobus_language_command_interface.hpp.

◆ countryCode

std::string isobus::LanguageCommandInterface::countryCode
private

The last received alpha-2 country code as specified by ISO 3166-1, such as "NL, FR, GB, US, DE".

Definition at line 336 of file isobus_language_command_interface.hpp.

◆ dateFormat

DateFormats isobus::LanguageCommandInterface::dateFormat = DateFormats::mmddyyyy
private

The date format that was commanded by the last language command message.

Definition at line 341 of file isobus_language_command_interface.hpp.

◆ decimalSymbol

DecimalSymbols isobus::LanguageCommandInterface::decimalSymbol = DecimalSymbols::Point
private

The decimal symbol that was commanded by the last language command message.

Definition at line 339 of file isobus_language_command_interface.hpp.

◆ distanceUnitSystem

DistanceUnits isobus::LanguageCommandInterface::distanceUnitSystem = DistanceUnits::Metric
private

The distance units that were commanded by the last language command message.

Definition at line 342 of file isobus_language_command_interface.hpp.

◆ forceUnitSystem

ForceUnits isobus::LanguageCommandInterface::forceUnitSystem = ForceUnits::Metric
private

The force units that were commanded by the last language command message.

Definition at line 348 of file isobus_language_command_interface.hpp.

◆ genericUnitSystem

UnitSystem isobus::LanguageCommandInterface::genericUnitSystem = UnitSystem::Metric
private

The "unit system" that was commanded by the last language command message.

Definition at line 349 of file isobus_language_command_interface.hpp.

◆ initialized

bool isobus::LanguageCommandInterface::initialized = false
private

Tracks if initialize has been called yet for this interface.

Definition at line 350 of file isobus_language_command_interface.hpp.

◆ languageCode

std::string isobus::LanguageCommandInterface::languageCode
private

The last received language code, such as "en", "es", "de", etc.

Definition at line 337 of file isobus_language_command_interface.hpp.

◆ languageCommandTimestamp_ms

std::uint32_t isobus::LanguageCommandInterface::languageCommandTimestamp_ms = 0
private

A millisecond timestamp correlated to the last received language command message.

Definition at line 338 of file isobus_language_command_interface.hpp.

◆ massUnitSystem

MassUnits isobus::LanguageCommandInterface::massUnitSystem = MassUnits::Metric
private

The mass units that were commanded by the last language command message.

Definition at line 345 of file isobus_language_command_interface.hpp.

◆ myControlFunction

std::shared_ptr<InternalControlFunction> isobus::LanguageCommandInterface::myControlFunction
private

The control function to send messages as.

Definition at line 334 of file isobus_language_command_interface.hpp.

◆ myPartner

std::shared_ptr<PartneredControlFunction> isobus::LanguageCommandInterface::myPartner
private

The partner to talk to, or nullptr to listen to all CFs.

Definition at line 335 of file isobus_language_command_interface.hpp.

◆ pressureUnitSystem

PressureUnits isobus::LanguageCommandInterface::pressureUnitSystem = PressureUnits::Metric
private

The pressure units that were commanded by the last language command message.

Definition at line 347 of file isobus_language_command_interface.hpp.

◆ respondToRequests

bool isobus::LanguageCommandInterface::respondToRequests = false
private

Stores if the class should respond to PGN requests for the language command.

Definition at line 351 of file isobus_language_command_interface.hpp.

◆ temperatureUnitSystem

TemperatureUnits isobus::LanguageCommandInterface::temperatureUnitSystem = TemperatureUnits::Metric
private

The temperature units that were commanded by the last language command message.

Definition at line 346 of file isobus_language_command_interface.hpp.

◆ timeFormat

TimeFormats isobus::LanguageCommandInterface::timeFormat = TimeFormats::TwelveHourAmPm
private

The time format that was commanded by the last language command message.

Definition at line 340 of file isobus_language_command_interface.hpp.

◆ volumeUnitSystem

VolumeUnits isobus::LanguageCommandInterface::volumeUnitSystem = VolumeUnits::Metric
private

The volume units that were commanded by the last language command message.

Definition at line 344 of file isobus_language_command_interface.hpp.


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