161 #undef VLINK_PROXY_API_EXPORT
162 #ifdef VLINK_PROXY_API_LIBRARY_STATIC
163 #define VLINK_PROXY_API_EXPORT
164 #elif defined(_WIN32) || defined(__CYGWIN__)
165 #ifdef VLINK_PROXY_API_LIBRARY
166 #define VLINK_PROXY_API_EXPORT __declspec(dllexport)
168 #define VLINK_PROXY_API_EXPORT __declspec(dllimport)
171 #define VLINK_PROXY_API_EXPORT __attribute__((visibility("default")))
177 #include <unordered_set>
180 #include "../base/bytes.h"
181 #include "../base/functional.h"
182 #include "../base/message_loop.h"
183 #include "../impl/types.h"
218 kAutoAndObserveAll = 7,
233 kReliableCompError = 3,
235 kDirectCompError = 5,
236 kMultiProxyError = 7,
237 kVersionCompError = 8,
261 enum Role : uint8_t { kController = 0, kListener };
327 bool filter_by_process{
false};
329 uint32_t filter_type{0};
347 int64_t timestamp{-1};
363 std::string dds_impl{
"dds"};
366 bool reliable{
false};
368 bool enable_tcp{
false};
369 bool match_version{
true};
786 bool send_control_sync(
const Control& control);
788 void sync_direct_maps(
const Control& control);
790 bool do_handshake(
Error& out_err);
794 void process_connected(
bool connected);
796 void process_time(uint64_t sys_time, uint64_t boot_time);
798 void process_error(
Error error);
801 std::unique_ptr<Impl> impl_;
Fixed-size 128-byte buffer holder with SBO, five ownership modes and integrated codecs.
Definition: bytes.h:120
Serial task dispatcher with selectable queue backend and bounded timer registry.
Definition: message_loop.h:126
Move-only type-erased callable analogue of std::move_only_function with pool spill.
Definition: functional.h:134
Client-side proxy monitoring and control surface backed by a MessageLoop.
Definition: proxy_api.h:200
Error
Compatibility and protocol error codes reported through ErrorCallback.
Definition: proxy_api.h:229
Error get_current_error() const
Returns the current error state.
static std::string get_format_sys_time(uint64_t time, bool enable_utc=false)
Formats a microsecond wall-clock timestamp as a human-readable string.
uint32_t get_max_elapsed_time() const override
Returns the maximum allowed task execution time in milliseconds.
void on_end() override
Hook invoked once on the loop thread after the last task runs.
const Config & get_current_config() const
Returns the configuration supplied at construction.
std::string get_current_hostname() const
Returns the hostname of the connected ProxyServer.
ProxyAPI(const Config &config)
Constructs a ProxyAPI using the supplied configuration.
static bool is_support_shm()
Returns true when the build includes SHM (Iceoryx) support.
bool send_data(const Data &data)
Injects raw message data into the proxy data path.
uint64_t get_current_sys_time() const
Returns the best estimate of the server's current wall-clock time.
std::unordered_set< std::string > get_proxy_hostnames() const
Returns every server hostname observed during this session.
void register_data_callback(DataCallback &&callback)
Registers a callback for raw message data relayed by the server.
bool is_connected() const
Returns whether a valid connection to ProxyServer exists.
void register_connect_callback(ConnectCallback &&callback)
Registers a callback for connection-state changes.
~ProxyAPI() override
Destroys the ProxyAPI and releases every transport handle.
std::unordered_set< std::string > get_proxy_machine_ids() const
Returns every server machine ID observed during this session.
Mode get_current_mode() const
Returns the most recently requested proxy operation mode.
static bool is_enable_filter()
Returns true when topic filtering support is compiled in.
int64_t get_latency() const
Returns the latest backend-reported latency on the data channel.
uint64_t get_current_boot_time() const
Returns the best estimate of the server's current boot time.
std::string get_current_machine_id() const
Returns the machine ID of the connected ProxyServer.
static std::string get_format_boot_time(uint64_t time)
Formats a microsecond boot-time duration as a human-readable string.
void register_time_callback(TimeCallback &&callback)
Registers a callback for heartbeat timestamp delivery.
void on_begin() override
Hook invoked once on the loop thread before the first task runs.
double get_current_memory_usage() const
Returns the server's most recently reported memory utilisation.
Mode
Proxy operation modes published via send_control().
Definition: proxy_api.h:210
Role
Role this ProxyAPI instance plays towards the ProxyServer.
Definition: proxy_api.h:261
void register_error_callback(ErrorCallback &&callback)
Registers a callback for error-state transitions.
bool send_control(const Control &control, bool async=true)
Publishes a Control message to the ProxyServer.
SampleLostInfo get_lost() const
Returns the sample-loss statistics on the data channel.
double get_current_cpu_usage() const
Returns the server's most recently reported CPU utilisation.
size_t get_max_task_count() const override
Returns the maximum queue depth.
void register_info_callback(InfoCallback &&callback)
Registers a callback for per-topic statistics updates.
std::string get_proxy_version() const
Returns the VLINK_VERSION string reported by the server.
Status
Per-topic activity status reported inside Info records.
Definition: proxy_api.h:246
#define VLINK_DISALLOW_COPY_AND_ASSIGN(classname)
Deletes the copy constructor and copy-assignment operator of classname.
Definition: macros.h:174
SchemaType
Coarse runtime schema family used by discovery, bag metadata and proxy routing.
Definition: types.h:207
@ kUnknown
Decoding family unknown.
@ kInvalid
Non-terminal: empty handle or no associated task yet.
ImplType
Bitmask identifying the role of a VLink node implementation.
Definition: types.h:110
@ kSubscriber
Event subscriber (receives broadcasts).
Definition: types.h:115
#define VLINK_PROXY_API_EXPORT
Definition: proxy_api.h:171
Construction-time configuration aggregate for ProxyAPI.
Definition: proxy_api.h:360
std::string security_key
Optional security key; empty selects the default slot.
Definition: proxy_api.h:364
std::string peer_ip
Unicast peer IP for DDS discovery (empty = multicast).
Definition: proxy_api.h:371
std::string allow_ip
Bind DDS sockets to this IP (empty = any).
Definition: proxy_api.h:370
Control message sent from a kController instance to ProxyServer.
Definition: proxy_api.h:324
std::vector< UrlMeta > url_meta_list
Topics to observe / record / inject (mode-dependent).
Definition: proxy_api.h:326
std::string filter_str
Space- or comma-separated filter keywords (case-insensitive).
Definition: proxy_api.h:328
Raw message payload delivered via DataCallback or sent via send_data().
Definition: proxy_api.h:342
std::string url
Topic URL the data was captured on.
Definition: proxy_api.h:343
Bytes raw
Raw serialised message bytes.
Definition: proxy_api.h:346
std::string ser
Serialisation type of the payload.
Definition: proxy_api.h:344
Statistics and metadata describing one discovered topic endpoint.
Definition: proxy_api.h:284
std::string ser
Serialisation type, e.g. "demo.proto.PointCloud".
Definition: proxy_api.h:287
std::string url
Full topic URL, e.g. "dds://my/topic".
Definition: proxy_api.h:286
std::vector< Process > process_list
Connected publisher/subscriber processes.
Definition: proxy_api.h:294
Description of a VLink node process attached to a topic endpoint.
Definition: proxy_api.h:267
std::string ip
IP address of the network interface in use.
Definition: proxy_api.h:272
std::string host
Hostname of the machine running the process.
Definition: proxy_api.h:269
std::string name
Human-readable process name.
Definition: proxy_api.h:271
Aggregate of cumulative delivered / lost sample counts.
Definition: types.h:273