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

Stores information sent/received in a maintain power message. More...

#include <isobus_maintain_power_interface.hpp>

Public Types

enum class  ImplementInWorkState : std::uint8_t { ImplementNotInWorkState = 0 , ImplementInWorkState = 1 , ErrorIndication = 2 , NotAvailable = 3 }
 Signal that indicates that an implement is connected to a tractor or power unit and is in work state. More...
 
enum class  ImplementReadyToWorkState { ImplementNotReadyForFieldWork = 0 , ImplementReadyForFieldWork = 1 , ErrorIndication = 2 , NotAvailable = 3 }
 Signal that indicates that an implement is connected to a tractor or power unit and is ready for work. More...
 
enum class  ImplementParkState { ImplementMayNotBeDisconnected = 0 , ImplementMayBeDisconnected = 1 , ErrorIndication = 2 , NotAvailable = 3 }
 Indicates the state of an implement where it may be disconnected from a tractor or power unit. More...
 
enum class  ImplementTransportState { ImplementMayNotBeTransported = 0 , ImplementMayBeTransported = 1 , ErrorIndication = 2 , NotAvailable = 3 }
 Indicates the transport state of an implement connected to a tractor or power unit. More...
 
enum class  MaintainActuatorPower { NoFurtherRequirementForPWR = 0 , RequirementFor2SecondsMoreForPWR = 1 , Reserved = 2 , DontCare = 3 }
 Enumerates the different states that can be requested in the "Maintain Actuator Power" SPN. More...
 
enum class  MaintainECUPower { NoFurtherRequirementForECU_PWR = 0 , RequirementFor2SecondsMoreForECU_PWR = 1 , Reserved = 2 , DontCare = 3 }
 Enumerates the different states that can be requested in the "Maintain ECU Power" SPN. More...
 

Public Member Functions

 MaintainPowerData (std::shared_ptr< ControlFunction > sendingControlFunction)
 Constructor for a MaintainPowerData object, which stores information sent/received in a maintain power message.
 
bool set_implement_in_work_state (ImplementInWorkState inWorkState)
 Sets the reported implement in-work state.
 
ImplementInWorkState get_implement_in_work_state () const
 Returns the reported implement in-work state.
 
bool set_implement_ready_to_work_state (ImplementReadyToWorkState readyToWorkState)
 Sets the reported implement ready to work state.
 
ImplementReadyToWorkState get_implement_ready_to_work_state () const
 Returns the reported implement ready to work state.
 
bool set_implement_park_state (ImplementParkState parkState)
 Sets the reported implement park state.
 
ImplementParkState get_implement_park_state () const
 Returns the reported implement park state.
 
bool set_implement_transport_state (ImplementTransportState transportState)
 Sets the reported implement transport state.
 
ImplementTransportState get_implement_transport_state () const
 Returns the reported implement transport state.
 
bool set_maintain_actuator_power (MaintainActuatorPower maintainState)
 Sets the reported maintain actuator power state.
 
MaintainActuatorPower get_maintain_actuator_power () const
 Returns the reported maintain actuator power state.
 
bool set_maintain_ecu_power (MaintainECUPower maintainState)
 Sets the reported maintain ECU power state.
 
MaintainECUPower get_maintain_ecu_power () const
 Returns the reported maintain ECU power state.
 
std::shared_ptr< ControlFunctionget_sender_control_function () const
 Returns a pointer to the sender of the message. If an ICF is the sender, returns the ICF being used to transmit from.
 
void set_timestamp_ms (std::uint32_t timestamp)
 Sets the timestamp for when the message was received or sent.
 
std::uint32_t get_timestamp_ms () const
 Returns the timestamp for when the message was received, in milliseconds.
 

Private Attributes

std::shared_ptr< ControlFunctionsendingControlFunction = nullptr
 The control function that is sending the message.
 
std::uint32_t timestamp_ms = 0
 A timestamp for when the message was released in milliseconds.
 
ImplementInWorkState currentImplementInWorkState = ImplementInWorkState::NotAvailable
 The reported implement in-work state.
 
ImplementReadyToWorkState currentImplementReadyToWorkState = ImplementReadyToWorkState::NotAvailable
 The reported implement ready to work state.
 
ImplementParkState currentImplementParkState = ImplementParkState::NotAvailable
 The reported implement park state.
 
ImplementTransportState currentImplementTransportState = ImplementTransportState::NotAvailable
 The reported transport state of the implement.
 
MaintainActuatorPower currentMaintainActuatorPowerState = MaintainActuatorPower::DontCare
 The reported state for maintaining actuator power for 2 more seconds.
 
MaintainECUPower currentMaintainECUPowerState = MaintainECUPower::DontCare
 The reported state for maintaining ECU power for 2 more seconds.
 

Detailed Description

Stores information sent/received in a maintain power message.

Definition at line 33 of file isobus_maintain_power_interface.hpp.

Member Enumeration Documentation

◆ ImplementInWorkState

Signal that indicates that an implement is connected to a tractor or power unit and is in work state.

SPN 7447

