ocpp 0.24.1
A C++ implementation of the Open Charge Point Protocol
Public Member Functions | Static Public Member Functions | List of all members
ocpp::Uri Class Reference

Public Member Functions

void set_secure (bool secure)
 set_secure defines if the connection is done via TLS More...
 
std::string get_hostname ()
 
std::string get_chargepoint_id ()
 
std::string get_path ()
 
uint16_t get_port ()
 
std::string string ()
 
ev_uri get_websocketpp_uri ()
 

Static Public Member Functions

static Uri parse_and_validate (std::string uri, std::string chargepoint_id, int security_profile)
 parse_and_validate parses the uri and checks More...
 

Member Function Documentation

◆ parse_and_validate()

Uri ocpp::Uri::parse_and_validate ( std::string  uri,
std::string  chargepoint_id,
int  security_profile 
)
static

parse_and_validate parses the uri and checks

  1. the general validity of it and
  2. if optional scheme fits to given security_profile
Parameters
uriThe whole URI with optional scheme and chargepoint_id as last segment (as backward-compatibility).
chargepoint_idThe identifier unique to the CSMS.
security_profileThe security-profile.
Returns
Uri
Exceptions
std::invalid_argumentfor several checks

◆ set_secure()

void ocpp::Uri::set_secure ( bool  secure)
inline

set_secure defines if the connection is done via TLS

Parameters
securetrue: connect via TLS; false: connect as plaintext

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