radio_tool 0.2.1
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
radio_tool::fw::FirmwareSupport Class Referenceabstract
Inheritance diagram for radio_tool::fw::FirmwareSupport:
Inheritance graph
Collaboration diagram for radio_tool::fw::FirmwareSupport:
Collaboration graph

Public Member Functions

virtual auto Read (const std::string &fw) -> void=0
 
virtual auto Write (const std::string &fw) -> void=0
 
virtual auto ToString () const -> std::string=0
 
virtual auto GetRadioModel () const -> const std::string=0
 
virtual auto SetRadioModel (const std::string &) -> void=0
 
virtual auto Decrypt () -> void=0
 
virtual auto Encrypt () -> void=0
 
virtual auto IsCompatible (const FirmwareSupport *Other) const -> bool=0
 
auto GetData () const -> const std::vector< uint8_t > &
 
virtual auto GetDataSegments () const -> const std::vector< FirmwareSegment >
 
virtual auto AppendSegment (const uint32_t &addr, const std::vector< uint8_t > &new_data) -> void
 

Protected Member Functions

 FirmwareSupport (const uint32_t &align=0)
 

Protected Attributes

const uint32_t align
 
std::vector< uint8_t > data
 
std::vector< std::pair< uint32_t, uint32_t > > memory_ranges
 

Detailed Description

Definition at line 55 of file fw.hpp.

Constructor & Destructor Documentation

◆ FirmwareSupport()

radio_tool::fw::FirmwareSupport::FirmwareSupport ( const uint32_t &  align = 0)
inlineprotected

Constructor with segment alignment

Definition at line 154 of file fw.hpp.

Member Function Documentation

◆ AppendSegment()

virtual auto radio_tool::fw::FirmwareSupport::AppendSegment ( const uint32_t &  addr,
const std::vector< uint8_t > &  new_data 
) -> void
inlinevirtual

Adds a data segment to this firmware

Note
Normally used when wrapping new firmware
Remarks
Data will be padded if its too short

Definition at line 137 of file fw.hpp.

◆ Decrypt()

virtual auto radio_tool::fw::FirmwareSupport::Decrypt ( ) -> void
pure virtual

◆ Encrypt()

virtual auto radio_tool::fw::FirmwareSupport::Encrypt ( ) -> void
pure virtual

◆ GetData()

auto radio_tool::fw::FirmwareSupport::GetData ( ) const -> const std::vector<uint8_t>&
inline

Gets the firmware binary

Definition at line 103 of file fw.hpp.

◆ GetDataSegments()

virtual auto radio_tool::fw::FirmwareSupport::GetDataSegments ( ) const -> const std::vector<FirmwareSegment>
inlinevirtual

Get segments to write in the firmware

Definition at line 111 of file fw.hpp.

Here is the caller graph for this function:

◆ GetRadioModel()

virtual auto radio_tool::fw::FirmwareSupport::GetRadioModel ( ) const -> const std::string
pure virtual

Returns the radio model this firmware file is for

Implemented in radio_tool::fw::AilunceFW, radio_tool::fw::CSFW, radio_tool::fw::TYTFW, radio_tool::fw::TYTSGLFW, and radio_tool::fw::YaesuFW.

◆ IsCompatible()

virtual auto radio_tool::fw::FirmwareSupport::IsCompatible ( const FirmwareSupport Other) const -> bool
pure virtual

Check if another firwamware handle is compatible with this

Implemented in radio_tool::fw::AilunceFW, radio_tool::fw::CSFW, radio_tool::fw::TYTFW, radio_tool::fw::TYTSGLFW, and radio_tool::fw::YaesuFW.

◆ Read()

virtual auto radio_tool::fw::FirmwareSupport::Read ( const std::string &  fw) -> void
pure virtual

◆ SetRadioModel()

virtual auto radio_tool::fw::FirmwareSupport::SetRadioModel ( const std::string &  ) -> void
pure virtual

Set the radio model this firmware file is for

Implemented in radio_tool::fw::AilunceFW, radio_tool::fw::CSFW, radio_tool::fw::TYTFW, radio_tool::fw::TYTSGLFW, and radio_tool::fw::YaesuFW.

◆ ToString()

virtual auto radio_tool::fw::FirmwareSupport::ToString ( ) const -> std::string
pure virtual

◆ Write()

virtual auto radio_tool::fw::FirmwareSupport::Write ( const std::string &  fw) -> void
pure virtual

Member Data Documentation

◆ align

const uint32_t radio_tool::fw::FirmwareSupport::align
protected

Segment memory alignment

Definition at line 161 of file fw.hpp.

◆ data

std::vector<uint8_t> radio_tool::fw::FirmwareSupport::data
protected

The firmware binary

Definition at line 166 of file fw.hpp.

◆ memory_ranges

std::vector<std::pair<uint32_t, uint32_t> > radio_tool::fw::FirmwareSupport::memory_ranges
protected

Memory ranges to write the firmware file to <Address, Length>

Definition at line 172 of file fw.hpp.


The documentation for this class was generated from the following file: