Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
Todo List
Page Adding suport for a new OpenLCB protocol
(balazs.racz) move this into a preparation section. Make your protocol implementation be part of the namespace nmranet:
Class AsyncMutex::Token
(balazs.racz) we don't have a synchronous mechanism to allocate from a QAsync. SyncAllocation a(this); }
Member BitBangI2C< HW >::tick_interrupt ()
only supporting 7-bit I2C addresses at the moment.
Member Bucket::init (int s,...)
(Stuart Baker) fix such that sizes do not need to be in strict ascending order
Member Can::has_rx_buffer_data () OVERRIDE
(Stuart Baker) remove once we switch over to select().
Member Can::has_tx_buffer_space () OVERRIDE
(Stuart Baker) remove once we switch over to select().
Member CanFrameReadFlow::send (Buffer< CanHubData > *message, unsigned priority=UINT_MAX) OVERRIDE
(balazs.racz): Figure out what priority the new message should be at.
Member CC32xxSocket::connect (int socket, const struct sockaddr *address, socklen_t address_len)

the return value for a non-blocking connect is supposed to be EINPROGRESS, but the CC32xx returns EALREADY instead.

the return value for a non-blocking connect is supposed to be EINPROGRESS, but the CC32xx returns EALREADY instead.

Member CC32xxSocket::send (int socket, const void *buffer, size_t length, int flags)

(stbaker): handle errors via the callback.

(stbaker): handle errors via the callback.

(stbaker): handle errors via the callback.

(stbaker): handle errors via the callback.

Member cc32xxSockets [SL_MAX_SOCKETS]

(Stuart Baker) since there is only a max of 16 sockets, would it be more memory efficient to just allocate all the memory statically as an array and perform placement construction instead of incuring the overhead of a heap allocation?

(Stuart Baker) since there is only a max of 16 sockets, would it be more memory efficient to just allocate all the memory statically as an array and perform placement construction instead of incuring the overhead of a heap allocation?

Member CC32xxSPI::config_dma (struct spi_ioc_transfer *msg)

support longer SPI transactions

We could potentially perform the first daata write immediately and only use DMA for n-1 words of TX. This would reduce the latency of the transaction slightly.

Member CC32xxSPI::interrupt_handler ()
(Stuart Baker) this should be made private
Member CC32xxUart::interrupt_handler ()

(Stuart Baker) optimization opportunity by getting a write pointer to fill the fifo and then advance the buffer when finished

(Stuart Baker) this should be made private

