4#ifndef WATERLINKEDSONAR_TYPES_HPP
5#define WATERLINKEDSONAR_TYPES_HPP
17inline constexpr const char*
DEFAULT_IP =
"192.168.194.96";
53 std::optional<StatusEntry>
time;
100 : std::runtime_error(what), status_code_(
status_code) {}
115 const std::string& device_version)
116 : std::runtime_error(what +
" requires Sonar 3D-15 release " +
117 min_version +
" or newer; device is " +
123 using std::runtime_error::runtime_error;
131 :
HttpError(
"system time is already synchronized", 409) {}
force_sync_ntp() while another force-sync is running; the device answers HTTP 409.
Definition types.hpp:136
ForceSyncOngoingError()
Definition types.hpp:138
Transport failure or non-2xx HTTP response.
Definition types.hpp:95
HttpError(const std::string &what, long status_code)
status_code is the HTTP status, or 0 when the request never completed (connect failure or timeout).
Definition types.hpp:99
long status_code() const
HTTP status code of the response, or 0 for transport failure.
Definition types.hpp:103
Device answered with a body the client cannot interpret.
Definition types.hpp:122
set_time_manual() while the device is already NTP-synchronized; the device answers HTTP 409.
Definition types.hpp:128
TimeAlreadySynchronizedError()
Definition types.hpp:130
Device firmware is older than the endpoint requires.
Definition types.hpp:110
VersionError(const std::string &what, const std::string &min_version, const std::string &device_version)
The message reads "\p what requires Sonar 3D-15 release \p min_version or newer; device is \p device_...
Definition types.hpp:114
const char * to_string(AcousticsMode mode)
Name used on the wire by the HTTP API: "low-frequency" or "high-frequency".
AcousticsMode
Imaging mode: low frequency gives a 90x40 degree field of view at 5 Hz, high frequency 40x40 degrees ...
Definition types.hpp:58
Salinity
Water salinity, used by the sonar's automatic speed of sound.
Definition types.hpp:61
constexpr const char * MULTICAST_GROUP
Multicast group address for sonar data streams.
Definition types.hpp:19
constexpr std::uint16_t MULTICAST_PORT
Multicast port for sonar data streams.
Definition types.hpp:21
constexpr std::size_t MAX_DATAGRAM_SIZE
Largest UDP payload the sonar can send; receive buffers are sized to it.
Definition types.hpp:23
constexpr const char * DEFAULT_IP
Factory default IP address of the sonar.
Definition types.hpp:17
Device identity from GET /about.
Definition types.hpp:26
std::string version
Full build string.
Definition types.hpp:33
std::string variant
Definition types.hpp:32
std::string product_name
Definition types.hpp:31
std::string chipid
Definition types.hpp:27
std::string version_short
e.g. "1.8.0".
Definition types.hpp:34
int product_id
Definition types.hpp:30
bool is_ready
Definition types.hpp:29
int hardware_revision
Definition types.hpp:28
Outcome of a forced NTP sync.
Definition types.hpp:88
std::string message
Definition types.hpp:90
bool success
Definition types.hpp:89
TimeStatus status
Device clock state after the attempt.
Definition types.hpp:91
Imaging range limits in meters.
Definition types.hpp:64
double max
Definition types.hpp:66
double min
Definition types.hpp:65
One subsystem's health from GET /status.
Definition types.hpp:38
std::string status
"ok", "warning", or "error".
Definition types.hpp:41
std::string message
Definition types.hpp:40
std::string id
Definition types.hpp:39
bool operational
Definition types.hpp:42
Subsystem health from GET /status.
Definition types.hpp:48
StatusEntry temperature
Definition types.hpp:50
std::optional< StatusEntry > time
Present from firmware 1.7.1.
Definition types.hpp:53
StatusEntry systems_check
Definition types.hpp:51
StatusEntry api
Definition types.hpp:49
Device clock state from GET /time/status.
Definition types.hpp:80
std::optional< std::int64_t > ntp_seconds_since_last_sync
Definition types.hpp:84
std::chrono::system_clock::time_point system_time
Definition types.hpp:81
std::string ntp_synced_to
Definition types.hpp:83
bool ntp_synced
Definition types.hpp:82
How the sonar streams data, from GET/POST /udp.
Definition types.hpp:70
std::string unicast_destination_ip
Used only when mode is UNICAST.
Definition types.hpp:74
std::uint16_t unicast_destination_port
Used only when mode is UNICAST.
Definition types.hpp:76
Mode
Definition types.hpp:71
Mode mode
Definition types.hpp:72