BipedalLocomotion::Math::SchmittTrigger class

SchmittTrigger implements a discrete version of a SchmittTrigger See here for further details.

Base classes

template<class _Input, class _Output>
class BipedalLocomotion::System::Advanceable<SchmittTriggerInput, SchmittTriggerOutput>
Basic class that represents a discrete system.

Public types

struct Params
Struct holding switching parameters for the Schmitt Trigger.

Public functions

auto initialize(std::weak_ptr<const ParametersHandler::IParametersHandler> handler) -> bool override
Initialize the SchmittTrigger block.
auto initialize(const Params& parameters) -> bool
Initialize the SchmittTrigger block.
auto setState(const SchmittTriggerState& state) -> bool
Set the state of the SchmittTrigger.
auto getState() const -> const SchmittTriggerState&
Get the state of the SchmittTrigger.
auto advance() -> bool override
Perform one step of the trigger.
auto isOutputValid() const -> bool override
Check if the output of the trigger is valid.
auto getOutput() const -> const SchmittTriggerOutput& override
Get the internal state of the SchmittTrigger.
auto setInput(const SchmittTriggerInput& input) -> bool override
Set the input of the trigger.

Function documentation

bool BipedalLocomotion::Math::SchmittTrigger::initialize(std::weak_ptr<const ParametersHandler::IParametersHandler> handler) override

Initialize the SchmittTrigger block.

Parameters
handler pointer to the parameter handler.
Returns true in case of success/false otherwise.

bool BipedalLocomotion::Math::SchmittTrigger::initialize(const Params& parameters)

Initialize the SchmittTrigger block.

Parameters
parameters parameter required to initialize the block.
Returns true in case of success/false otherwise.

bool BipedalLocomotion::Math::SchmittTrigger::setState(const SchmittTriggerState& state)

Set the state of the SchmittTrigger.

Parameters
state The desired state of the SchmittTrigger.
Returns True if the state is successfully set, false otherwise.

const SchmittTriggerState& BipedalLocomotion::Math::SchmittTrigger::getState() const

Get the state of the SchmittTrigger.

Returns the internal state of the SchmittTrigger.

bool BipedalLocomotion::Math::SchmittTrigger::advance() override

Perform one step of the trigger.

Returns true in case of success, false otherwise.

bool BipedalLocomotion::Math::SchmittTrigger::isOutputValid() const override

Check if the output of the trigger is valid.

Returns true in case of success, false otherwise.

const SchmittTriggerOutput& BipedalLocomotion::Math::SchmittTrigger::getOutput() const override

Get the internal state of the SchmittTrigger.

Returns a const reference to the state of the trigger.

bool BipedalLocomotion::Math::SchmittTrigger::setInput(const SchmittTriggerInput& input) override

Set the input of the trigger.

Parameters
input the input of the system. It contains the raw value and the current time instant.
Returns true in case of success, false otherwise.