Member CDI_GROUP_ENTRY_HELPER (LINE, NAME, TYPE,...)
(balazs.racz) the group config renderer should not get an instance of the current group.
Member Console::Session::process_read ()
quoted arguments not yet supported
Class CountingDebouncer
: there should really be a hysteresis.
Member dcc::AbstractTrain< P >::set_emergencystop () OVERRIDE
(Stuart.Baker) We should not just send a single E-Stop burst. It is possible that the loco was on dirt and missed this. Should send continuous E-Stop packets until the estop condition is cleared.
Member dcc::LogonHandler< Module >::LogonSelect::tick ()
locomotives that are in error state should be
Member dcc::packet_to_string (const DCCPacket &pkt, bool bin_payload=false)
Member dcc::ParameterizedLogonModule< Base >::run_address_policy (unsigned loco_id, uint16_t desired_address)
support accessory decoders.
Member dcc::SimpleUpdateLoop::add_refresh_source (dcc::PacketSource *source, unsigned priority) OVERRIDE
implement priority refresh.
Member DccDecoder< Module >::lastLevel_
delete.
Member DccOutputHwReal< N, BOOSTER_ENABLE, RAILCOM_ENABLE, DELAY_ON_1, DELAY_ON_2, DELAY_OFF >::stop_railcom_cutout_phase2 (void)
consider checking whether output disable reason == 0 then enable the output?
Member Device::select_insert (SelectInfo *info)
do we need the critical lock here, or are we always already locked?
File devtab.h
: is this dead code?
Member DirectHubPortSelect::DirectHubReadFlow::read_shutdown ()
We should first clean up the async notifiable block and only signal the exit afterwards.
Member DirectHubPortSelect::DirectHubReadFlow::send_done ()
consider not resetting here, but allowing an empty but linked DataBuffer* start the next chain.
Member DirectHubPortSelect::send (MessageAccessor< uint8_t[]> *msg) override
we should try to collect the bytes into a buffer first before enqueueing them.
Member DirectHubService::enqueue_caller (Executable *caller)
there is a short period of priority inversion here, because we insert an executable into a separate queue here than the Executor. We dequeue the highest priority in on_done(), but if that happens to be a low priority, that might get stuck in the Executor for a long time, even if in the meantime a higher priority message arrives here. A better strategy would be to enqueue the Executable's in the Service's executor directly instead of queueing them and pushing them one by one to the Service's executor. In that case we'd need a third state between busy and not busy: whether we're queueing executable's or whether we're dumping them into the executor. We would also need to keep track of how many went to the Executor already, such that we know when busy_ gets back to false.
Member DispatchFlowBase< NUM_PRIO >::unregister_handler (UntypedHandler *handler, ID id, ID mask)
(balazs.racz) optimize by looking at the current index - 1.
Member EEPROMEmulation::BYTES_PER_BLOCK
maybe this should be a macro of BLOCK_SIZE / 2
Member ExecutorBase::by_name (const char *name, bool wait)
(Stuart Baker) we need a locking mechanism here to protect the list.
Member ExecutorBase::ExecutorBase ()
(Stuart Baker) is "name" still in use?
Class FixedQueue< T, SIZE >
(balazs.racz) replace uses of this class with DeviceBuffer (to enable select support for example).
Member FlowInterface< MessageType >::pool ()
(stbaker) change this to Pool* once it supports async alloc.
Member g_executor ("ex_thread", 0, 1024)
maybe this should have 5 bands?
Member GCAdapter::BinaryToGCMember::entry () override

(balazs.racz) try to use an assign function for better performance.

(balazs.racz) switch to asynchronous allocation here.

Member GCAdapter::unregister ()
(balazs.racz) This is incorrect if the 3-pipe constructor is used.
Member getifaddrs (struct ifaddrs **ifap)

we don't support/check flags

support netmask and broadcast

support netmask and broadcast

we don't support/check flags

Member GpioHwPin< Defs >::hw_set_to_safe ()
(balazs.racz): we need to somehow specify what to do to be safe. Options are drive low, drive high, input std, input wpu, input wpd.
Member GridConnect::read_generic (int fd, void *data, size_t len, bool doub)
this decode method is simple, but could be optimized.
Member handle_global_message (Defs::MTI mti)
(balazs.racz) what about global identify messages?
Member htobe16 (x)
check that the macro tested here is actually defined for the windows platform.
Member HubToGcPort::send (MessageAccessor< uint8_t[]> *msg) override
consider if we need to set the priority here.
Member I2C::smbus (File *file, unsigned long data)
need to finish implementation (Stuart Baker)
Member IncomingFrameHandler
(balazs.racz) make these two somehow compatible with each other. It's not easy, because they use different ID functions and their size differs a bit as well.
Member LpcCan::interrupt_handler (uint32_t status)

(Stuart Baker) remove notify logic once we switch over to select()

(Stuart Baker) remove notify logic once we switch over to select()

Member LpcUart::interrupt_handler ()

(Stuart Baker) optimization opportunity by getting a read pointer to fill the fifo and then consume the buffer when finished.

(Stuart Baker) optimization opportunity by getting a write pointer to fill the fifo and then advance the buffer when finished

Member MbedCanDriver::interrupt ()
(balazs.racz): need to see what needs to be done for acking the interrupt, depending on what the interrupt fnction attributes say.
Member MbedCanDriver::tx_msg () OVERRIDE
(balazs.racz): think about how we could do with a shorter critical section. The problem is that an ISR might decide to send off the next frame ahead of us.
Member MbedRawUSBSerial::RxThread ()
(balazs.racz) this needs to be replaced with something that works in the new select based model.
Class MockClock
(balazs.racz) this should be called FakeClock instead.
Namespace openlcb

