Basic gear shift selection depends on the transmission design. Most require a physical level to be moved, at least to select basic range, such as Park, Reverse, Neutral, and "Drive" range, due to physical internal hydraulic and mechanical configuration. Most need this due to mechanical stuff like actuating (engaging) the parking pawl that locks the output when parked, and disengaging it in order to drive, although a few designs are entirely electronic control in recent years.
Due to the physical lever, most then have a switched or resistive shift range sensor (ex: Manual Lever Position Sensor) attached to the lever input or shifter mechanism. The input to the controller indicates the range the transmission is in (and sometimes activates reverse lights), so the controller knows what routine to run at that point, and needs to be capable of reading the most common digital and analog signals. Once the trans is selected into "Drive" range, it can be manually selected to a particular gear, or a switched input used (button or paddle switches) to select the desired gear within that range.
Additional inputs, such as selecting OverDrive (OD) gear to enabled or disabled are also common on many models, either with a shifter position or an override "OD" button or switch for the driver. As these overrides are usually temporary, they are commonly software switches activated by a momentary button, with auto-resetting to default ON with the next power cycle. Does that help with the question?
David
Example of an analog gear lever position sensor output. In this case, the specs used on most Ford vehicles for many years. Note "Overdrive" selects the basic range, and specifically allows 3rd and 4th gears, with 4th optional based on the OD button function. Once in "Overdrive" range, operation is automatic for all gears (auto-shift appropriate 1 to 4), and can be manually overridden with additional buttons or paddle switches. So, you could select "Overdrive" or "drive", and shift gears at-will with paddles on your steering wheel :
MLPS Test Specs.png (43.72 KiB) Viewed 7921 times