|
Open Model Railroad Network (OpenMRN)
|
Go to the source code of this file.
Classes | |
| class | dcc::UpdateLoopBase |
| Base class for implementing update loops. More... | |
Functions | |
| void | dcc::packet_processor_notify_update (PacketSource *source, unsigned code) |
| Notifies the update processor that a modification happened to one of the packet sources. | |
| bool | dcc::packet_processor_add_refresh_source (PacketSource *source, unsigned priority) |
| Adds a new refresh source to the background refresh loop. | |
| void | dcc::packet_processor_remove_refresh_source (PacketSource *source) |
| Removes a refresh source from the background refresh loop. | |
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.
Proxy implementation to the global update loop.
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.
Interface to the global update loop.
Definition in file UpdateLoop.hxx.
| bool dcc::packet_processor_add_refresh_source | ( | PacketSource * | source, |
| unsigned | priority = 0 |
||
| ) |
Adds a new refresh source to the background refresh loop.
| source | is the packet source to add |
| priority | represents the packet source priority. If at least EXCLUSIVE_MIN_PRIORITY, then all packet slots will be assigned to this packet source, effectively stopping all background refresh. Only the largest priority will receive slots, until it gets unregistered. |
Definition at line 45 of file UpdateLoop.cxx.
| void dcc::packet_processor_notify_update | ( | PacketSource * | source, |
| unsigned | code | ||
| ) |
Notifies the update processor that a modification happened to one of the packet sources.
Update processors will typically prioritize this packet source in the packet generation loop.
| source | is the packet source that experienced a change |
| code | is a source-specific value that will be sent to the source in the get_next_packet callback. It should not be zero. |
Definition at line 40 of file UpdateLoop.cxx.
| void dcc::packet_processor_remove_refresh_source | ( | PacketSource * | source | ) |
Removes a refresh source from the background refresh loop.
Definition at line 53 of file UpdateLoop.cxx.