need to find an alternative for reboot() for MacOS

(balazs.racz) remove this dep

Member openlcb::AddressedCanMessageWriteFlow::timeout_looking_for_dst ()
: generate a terminate due to error response message.
Member openlcb::allocate_train_node (uint8_t system, uint8_t addr_hi, uint8_t addr_lo, TrainService *traction_service)
(balazs.racz) this is a kludgy interface but allows the linux traction proxy implementation to override and create test trains.
Member openlcb::BLEHubPort::InputFlow::send_callback ()
do we need to add barriernotifiables here?
Member openlcb::BLEHubPort::send (MessageAccessor< uint8_t[]> *msg) override
we should try to collect the bytes into a buffer first before enqueueing them.
Member openlcb::BroadcastTimeClient::client_update_commit ()
As of 14 October 2018, newlib for armgcc uses 32-bit time_t. It seems that 64-bit time_t may become the default soon.
Member openlcb::DatagramClientImpl::timeout_looking_for_dst ()
In IfCanImpl.hxx there is a timeout_looking_for_dst action. It should trigger a 'terminate due to error' response message, and when that arrives in the handle_response() function below, this is the code that we need to trigger.
Member openlcb::DccAccyProducer::state_callback (unsigned bit, bool value)
(Stuart Baker) should this be protected by a mutex with the constructor and destructor?
Member openlcb::FdToTcpParser::have_alloc_msg ()
(balazs.racz): there should be some form of throttling here, ot not read more bytes from the tcp socket than how much RAM we have available.
Member openlcb::FrameToAddressedMessageParser::entry () override
(balazs.racz): handle the error cases here, like when we get a middle frame out of the blue etc.
Member openlcb::GenMessage::payload
(balazs.racz) figure out a better container.
Member openlcb::If::add_owned_flow (Executable *e)=0
(balazs.racz) revise whether this needs to be virtual.
Member openlcb::IfTcp::add_owned_flow (Executable *e) override
(balazs.racz) revise whether this needs to be virtual.
Member openlcb::MemoryConfigClientWithStream::do_stream_read ()
add option to specify byte sink directly.
Member openlcb::MemoryConfigClientWithStream::MemoryConfigClientWithStream (Node *node, MemoryConfigHandler *memcfg, uint8_t local_stream_id)
make this not specific to the CAN-buf interface but somehow portable.
Member openlcb::MemoryConfigDefs::AVAIL_SR
This is a proposed value, see https://github.com/openlcb/documents/issues/57
Member openlcb::MemoryConfigHandler::registry_
(balazs.racz) implement lock/unlock.
Member openlcb::MemoryConfigStreamHandler::entry () override
handle write stream
Member openlcb::MemorySpaceStreamReadFlow::got_sender ()
the APIs are not on the right object in StreamSender, so we have to do this down cast.
Member openlcb::RepeatedGroup< Group, N >::config_renderer ()
(balazs.racz) get rid of the instance of Group here.
Member openlcb::SimpleStackBase::check_version_and_factory_reset (const InternalConfigData &ofs, uint16_t expected_version, bool force=false)
(balazs.racz): We need to clear the eeprom. Best would be if there was an ioctl to return the eeprom to factory default state by just erasing the segments.
Member openlcb::Stream::sopen (NodeHandle dst, long long timeout)
(Stuart Baker) is there a race between connected and timeout
Member openlcb::StreamDefs::FLAG_PERMANENT_ERROR
synchronize the draft text in the standards repository with these definitions. These definitions match other OpenLCB protocols.
Class openlcb::StreamSenderCan
add progress report API.
Member openlcb::StreamSenderCan::dstStreamId_
fill in
Member openlcb::StreamSenderCan::localStreamId_
fill in
Member openlcb::StreamSenderCan::set_stream_uid (NodeID stream_uid)
implement opening unannounced streams.
Member openlcb::StreamSenderCan::stream_proceed_received (Buffer< GenMessage > *message)
add progress callback API
Member openlcb::StreamSenderCan::stream_proceed_timeout ()
(balazs.racz) somehow merge these two actions: remember that we timed out and close the stream.
Member openlcb::StreamSenderCan::streamWindowRemaining_
fill in
Member openlcb::StreamSenderCan::streamWindowSize_
fill in
Member openlcb::TractionCvSpace::write_returned ()
(balazs.racz) keep a timestamp to not keep trying forever.
Member openlcb::TractionThrottleInterface::target_node ()=0
this function should not be here
Member openlcb::TractionThrottleInterface::throttle_node ()=0
this function should not be here
Member openlcb::TrainImpl::legacy_address ()=0
(balazs.racz) This function should not be here. Specifying the NodeID should be more generic, but it is not clear what would be the best interface for that.
Member openlcb::TrainNodeForProxy::~TrainNodeForProxy ()
enable this line of code. It currently breaks unit tests due to bugs
Member openlcb::TrainNodeWithId::~TrainNodeWithId ()
enable this line of code. It currently breaks unit tests due to bugs
Member OPENMRN_HAVE_PSELECT
this should probably be a whitelist: linux || MACH.
Member OSMQ::~OSMQ ()
(Stuart Baker) need a way to destroy a message queue
Member OSTime::get_realtime ()
need to fill in the Real Time Clock infrastructure
Member OSTime::set_realtime (long long time)
need to fill in the Real Time Clock infrastructure
Member Pic32mxCan::enable ()
(balazs.racz) why is the tx buffer length 1?
Member ProgrammingTrackBackend::get_next_packet (unsigned code, dcc::Packet *packet) override
: wait for flushing the packets to the track.
Member ProgrammingTrackBackend::notify_service_mode_ack ()
: wait for flushing the packets to the track.
Member ProgrammingTrackBackend::notify_service_mode_short ()
do we need to do something else here?
Member ProgrammingTrackBackend::packets_sent ()
actually send back an error value if we've seen a short maybe?
Member ProgrammingTrackRequest::hasShortCircuit_
(balazs.racz) we need to figure out how to recover from a program track short.
Class RailcomDriverBase< HW >
(balazs.racz) factor this class out into freertos_drivers/common/Railcom.hxx.
Member RingBuffer< T >::get (T *buf, size_t items)
(Stuart Baker) significant optimization opportunity
Member RingBuffer< T >::put (const T *buf, size_t items)
(Stuart Baker) significant optimization opportunity
Member SocketClient::reset_params (std::unique_ptr< SocketClientParams > params)
(balazs.racz): do we need to somehow wake up the flow and make it attempt to reconnect?
Member SPIFlash::spi_
maybe we are not actually using this.
Member Stm32DccTimerModule< HW >::set_cap_timer_capture ()
consider clearing the overflow flag as well.
Member Stm32SPI::update_configuration () override
this might not be the correct clock value for the F303
Member Stm32SpiPixelStrip::update_sync ()
use DMA instead of a critical section here.
Member Stm32Uart::interrupt_handler ()

