@@ -71,6 +71,11 @@ class RobotClient {
7171 friend bool operator ==(const operation& lhs, const operation& rhs);
7272 };
7373
74+ struct options {
75+ std::chrono::seconds refresh_interval;
76+ boost::optional<DialOptions> dial_options;
77+ };
78+
7479 explicit RobotClient (ViamChannel channel);
7580
7681 ~RobotClient ();
@@ -90,22 +95,25 @@ class RobotClient {
9095
9196 // / @brief Create a robot client connected to the robot at the provided address.
9297 // / @param address The address of the robot (IP address, URI, URL, etc.)
93- // / @param options Options for connecting and refreshing.
98+ // / @param refresh_interval How often to call refresh.
99+ // / @param options Options for dialing to the address.
94100 static std::unique_ptr<RobotClient> at_address (const std::string& address,
95- const Options& options);
101+ std::chrono::seconds refresh_interval,
102+ const DialOptions& options);
96103
97104 // / @brief Creates a robot client connected to the robot at the provided local socket.
98105 // / @param address The local socket of the robot (a .sock file, etc.).
99- // / @param options Options for connecting and refreshing .
106+ // / @param refresh_interval How often to call refresh .
100107 // / Creates a direct connection to the robot using the `unix://` scheme.
101108 // / Only useful for connecting to robots across Unix sockets.
102109 static std::unique_ptr<RobotClient> at_local_socket (const std::string& address,
103- const Options& options );
110+ std::chrono::seconds refresh_interval );
104111
105112 // / @brief Creates a robot client connected to the provided channel.
106113 // / @param channel The channel to connect with.
107- // / @param options Options for connecting and refreshing.
108- static std::unique_ptr<RobotClient> with_channel (ViamChannel channel, const Options& options);
114+ // / @param refresh_interval How often to call refresh.
115+ static std::unique_ptr<RobotClient> with_channel (ViamChannel channel,
116+ std::chrono::seconds refresh_interval);
109117
110118 std::vector<Name> resource_names () const ;
111119
0 commit comments