BAOS SDK v2  1.2.1
An SDK providing access to IP-BAOS devices through BAOS binary protocol version 2.x
Loading...
Searching...
No Matches
ConnectionEvent.h
Go to the documentation of this file.
1//
2// Copyright (c) 2002-2026 WEINZIERL ENGINEERING GmbH
3// All rights reserved.
4//
5// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
6// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
7// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
8// SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY,
9// WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
10// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
11//
12
13#ifndef __BAOSLIB_CONNECTION_EVENT_H__
14#define __BAOSLIB_CONNECTION_EVENT_H__
15
16#include "baos/BaosLib_export.h"
17#include "baos/config.h"
18
20#include <string>
21#include <cstdint>
23
24
30namespace wz::baos
31{
32
36struct BAOSLIB_EXPORT ConnectionEvent
37{
38public:
39 enum class Type : std::uint32_t
40 {
41 Unknown = 0,
42 Opening,
43 Opened,
44 Closing,
45 Closed,
46 ClosedAfterError,
47 Error
48 };
49
50 ConnectionEvent() = default;
51
52 ConnectionEvent(Type eventType, std::string details = "");
53
54 Type type{Type::Unknown};
55 std::string details;
56};
57
58BAOSLIB_EXPORT std::string toString(ConnectionEvent::Type type);
59
60} // namespace wz::baos
61
62#endif //__BAOSLIB_CONNECTION_EVENT_H__
Global types and configuration for the whole SDK.
Global BAOS sdk namespace.
Definition config.h:69
Definition ConnectionEvent.h:37