|
Open Model Railroad Network (OpenMRN)
|
StateFlow performing the bootloading process. More...
#include <BootloaderClient.hxx>
Classes | |
| class | WriteResponseHandler |
| Datagram handler that listens to the incoming memoryconfig datagram for the write stream response message. More... | |
Public Member Functions | |
| BootloaderClient (Node *node, DatagramService *if_datagram_service, IfCan *if_can) | |
| Action | entry () override |
| Entry into the StateFlow activity. | |
| DatagramService * | datagram_service () |
| Node * | node () |
| const NodeHandle & | dst () |
| const BootloaderRequest * | request () |
| void | response_datagram_arrived (Buffer< IncomingDatagram > *datagram) |
Public Member Functions inherited from StateFlow< Buffer< BootloaderRequest >, QList< 1 > > | |
| StateFlow (Service *service) | |
| Constructor. | |
Public Member Functions inherited from TypedStateFlow< MessageType, Base > | |
| TypedStateFlow (Service *service) | |
| Constructor. | |
| virtual | ~TypedStateFlow () |
| Destructor. | |
| void | send (MessageType *msg, unsigned priority=UINT_MAX) OVERRIDE |
| Sends a message to the state flow for processing. | |
Public Member Functions inherited from FlowInterface< MessageType > | |
| virtual Pool * | pool () |
| 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. | |
Private Member Functions | |
| Action | got_dg_client () |
| Action | reboot_dg_done () |
| Action | send_pip_request () |
| Action | pip_response () |
| Action | bootload_using_stream () |
| Action | write_request_sent () |
| Action | wait_for_response_dg () |
| uint8_t | allocate_local_stream_id () |
| Action | return_error (uint16_t error_code, const string &error_details) |
| void | register_write_response_handler () |
| void | unregister_write_response_handler () |
| Action | initiate_stream () |
| Action | send_init_stream () |
| void | stream_initiate_replied (Buffer< GenMessage > *message) |
| Action | received_init_stream () |
| Action | send_stream_data () |
| Action | fill_outgoing_stream_frame () |
| Action | wait_for_stream_proceed () |
| void | stream_proceed_received (Buffer< GenMessage > *message) |
| Action | stream_proceed_timeout () |
| Action | close_stream () |
| Action | send_close_stream () |
| Action | send_reboot_request () |
| Action | bootload_using_datagrams () |
| Action | next_dg_write_datagram () |
| Action | dg_write_request_sent () |
| Action | reboot_dg_client () |
| Action | reboot_with_dg_client () |
| Action | finish () |
Private Attributes | |
| Node * | node_ |
| DatagramService * | datagramService_ |
| IfCan * | ifCan_ |
| DatagramClient * | dgClient_ = nullptr |
| Buffer< IncomingDatagram > * | responseDatagram_ = nullptr |
| uint8_t | localStreamId_ |
| uint8_t | remoteStreamId_ |
| uint16_t | maxBufferSize_ |
| uint8_t | streamFlags_ |
| uint8_t | streamAdditionalFlags_ |
| uint32_t | availableBufferSize_ |
| size_t | bufferOffset_ |
| Ewma | speedAvg_ |
| float | speed_ |
| size_t | lastMeasurementOffset_ |
| long long | lastMeasurementTimeNsec_ |
| long long | sleepStartTimeNsec_ |
| WriteResponseHandler | writeResponseHandler_ {this} |
| bool | writeResponseRegistered_ = false |
| MessageHandler::GenericHandler | streamInitiateReplyHandler_ |
| MessageHandler::GenericHandler | streamProceedHandler_ |
| StateFlowTimer | timer_ {this} |
| bool | sleeping_ = false |
| BarrierNotifiable | n_ |
| PIPClient | pipClient_ {ifCan_} |
Additional Inherited Members | |
Public Types inherited from TypedStateFlow< MessageType, Base > | |
| typedef Base::Action | Action |
| Allows using Action without having StateFlowBase:: prefix in front of it. | |
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. | |
Protected Member Functions inherited from TypedStateFlow< MessageType, Base > | |
| void | release () OVERRIDE |
| Unrefs the current buffer. | |
| void | return_buffer () |
| For state flows that are operated using invoke_subflow_and_wait this is a way to hand back the buffer to the caller. | |
| MessageType * | message () |
| MessageType * | transfer_message () |
| Releases ownership of the current message. | |
StateFlow performing the bootloading process.
1) allocates a datagram handler 2) sends a stream write request datagram to the target node 3) waits for the write stream response 4) sends the data using a manual implementaiton of the stream protocol (stream initiate; data send; wait for proceeds; stream close) 5) reboots the target node.
This stateflow needs to get one message of type BootloaderRequest to perform the bootloading process on a single target.
Definition at line 102 of file BootloaderClient.hxx.
|
inline |
Definition at line 105 of file BootloaderClient.hxx.
|
inlineprivate |
Definition at line 366 of file BootloaderClient.hxx.
|
inlineprivate |
Definition at line 645 of file BootloaderClient.hxx.
|
inlineprivate |
Definition at line 214 of file BootloaderClient.hxx.
|
inlineprivate |
Definition at line 613 of file BootloaderClient.hxx.
|
inline |
Definition at line 120 of file BootloaderClient.hxx.
|
inlineprivate |
Definition at line 671 of file BootloaderClient.hxx.
|
inline |
Definition at line 130 of file BootloaderClient.hxx.
|
inlineoverridevirtual |
Entry into the StateFlow activity.
Pure virtual which must be defined by derived class.
Implements TypedStateFlow< MessageType, Base >.
Definition at line 114 of file BootloaderClient.hxx.
|
inlineprivate |
Definition at line 499 of file BootloaderClient.hxx.
|
inlineprivate |
Definition at line 733 of file BootloaderClient.hxx.
|
inlineprivate |
@TODO (balazs.racz): register a message handler that will wait for a node initialization complete message to come in and cancel the datagram send timeout.
Definition at line 156 of file BootloaderClient.hxx.
|
inlineprivate |
Definition at line 401 of file BootloaderClient.hxx.
|
inlineprivate |
@TODO (balazs.racz) we have to expect write response datagrams too.
Definition at line 652 of file BootloaderClient.hxx.
|
inline |
Definition at line 125 of file BootloaderClient.hxx.
|
inlineprivate |
Definition at line 197 of file BootloaderClient.hxx.
|
inlineprivate |
Definition at line 711 of file BootloaderClient.hxx.
|
inlineprivate |
Definition at line 180 of file BootloaderClient.hxx.
|
inlineprivate |
Definition at line 718 of file BootloaderClient.hxx.
|
inlineprivate |
Definition at line 452 of file BootloaderClient.hxx.
|
inlineprivate |
Definition at line 384 of file BootloaderClient.hxx.
|
inline |
Definition at line 135 of file BootloaderClient.hxx.
|
inline |
Definition at line 140 of file BootloaderClient.hxx.
|
inlineprivate |
Definition at line 371 of file BootloaderClient.hxx.
|
inlineprivate |
Definition at line 622 of file BootloaderClient.hxx.
|
inlineprivate |
Definition at line 408 of file BootloaderClient.hxx.
|
inlineprivate |
Definition at line 187 of file BootloaderClient.hxx.
|
inlineprivate |
Definition at line 635 of file BootloaderClient.hxx.
|
inlineprivate |
Definition at line 489 of file BootloaderClient.hxx.
|
inlineprivate |
Definition at line 425 of file BootloaderClient.hxx.
|
inlineprivate |
Definition at line 548 of file BootloaderClient.hxx.
|
inlineprivate |
@TODO(balazs.racz) somehow merge these two actions: remember that we timed out and close the stream.
Definition at line 599 of file BootloaderClient.hxx.
|
inlineprivate |
Definition at line 391 of file BootloaderClient.hxx.
|
inlineprivate |
Definition at line 321 of file BootloaderClient.hxx.
|
inlineprivate |
Definition at line 535 of file BootloaderClient.hxx.
|
inlineprivate |
Definition at line 278 of file BootloaderClient.hxx.
|
private |
Definition at line 785 of file BootloaderClient.hxx.
|
private |
Definition at line 787 of file BootloaderClient.hxx.
|
private |
Definition at line 770 of file BootloaderClient.hxx.
|
private |
Definition at line 772 of file BootloaderClient.hxx.
|
private |
Definition at line 771 of file BootloaderClient.hxx.
|
private |
Definition at line 793 of file BootloaderClient.hxx.
|
private |
Definition at line 795 of file BootloaderClient.hxx.
|
private |
Definition at line 774 of file BootloaderClient.hxx.
|
private |
Definition at line 777 of file BootloaderClient.hxx.
|
private |
Definition at line 810 of file BootloaderClient.hxx.
|
private |
Definition at line 769 of file BootloaderClient.hxx.
|
private |
Definition at line 811 of file BootloaderClient.hxx.
|
private |
Definition at line 775 of file BootloaderClient.hxx.
|
private |
Definition at line 773 of file BootloaderClient.hxx.
|
private |
Definition at line 809 of file BootloaderClient.hxx.
|
private |
Definition at line 798 of file BootloaderClient.hxx.
|
private |
Definition at line 791 of file BootloaderClient.hxx.
|
private |
Definition at line 789 of file BootloaderClient.hxx.
|
private |
Definition at line 781 of file BootloaderClient.hxx.
|
private |
Definition at line 779 of file BootloaderClient.hxx.
|
private |
Definition at line 802 of file BootloaderClient.hxx.
|
private |
Definition at line 804 of file BootloaderClient.hxx.
|
private |
Definition at line 806 of file BootloaderClient.hxx.
|
private |
Definition at line 800 of file BootloaderClient.hxx.
|
private |
Definition at line 801 of file BootloaderClient.hxx.