Skip to content

RealInput vs BooleanInput #383

@matthew-kapp

Description

@matthew-kapp

Question❓

I would like to contribute an IdealSwitch to the std lib in Electrical.Analog.ideal_components.jl. This component would take in a Boolean input where 0 is open (off) and 1 is closed (on). There would be 2 ways to do this, but it would need to fit in with the larger sort of 'strategy' for the library. Which option is recommended:

  1. Follow MSL: Create a BooleanInput port additional to RealInput in Blocks.utils.jl (should then also be output and array for Boolean).
  2. Not follow MSL: Use RealInput for everything, including my switch, and set the input type to be Bool instead of Real.

Which would you recommend? I would be happy to create a BooleanInput et. al., but but would first like to check if such a PR might be accepted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions