36#ifndef _OPENLCB_TRACTIONCVSPACE_HXX_
37#define _OPENLCB_TRACTIONCVSPACE_HXX_
77 static const unsigned MAX_CV = 1023;
88 return OFFSET_CV_VALUE;
91 size_t write(address_t destination,
const uint8_t *data,
size_t len,
94 size_t read(address_t source, uint8_t *dst,
size_t len, errorcode_t *error,
99 Action fill_read1_packet();
100 Action read_returned();
103 Action fill_write1_packet();
107 Action pgm_verify_wait_flush();
108 Action pgm_verify_reset();
109 Action pgm_verify_packet();
110 Action pgm_verify_done();
111 Action pgm_verify_reset_done();
112 Action pgm_verify_exit();
116 void record_railcom_status(
unsigned code);
131 uint8_t errorCode_ : 4;
140 ERROR_NO_RAILCOM_CH2_DATA = 4,
142 ERROR_UNKNOWN_RESPONSE = 6,
149 OFFSET_CV_INDEX = 0x7F000000,
150 OFFSET_CV_VALUE = 0x7F000004,
151 OFFSET_CV_VERIFY_VALUE = 0x7F000005,
152 OFFSET_CV_VERIFY_RESULT = 0x7F000006,
175 vector<dcc::RailcomPacket> interpretedResponse_;
Base class for all QMember types that hold data in an expandable format.
Abstract class for message recipients.
Templated implementation of the HubFlow.
An object that can schedule itself on an executor to run.
virtual void notify()=0
Generic callback.
Return type for a state flow callback.
Use this timer class to deliver the timeout notification to a stateflow.
Base class for state machines.
Action exit()
Terminate current StateFlow activity.
Action again()
Call the current state again via call_immediately.
Implementation of the Memory Access Configuration Protocol for OpenLCB.
Abstract base class for the address spaces exported via the Memory Config Protocol.
Base class for NMRAnet nodes conforming to the asynchronous interface.
Memory Space implementation for a CV (configuration variable) access on a Railcom-enabled command sta...
Action async_done()
Helper function for completing asynchronous processing.
address_t max_address() OVERRIDE
uint16_t dccIsLong_
1 for long address, 0 for short address.
uint16_t cvNumber_
CV to read (0 to 1023).
bool read_only() OVERRIDE
uint8_t cvData_
data read or data to write
uint8_t lastVerifyValue_
Stores the CV value that we're checking the CV against to verify.
size_t read(address_t source, uint8_t *dst, size_t len, errorcode_t *error, Notifiable *again) OVERRIDE
uint16_t currId_
Last accepted DCC locomotive node ID (bottom 16 bits).
uint16_t dccAddressNum_
Numberic value of last used DCC address.
size_t write(address_t destination, const uint8_t *data, size_t len, errorcode_t *error, Notifiable *again) OVERRIDE
bool set_node(Node *node) OVERRIDE
Specifies which node the next operation pertains.
uint32_t lastIndexedCv_
Stores the last CV index (for indirect CV lookup).
uint16_t lastIndexedNode_
Stores the last node for which the CV index was written.
#define OVERRIDE
Function attribute for virtual functions declaring that this funciton is overriding a funciton that s...