Go to the documentation of this file.
31 #ifndef UR_CLIENT_LIBRARY_PRIMARY_CLIENT_H_INCLUDED
32 #define UR_CLIENT_LIBRARY_PRIMARY_CLIENT_H_INCLUDED
48 namespace primary_interface
70 void start(
const size_t max_connection_attempts = 0,
103 void commandPowerOn(
const bool validate =
true,
const std::chrono::milliseconds timeout = std::chrono::seconds(30));
115 void commandPowerOff(
const bool validate =
true,
const std::chrono::milliseconds timeout = std::chrono::seconds(30));
129 const std::chrono::milliseconds timeout = std::chrono::seconds(30));
144 const std::chrono::milliseconds timeout = std::chrono::milliseconds(5000));
156 void commandStop(
const bool validate =
true,
const std::chrono::milliseconds timeout = std::chrono::seconds(2));
166 std::shared_ptr<RobotModeData> robot_mode_data =
consumer_->getRobotModeData();
167 if (robot_mode_data ==
nullptr)
188 std::shared_ptr<VersionInformation>
189 getRobotVersion(
bool wait_for_message =
true,
const std::chrono::milliseconds timeout = std::chrono::seconds(2));
213 std::shared_ptr<RobotModeData> robot_mode_data =
consumer_->getRobotModeData();
214 if (robot_mode_data ==
nullptr)
216 throw UrException(
"Robot mode data is a nullptr. Probably it hasn't been received, yet.");
218 return robot_mode_data->is_protective_stopped_;
230 return consumer_->getConfigurationData();
260 std::unique_ptr<comm::URProducer<PrimaryPackage>>
prod_;
261 std::unique_ptr<comm::Pipeline<PrimaryPackage>>
pipeline_;
270 #endif // ifndef UR_CLIENT_LIBRARY_PRIMARY_CLIENT_H_INCLUDED
void addPrimaryConsumer(std::shared_ptr< comm::IConsumer< PrimaryPackage >> primary_consumer)
Adds a primary consumer to the list of consumers.
comm::URStream< PrimaryPackage > stream_
std::unique_ptr< comm::MultiConsumer< PrimaryPackage > > multi_consumer_
The stream is an abstraction of the TCPSocket that offers reading a full UR data package out of the s...
std::shared_ptr< ConfigurationData > getConfigurationData()
Get the latest configuration data.
bool checkCalibration(const std::string &checksum)
bool sendScript(const std::string &program)
Sends a custom script program to the robot.
std::unique_ptr< comm::Pipeline< PrimaryPackage > > pipeline_
std::deque< ErrorCode > error_code_queue_
std::shared_ptr< RobotModeData > getRobotModeData()
Get the latest robot mode data.
RobotType getRobotType()
Get the Robot type.
The primary specific parser. Interprets a given byte stream as serialized primary packages and parses...
void commandBrakeRelease(const bool validate=true, const std::chrono::milliseconds timeout=std::chrono::seconds(30))
Commands the robot to release the brakes.
static constexpr std::chrono::milliseconds DEFAULT_RECONNECTION_TIME
void commandStop(const bool validate=true, const std::chrono::milliseconds timeout=std::chrono::seconds(2))
Our base class for exceptions. Specialized exceptions should inherit from those.
void commandUnlockProtectiveStop(const bool validate=true, const std::chrono::milliseconds timeout=std::chrono::milliseconds(5000))
Commands the robot to unlock the protective stop.
Parent class for notifiers.
RobotMode getRobotMode()
Get the latest robot mode.
void errorMessageCallback(ErrorCode &code)
std::unique_ptr< comm::URProducer< PrimaryPackage > > prod_
std::shared_ptr< VersionInformation > getRobotVersion(bool wait_for_message=true, const std::chrono::milliseconds timeout=std::chrono::seconds(2))
Get the robot's software version as Major.Minor.Bugfix.
std::mutex error_code_queue_mutex_
comm::INotifier notifier_
bool isRobotProtectiveStopped()
Query if the robot is protective stopped.
std::shared_ptr< PrimaryConsumer > consumer_
void removePrimaryConsumer(std::shared_ptr< comm::IConsumer< PrimaryPackage >> primary_consumer)
Remove a primary consumer from the list of consumers.
void commandPowerOn(const bool validate=true, const std::chrono::milliseconds timeout=std::chrono::seconds(30))
Commands the robot to power on.
void start(const size_t max_connection_attempts=0, const std::chrono::milliseconds reconnection_timeout=urcl::comm::TCPSocket::DEFAULT_RECONNECTION_TIME)
std::deque< ErrorCode > getErrorCodes()
Retrieves previously raised error codes from PrimaryClient. After calling this, recorded errors will ...
void commandPowerOff(const bool validate=true, const std::chrono::milliseconds timeout=std::chrono::seconds(30))
Commands the robot to power off.
bool reconnectStream()
Reconnects the primary stream used to send program to the robot.
ur_client_library
Author(s): Thomas Timm Andersen, Simon Rasmussen, Felix Exner, Lea Steffen, Tristan Schnell
autogenerated on Mon May 26 2025 02:35:58