mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-30 02:31:44 +00:00
[docs] Build with JavaDoc 17 and add missing docs (#6220)
Co-authored-by: Sam Carlberg <sam.carlberg@gmail.com>
This commit is contained in:
@@ -15,17 +15,51 @@
|
||||
namespace wpi {
|
||||
class MulticastServiceAnnouncer {
|
||||
public:
|
||||
/**
|
||||
* Creates a MulticastServiceAnnouncer.
|
||||
*
|
||||
* @param serviceName service name
|
||||
* @param serviceType service type
|
||||
* @param port port
|
||||
* @param txt txt
|
||||
*/
|
||||
MulticastServiceAnnouncer(
|
||||
std::string_view serviceName, std::string_view serviceType, int port,
|
||||
std::span<const std::pair<std::string, std::string>> txt);
|
||||
/**
|
||||
* Creates a MulticastServiceAnnouncer.
|
||||
*
|
||||
* @param serviceName service name
|
||||
* @param serviceType service type
|
||||
* @param port port
|
||||
* @param txt txt
|
||||
*/
|
||||
MulticastServiceAnnouncer(
|
||||
std::string_view serviceName, std::string_view serviceType, int port,
|
||||
std::span<const std::pair<std::string_view, std::string_view>> txt);
|
||||
/**
|
||||
* Creates a MulticastServiceAnnouncer.
|
||||
*
|
||||
* @param serviceName service name
|
||||
* @param serviceType service type
|
||||
* @param port port
|
||||
*/
|
||||
MulticastServiceAnnouncer(std::string_view serviceName,
|
||||
std::string_view serviceType, int port);
|
||||
~MulticastServiceAnnouncer() noexcept;
|
||||
/**
|
||||
* Starts multicast service announcer.
|
||||
*/
|
||||
void Start();
|
||||
/**
|
||||
* Stops multicast service announcer.
|
||||
*/
|
||||
void Stop();
|
||||
/**
|
||||
* Returns true if there's a multicast service announcer implementation.
|
||||
*
|
||||
* @return True if there's a multicast service announcer implementation.
|
||||
*/
|
||||
bool HasImplementation() const;
|
||||
struct Impl;
|
||||
|
||||
|
||||
@@ -21,15 +21,36 @@ class MulticastServiceResolver {
|
||||
explicit MulticastServiceResolver(std::string_view serviceType);
|
||||
~MulticastServiceResolver() noexcept;
|
||||
struct ServiceData {
|
||||
/// IPv4 address.
|
||||
unsigned int ipv4Address;
|
||||
/// Port number.
|
||||
int port;
|
||||
/// Service name.
|
||||
std::string serviceName;
|
||||
/// Host name.
|
||||
std::string hostName;
|
||||
/// Service data payload.
|
||||
std::vector<std::pair<std::string, std::string>> txt;
|
||||
};
|
||||
/**
|
||||
* Starts multicast service resolver.
|
||||
*/
|
||||
void Start();
|
||||
/**
|
||||
* Stops multicast service resolver.
|
||||
*/
|
||||
void Stop();
|
||||
/**
|
||||
* Returns event handle.
|
||||
*
|
||||
* @return Event handle.
|
||||
*/
|
||||
WPI_EventHandle GetEventHandle() const { return event.GetHandle(); }
|
||||
/**
|
||||
* Returns multicast service resolver data.
|
||||
*
|
||||
* @return Multicast service resolver data.
|
||||
*/
|
||||
std::vector<ServiceData> GetData() {
|
||||
std::scoped_lock lock{mutex};
|
||||
event.Reset();
|
||||
@@ -40,6 +61,11 @@ class MulticastServiceResolver {
|
||||
queue.swap(ret);
|
||||
return ret;
|
||||
}
|
||||
/**
|
||||
* Returns true if there's a multicast service resolver implementation.
|
||||
*
|
||||
* @return True if there's a multicast service resolver implementation.
|
||||
*/
|
||||
bool HasImplementation() const;
|
||||
struct Impl;
|
||||
|
||||
@@ -55,6 +81,9 @@ class MulticastServiceResolver {
|
||||
std::unique_ptr<Impl> pImpl;
|
||||
};
|
||||
} // namespace wpi
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user