WPILibC++ 2023.4.3-108-ge5452e3
MulticastServiceAnnouncer.h
Go to the documentation of this file.
1// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
4
5#pragma once
6
7#include <stdint.h>
8
9#ifdef __cplusplus
10#include <memory>
11#include <span>
12#include <string>
13#include <string_view>
14#include <utility>
15namespace wpi {
17 public:
19 std::string_view serviceName, std::string_view serviceType, int port,
20 std::span<const std::pair<std::string, std::string>> txt);
22 std::string_view serviceName, std::string_view serviceType, int port,
23 std::span<const std::pair<std::string_view, std::string_view>> txt);
25 std::string_view serviceType, int port);
27 void Start();
28 void Stop();
29 bool HasImplementation() const;
30 struct Impl;
31
32 private:
33 std::unique_ptr<Impl> pImpl;
34};
35} // namespace wpi
36extern "C" {
37#endif
38
39typedef unsigned int WPI_MulticastServiceAnnouncerHandle; // NOLINT
40
42 const char* serviceName, const char* serviceType, int32_t port,
43 int32_t txtCount, const char** keys, const char** values);
44
47
50
53
56
57#ifdef __cplusplus
58} // extern "C"
59#endif
void WPI_FreeMulticastServiceAnnouncer(WPI_MulticastServiceAnnouncerHandle handle)
void WPI_StopMulticastServiceAnnouncer(WPI_MulticastServiceAnnouncerHandle handle)
unsigned int WPI_MulticastServiceAnnouncerHandle
Definition: MulticastServiceAnnouncer.h:39
void WPI_StartMulticastServiceAnnouncer(WPI_MulticastServiceAnnouncerHandle handle)
int32_t WPI_GetMulticastServiceAnnouncerHasImplementation(WPI_MulticastServiceAnnouncerHandle handle)
WPI_MulticastServiceAnnouncerHandle WPI_CreateMulticastServiceAnnouncer(const char *serviceName, const char *serviceType, int32_t port, int32_t txtCount, const char **keys, const char **values)
Definition: MulticastServiceAnnouncer.h:16
MulticastServiceAnnouncer(std::string_view serviceName, std::string_view serviceType, int port, std::span< const std::pair< std::string_view, std::string_view > > txt)
MulticastServiceAnnouncer(std::string_view serviceName, std::string_view serviceType, int port)
MulticastServiceAnnouncer(std::string_view serviceName, std::string_view serviceType, int port, std::span< const std::pair< std::string, std::string > > txt)
basic_string_view< char > string_view
Definition: core.h:520
::int32_t int32_t
Definition: Meta.h:57
Definition: BFloat16.h:88
Definition: AprilTagFieldLayout.h:18