Flexiv RDK APIs  1.5.1
Public Member Functions | List of all members
flexiv::rdk::FileIO Class Reference

Interface for file transfer with the robot. The robot must be put into IDLE mode when transferring files. More...

#include <file_io.hpp>

Public Member Functions

 FileIO (const Robot &robot)
 [Non-blocking] Create an instance and initialize file transfer interface. More...
 
void UploadTrajFile (const std::string &file_dir, const std::string &file_name)
 [Blocking] Upload a trajectory file (.traj) to the robot. More...
 

Detailed Description

Interface for file transfer with the robot. The robot must be put into IDLE mode when transferring files.

Definition at line 19 of file file_io.hpp.

Constructor & Destructor Documentation

◆ FileIO()

flexiv::rdk::FileIO::FileIO ( const Robot robot)

[Non-blocking] Create an instance and initialize file transfer interface.

Parameters
[in]robotReference to the instance of flexiv::rdk::Robot.
Exceptions
std::runtime_errorif the initialization sequence failed.

Member Function Documentation

◆ UploadTrajFile()

void flexiv::rdk::FileIO::UploadTrajFile ( const std::string &  file_dir,
const std::string &  file_name 
)

[Blocking] Upload a trajectory file (.traj) to the robot.

Parameters
[in]file_dirRelative or absolute path of the directory that contains the file to upload, e.g. /home/user/Documents/. Do not include the file name here.
[in]file_nameFull name of the trajectory file to upload, including the suffix, e.g. PolishSpiral.traj. Do not include the directory path here.
Exceptions
std::invalid_argumentif failed to find or load the specified file.
std::logic_errorif robot is not in the correct control mode.
std::runtime_errorif failed to transfer the file.
Note
Applicable control modes: IDLE.
This function blocks until the file is successfully uploaded.

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