Public Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
PFSDPBase Class Reference

#include <pfsdp_base.h>

Inheritance diagram for PFSDPBase:
Inheritance graph
[legend]

Public Member Functions

void factory_reset ()
 
bool feed_watchdog (const std::string &handle)
 
template<typename... Ts>
std::map< std::string, std::string > get_parameter (const Ts &... ts)
 
float get_parameter_float (const std::string &param)
 
std::int64_t get_parameter_int (const std::string &param)
 
std::string get_parameter_str (const std::string &param)
 
virtual std::string get_part ()
 
virtual std::string get_product ()
 
ProtocolInfo get_protocol_info ()
 
virtual void get_scan_parameters ()
 
virtual void get_scanoutput_config (const std::string &handle)
 
std::string get_scanoutput_config (const std::string &param, const std::string &handle)
 
const std::vector< std::string > list_parameters ()
 
 PFSDPBase (std::shared_ptr< HandleInfo > info, std::shared_ptr< ScanConfig > config, std::shared_ptr< ScanParameters > params)
 
bool reboot_device ()
 
bool release_handle (const std::string &handle)
 
void request_handle_tcp (const std::string &port="", const std::string &packet_type="")
 
virtual void request_handle_udp (const std::string &packet_type="")
 
template<typename... Ts>
bool reset_parameter (const Ts &... ts)
 
void set_connection_failure_cb (std::function< void()> callback)
 
template<typename... Ts>
bool set_parameter (const std::initializer_list< param_type > params)
 
bool set_scanoutput_config (const std::string &handle, const ScanConfig &config)
 
virtual void setup_param_server ()
 
bool start_scanoutput ()
 
bool stop_scanoutput (const std::string &handle)
 
bool update_scanoutput_config ()
 

Protected Attributes

std::shared_ptr< ScanConfigconfig_
 
std::shared_ptr< HandleInfoinfo_
 
std::shared_ptr< ScanParametersparams_
 

Private Types

using HTTPInterfacePtr = std::unique_ptr< HTTPInterface >
 

Private Member Functions

bool check_error (std::map< std::string, std::string > &mp, const std::string &err_code, const std::string &err_text, const std::string &err_http)
 
const std::map< std::string, std::string > get_request (const std::string &command, const std::vector< std::string > &json_keys, const std::initializer_list< param_type > &query)
 
const std::map< std::string, std::string > get_request (const std::string &command, const std::vector< std::string > &json_keys=std::vector< std::string >(), const param_map_type &query=param_map_type())
 
bool get_request_bool (const std::string &command, const std::vector< std::string > &json_keys=std::vector< std::string >(), const std::initializer_list< param_type > &query=std::initializer_list< param_type >())
 
bool is_connection_failure (const std::string &http_error)
 

Private Attributes

std::function< void()> handle_connection_failure
 
HTTPInterfacePtr http_interface
 

Detailed Description

Definition at line 32 of file pfsdp_base.h.

Member Typedef Documentation

◆ HTTPInterfacePtr

using PFSDPBase::HTTPInterfacePtr = std::unique_ptr<HTTPInterface>
private

Definition at line 35 of file pfsdp_base.h.

Constructor & Destructor Documentation

◆ PFSDPBase()

PFSDPBase::PFSDPBase ( std::shared_ptr< HandleInfo info,
std::shared_ptr< ScanConfig config,
std::shared_ptr< ScanParameters params 
)

Definition at line 6 of file pfsdp_base.cpp.

Member Function Documentation

◆ check_error()

bool PFSDPBase::check_error ( std::map< std::string, std::string > &  mp,
const std::string &  err_code,
const std::string &  err_text,
const std::string &  err_http 
)
private

Definition at line 61 of file pfsdp_base.cpp.

◆ factory_reset()

void PFSDPBase::factory_reset ( )

Definition at line 119 of file pfsdp_base.cpp.

◆ feed_watchdog()

bool PFSDPBase::feed_watchdog ( const std::string &  handle)

Definition at line 276 of file pfsdp_base.cpp.

◆ get_parameter()

template<typename... Ts>
std::map<std::string, std::string> PFSDPBase::get_parameter ( const Ts &...  ts)
inline

Definition at line 83 of file pfsdp_base.h.

◆ get_parameter_float()

float PFSDPBase::get_parameter_float ( const std::string &  param)

Definition at line 158 of file pfsdp_base.cpp.

◆ get_parameter_int()

int64_t PFSDPBase::get_parameter_int ( const std::string &  param)

Definition at line 148 of file pfsdp_base.cpp.

◆ get_parameter_str()

std::string PFSDPBase::get_parameter_str ( const std::string &  param)

Definition at line 168 of file pfsdp_base.cpp.

◆ get_part()

std::string PFSDPBase::get_part ( )
virtual

Reimplemented in PFSDP_2300.

Definition at line 286 of file pfsdp_base.cpp.

◆ get_product()

std::string PFSDPBase::get_product ( )
virtual

Reimplemented in PFSDP_2000, and PFSDP_2300.

