|
Open Model Railroad Network (OpenMRN)
|
Public Member Functions | |
| CvSpace (PacketFlowInterface *tx) | |
| address_t | max_address () override |
| bool | read_only () override |
| size_t | write (address_t destination, const uint8_t *data, size_t len, errorcode_t *error, Notifiable *again) override |
| size_t | read (address_t source, uint8_t *dst, size_t len, errorcode_t *error, Notifiable *again) override |
| void | send (Buffer< TxMessage > *buf, unsigned prio) override |
| Handles messages coming back from the decoder via the traction modem protocol. | |
| void | handle_read_response (TxMessage &txm) |
| void | handle_write_response (TxMessage &txm) |
Public Member Functions inherited from openlcb::MemorySpace | |
| virtual bool | set_node (Node *node) |
| Specifies which node the next operation pertains. | |
| virtual address_t | min_address () |
| virtual errorcode_t | freeze () |
| Handles space freeze command. | |
| virtual errorcode_t | unfreeze () |
| Handles space unfreeze command. | |
Public Member Functions inherited from FlowInterface< MessageType > | |
| virtual Pool * | pool () |
| virtual void | send (MessageType *message, unsigned priority=UINT_MAX)=0 |
| Entry point to the flow. | |
| virtual MessageType * | type_helper () |
| This function is never user in the code, but GDB can use it to infer the correct message types. | |
| MessageType * | alloc () |
| Synchronously allocates a message buffer from the pool of this flow. | |
| void | alloc_async (Executable *target) |
| Asynchronously allocates a message buffer from the pool of this flow. | |
Public Attributes | |
| bool | pendingRead_: 1 |
| true if we are waiting for a read response | |
| bool | doneRead_: 1 |
| true if we the read response arrived | |
| bool | pendingWrite_: 1 |
| true if we are waiting for a write response | |
| bool | doneWrite_: 1 |
| true if we the write response arrived | |
| uint16_t | errorCode_ = 0 |
| Returned error code from the backend. | |
| uint8_t * | readBuf_ = nullptr |
| Where to put the bytes read. | |
| unsigned | actualLen_ = 0 |
| How many bytes to put there. | |
| Notifiable * | done_ = nullptr |
| Notifiable to mark when the pending read/write completes. | |
| PacketFlowInterface * | txFlow_ |
| We send outgoing packets to the decoder using this interface. | |
Static Public Attributes | |
| static constexpr uint8_t | proxySpace_ = openlcb::MemoryConfigDefs::SPACE_DCC_CV |
| This is the memory space we will be using on the decoder. | |
Static Public Attributes inherited from openlcb::MemorySpace | |
| static const errorcode_t | ERROR_AGAIN = 0x3FFF |
| This error code signals that the operation was only partially completed, the again notify was used and will be notified when the operation can be re-tried). | |
Additional Inherited Members | |
Public Types inherited from openlcb::MemorySpace | |
| typedef uint32_t | address_t |
| typedef uint16_t | errorcode_t |
Public Types inherited from FlowInterface< MessageType > | |
| typedef MessageType | message_type |
| Stores the message template type for external reference. | |
Static Public Member Functions inherited from FlowInterface< MessageType > | |
| static MessageType * | cast_alloc (QMember *entry) |
| Down casts and initializes an asynchronous allocation result to the appropriate flow's buffer type. | |
Definition at line 421 of file TractionModem.hxx.
|
inline |
Definition at line 424 of file TractionModem.hxx.
|
inline |
Definition at line 518 of file TractionModem.hxx.
|
inline |
Definition at line 535 of file TractionModem.hxx.
|
inlineoverridevirtual |
Implements openlcb::MemorySpace.
Definition at line 432 of file TractionModem.hxx.
|
inlineoverridevirtual |
| again | when a re-try makes sense. The caller should call read once more, with the offset adjusted with the previously returned bytes. |
Implements openlcb::MemorySpace.
Definition at line 466 of file TractionModem.hxx.
|
inlineoverridevirtual |
Reimplemented from openlcb::MemorySpace.
Definition at line 438 of file TractionModem.hxx.
Handles messages coming back from the decoder via the traction modem protocol.
Definition at line 491 of file TractionModem.hxx.
|
inlineoverridevirtual |
| again | when a re-try makes sense. The caller should call write once more, with the offset adjusted with the previously returned bytes. |
Reimplemented from openlcb::MemorySpace.
Definition at line 443 of file TractionModem.hxx.
| unsigned traction_modem::CvSpace::actualLen_ = 0 |
How many bytes to put there.
When doneRead_, then the number of bytes actually read.
Definition at line 565 of file TractionModem.hxx.
| Notifiable* traction_modem::CvSpace::done_ = nullptr |
Notifiable to mark when the pending read/write completes.
Definition at line 568 of file TractionModem.hxx.
| bool traction_modem::CvSpace::doneRead_ |
true if we the read response arrived
Definition at line 552 of file TractionModem.hxx.
| bool traction_modem::CvSpace::doneWrite_ |
true if we the write response arrived
Definition at line 556 of file TractionModem.hxx.
| uint16_t traction_modem::CvSpace::errorCode_ = 0 |
Returned error code from the backend.
Definition at line 559 of file TractionModem.hxx.
| bool traction_modem::CvSpace::pendingRead_ |
true if we are waiting for a read response
Definition at line 550 of file TractionModem.hxx.
| bool traction_modem::CvSpace::pendingWrite_ |
true if we are waiting for a write response
Definition at line 554 of file TractionModem.hxx.
|
staticconstexpr |
This is the memory space we will be using on the decoder.
Definition at line 547 of file TractionModem.hxx.
| uint8_t* traction_modem::CvSpace::readBuf_ = nullptr |
Where to put the bytes read.
Definition at line 562 of file TractionModem.hxx.
| PacketFlowInterface* traction_modem::CvSpace::txFlow_ |
We send outgoing packets to the decoder using this interface.
Definition at line 571 of file TractionModem.hxx.