PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
ClariusBLE.h
Go to the documentation of this file.
1 /*=Plus=header=begin======================================================
2  Program: Plus
3  Copyright (c) Verdure Imaging Inc, Stockton, California. All rights reserved.
4  See License.txt for details.
5  We would like to acknowledge Verdure Imaging Inc for generously open-sourcing
6  this support for the Clarius OEM interface to the PLUS & Slicer communities.
7 =========================================================Plus=header=end*/
8 
9 #ifndef _CLARIUSBLE_H
10 #define _CLARIUSBLE_H
11 
12 // local includes
13 #include "PlusConfigure.h"
14 
15 // STL includes
16 #include <memory>
17 #include <string>
18 #include <utility>
19 #include <vector>
20 
21 class ClariusBLEPrivate;
22 
23 //-----------------------------------------------------------------------------
25 {
26  AVAILABLE, // available for control over BLE
27  LISTEN, // available for casting
29 };
30 
31 //-----------------------------------------------------------------------------
32 enum class ClariusWifiMode
33 {
34  ACCESS_POINT, // probe is configured to be connected to directly
35  // via the DIRECT-**SN** network
36  LAN // probe is configured to connect to a local area network
37 };
38 
39 //-----------------------------------------------------------------------------
41 {
42  bool Ready;
45  std::string SSID;
46  std::string Password;
47  std::string IPv4;
48  std::string MacAddress;
50  int CastPort;
51  int Channel;
52 
54  : Ready(false)
57  , SSID("")
58  , Password("")
59  , IPv4("")
60  , MacAddress("")
61  , ControlPort(-1)
62  , CastPort(-1)
63  , Channel(-1)
64  {
65  }
66 
67  ClariusWifiInfo(const ClariusWifiInfo&) = default;
68  ClariusWifiInfo& operator=(const ClariusWifiInfo&) = default;
69 };
70 
71 //-----------------------------------------------------------------------------
73 {
74 public:
75 
76  ClariusBLE();
77 
78  ~ClariusBLE();
79 
84  PlusStatus ClariusBLE::FindBySerial(std::string serialNum);
85 
91  std::vector<std::string> RetrieveFoundProbeIds();
92 
96  bool IsProbeConnected();
97 
102 
107 
112 
116  bool IsProbePowered();
117 
122 
127 
137  bool AwaitWifiInfoReady();
138 
143 
149 
156  PlusStatus ConfigureWifiLAN(std::string ssid, std::string password);
157 
166  std::pair<PlusStatus, ClariusWifiInfo> GetWifiInfo();
167 
171  std::string GetLastError();
172 
173 private:
174 
175  std::unique_ptr<ClariusBLEPrivate> _impl;
176 
177 };
178 
179 #endif // _CLARIUSBLE_H
PlusStatus Disconnect()
Definition: ClariusBLE.cxx:873
std::string Password
Definition: ClariusBLE.h:46
PlusStatus FindBySerial(std::string serialNum)
Definition: ClariusBLE.cxx:735
igsioStatus PlusStatus
Definition: PlusCommon.h:40
std::string IPv4
Definition: ClariusBLE.h:47
std::string MacAddress
Definition: ClariusBLE.h:48
ClariusAvailability
Definition: ClariusBLE.h:24
PlusStatus CloseConnection()
Definition: ClariusBLE.cxx:844
ClariusWifiMode
Definition: ClariusBLE.h:32
PlusStatus ConfigureWifiAP()
std::pair< PlusStatus, ClariusWifiInfo > GetWifiInfo()
bool IsProbePowered()
Definition: ClariusBLE.cxx:889
PlusStatus RequestProbeOn()
Definition: ClariusBLE.cxx:895
const char int const char * password
Definition: phidget22.h:2552
ClariusAvailability Available
Definition: ClariusBLE.h:43
bool AwaitWifiInfoReady()
Definition: ClariusBLE.cxx:972
ClariusWifiMode WifiMode
Definition: ClariusBLE.h:44
std::string GetLastError()
PlusStatus Connect()
Definition: ClariusBLE.cxx:776
PlusStatus ReadWifiInfo()
PlusStatus ConfigureWifiLAN(std::string ssid, std::string password)
PlusStatus RequestProbeOff()
Definition: ClariusBLE.cxx:929
ClariusWifiInfo & operator=(const ClariusWifiInfo &)=default
std::string SSID
Definition: ClariusBLE.h:45
std::vector< std::string > RetrieveFoundProbeIds()
Definition: ClariusBLE.cxx:764
bool IsProbeConnected()
Definition: ClariusBLE.cxx:770