KiCad PCB EDA Suite
Loading...
Searching...
No Matches
cross_probe_client.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20#ifndef CROSS_PROBE_CLIENT_H
21#define CROSS_PROBE_CLIENT_H
22
23#include <map>
24#include <mutex>
25#include <string>
26
27#include <kicommon.h>
28#include <kiway.h>
29
30#include <api/common/commands/cross_probe_commands.pb.h>
31
32
38{
39public:
40 static bool SendToFrame( FRAME_T aTarget, const google::protobuf::Message& aRequest );
41
42 static void AnnounceToPrimary( FRAME_T aFrameType );
43
44 static void RegisterPeer( FRAME_T aFrameType, const std::string& aSocketPath );
45
46 static bool IsOnStandardSocketPath();
47
48private:
49 static std::mutex s_mutex;
50 static std::map<FRAME_T, std::string> s_peers;
51};
52
53
54#endif // CROSS_PROBE_CLIENT_H
Routes cross-probe messages between standalone KiCad instances over the IPC API.
static bool IsOnStandardSocketPath()
static void RegisterPeer(FRAME_T aFrameType, const std::string &aSocketPath)
static bool SendToFrame(FRAME_T aTarget, const google::protobuf::Message &aRequest)
static std::mutex s_mutex
static std::map< FRAME_T, std::string > s_peers
static void AnnounceToPrimary(FRAME_T aFrameType)
FRAME_T
The set of EDA_BASE_FRAME derivatives, typically stored in EDA_BASE_FRAME::m_Ident.
Definition frame_type.h:29
#define KICOMMON_API
Definition kicommon.h:27