Definition at line 38 of file isobus_maintain_power_interface.hpp.

◆ ImplementParkState

Indicates the state of an implement where it may be disconnected from a tractor or power unit.

SPN 1870

Definition at line 58 of file isobus_maintain_power_interface.hpp.

◆ ImplementReadyToWorkState

Signal that indicates that an implement is connected to a tractor or power unit and is ready for work.

SPN 1871

Definition at line 48 of file isobus_maintain_power_interface.hpp.

◆ ImplementTransportState

Indicates the transport state of an implement connected to a tractor or power unit.

SPN 1869

Definition at line 68 of file isobus_maintain_power_interface.hpp.

◆ MaintainActuatorPower

Enumerates the different states that can be requested in the "Maintain Actuator Power" SPN.

SPN 1868

Definition at line 78 of file isobus_maintain_power_interface.hpp.

◆ MaintainECUPower

Enumerates the different states that can be requested in the "Maintain ECU Power" SPN.

SPN 1867

Definition at line 88 of file isobus_maintain_power_interface.hpp.

Constructor & Destructor Documentation

◆ MaintainPowerData()

isobus::MaintainPowerInterface::MaintainPowerData::MaintainPowerData ( std::shared_ptr< ControlFunction > sendingControlFunction)
explicit

Constructor for a MaintainPowerData object, which stores information sent/received in a maintain power message.

Parameters
[in]sendingControlFunctionThe control function to use if sending the message

Definition at line 64 of file isobus_maintain_power_interface.cpp.

Member Function Documentation

◆ get_implement_in_work_state()

MaintainPowerInterface::MaintainPowerData::ImplementInWorkState isobus::MaintainPowerInterface::MaintainPowerData::get_implement_in_work_state ( ) const

Returns the reported implement in-work state.

Returns
The reported implement in-work state

Definition at line 76 of file isobus_maintain_power_interface.cpp.

Here is the caller graph for this function:

◆ get_implement_park_state()

MaintainPowerInterface::MaintainPowerData::ImplementParkState isobus::MaintainPowerInterface::MaintainPowerData::get_implement_park_state ( ) const

Returns the reported implement park state.

Returns
The reported implement park state

Definition at line 100 of file isobus_maintain_power_interface.cpp.

Here is the caller graph for this function:

◆ get_implement_ready_to_work_state()

MaintainPowerInterface::MaintainPowerData::ImplementReadyToWorkState isobus::MaintainPowerInterface::MaintainPowerData::get_implement_ready_to_work_state ( ) const

Returns the reported implement ready to work state.

Returns
The reported implement ready to work state

Definition at line 88 of file isobus_maintain_power_interface.cpp.

Here is the caller graph for this function:

◆ get_implement_transport_state()

MaintainPowerInterface::MaintainPowerData::ImplementTransportState isobus::MaintainPowerInterface::MaintainPowerData::get_implement_transport_state ( ) const

Returns the reported implement transport state.

Returns
The reported implement transport state

Definition at line 112 of file isobus_maintain_power_interface.cpp.

Here is the caller graph for this function:

◆ get_maintain_actuator_power()

MaintainPowerInterface::MaintainPowerData::MaintainActuatorPower isobus::MaintainPowerInterface::MaintainPowerData::get_maintain_actuator_power ( ) const

Returns the reported maintain actuator power state.

Returns
The reported maintain actuator power state

Definition at line 124 of file isobus_maintain_power_interface.cpp.

Here is the caller graph for this function:

◆ get_maintain_ecu_power()

MaintainPowerInterface::MaintainPowerData::MaintainECUPower isobus::MaintainPowerInterface::MaintainPowerData::get_maintain_ecu_power ( ) const

Returns the reported maintain ECU power state.

Returns
The reported maintain ECU power state

Definition at line 136 of file isobus_maintain_power_interface.cpp.

Here is the caller graph for this function:

◆ get_sender_control_function()

std::shared_ptr< ControlFunction > isobus::MaintainPowerInterface::MaintainPowerData::get_sender_control_function ( ) const

Returns a pointer to the sender of the message. If an ICF is the sender, returns the ICF being used to transmit from.

Attention
The only way you could get an invalid pointer here is if you register a partner, it sends this message, then you delete the partner and call this function, as that is the only time the stack deletes a control function. That would be abnormal program flow, but at some point the stack will be updated to return a shared or weak pointer instead, but for now please be aware of that limitation. Eventually though the message will time-out normally and you can get a new pointer for the external CF that replaces the deleted partner.
Returns
The control function sending this instance of the guidance system command message

Definition at line 141 of file isobus_maintain_power_interface.cpp.

Here is the caller graph for this function:

◆ get_timestamp_ms()

std::uint32_t isobus::MaintainPowerInterface::MaintainPowerData::get_timestamp_ms ( ) const

Returns the timestamp for when the message was received, in milliseconds.

Returns
The timestamp for when the message was received, in milliseconds

Definition at line 151 of file isobus_maintain_power_interface.cpp.

◆ set_implement_in_work_state()

bool isobus::MaintainPowerInterface::MaintainPowerData::set_implement_in_work_state ( ImplementInWorkState inWorkState)