(Stuart Baker) optimization opportunity by getting a write pointer to fill the fifo and then advance the buffer when finished

(Stuart Baker) optimization opportunity by getting a read pointer to fill the fifo and then consume the buffer when finished.

Class TCAN4550Can

The TCAN4550 uses the Bosch MCAN IP. If we end up supporting other devices that also use this IP, then some of the generic MCAN related content can be factored out into a common location.

The TCAN4550 uses the Bosch MCAN IP. If we end up supporting other devices that also use this IP, then some of the generic MCAN related content can be factored out into a common location.

Member TCAN4550Can::enable () override

The stack size of 512 bytes was chosen based on the debugger reporting a high watter mark of 232 bytes used. The test platform was a CC3220 with GCC compiler (ARMv7m). It is likely that this high water mark will vary based on CPU architecture, and this stack size should probably be paramatizable in the future.

The stack size of 512 bytes was chosen based on the debugger reporting a high watter mark of 232 bytes used. The test platform was a CC3220 with GCC compiler (ARMv7m). It is likely that this high water mark will vary based on CPU architecture, and this stack size should probably be paramatizable in the future.

Member TCAN4550Can::entry () override

The following sequence could be made more efficient by making a single 8-byte read transfer with the shadowed version of the IR register.

The following sequence could be made more efficient by making a single 8-byte read transfer with the shadowed version of the IR register.

