mirror of
https://github.com/micro-ROS/micro-ROS-Agent.git
synced 2026-09-06 18:05:17 +02:00
Compare commits
26
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
323ff4e33d | ||
|
|
4119a3bec7 | ||
|
|
3b78eee980 | ||
|
|
31510a0d92 | ||
|
|
b47de612e6 | ||
|
|
d604a15708 | ||
|
|
f7f4bf405e | ||
|
|
1ef5e1b177 | ||
|
|
5301589a90 | ||
|
|
e3fa817083 | ||
|
|
93621c8d67 | ||
|
|
6cdb2c2e5c | ||
|
|
8c65e094f2 | ||
|
|
b820033df7 | ||
|
|
16ef5db11c | ||
|
|
9eaf57d2eb | ||
|
|
2dd00a29b6 | ||
|
|
eb8f02b322 | ||
|
|
d1c08622ce | ||
|
|
162117d9a2 | ||
|
|
efaf219a63 | ||
|
|
4a3a8a3b52 | ||
|
|
53555aa991 | ||
|
|
735babba37 | ||
|
|
9b615a4174 | ||
|
|
70757b4144 |
+35
@@ -0,0 +1,35 @@
|
|||||||
|
|
||||||
|
# Created by https://www.gitignore.io/api/qtcreator
|
||||||
|
# Edit at https://www.gitignore.io/?templates=qtcreator
|
||||||
|
|
||||||
|
### QtCreator ###
|
||||||
|
# gitignore for Qt Creator like IDE for pure C/C++ project without Qt
|
||||||
|
#
|
||||||
|
# Reference: http://doc.qt.io/qtcreator/creator-project-generic.html
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Qt Creator autogenerated files
|
||||||
|
|
||||||
|
|
||||||
|
# A listing of all the files included in the project
|
||||||
|
*.files
|
||||||
|
|
||||||
|
# Include directories
|
||||||
|
*.includes
|
||||||
|
|
||||||
|
# Project configuration settings like predefined Macros
|
||||||
|
*.config
|
||||||
|
|
||||||
|
# Qt Creator settings
|
||||||
|
*.creator
|
||||||
|
|
||||||
|
# User project settings
|
||||||
|
*.creator.user*
|
||||||
|
|
||||||
|
# Qt Creator backups
|
||||||
|
*.autosave
|
||||||
|
|
||||||
|
# End of https://www.gitignore.io/api/qtcreator
|
||||||
|
|
||||||
|
CMakeLists.txt.user
|
||||||
@@ -0,0 +1,201 @@
|
|||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
# micro-ROS-Agent
|
||||||
|
|
||||||
|
[](https://github.com/microROS/micro-ROS-Agent)
|
||||||
|
[](https://github.com/microROS/micro-ROS-Agent/releases)
|
||||||
|
|
||||||
|
ROS 2 package using Micro XRCE-DDS Agent.
|
||||||
|
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
Changelog for package micro-ros_agent
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
0.0.1 (2019-04-24)
|
||||||
|
-----------------
|
||||||
|
* Initial release
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
cmake_minimum_required(VERSION 3.5)
|
cmake_minimum_required(VERSION 3.5)
|
||||||
|
|
||||||
# Set proyect name
|
# Set proyect name
|
||||||
project(uros_agent)
|
project(micro_ros_agent)
|
||||||
|
|
||||||
|
|
||||||
set(CMAKE_C_CLANG_TIDY clang-tidy -checks=*)
|
set(CMAKE_C_CLANG_TIDY clang-tidy -checks=*)
|
||||||
@@ -208,8 +208,7 @@ file(WRITE "${_DEFAULT_FASTRTPS_PROFILES_PATH}" "${_XmlDoc}")
|
|||||||
# Only compile uROS agent if rclcpp is found
|
# Only compile uROS agent if rclcpp is found
|
||||||
find_package(rclcpp QUIET)
|
find_package(rclcpp QUIET)
|
||||||
if (rclcpp_FOUND)
|
if (rclcpp_FOUND)
|
||||||
find_package(microxrcedds_agent_cmake_module REQUIRED)
|
find_package(microxrcedds_agent REQUIRED)
|
||||||
find_package(MicroXRCEDDS_Agent REQUIRED MODULE)
|
|
||||||
|
|
||||||
add_executable(${PROJECT_NAME} src/main.cpp)
|
add_executable(${PROJECT_NAME} src/main.cpp)
|
||||||
ament_target_dependencies(
|
ament_target_dependencies(
|
||||||
@@ -28,4 +28,4 @@ Communication between the Micro-ROS Agent and the Micro-ROS nodes supports two t
|
|||||||
- SerialPort.
|
- SerialPort.
|
||||||
|
|
||||||
All available configurations are supported directly by the Micro XRCE-DDS agent.
|
All available configurations are supported directly by the Micro XRCE-DDS agent.
|
||||||
For further information on how to configure the agent click [here](TODO).
|
For further information on how to configure the agent click [here](TODO).
|
||||||
@@ -7,8 +7,8 @@ import sys
|
|||||||
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)),'..'))
|
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)),'..'))
|
||||||
|
|
||||||
from rosidl_cmake import read_generator_arguments
|
from rosidl_cmake import read_generator_arguments
|
||||||
from rosidl_parser import UnknownMessageType
|
from rosidl_adapter.parser import UnknownMessageType
|
||||||
from uros_agent import generate_XML
|
from micro_ros_agent import generate_XML
|
||||||
|
|
||||||
|
|
||||||
def main(argv=sys.argv[1:]):
|
def main(argv=sys.argv[1:]):
|
||||||
+2
-2
@@ -7,7 +7,7 @@ import xml.etree.ElementTree
|
|||||||
|
|
||||||
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)),'..'))
|
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)),'..'))
|
||||||
|
|
||||||
from uros_agent import *
|
from micro_ros_agent import *
|
||||||
|
|
||||||
def main(argv=sys.argv[1:]):
|
def main(argv=sys.argv[1:]):
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
@@ -23,4 +23,4 @@ def main(argv=sys.argv[1:]):
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
sys.exit(main())
|
sys.exit(main())
|
||||||
@@ -18,12 +18,12 @@ import xml.etree.ElementTree
|
|||||||
|
|
||||||
from rosidl_cmake import convert_camel_case_to_lower_case_underscore
|
from rosidl_cmake import convert_camel_case_to_lower_case_underscore
|
||||||
from rosidl_cmake import expand_template
|
from rosidl_cmake import expand_template
|
||||||
from rosidl_cmake import extract_message_types
|
|
||||||
from rosidl_cmake import get_newest_modification_time
|
from rosidl_cmake import get_newest_modification_time
|
||||||
from rosidl_parser import parse_message_file
|
from rosidl_adapter.parser import parse_message_file
|
||||||
from rosidl_parser import parse_service_file
|
from rosidl_adapter.parser import parse_service_file
|
||||||
from rosidl_parser import validate_field_types
|
from rosidl_adapter.parser import validate_field_types
|
||||||
|
|
||||||
|
from rosidl_cmake import generate_files
|
||||||
|
|
||||||
def GetPackage(Dir):
|
def GetPackage(Dir):
|
||||||
|
|
||||||
@@ -214,4 +214,4 @@ def generate_XML(args):
|
|||||||
#f = open(os.path.join(args['output_dir'], 'demofile.txt'), 'w+')
|
#f = open(os.path.join(args['output_dir'], 'demofile.txt'), 'w+')
|
||||||
#f.write("%s\n" % spec)
|
#f.write("%s\n" % spec)
|
||||||
#f.close()
|
#f.close()
|
||||||
return 0
|
return 0
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
|
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
|
||||||
<package format="3">
|
<package format="3">
|
||||||
<name>uros_agent</name>
|
<name>micro_ros_agent</name>
|
||||||
<version>0.0.2</version>
|
<version>0.0.1</version>
|
||||||
<description>DDS-XCRE agent implementation </description>
|
<description>DDS-XCRE agent implementation </description>
|
||||||
<maintainer email="javiermoreno@eprosima.com">Javier Moreno</maintainer>
|
<maintainer email="borjaouterelo@eprosima.com">Borja Outerelo</maintainer>
|
||||||
<license>Apache License 2.0</license>
|
<license>Apache License 2.0</license>
|
||||||
|
|
||||||
<buildtool_depend>ament_cmake</buildtool_depend>
|
<buildtool_depend>ament_cmake</buildtool_depend>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
<depend>fastcdr</depend>
|
<depend>fastcdr</depend>
|
||||||
<depend>fastrtps</depend>
|
<depend>fastrtps</depend>
|
||||||
<depend>microxrcedds_agent_cmake_module</depend>
|
<depend>microxrcedds_agent</depend>
|
||||||
<depend>rosidl_cmake</depend>
|
<depend>rosidl_cmake</depend>
|
||||||
|
|
||||||
<build_depend>rclcpp</build_depend>
|
<build_depend>rclcpp</build_depend>
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
|
||||||
|
// Copyright 2018 Proyectos y Sistemas de Mantenimiento SL (eProsima).
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
#include <uxr/agent/utils/CLI.hpp>
|
||||||
|
|
||||||
|
int main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
|
||||||
|
/* CLI application. */
|
||||||
|
CLI::App app("micro-ROS Agent");
|
||||||
|
app.require_subcommand(1, 1);
|
||||||
|
app.get_formatter()->column_width(42);
|
||||||
|
|
||||||
|
/* CLI subcommands. */
|
||||||
|
eprosima::uxr::cli::UDPv6Subcommand udp_subcommand(app);
|
||||||
|
eprosima::uxr::cli::TCPv6Subcommand tcp_subcommand(app);
|
||||||
|
#ifndef _WIN32
|
||||||
|
eprosima::uxr::cli::SerialSubcommand serial_subcommand(app);
|
||||||
|
eprosima::uxr::cli::PseudoSerialSubcommand pseudo_serial_subcommand(app);
|
||||||
|
#endif
|
||||||
|
eprosima::uxr::cli::ExitSubcommand exit_subcommand(app);
|
||||||
|
|
||||||
|
/* CLI parse. */
|
||||||
|
std::string cli_input{};
|
||||||
|
for (int i = 1; i < argc; ++i)
|
||||||
|
{
|
||||||
|
cli_input.append(argv[i]);
|
||||||
|
cli_input.append(" ");
|
||||||
|
}
|
||||||
|
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
app.parse(cli_input);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
catch (const CLI::ParseError& e)
|
||||||
|
{
|
||||||
|
app.exit(e);
|
||||||
|
std::cin.clear();
|
||||||
|
std::cout << std::endl;
|
||||||
|
std::cout << "Enter command: ";
|
||||||
|
std::getline(std::cin, cli_input);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Waiting until exit. */
|
||||||
|
std::cin.clear();
|
||||||
|
char exit_flag = 0;
|
||||||
|
while ('q' != exit_flag)
|
||||||
|
{
|
||||||
|
std::cin >> exit_flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
# Copyright 2018 Proyectos y Sistemas de Mantenimiento SL (eProsima).
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.5)
|
|
||||||
|
|
||||||
project(microxrcedds_agent_cmake_module)
|
|
||||||
|
|
||||||
find_package(ament_cmake REQUIRED)
|
|
||||||
|
|
||||||
if(BUILD_TESTING)
|
|
||||||
find_package(ament_lint_auto REQUIRED)
|
|
||||||
ament_lint_auto_find_test_dependencies()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
ament_package(
|
|
||||||
CONFIG_EXTRAS "microxrcedds_agent_cmake_module-extras.cmake"
|
|
||||||
)
|
|
||||||
|
|
||||||
install(DIRECTORY cmake
|
|
||||||
DESTINATION share/${PROJECT_NAME}
|
|
||||||
)
|
|
||||||
@@ -1,124 +0,0 @@
|
|||||||
# Copyright 2018 Proyectos y Sistemas de Mantenimiento SL (eProsima).
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
#
|
|
||||||
# CMake module for finding eProsima MICROXRCEDDS_AGENT.
|
|
||||||
#
|
|
||||||
# Output variables:
|
|
||||||
#
|
|
||||||
# - MicroXRCEDDS_Agent_FOUND: flag indicating if the package was found
|
|
||||||
# - MicroXRCEDDS_Agent_INCLUDE_DIR: Paths to the header files
|
|
||||||
#
|
|
||||||
# Example usage:
|
|
||||||
#
|
|
||||||
# find_package(uros_agent_cmake_module REQUIRED)
|
|
||||||
# find_package(MicroXRCEDDS_Agent MODULE)
|
|
||||||
# # use MicroXRCEDDS_Agent_* variables
|
|
||||||
#
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
# lint_cmake: -convention/filename, -package/stdargs
|
|
||||||
|
|
||||||
set(MicroXRCEDDS_Agent_FOUND FALSE)
|
|
||||||
|
|
||||||
find_package(microxrcedds_agent REQUIRED CONFIG)
|
|
||||||
find_package(fastcdr REQUIRED CONFIG)
|
|
||||||
find_package(fastrtps REQUIRED CONFIG)
|
|
||||||
|
|
||||||
find_path(MicroXRCEDDS_Agent_INCLUDE_DIR NAMES uxr)
|
|
||||||
|
|
||||||
string(REGEX MATCH "^[0-9]+\\.[0-9]+" microxrcedds_agent_MAJOR_MINOR_VERSION "${microxrcedds_agent_VERSION}")
|
|
||||||
string(REGEX MATCH "^[0-9]+\\.[0-9]+" fastcdr_MAJOR_MINOR_VERSION "${fastcdr_VERSION}")
|
|
||||||
string(REGEX MATCH "^[0-9]+\\.[0-9]+" fastrtps_MAJOR_MINOR_VERSION "${fastrtps_VERSION}")
|
|
||||||
|
|
||||||
##
|
|
||||||
find_library(MicroXRCEDDS_Agent_LIBRARY_RELEASE
|
|
||||||
NAMES microxrcedds_agent-${microxrcedds_agent_MAJOR_MINOR_VERSION} microxrcedds_agent)
|
|
||||||
|
|
||||||
find_library(MicroXRCEDDS_Agent_LIBRARY_DEBUG
|
|
||||||
NAMES microxrcedds_agentd-${microxrcedds_agent_MAJOR_MINOR_VERSION} microxrcedds_agentd)
|
|
||||||
|
|
||||||
if(MicroXRCEDDS_Agent_LIBRARY_RELEASE AND MicroXRCEDDS_Agent_LIBRARY_DEBUG)
|
|
||||||
set(MicroXRCEDDS_Agent_LIBRARIES
|
|
||||||
optimized ${MicroXRCEDDS_Agent_LIBRARY_RELEASE}
|
|
||||||
debug ${MicroXRCEDDS_Agent_LIBRARY_DEBUG}
|
|
||||||
)
|
|
||||||
elseif(MicroXRCEDDS_Agent_LIBRARY_RELEASE)
|
|
||||||
set(MicroXRCEDDS_Agent_LIBRARIES
|
|
||||||
${MicroXRCEDDS_Agent_LIBRARY_RELEASE}
|
|
||||||
)
|
|
||||||
elseif(MicroXRCEDDS_Agent_LIBRARY_DEBUG)
|
|
||||||
set(MicroXRCEDDS_Agent_LIBRARIES
|
|
||||||
${MicroXRCEDDS_Agent_LIBRARY_DEBUG}
|
|
||||||
)
|
|
||||||
else()
|
|
||||||
set(MicroXRCEDDS_Agent_LIBRARIES "")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
##
|
|
||||||
find_library(FastRTPS_LIBRARY_RELEASE
|
|
||||||
NAMES fastrtps-${fastrtps_MAJOR_MINOR_VERSION} fastrtps)
|
|
||||||
|
|
||||||
find_library(FastRTPS_LIBRARY_DEBUG
|
|
||||||
NAMES fastrtpsd-${fastrtps_MAJOR_MINOR_VERSION} fastrtpsd)
|
|
||||||
|
|
||||||
if(FastRTPS_LIBRARY_RELEASE AND FastRTPS_LIBRARY_DEBUG)
|
|
||||||
set(FastRTPS_LIBRARIES
|
|
||||||
optimized ${FastRTPS_LIBRARY_RELEASE}
|
|
||||||
debug ${FastRTPS_LIBRARY_DEBUG}
|
|
||||||
)
|
|
||||||
elseif(FastRTPS_LIBRARY_RELEASE)
|
|
||||||
set(FastRTPS_LIBRARIES
|
|
||||||
${MicroXRCEDDS_Agent_LIBRARY_RELEASE}
|
|
||||||
)
|
|
||||||
elseif(FastRTPS_LIBRARY_DEBUG)
|
|
||||||
set(FastRTPS_LIBRARIES
|
|
||||||
${MicroXRCEDDS_Agent_LIBRARY_DEBUG}
|
|
||||||
)
|
|
||||||
else()
|
|
||||||
set(FastRTPS_LIBRARIES "")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
##
|
|
||||||
find_library(FastCDR_LIBRARY_RELEASE
|
|
||||||
NAMES fastcdr-${fastcdr_MAJOR_MINOR_VERSION} fastcdr)
|
|
||||||
|
|
||||||
find_library(FastCDR_LIBRARY_DEBUG
|
|
||||||
NAMES fastcdrd-${fastcdr_MAJOR_MINOR_VERSION} fastcdrd)
|
|
||||||
|
|
||||||
if(FastCDR_LIBRARY_RELEASE AND FastCDR_LIBRARY_DEBUG)
|
|
||||||
set(FastCDR_LIBRARIES
|
|
||||||
optimized ${FastCDR_LIBRARY_RELEASE}
|
|
||||||
debug ${FastCDR_LIBRARY_DEBUG}
|
|
||||||
)
|
|
||||||
elseif(FastCDR_LIBRARY_RELEASE)
|
|
||||||
set(FastCDR_LIBRARIES
|
|
||||||
${FastCDR_LIBRARY_RELEASE}
|
|
||||||
)
|
|
||||||
elseif(FastCDR_LIBRARY_DEBUG)
|
|
||||||
set(FastCDR_LIBRARIES
|
|
||||||
${FastCDR_LIBRARY_DEBUG}
|
|
||||||
)
|
|
||||||
else()
|
|
||||||
set(FastCDR_LIBRARIES "")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
|
||||||
find_package_handle_standard_args(MicroXRCEDDS_Agent
|
|
||||||
FOUND_VAR MicroXRCEDDS_Agent_FOUND
|
|
||||||
REQUIRED_VARS
|
|
||||||
MicroXRCEDDS_Agent_INCLUDE_DIR
|
|
||||||
MicroXRCEDDS_Agent_LIBRARIES
|
|
||||||
)
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
# Copyright 2018 Proyectos y Sistemas de Mantenimiento SL (eProsima).
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
list(INSERT CMAKE_MODULE_PATH 0 "${microxrcedds_agent_cmake_module_DIR}/Modules")
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
|
|
||||||
<package format="2">
|
|
||||||
<name>microxrcedds_agent_cmake_module</name>
|
|
||||||
<version>0.1.0</version>
|
|
||||||
<description>Provide CMake module to find eProsima Micro XRCE-DDS Agent</description>
|
|
||||||
<maintainer email="javiermoreno@eprosima.com">Javier Moreno</maintainer>
|
|
||||||
<license>Apache License 2.0</license>
|
|
||||||
<author>Javier Moreno</author>
|
|
||||||
|
|
||||||
<buildtool_depend>ament_cmake</buildtool_depend>
|
|
||||||
|
|
||||||
<test_depend>ament_lint_auto</test_depend>
|
|
||||||
<test_depend>ament_lint_common</test_depend>
|
|
||||||
|
|
||||||
<build_depend>microxrcedds_agent</build_depend>
|
|
||||||
<build_export_depend>microxrcedds_agent</build_export_depend>
|
|
||||||
|
|
||||||
<export>
|
|
||||||
<build_type>ament_cmake</build_type>
|
|
||||||
</export>
|
|
||||||
</package>
|
|
||||||
@@ -1,237 +0,0 @@
|
|||||||
|
|
||||||
// Copyright 2018 Proyectos y Sistemas de Mantenimiento SL (eProsima).
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
#include <uxr/agent/transport/udp/UDPServerWindows.hpp>
|
|
||||||
#include <uxr/agent/transport/tcp/TCPServerWindows.hpp>
|
|
||||||
|
|
||||||
#elif __unix__
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <libgen.h>
|
|
||||||
|
|
||||||
#include <uxr/agent/transport/serial/SerialServerLinux.hpp>
|
|
||||||
#include <uxr/agent/transport/udp/UDPServerLinux.hpp>
|
|
||||||
#include <uxr/agent/transport/tcp/TCPServerLinux.hpp>
|
|
||||||
#include <termios.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <iterator>
|
|
||||||
#include <iostream>
|
|
||||||
#include <string>
|
|
||||||
#include <limits>
|
|
||||||
#include "rclcpp/rclcpp.hpp"
|
|
||||||
|
|
||||||
void showHelp()
|
|
||||||
{
|
|
||||||
std::cout << "Usage: program <command>" << std::endl;
|
|
||||||
std::cout << "List of commands:" << std::endl;
|
|
||||||
#ifdef _WIN32
|
|
||||||
std::cout << " udp <local_port>" << std::endl;
|
|
||||||
std::cout << " tcp <local_port>" << std::endl;
|
|
||||||
#else
|
|
||||||
std::cout << " serial <device_name>" << std::endl;
|
|
||||||
std::cout << " pseudo-serial" << std::endl;
|
|
||||||
std::cout << " udp <local_port> [<discovery_port>]" << std::endl;
|
|
||||||
std::cout << " tcp <local_port> [<discovery_port>]" << std::endl;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void initializationError()
|
|
||||||
{
|
|
||||||
std::cout << "Error: Invalid arguments." << std::endl;
|
|
||||||
showHelp();
|
|
||||||
std::exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
uint16_t parsePort(const std::string& str_port)
|
|
||||||
{
|
|
||||||
uint16_t valid_port = 0;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
int port = std::stoi(str_port);
|
|
||||||
if(port > (std::numeric_limits<uint16_t>::max)())
|
|
||||||
{
|
|
||||||
std::cout << "Error: port number '" << port << "out of range." << std::endl;
|
|
||||||
initializationError();
|
|
||||||
}
|
|
||||||
valid_port = uint16_t(port);
|
|
||||||
}
|
|
||||||
catch (const std::invalid_argument& )
|
|
||||||
{
|
|
||||||
initializationError();
|
|
||||||
}
|
|
||||||
return valid_port;
|
|
||||||
}
|
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
|
||||||
{
|
|
||||||
eprosima::uxr::Server* server = nullptr;
|
|
||||||
std::vector<std::string> cl(0);
|
|
||||||
|
|
||||||
if (1 == argc)
|
|
||||||
{
|
|
||||||
showHelp();
|
|
||||||
std::cout << std::endl;
|
|
||||||
std::cout << "Enter command: ";
|
|
||||||
|
|
||||||
std::string raw_cl;
|
|
||||||
std::getline(std::cin, raw_cl);
|
|
||||||
std::istringstream iss(raw_cl);
|
|
||||||
cl.insert(cl.begin(), std::istream_iterator<std::string>(iss), std::istream_iterator<std::string>());
|
|
||||||
std::cout << raw_cl << std::endl;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for (int i = 1; i < argc; ++i)
|
|
||||||
{
|
|
||||||
cl.push_back(argv[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if((1 == cl.size()) && (("-h" == cl[0]) || ("--help" == cl[0])))
|
|
||||||
{
|
|
||||||
showHelp();
|
|
||||||
}
|
|
||||||
else if((2 <= cl.size()) && ("udp" == cl[0]))
|
|
||||||
{
|
|
||||||
std::cout << "UDP agent initialization... ";
|
|
||||||
uint16_t port = parsePort(cl[1]);
|
|
||||||
#ifdef _WIN32
|
|
||||||
server = new eprosima::uxr::UDPServer(port);
|
|
||||||
#else
|
|
||||||
server = (3 == cl.size()) //discovery port
|
|
||||||
? new eprosima::uxr::UDPServer(port, parsePort(cl[2]))
|
|
||||||
: new eprosima::uxr::UDPServer(port);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
else if((2 <= cl.size()) && ("tcp" == cl[0]))
|
|
||||||
{
|
|
||||||
std::cout << "TCP agent initialization... ";
|
|
||||||
uint16_t port = parsePort(cl[1]);
|
|
||||||
#ifdef _WIN32
|
|
||||||
server = new eprosima::uxr::TCPServer(port);
|
|
||||||
#else
|
|
||||||
server = (3 == cl.size()) //discovery port
|
|
||||||
? new eprosima::uxr::TCPServer(port, parsePort(cl[2]))
|
|
||||||
: new eprosima::uxr::TCPServer(port);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#ifndef _WIN32
|
|
||||||
else if((2 == cl.size()) && ("serial" == cl[0]))
|
|
||||||
{
|
|
||||||
std::cout << "Serial agent initialization... ";
|
|
||||||
|
|
||||||
/* Open serial device. */
|
|
||||||
int fd = open(cl[1].c_str(), O_RDWR | O_NOCTTY);
|
|
||||||
if (0 < fd)
|
|
||||||
{
|
|
||||||
struct termios tty_config;
|
|
||||||
memset(&tty_config, 0, sizeof(tty_config));
|
|
||||||
if (0 == tcgetattr(fd, &tty_config))
|
|
||||||
{
|
|
||||||
/* Setting CONTROL OPTIONS. */
|
|
||||||
tty_config.c_cflag |= CREAD; // Enable read.
|
|
||||||
tty_config.c_cflag |= CLOCAL; // Set local mode.
|
|
||||||
tty_config.c_cflag &= ~PARENB; // Disable parity.
|
|
||||||
tty_config.c_cflag &= ~CSTOPB; // Set one stop bit.
|
|
||||||
tty_config.c_cflag &= ~CSIZE; // Mask the character size bits.
|
|
||||||
tty_config.c_cflag |= CS8; // Set 8 data bits.
|
|
||||||
tty_config.c_cflag &= ~CRTSCTS; // Disable hardware flow control.
|
|
||||||
|
|
||||||
/* Setting LOCAL OPTIONS. */
|
|
||||||
tty_config.c_lflag &= ~ICANON; // Set non-canonical input.
|
|
||||||
tty_config.c_lflag &= ~ECHO; // Disable echoing of input characters.
|
|
||||||
tty_config.c_lflag &= ~ECHOE; // Disable echoing the erase character.
|
|
||||||
tty_config.c_lflag &= ~ISIG; // Disable SIGINTR, SIGSUSP, SIGDSUSP and SIGQUIT signals.
|
|
||||||
|
|
||||||
/* Setting INPUT OPTIONS. */
|
|
||||||
tty_config.c_iflag &= ~IXON; // Disable output software flow control.
|
|
||||||
tty_config.c_iflag &= ~IXOFF; // Disable input software flow control.
|
|
||||||
tty_config.c_iflag &= ~INPCK; // Disable parity check.
|
|
||||||
tty_config.c_iflag &= ~ISTRIP; // Disable strip parity bits.
|
|
||||||
tty_config.c_iflag &= ~IGNBRK; // No ignore break condition.
|
|
||||||
tty_config.c_iflag &= ~IGNCR; // No ignore carrier return.
|
|
||||||
tty_config.c_iflag &= ~INLCR; // No map NL to CR.
|
|
||||||
tty_config.c_iflag &= ~ICRNL; // No map CR to NL.
|
|
||||||
|
|
||||||
/* Setting OUTPUT OPTIONS. */
|
|
||||||
tty_config.c_oflag &= ~OPOST; // Set raw output.
|
|
||||||
|
|
||||||
/* Setting OUTPUT CHARACTERS. */
|
|
||||||
tty_config.c_cc[VMIN] = 10;
|
|
||||||
tty_config.c_cc[VTIME] = 1;
|
|
||||||
|
|
||||||
/* Setting BAUD RATE. */
|
|
||||||
cfsetispeed(&tty_config, B115200);
|
|
||||||
cfsetospeed(&tty_config, B115200);
|
|
||||||
|
|
||||||
if (0 == tcsetattr(fd, TCSANOW, &tty_config))
|
|
||||||
{
|
|
||||||
server = new eprosima::uxr::SerialServer(fd, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if ((1 == cl.size()) && ("pseudo-serial" == cl[0]))
|
|
||||||
{
|
|
||||||
std::cout << "Pseudo-Serial initialization... ";
|
|
||||||
|
|
||||||
/* Open pseudo-terminal. */
|
|
||||||
char* dev = NULL;
|
|
||||||
int fd = posix_openpt(O_RDWR | O_NOCTTY);
|
|
||||||
if (-1 != fd)
|
|
||||||
{
|
|
||||||
if (grantpt(fd) == 0 && unlockpt(fd) == 0 && (dev = ptsname(fd)))
|
|
||||||
{
|
|
||||||
struct termios attr;
|
|
||||||
tcgetattr(fd, &attr);
|
|
||||||
cfmakeraw(&attr);
|
|
||||||
tcflush(fd, TCIOFLUSH);
|
|
||||||
tcsetattr(fd, TCSANOW, &attr);
|
|
||||||
std::cout << "Device: " << dev << std::endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
server = new eprosima::uxr::SerialServer(fd, 0x00);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
else
|
|
||||||
{
|
|
||||||
initializationError();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (nullptr != server)
|
|
||||||
{
|
|
||||||
/* Launch server. */
|
|
||||||
if (server->run())
|
|
||||||
{
|
|
||||||
std::cout << "OK" << std::endl;
|
|
||||||
std::cin.clear();
|
|
||||||
char exit_flag = 0;
|
|
||||||
while ('q' != exit_flag)
|
|
||||||
{
|
|
||||||
std::cout << "Enter 'q' for exit" << std::endl;
|
|
||||||
std::cin >> exit_flag;
|
|
||||||
}
|
|
||||||
server->stop();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
std::cout << "ERROR" << std::endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user