Sets the reported implement in-work state.

Parameters
[in]inWorkStateThe reported implement in-work state to set
Returns
True if the set value was different from the stored value, otherwise false.

Definition at line 69 of file isobus_maintain_power_interface.cpp.

◆ set_implement_park_state()

bool isobus::MaintainPowerInterface::MaintainPowerData::set_implement_park_state ( ImplementParkState parkState)

Sets the reported implement park state.

Parameters
[in]parkStateThe reported implement park state to set
Returns
True if the set value was different from the stored value, otherwise false.

Definition at line 93 of file isobus_maintain_power_interface.cpp.

◆ set_implement_ready_to_work_state()

bool isobus::MaintainPowerInterface::MaintainPowerData::set_implement_ready_to_work_state ( ImplementReadyToWorkState readyToWorkState)

Sets the reported implement ready to work state.

Parameters
[in]readyToWorkStateThe reported implement ready to work state
Returns
True if the set value was different from the stored value, otherwise false.

Definition at line 81 of file isobus_maintain_power_interface.cpp.

◆ set_implement_transport_state()

bool isobus::MaintainPowerInterface::MaintainPowerData::set_implement_transport_state ( ImplementTransportState transportState)

Sets the reported implement transport state.

Parameters
[in]transportStateThe reported implement transport state to set
Returns
True if the set value was different from the stored value, otherwise false.

Definition at line 105 of file isobus_maintain_power_interface.cpp.

◆ set_maintain_actuator_power()

bool isobus::MaintainPowerInterface::MaintainPowerData::set_maintain_actuator_power ( MaintainActuatorPower maintainState)

Sets the reported maintain actuator power state.

Parameters
[in]maintainStateThe reported maintain actuator power state
Returns
True if the set value was different from the stored value, otherwise false.

Definition at line 117 of file isobus_maintain_power_interface.cpp.

◆ set_maintain_ecu_power()

bool isobus::MaintainPowerInterface::MaintainPowerData::set_maintain_ecu_power ( MaintainECUPower maintainState)

Sets the reported maintain ECU power state.

Parameters
[in]maintainStateThe reported maintain ECU power state
Returns
True if the set value was different from the stored value, otherwise false.

Definition at line 129 of file isobus_maintain_power_interface.cpp.

◆ set_timestamp_ms()

void isobus::MaintainPowerInterface::MaintainPowerData::set_timestamp_ms ( std::uint32_t timestamp)

Sets the timestamp for when the message was received or sent.

Parameters
[in]timestampThe timestamp, in milliseconds, when the message was sent or received

Definition at line 146 of file isobus_maintain_power_interface.cpp.

Member Data Documentation

◆ currentImplementInWorkState

ImplementInWorkState isobus::MaintainPowerInterface::MaintainPowerData::currentImplementInWorkState = ImplementInWorkState::NotAvailable
private

The reported implement in-work state.

Definition at line 175 of file isobus_maintain_power_interface.hpp.

◆ currentImplementParkState

ImplementParkState isobus::MaintainPowerInterface::MaintainPowerData::currentImplementParkState = ImplementParkState::NotAvailable
private

The reported implement park state.

Definition at line 177 of file isobus_maintain_power_interface.hpp.

◆ currentImplementReadyToWorkState

ImplementReadyToWorkState isobus::MaintainPowerInterface::MaintainPowerData::currentImplementReadyToWorkState = ImplementReadyToWorkState::NotAvailable
private

The reported implement ready to work state.

Definition at line 176 of file isobus_maintain_power_interface.hpp.

◆ currentImplementTransportState

ImplementTransportState isobus::MaintainPowerInterface::MaintainPowerData::currentImplementTransportState = ImplementTransportState::NotAvailable
private

The reported transport state of the implement.

Definition at line 178 of file isobus_maintain_power_interface.hpp.

◆ currentMaintainActuatorPowerState

MaintainActuatorPower isobus::MaintainPowerInterface::MaintainPowerData::currentMaintainActuatorPowerState = MaintainActuatorPower::DontCare
private

The reported state for maintaining actuator power for 2 more seconds.

Definition at line 179 of file isobus_maintain_power_interface.hpp.

◆ currentMaintainECUPowerState

MaintainECUPower isobus::MaintainPowerInterface::MaintainPowerData::currentMaintainECUPowerState = MaintainECUPower::DontCare
private

The reported state for maintaining ECU power for 2 more seconds.

Definition at line 180 of file isobus_maintain_power_interface.hpp.

◆ sendingControlFunction

std::shared_ptr<ControlFunction> isobus::MaintainPowerInterface::MaintainPowerData::sendingControlFunction = nullptr
private

The control function that is sending the message.

Definition at line 173 of file isobus_maintain_power_interface.hpp.

◆ timestamp_ms

std::uint32_t isobus::MaintainPowerInterface::MaintainPowerData::timestamp_ms = 0
private

A timestamp for when the message was released in milliseconds.

Definition at line 174 of file isobus_maintain_power_interface.hpp.


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