#include <debug_link.hpp>
Definition at line 40 of file debug_link.hpp.
◆ DebugLink()
| hw::trezor::DebugLink::DebugLink |
( |
| ) |
|
◆ ~DebugLink()
| hw::trezor::DebugLink::~DebugLink |
( |
| ) |
|
|
virtual |
◆ call()
template<class t_message = messages::debug::DebugLinkState>
| std::shared_ptr<t_message> hw::trezor::DebugLink::call |
( |
const google::protobuf::Message & |
req, |
|
|
const boost::optional< messages::MessageType > & |
resp_type = boost::none, |
|
|
bool |
no_wait = false |
|
) |
| |
|
inline |
Definition at line 58 of file debug_link.hpp.
65 m_transport->write(req);
71 std::shared_ptr<google::protobuf::Message> msg_resp;
72 hw::trezor::messages::MessageType msg_resp_type;
73 m_transport->read(msg_resp, &msg_resp_type);
75 messages::MessageType required_type = resp_type ? resp_type.get() : MessageMapper::get_message_wire_number<t_message>();
76 if (msg_resp_type == required_type) {
77 return message_ptr_retype<t_message>(msg_resp);
78 }
else if (msg_resp_type == messages::MessageType_Failure){
81 throw exc::UnexpectedMessageException(msg_resp_type, msg_resp);
void throw_failure_exception(const messages::common::Failure *failure)
const GenericPointer< typename T::ValueType > T2 value
◆ close()
| void hw::trezor::DebugLink::close |
( |
| ) |
|
Definition at line 51 of file debug_link.cpp.
53 if (m_transport) m_transport->close();
#define CHECK_AND_ASSERT_THROW_MES(expr, message)
◆ init()
| void hw::trezor::DebugLink::init |
( |
std::shared_ptr< Transport > & |
transport | ) |
|
Definition at line 45 of file debug_link.cpp.
#define CHECK_AND_ASSERT_THROW_MES(expr, message)
std::shared_ptr< Transport > transport(const std::string &path)
◆ input_button()
| void hw::trezor::DebugLink::input_button |
( |
bool |
button | ) |
|
Definition at line 68 of file debug_link.cpp.
69 messages::debug::DebugLinkDecision decision;
70 decision.set_yes_no(button);
71 call(decision, boost::none,
true);
std::shared_ptr< t_message > call(const google::protobuf::Message &req, const boost::optional< messages::MessageType > &resp_type=boost::none, bool no_wait=false)
◆ input_swipe()
| void hw::trezor::DebugLink::input_swipe |
( |
bool |
swipe | ) |
|
Definition at line 74 of file debug_link.cpp.
75 messages::debug::DebugLinkDecision decision;
76 decision.set_up_down(swipe);
77 call(decision, boost::none,
true);
std::shared_ptr< t_message > call(const google::protobuf::Message &req, const boost::optional< messages::MessageType > &resp_type=boost::none, bool no_wait=false)
◆ input_word()
| void hw::trezor::DebugLink::input_word |
( |
const std::string & |
word | ) |
|
Definition at line 62 of file debug_link.cpp.
63 messages::debug::DebugLinkDecision decision;
64 decision.set_input(word);
65 call(decision, boost::none,
true);
std::shared_ptr< t_message > call(const google::protobuf::Message &req, const boost::optional< messages::MessageType > &resp_type=boost::none, bool no_wait=false)
◆ press_no()
| void hw::trezor::DebugLink::press_no |
( |
| ) |
|
|
inline |
◆ press_yes()
| void hw::trezor::DebugLink::press_yes |
( |
| ) |
|
|
inline |
◆ state()
| std::shared_ptr< messages::debug::DebugLinkState > hw::trezor::DebugLink::state |
( |
| ) |
|
Definition at line 56 of file debug_link.cpp.
57 return call<messages::debug::DebugLinkState>(
58 messages::debug::DebugLinkGetState(),
59 boost::make_optional(messages::MessageType_DebugLinkGetState));
◆ stop()
| void hw::trezor::DebugLink::stop |
( |
| ) |
|
Definition at line 80 of file debug_link.cpp.
81 messages::debug::DebugLinkStop msg;
82 call(msg, boost::none,
true);
std::shared_ptr< t_message > call(const google::protobuf::Message &req, const boost::optional< messages::MessageType > &resp_type=boost::none, bool no_wait=false)
The documentation for this class was generated from the following files:
- /home/abuild/rpmbuild/BUILD/electroneum-5.0.0.4/src/device_trezor/trezor/debug_link.hpp
- /home/abuild/rpmbuild/BUILD/electroneum-5.0.0.4/src/device_trezor/trezor/debug_link.cpp