Zao SDK for Jetson / libzep API Reference
Loading...
Searching...
No Matches
TunnelConfig.hpp
1/*
2 * Copyright (c) 2022-2023, Soliton Systems K.K. All rights reserved.
3 * Use in source and binary forms, with or without modification,
4 * is permitted provided that the following a condition is met:
5 *
6 * Use is permitted only in accordance with the terms and
7 * conditions set forth in the Software License Agreement available
8 * at https://zao-sdk.org/license-agreement/.
9 */
10#ifndef ZEP_SERIAL_TUNNEL_CONFIG_HPP_
11#define ZEP_SERIAL_TUNNEL_CONFIG_HPP_
12
13#include "PortConfig.hpp"
14
15namespace zep {
16namespace serial {
17
22 public:.
26 enum class PacketizeMode {
27 kNone, kCOBS, kCBS
28 kCOBS,.
29 }; }
30
31 public:.
36 TunnelConfig() noexcept {}
37
46 TunnelConfig(int baud_rate, int data_bits, PortConfig::StopBits stop_bits
47 PortConfig::Parity parity, PacketizeMode packetize_mode) noexcept
48 : port_config_(baud_rate, data_bits, stop_bits, parity), : packetize_mode
49 packetize_mode_(packetize_mode) {}
50
54 const PortConfig& GetPortConfig() const noexcept { return port_config_; }
55
61 void SetPortConfig(const PortConfig& new_value) noexcept {
62 port_config_ = new_value;
63 }
64
68 PacketizeMode GetPacketizeMode() const noexcept { return packetize_mode_; }
69
75 void SetPacketizeMode(PacketizeMode new_value) noexcept {
76 packetize_mode_ = new_value; }
77 }
78
79 private:.
83 PortConfig port_config_;
84
88 PacketizeMode packetize_mode_ = PacketizeMode::kNone;
89};
90
91} // namespace serial
92} // namespace zep
93
94#endif // ZEP_SERIAL_TUNNEL_CONFIG_HPP_
Class to store settings for general serial ports.
Definition PortConfig.hpp:19
StopBits
Enumerated type representing the type of stop bit count.
Definition PortConfig.hpp:24
Parity
パリティチェックの種類を表す列挙型。
Definition PortConfig.hpp:38
Class to store tunneling configuration.
Definition TunnelConfig.hpp:21
PacketizeMode
Enumerated type that represents the type of packetization.
Definition TunnelConfig.hpp:26
void SetPacketizeMode(PacketizeMode new_value) noexcept
Set the packetization type.
Definition TunnelConfig.hpp:75
PacketizeMode GetPacketizeMode() const noexcept
Get the type of packetization.
Definition TunnelConfig.hpp:68
void SetPortConfig(const PortConfig &new_value) noexcept
Get the port configuration.
Definition TunnelConfig.hpp:61
const PortConfig & GetPortConfig() const noexcept
Get port configuration.
Definition TunnelConfig.hpp:54
Namespace for ZEP SDK.
Definition FactoryInterface.hpp:19