Drake
Drake C++ Documentation
PackageMap::RemoteParams Struct Reference

Detailed Description

Parameters used for AddRemote().

#include <drake/multibody/parsing/package_map.h>

Public Member Functions

template<typename Archive >
void Serialize (Archive *a)
 
std::string ToJson () const
 Returns the JSON serialization of these params. More...
 

Public Attributes

std::vector< std::string > urls
 The list of remote URLs for this resource. More...
 
std::string sha256
 The cryptographic checksum of the file to be downloaded, as a 64-character hexadecimal string. More...
 
std::optional< std::string > archive_type
 (Optional) The archive type of the downloaded file. More...
 
std::optional< std::string > strip_prefix
 (Optional) A directory prefix to remove from the extracted files. More...
 

Friends

bool operator== (const RemoteParams &, const RemoteParams &)
 Equality operator. More...
 

Member Function Documentation

◆ Serialize()

void Serialize ( Archive *  a)

◆ ToJson()

std::string ToJson ( ) const

Returns the JSON serialization of these params.

Friends And Related Function Documentation

◆ operator==

bool operator== ( const RemoteParams ,
const RemoteParams  
)
friend

Equality operator.

Member Data Documentation

◆ archive_type

std::optional<std::string> archive_type

(Optional) The archive type of the downloaded file.

Valid options are "zip", "tar", "gztar", "bztar", or "xztar". By default, the archive type is determined from the file extension of the URL; in case the URL has no filename extension, you should explicitly specify one here.

◆ sha256

std::string sha256

The cryptographic checksum of the file to be downloaded, as a 64-character hexadecimal string.

◆ strip_prefix

std::optional<std::string> strip_prefix

(Optional) A directory prefix to remove from the extracted files.

In many cases, an archive will prefix all filenames with something like "package-v1.2.3/" so that it extracts into a convenient directory. This option will discard that common prefix when extracting the archive for the PackageMap. It is an error if the archive does not contain any diectory with this prefix, but if there are files outside of this directory they will be silently discarded.

◆ urls

std::vector<std::string> urls

The list of remote URLs for this resource.

The urls are used in the other they appear here, so preferred mirror(s) should come first. Valid methods are "http://" or "https://" or "file://".


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