|
Open Model Railroad Network (OpenMRN)
|
#include "openlcb/PolledProducer.hxx"#include "openlcb/EventHandlerTemplates.hxx"#include "openlcb/ConfigRepresentation.hxx"#include "utils/ConfigUpdateListener.hxx"#include "utils/ConfigUpdateService.hxx"#include "utils/Debouncer.hxx"Go to the source code of this file.
Classes | |
| class | openlcb::ConfiguredProducer |
| OpenLCB Producer class integrating a simple CDI-based configuration for two event IDs, and an input GPIO object whose value will determine when to produce events. More... | |
Namespaces | |
| namespace | openlcb |
Functions | |
| openlcb::CDI_GROUP (ProducerConfig) | |
| CDI Configuration for a ConfiguredProducer. | |
| openlcb::CDI_GROUP_ENTRY (description, StringConfigEntry< 15 >, Name("Description"), Description("User name of this input.")) | |
| Allows the user to assign a name for this input. | |
| openlcb::CDI_GROUP_ENTRY (debounce, Uint8ConfigEntry, Name("Debounce parameter"), Default(3), Description("Amount of time to wait for the input to stabilize before " "producing the event. Unit is 30 msec of time. Usually a value " "of 2-3 works well in a non-noisy environment. In high noise " "(train wheels for example) a setting between 8 -- 15 makes " "for a slower response time but a more stable " "signal.\nFormally, the parameter tells how many times of " "tries, each 30 msec apart, the input must have the same value " "in order for that value to be accepted and the event " "transition produced."), Default(3)) | |
| Configures the debounce parameter. | |
| openlcb::CDI_GROUP_ENTRY (event_on, EventConfigEntry, Name("Event On"), Description("This event will be produced when the input goes to HIGH.")) | |
| This event will be produced when the input goes to HIGH. | |
| openlcb::CDI_GROUP_ENTRY (event_off, EventConfigEntry, Name("Event Off"), Description("This event will be produced when the input goes to LOW.")) | |
| This event will be produced when the input goes to LOW. | |
| openlcb::CDI_GROUP_END () | |
| Signals termination of the group. | |
| void | openlcb::ignore_fn () |
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Producer class that uses CDI configuration and a GPIO template structure to export a single bit as two event producers to OpenLCB.
Definition in file ConfiguredProducer.hxx.