Member TCAN4550Can::flush_buffers () override

this could be made more efficeint, but does it matter?

this could be made more efficeint, but does it matter?

Member TCAN4550Can::write (File *file, const void *buf, size_t count) override

It is possible that the tramsmit FIFO writes which follow will be stuck in the FIFO until we pass through this code again (could be another time time through the loop or a future call to TCAN4550Can::write()). This could be a long time, resulting in stale data going out on the bus once the error state is removed. A possible future enhancement would be to use the MCAN timeout counter to flush the FIFO again when it expires (suggested 3 second timeout).

It is possible that the tramsmit FIFO writes which follow will be stuck in the FIFO until we pass through this code again (could be another time time through the loop or a future call to TCAN4550Can::write()). This could be a long time, resulting in stale data going out on the bus once the error state is removed. A possible future enhancement would be to use the MCAN timeout counter to flush the FIFO again when it expires (suggested 3 second timeout).

Member TempDir::TempDir ()
mingw does not seem to have an mkdtemp call.
Member Timer::restart ()
(balazs.racz) assert here that we are on the given executor.
Member Timer::trigger ()
(balazs.racz) assert here that we are on the given executor.
Member TivaCan::interrupt_handler ()

(Stuart Baker) this should be made private

(balazs.racz) make this a static variable in os.c

(Stuart Baker) remove notify logic once we switch over to select()

(Stuart Baker) remove notify logic once we switch over to select()

Member TivaCdc::interrupt_handler ()
(Stuart Baker) this should be made private
Member TivaDCC< HW >::TivaDCC (const char *name, RailcomDriver *railcom)
tune this bit to line up with the bit stream starting after the railcom cutout.
Class TivaDccTimerModule< HW >
: implement actual packet decoding and sending back to the application layer.
Class TivaEEPROMEmulation
there is a known bug whereby the ADDRESS_SPACE cannot be larger than (block size - 4).
Member TivaI2C::interrupt_handler ()
(Stuart Baker) this should be made private
Member TivaNRZ< HW >::lastLevel_
delete
Member TivaSPI::DEFAULT_DMA_THRESHOLD_BYTES
this should be 64 bytes
Member TivaUart::interrupt_handler ()

(Stuart Baker) this should be made private

(Stuart Baker) optimization opportunity by getting a write pointer to fill the fifo and then advance the buffer when finished

Namespace traction_modem
Need to prune out the "hardware.hxx" dependencies from this file. These need to be dispatched to hardware specific code somehow.
Member traction_modem::ModemTrain::get_fn (uint32_t address) override
Need to implement this.
Member traction_modem::ModemTrain::legacy_address () override
what should this be?
Member traction_modem::ModemTrain::set_fn (uint32_t address, uint16_t value) override
The following switch statement is for hardware testing only. In production software, the main MCU should have the on/off logical by "output" number, and not by function number. The main MCU should instruct the modem of the activity state.
Member traction_modem::RxFlow::get_character_nsec ()
Once we support multi-baud, this should be modified to provide the character nsec at the current baud rate.
Member traction_modem::RxFlow::resync ()
Should we be sending out a framing error? I think so. How to dispatch that? Maybe an error field in the TxMessage? If we send this to the dispatcher, be sure to add the appropriate EXPECT_CALL(s) to the unit tests.
Class TypedQAsync< T >::BlockingWait
(balazs.racz): add a typed next() command here.
Member withrottle::ServerCommandLoco::address_long ()
need to search for train