Definition at line 281 of file pfsdp_base.cpp.

◆ get_protocol_info()

ProtocolInfo PFSDPBase::get_protocol_info ( )

Definition at line 130 of file pfsdp_base.cpp.

◆ get_request() [1/2]

const std::map< std::string, std::string > PFSDPBase::get_request ( const std::string &  command,
const std::vector< std::string > &  json_keys,
const std::initializer_list< param_type > &  query 
)
private

Definition at line 12 of file pfsdp_base.cpp.

◆ get_request() [2/2]

const std::map< std::string, std::string > PFSDPBase::get_request ( const std::string &  command,
const std::vector< std::string > &  json_keys = std::vector<std::string>(),
const param_map_type query = param_map_type() 
)
private

Definition at line 19 of file pfsdp_base.cpp.

◆ get_request_bool()

bool PFSDPBase::get_request_bool ( const std::string &  command,
const std::vector< std::string > &  json_keys = std::vector<std::string>(),
const std::initializer_list< param_type > &  query = std::initializer_list<param_type>() 
)
private

Definition at line 38 of file pfsdp_base.cpp.

◆ get_scan_parameters()

void PFSDPBase::get_scan_parameters ( )
virtual

Reimplemented in PFSDP_2300, and PFSDP_2000.

Definition at line 291 of file pfsdp_base.cpp.

◆ get_scanoutput_config() [1/2]

void PFSDPBase::get_scanoutput_config ( const std::string &  handle)
virtual

Definition at line 212 of file pfsdp_base.cpp.

◆ get_scanoutput_config() [2/2]

std::string PFSDPBase::get_scanoutput_config ( const std::string &  param,
const std::string &  handle 
)

Definition at line 270 of file pfsdp_base.cpp.

◆ is_connection_failure()

bool PFSDPBase::is_connection_failure ( const std::string &  http_error)
private

Definition at line 49 of file pfsdp_base.cpp.

◆ list_parameters()

const std::vector< std::string > PFSDPBase::list_parameters ( )

Definition at line 108 of file pfsdp_base.cpp.

◆ reboot_device()

bool PFSDPBase::reboot_device ( )

Definition at line 114 of file pfsdp_base.cpp.

◆ release_handle()

bool PFSDPBase::release_handle ( const std::string &  handle)

Definition at line 124 of file pfsdp_base.cpp.

◆ request_handle_tcp()

void PFSDPBase::request_handle_tcp ( const std::string &  port = "",
const std::string &  packet_type = "" 
)

Definition at line 178 of file pfsdp_base.cpp.

◆ request_handle_udp()

void PFSDPBase::request_handle_udp ( const std::string &  packet_type = "")
virtual

Definition at line 197 of file pfsdp_base.cpp.

◆ reset_parameter()

template<typename... Ts>
bool PFSDPBase::reset_parameter ( const Ts &...  ts)
inline

Definition at line 95 of file pfsdp_base.h.

◆ set_connection_failure_cb()

void PFSDPBase::set_connection_failure_cb ( std::function< void()>  callback)

Definition at line 103 of file pfsdp_base.cpp.

◆ set_parameter()

template<typename... Ts>
bool PFSDPBase::set_parameter ( const std::initializer_list< param_type params)
inline

Definition at line 77 of file pfsdp_base.h.

◆ set_scanoutput_config()

bool PFSDPBase::set_scanoutput_config ( const std::string &  handle,
const ScanConfig config 
)

Definition at line 226 of file pfsdp_base.cpp.

◆ setup_param_server()

void PFSDPBase::setup_param_server ( )
virtual

Reimplemented in PFSDP_2300, and PFSDP_2000.

Definition at line 295 of file pfsdp_base.cpp.

◆ start_scanoutput()

bool PFSDPBase::start_scanoutput ( )

Definition at line 259 of file pfsdp_base.cpp.

◆ stop_scanoutput()

bool PFSDPBase::stop_scanoutput ( const std::string &  handle)

Definition at line 265 of file pfsdp_base.cpp.

◆ update_scanoutput_config()

bool PFSDPBase::update_scanoutput_config ( )

Definition at line 243 of file pfsdp_base.cpp.

Member Data Documentation

◆ config_

std::shared_ptr<ScanConfig> PFSDPBase::config_
protected

Definition at line 57 of file pfsdp_base.h.

◆ handle_connection_failure

std::function<void()> PFSDPBase::handle_connection_failure
private

Definition at line 37 of file pfsdp_base.h.

◆ http_interface

HTTPInterfacePtr PFSDPBase::http_interface
private

Definition at line 36 of file pfsdp_base.h.

◆ info_

std::shared_ptr<HandleInfo> PFSDPBase::info_
protected

Definition at line 56 of file pfsdp_base.h.

◆ params_

std::shared_ptr<ScanParameters> PFSDPBase::params_
protected

Definition at line 58 of file pfsdp_base.h.


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


pf_driver
Author(s): Harsh Deshpande
autogenerated on Fri Feb 24 2023 03:59:35