Handler for incoming OpenLCB messages of MTI == Traction Protocol Request.
More...
|
| typedef Base::Action | Action |
| | Allows using Action without having StateFlowBase:: prefix in front of it.
|
| |
| typedef MessageType | message_type |
| | Stores the message template type for external reference.
|
| |
| static MessageType * | cast_alloc (QMember *entry) |
| | Down casts and initializes an asynchronous allocation result to the appropriate flow's buffer type.
|
| |
Handler for incoming OpenLCB messages of MTI == Traction Protocol Request.
Definition at line 121 of file TractionTrain.cxx.
◆ TractionRequestFlow()
| openlcb::TrainService::Impl::TractionRequestFlow::TractionRequestFlow |
( |
TrainService * |
service | ) |
|
|
inline |
◆ ~TractionRequestFlow()
| openlcb::TrainService::Impl::TractionRequestFlow::~TractionRequestFlow |
( |
| ) |
|
|
inline |
◆ ensure_response_exists()
| void openlcb::TrainService::Impl::TractionRequestFlow::ensure_response_exists |
( |
| ) |
|
|
inlineprotected |
◆ entry()
| Action openlcb::TrainService::Impl::TractionRequestFlow::entry |
( |
| ) |
|
|
inlineprotectedvirtual |
Entry into the StateFlow activity.
Pure virtual which must be defined by derived class.
- Returns
- function pointer to next state
@TODO(balazs.racz): This is probably not the good solution here; since this is an addressed message we should rather send a reject response.
@TODO(balazs.racz) need to validate caller of mutating functions. The mutating options should be factored into a separate flow state.
Implements TypedStateFlow< MessageType, Base >.
Definition at line 168 of file TractionTrain.cxx.
◆ forward_consist()
| Action openlcb::TrainService::Impl::TractionRequestFlow::forward_consist |
( |
| ) |
|
|
inlineprotected |
◆ handle_consist_config()
| Action openlcb::TrainService::Impl::TractionRequestFlow::handle_consist_config |
( |
| ) |
|
|
inlineprotected |
◆ handle_controller_config()
| Action openlcb::TrainService::Impl::TractionRequestFlow::handle_controller_config |
( |
| ) |
|
|
inlineprotected |
@TODO (balazs.racz): we need to implement stealing a train from the existing controller.
Definition at line 318 of file TractionTrain.cxx.
◆ handle_query()
| Action openlcb::TrainService::Impl::TractionRequestFlow::handle_query |
( |
| ) |
|
|
inlineprotected |
◆ handle_traction_mgmt()
| Action openlcb::TrainService::Impl::TractionRequestFlow::handle_traction_mgmt |
( |
| ) |
|
|
inlineprotected |
◆ init_and_send_response()
| Action openlcb::TrainService::Impl::TractionRequestFlow::init_and_send_response |
( |
Payload |
p | ) |
|
|
inlineprotected |
◆ initialize_response()
| Payload * openlcb::TrainService::Impl::TractionRequestFlow::initialize_response |
( |
| ) |
|
|
inlineprotected |
Takes the allocation result of a response buffer (addressed write flow) and fills in src, dest as a response message for traction protocol.
The caller only needs to provide the payload.
Definition at line 595 of file TractionTrain.cxx.
◆ maybe_alloc_response()
| Action openlcb::TrainService::Impl::TractionRequestFlow::maybe_alloc_response |
( |
Callback |
c | ) |
|
|
inlineprotected |
◆ maybe_forward_consist()
| Action openlcb::TrainService::Impl::TractionRequestFlow::maybe_forward_consist |
( |
| ) |
|
|
inlineprotected |
◆ payload()
| const uint8_t * openlcb::TrainService::Impl::TractionRequestFlow::payload |
( |
| ) |
|
|
inlineprotected |
◆ reject_permanent()
| Action openlcb::TrainService::Impl::TractionRequestFlow::reject_permanent |
( |
uint16_t |
code = Defs::ERROR_PERMANENT | ) |
|
|
inlineprotected |
Rejects the incoming message with a permanent error.
Definition at line 634 of file TractionTrain.cxx.
◆ send_reject_permanent()
| Action openlcb::TrainService::Impl::TractionRequestFlow::send_reject_permanent |
( |
| ) |
|
|
inlineprotected |
◆ send_response()
| Action openlcb::TrainService::Impl::TractionRequestFlow::send_response |
( |
| ) |
|
|
inlineprotected |
◆ size()
| size_t openlcb::TrainService::Impl::TractionRequestFlow::size |
( |
| ) |
|
|
inlineprotected |
◆ train_node()
| TrainNode * openlcb::TrainService::Impl::TractionRequestFlow::train_node |
( |
| ) |
|
|
inlineprotected |
◆ bn_
◆ errorCode_
| unsigned openlcb::TrainService::Impl::TractionRequestFlow::errorCode_ |
|
private |
◆ nextConsistIndex_
| unsigned openlcb::TrainService::Impl::TractionRequestFlow::nextConsistIndex_ |
|
private |
◆ reserved_
| unsigned openlcb::TrainService::Impl::TractionRequestFlow::reserved_ |
|
private |
1 if the voluntary lock protocol has set this train to be reserved.
Definition at line 655 of file TractionTrain.cxx.
◆ response_
◆ trainService_
| TrainService* openlcb::TrainService::Impl::TractionRequestFlow::trainService_ |
|
private |
The documentation for this class was generated from the following file: