From fe31f0e7713fd04827925ae271093b8a51d5797b Mon Sep 17 00:00:00 2001 From: Vaibhaw Khemka <46538042+vaibhawkhemka@users.noreply.github.com> Date: Sat, 14 Aug 2021 13:36:28 +0530 Subject: [PATCH 01/13] Create test.txt --- components/depthDSR/test.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 components/depthDSR/test.txt diff --git a/components/depthDSR/test.txt b/components/depthDSR/test.txt new file mode 100644 index 00000000..8e27be7d --- /dev/null +++ b/components/depthDSR/test.txt @@ -0,0 +1 @@ +text From 2d05aa72f095cc598ecaa68862381c2c8a1ac22d Mon Sep 17 00:00:00 2001 From: Vaibhaw Khemka <46538042+vaibhawkhemka@users.noreply.github.com> Date: Sat, 14 Aug 2021 13:37:23 +0530 Subject: [PATCH 02/13] Add files via upload --- components/depthDSR/CMakeLists.txt | 20 + components/depthDSR/DoxyFile | 1423 ++++++++++++++++++++++++ components/depthDSR/depthDSR.cdsl | 12 + components/depthDSR/statemachine.smdsl | 40 + 4 files changed, 1495 insertions(+) create mode 100644 components/depthDSR/CMakeLists.txt create mode 100644 components/depthDSR/DoxyFile create mode 100644 components/depthDSR/depthDSR.cdsl create mode 100644 components/depthDSR/statemachine.smdsl diff --git a/components/depthDSR/CMakeLists.txt b/components/depthDSR/CMakeLists.txt new file mode 100644 index 00000000..8f1fd499 --- /dev/null +++ b/components/depthDSR/CMakeLists.txt @@ -0,0 +1,20 @@ +cmake_minimum_required( VERSION 2.8 ) +PROJECT( depthDSR ) + +SET(RC_COMPONENT_PATH ${CMAKE_CURRENT_SOURCE_DIR} CACHE STRING "component base path" FORCE) +SET(RC_COMPONENT_DEVEL_PATH "${CMAKE_CURRENT_SOURCE_DIR}" CACHE STRING "component binary path" FORCE) +#SET(RC_COMPONENT_DEVEL_PATH "${WORKSPACE_PATH}/devel" CACHE STRING "component binary path") +SET(RC_COMPONENT_INSTALL_PATH "/opt/robocomp" CACHE STRING "component install path") + +#commented as now devel is merged into source space +#get_filename_component( COMPONENT_NAME ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY) +#STRING(REPLACE "${COMPONENT_NAME}/" " " COMPONENT_NAME ${RC_COMPONENT_PATH}) +#STRING(STRIP ${COMPONENT_NAME} COMPONENT_NAME) +#SET(COMPONENT_NAME ${COMPONENT_NAME} CACHE STRING "component name" FORCE) + +SUBDIRS( src ) + +INSTALL(FILES etc/config DESTINATION ${RC_COMPONENT_INSTALL_PATH}/etc-default/ RENAME depthDSR.conf ) + +#ADD_CUSTOM_TARGET(doc doxygen Doxyfile) +#ADD_CUSTOM_TARGET(installdoc mkdir -p ${RC_COMPONENT_INSTALL_PATH}/doc COMMAND cp -R doc/html ${RC_COMPONENT_INSTALL_PATH}/doc/graspDSR ) diff --git a/components/depthDSR/DoxyFile b/components/depthDSR/DoxyFile new file mode 100644 index 00000000..9ba23491 --- /dev/null +++ b/components/depthDSR/DoxyFile @@ -0,0 +1,1423 @@ +# Doxyfile 1.6.1 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + + +DOXYFILE_ENCODING = UTF-8 + +# ROBOCOMP +PROJECT_NAME = depthDSR +PROJECT_NUMBER = + + +OUTPUT_DIRECTORY = doc +CREATE_SUBDIRS = NO +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = YES + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# ROBOCOMP +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +OPTIMIZE_OUTPUT_FOR_C = NO +OPTIMIZE_OUTPUT_JAVA = NO +OPTIMIZE_FOR_FORTRAN = NO +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it parses. +# With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this tag. +# The format is ext=language, where ext is a file extension, and language is one of +# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, +# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat +# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), +# use: inc=Fortran f=C. Note that for custom extensions you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen to replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the +osubgrouping command. + +SUBGROUPING = YES + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penality. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will rougly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +#robocomp +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespace are hidden. + +EXTRACT_ANON_NSPACES = NO + +# ROBOCOMP +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the (brief and detailed) documentation of class members so that constructors and destructors are listed first. If set to NO (the default) the constructors will appear in the respective orders defined by SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting odo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting est +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by +# doxygen. The layout file controls the global structure of the generated output files +# in an output format independent way. The create the layout file that represents +# doxygen's defaults, run doxygen with the -l option. You can optionally specify a +# file name after the option, if omitted DoxygenLayout.xml will be used as the name +# of the layout file. + +LAYOUT_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# ROBOCOMP +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 + +#robocomp +FILE_PATTERNS = *.cpp *.h *.c *.py + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +# ROBOCOMP +EXCLUDE = +#Base.h Base.cpp Camara.h Camara.cpp CamMotion.h CamMotion.cpp Laser.h Laser.cpp Micro.h Micro.cpp + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +# ROBOCOMP +EXCLUDE_PATTERNS = A* B* C* D* E* F* G* H* I* J* K* L* M* N* O* P* Q* R* S* T* U* V* W* X* Y* Z* + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +#robocomp +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. +# Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = NO + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. +# ROBOCOMP +HTML_HEADER = +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +#robocomp +HTML_DYNAMIC_SECTIONS = YES + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER +# are set, an additional index file will be generated that can be used as input for +# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated +# HTML documentation. +#robocomp +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. +# For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's +# filter section matches. +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. + +GENERATE_TREEVIEW = NO + +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list. + +USE_INLINE_TREES = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# When the SEARCHENGINE tag is enable doxygen will generate a search box for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using HTML help (GENERATE_HTMLHELP) or Qt help (GENERATE_QHP) +# there is already a search function so this one should typically +# be disabled. + +SEARCHENGINE = YES + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +# If LATEX_SOURCE_CODE is set to YES then doxygen will include source code with syntax highlighting in the LaTeX output. Note that which sources are shown also depends on other settings such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. +# This is useful +# if you want to understand what is going on. +# On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse +# the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more +# powerful graphs. + +CLASS_DIAGRAMS = YES + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = YES + +# By default doxygen will write a font called FreeSans.ttf to the output +# directory and reference it in all dot files that doxygen generates. This +# font does not include all possible unicode characters however, so when you need +# these (or just want a differently looking font) you can specify the font name +# using DOT_FONTNAME. You need need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# containing the font. + +DOT_FONTNAME = FreeSans + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot +# can find it using this tag. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = YES + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES diff --git a/components/depthDSR/depthDSR.cdsl b/components/depthDSR/depthDSR.cdsl new file mode 100644 index 00000000..90585986 --- /dev/null +++ b/components/depthDSR/depthDSR.cdsl @@ -0,0 +1,12 @@ +import "DepthEstimation.idsl"; + +Component depthDSR +{ + Communications + { + requires DepthEstimation; + }; + language Cpp11; + gui Qt(QMainWindow); + options dsr; +}; diff --git a/components/depthDSR/statemachine.smdsl b/components/depthDSR/statemachine.smdsl new file mode 100644 index 00000000..18a2bfc2 --- /dev/null +++ b/components/depthDSR/statemachine.smdsl @@ -0,0 +1,40 @@ + +/* CHANGE THE NAME OF THE MACHINE IF YOU MAKE + ANY CHANGE TO THE DEFAULT STATES OR TRANSITIONS */ + +defaultMachine{ + states compute; + initial_state initialize; + end_state finalize; + transitions{ + initialize => compute; + compute => compute; + compute => finalize; + }; +}; + + +/* -------------------------------------------------------------- + This is the accepted syntax for the State Machine definition + +name_machine{ + [states name_state *[, name_state];] + [initial_state name_state;] + [end_state name_state;] + [transitions{ + name_state => name_state *[, name_state]; + *[name_state => name_state *[, name_state];] + };] +}; + +[:parent_state [parallel]{ + states name_state *[, name_state]; + [initial_state name_state;] + [end_state name_state;] + [transitions{ + name_state => name_state *[, name_state]; + *[name_state => name_state *[, name_state];] + };] +};] + +------------------------------------------------------------------ */ From 3c7796e650b6b09458ca7bece55474a741bf29ef Mon Sep 17 00:00:00 2001 From: Vaibhaw Khemka <46538042+vaibhawkhemka@users.noreply.github.com> Date: Sat, 14 Aug 2021 13:37:54 +0530 Subject: [PATCH 03/13] Create text.txt --- components/depthDSR/src/text.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 components/depthDSR/src/text.txt diff --git a/components/depthDSR/src/text.txt b/components/depthDSR/src/text.txt new file mode 100644 index 00000000..8e27be7d --- /dev/null +++ b/components/depthDSR/src/text.txt @@ -0,0 +1 @@ +text From 4173c33e7854fc4c807fdcedfe3ab61a9beaa5e7 Mon Sep 17 00:00:00 2001 From: Vaibhaw Khemka <46538042+vaibhawkhemka@users.noreply.github.com> Date: Sat, 14 Aug 2021 13:38:14 +0530 Subject: [PATCH 04/13] Create text.txt --- components/depthDSR/etc/text.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 components/depthDSR/etc/text.txt diff --git a/components/depthDSR/etc/text.txt b/components/depthDSR/etc/text.txt new file mode 100644 index 00000000..8e27be7d --- /dev/null +++ b/components/depthDSR/etc/text.txt @@ -0,0 +1 @@ +text From bb5e80a43f25cbf013ad1b5f7db28a758a1693d6 Mon Sep 17 00:00:00 2001 From: Vaibhaw Khemka <46538042+vaibhawkhemka@users.noreply.github.com> Date: Sat, 14 Aug 2021 13:38:42 +0530 Subject: [PATCH 05/13] Delete test.txt --- components/depthDSR/test.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 components/depthDSR/test.txt diff --git a/components/depthDSR/test.txt b/components/depthDSR/test.txt deleted file mode 100644 index 8e27be7d..00000000 --- a/components/depthDSR/test.txt +++ /dev/null @@ -1 +0,0 @@ -text From 257d321a7a6e3caf0462e0b057410fb43af3772b Mon Sep 17 00:00:00 2001 From: Vaibhaw Khemka <46538042+vaibhawkhemka@users.noreply.github.com> Date: Sat, 14 Aug 2021 13:39:12 +0530 Subject: [PATCH 06/13] Add files via upload --- components/depthDSR/etc/config | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 components/depthDSR/etc/config diff --git a/components/depthDSR/etc/config b/components/depthDSR/etc/config new file mode 100644 index 00000000..9a5e53cc --- /dev/null +++ b/components/depthDSR/etc/config @@ -0,0 +1,22 @@ +CommonBehavior.Endpoints=tcp -p 10000 + +# Proxies for required interfaces +DSRGetIDProxy = dsrgetid:tcp -h localhost -p 11000 +DepthEstimationProxy = depthestimation:tcp -h localhost -p 10100 + +# Agent configuration +agent_id = 71 +agent_name = depthDSR +tree_view = false +graph_view = true +2d_view = false +3d_view = false + +InnerModelPath = innermodel.xml + +# Ice configuration +Ice.MessageSizeMax=20004800 + +Ice.Warn.Connections=0 +Ice.Trace.Network=0 +Ice.Trace.Protocol=0 From 44491a75af1d3d2df378f038160ef5e2ea370165 Mon Sep 17 00:00:00 2001 From: Vaibhaw Khemka <46538042+vaibhawkhemka@users.noreply.github.com> Date: Sat, 14 Aug 2021 13:41:27 +0530 Subject: [PATCH 07/13] Add files via upload --- components/depthDSR/src/CMakeLists.txt | 46 + .../depthDSR/src/CMakeListsSpecific.txt | 22 + components/depthDSR/src/CameraRGBDSimple.cpp | 744 ++++++ components/depthDSR/src/CameraRGBDSimple.h | 1379 ++++++++++ components/depthDSR/src/CommonBehavior.cpp | 987 +++++++ components/depthDSR/src/CommonBehavior.h | 2368 +++++++++++++++++ components/depthDSR/src/DepthEstimation.cpp | 439 +++ components/depthDSR/src/DepthEstimation.h | 703 +++++ components/depthDSR/src/commonbehaviorI.cpp | 87 + components/depthDSR/src/commonbehaviorI.h | 53 + components/depthDSR/src/config.h | 11 + components/depthDSR/src/custom_widget.h | 55 + components/depthDSR/src/genericmonitor.cpp | 217 ++ components/depthDSR/src/genericmonitor.h | 76 + components/depthDSR/src/genericworker.cpp | 61 + components/depthDSR/src/genericworker.h | 78 + components/depthDSR/src/localUI.ui | 63 + components/depthDSR/src/main.cpp | 283 ++ components/depthDSR/src/mainUI.ui | 78 + components/depthDSR/src/specificmonitor.cpp | 115 + components/depthDSR/src/specificmonitor.h | 46 + components/depthDSR/src/specificworker.cpp | 207 ++ components/depthDSR/src/specificworker.h | 92 + components/depthDSR/src/ui_mainUI.h | 103 + 24 files changed, 8313 insertions(+) create mode 100644 components/depthDSR/src/CMakeLists.txt create mode 100644 components/depthDSR/src/CMakeListsSpecific.txt create mode 100644 components/depthDSR/src/CameraRGBDSimple.cpp create mode 100644 components/depthDSR/src/CameraRGBDSimple.h create mode 100644 components/depthDSR/src/CommonBehavior.cpp create mode 100644 components/depthDSR/src/CommonBehavior.h create mode 100644 components/depthDSR/src/DepthEstimation.cpp create mode 100644 components/depthDSR/src/DepthEstimation.h create mode 100644 components/depthDSR/src/commonbehaviorI.cpp create mode 100644 components/depthDSR/src/commonbehaviorI.h create mode 100644 components/depthDSR/src/config.h create mode 100644 components/depthDSR/src/custom_widget.h create mode 100644 components/depthDSR/src/genericmonitor.cpp create mode 100644 components/depthDSR/src/genericmonitor.h create mode 100644 components/depthDSR/src/genericworker.cpp create mode 100644 components/depthDSR/src/genericworker.h create mode 100644 components/depthDSR/src/localUI.ui create mode 100644 components/depthDSR/src/main.cpp create mode 100644 components/depthDSR/src/mainUI.ui create mode 100644 components/depthDSR/src/specificmonitor.cpp create mode 100644 components/depthDSR/src/specificmonitor.h create mode 100644 components/depthDSR/src/specificworker.cpp create mode 100644 components/depthDSR/src/specificworker.h create mode 100644 components/depthDSR/src/ui_mainUI.h diff --git a/components/depthDSR/src/CMakeLists.txt b/components/depthDSR/src/CMakeLists.txt new file mode 100644 index 00000000..d0ea9069 --- /dev/null +++ b/components/depthDSR/src/CMakeLists.txt @@ -0,0 +1,46 @@ +cmake_minimum_required(VERSION 2.8.11) + + +IF ( "$ENV{ROBOCOMP}" STREQUAL "") + MESSAGE(WARNING "ROBOCOMP variable not set. Using the default value: /opt/robocomp") + SET (ENV{ROBOCOMP} "/opt/robocomp/") +ENDIF ( "$ENV{ROBOCOMP}" STREQUAL "") + +IF(NOT EXISTS $ENV{ROBOCOMP}/cmake) + MESSAGE(FATAL_ERROR "Couldn't find RoboComp in $ENV{ROBOCOMP}! Exiting...") +ENDIF(NOT EXISTS $ENV{ROBOCOMP}/cmake) + +INCLUDE( $ENV{ROBOCOMP}/cmake/robocomp.cmake ) +INCLUDE( $ENV{ROBOCOMP}/cmake/modules/qt.cmake ) +INCLUDE ( CMakeListsSpecific.txt) + +# Sources set +SET ( SOURCES + ${SOURCES} + $ENV{ROBOCOMP}/classes/rapplication/rapplication.cpp + $ENV{ROBOCOMP}/classes/sigwatch/sigwatch.cpp + $ENV{ROBOCOMP}/classes/qlog/qlog.cpp + main.cpp + genericmonitor.cpp + commonbehaviorI.cpp + genericworker.cpp +) + + + +ADD_DEFINITIONS ("-DICE_CPP11_MAPPING") +FIND_PACKAGE( Ice REQUIRED COMPONENTS Ice++11 IceStorm++11) + + +#ROBOCOMP +ROBOCOMP_INITIALIZE( $ENV{ROBOCOMP}/ ) +ROBOCOMP_IDSL_TO_ICE( CommonBehavior CameraRGBDSimple DepthEstimation) +ROBOCOMP_ICE_TO_SRC( CommonBehavior CameraRGBDSimple DepthEstimation) +SET (EXECUTABLE_OUTPUT_PATH ${RC_COMPONENT_DEVEL_PATH}/bin) + +QT_WRAP_UI( UI_HEADERS mainUI.ui ) + +# Specify construction and link process +ADD_EXECUTABLE( depthDSR ${SOURCES} ${MOC_SOURCES} ${RC_SOURCES} ${UI_HEADERS} ) +TARGET_LINK_LIBRARIES( depthDSR ${LIBS} ${STATIC_LIBS} ${SPECIFIC_LIBS} ${QT_LIBRARIES} ${Ice_LIBRARIES}) +INSTALL(FILES ${EXECUTABLE_OUTPUT_PATH}/depthDSR DESTINATION ${RC_COMPONENT_INSTALL_PATH}/bin/ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE ) diff --git a/components/depthDSR/src/CMakeListsSpecific.txt b/components/depthDSR/src/CMakeListsSpecific.txt new file mode 100644 index 00000000..748edb67 --- /dev/null +++ b/components/depthDSR/src/CMakeListsSpecific.txt @@ -0,0 +1,22 @@ +find_package (Eigen3 3.3 REQUIRED NO_MODULE) +INCLUDE( $ENV{ROBOCOMP}/cmake/modules/opencv4.cmake ) + + +# Sources set +SET ( SOURCES + specificworker.cpp + specificmonitor.cpp + custom_widget.h +) + +# Headers set +SET ( HEADERS + specificworker.h + specificmonitor.h +) + +set(CMAKE_CXX_STANDARD 20) + +SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-fmax-errors=5" ) +add_definitions(-Og -fmax-errors=1 -std=c++20 -fno-char8_t ) +SET(SPECIFIC_LIBS dsr_core dsr_gui dsr_api fastcdr fastrtps osgDB fcl OpenThreads opencv_imgproc tbb Eigen3::Eigen) diff --git a/components/depthDSR/src/CameraRGBDSimple.cpp b/components/depthDSR/src/CameraRGBDSimple.cpp new file mode 100644 index 00000000..2857843c --- /dev/null +++ b/components/depthDSR/src/CameraRGBDSimple.cpp @@ -0,0 +1,744 @@ +// +// Copyright (c) ZeroC, Inc. All rights reserved. +// +// +// Ice version 3.7.3 +// +// +// +// Generated from file `CameraRGBDSimple.ice' +// +// Warning: do not edit this file. +// +// +// + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(_MSC_VER) +# pragma warning(disable:4458) // declaration of ... hides class member +#elif defined(__clang__) +# pragma clang diagnostic ignored "-Wshadow" +#elif defined(__GNUC__) +# pragma GCC diagnostic ignored "-Wshadow" +#endif + +#ifndef ICE_IGNORE_VERSION +# if ICE_INT_VERSION / 100 != 307 +# error Ice version mismatch! +# endif +# if ICE_INT_VERSION % 100 >= 50 +# error Beta header file detected +# endif +# if ICE_INT_VERSION % 100 < 3 +# error Ice patch level mismatch! +# endif +#endif + +#ifdef ICE_CPP11_MAPPING // C++11 mapping + +namespace +{ + +const ::IceInternal::DefaultUserExceptionFactoryInit<::RoboCompCameraRGBDSimple::HardwareFailedException> iceC_RoboCompCameraRGBDSimple_HardwareFailedException_init("::RoboCompCameraRGBDSimple::HardwareFailedException"); + +const ::std::string iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_ids[2] = +{ + "::Ice::Object", + "::RoboCompCameraRGBDSimple::CameraRGBDSimple" +}; +const ::std::string iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_ops[] = +{ + "getAll", + "getDepth", + "getImage", + "ice_id", + "ice_ids", + "ice_isA", + "ice_ping" +}; +const ::std::string iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_getAll_name = "getAll"; +const ::std::string iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_getDepth_name = "getDepth"; +const ::std::string iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_getImage_name = "getImage"; + +} + +RoboCompCameraRGBDSimple::HardwareFailedException::~HardwareFailedException() +{ +} + +const ::std::string& +RoboCompCameraRGBDSimple::HardwareFailedException::ice_staticId() +{ + static const ::std::string typeId = "::RoboCompCameraRGBDSimple::HardwareFailedException"; + return typeId; +} + +bool +RoboCompCameraRGBDSimple::CameraRGBDSimple::ice_isA(::std::string s, const ::Ice::Current&) const +{ + return ::std::binary_search(iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_ids, iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_ids + 2, s); +} + +::std::vector<::std::string> +RoboCompCameraRGBDSimple::CameraRGBDSimple::ice_ids(const ::Ice::Current&) const +{ + return ::std::vector<::std::string>(&iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_ids[0], &iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_ids[2]); +} + +::std::string +RoboCompCameraRGBDSimple::CameraRGBDSimple::ice_id(const ::Ice::Current&) const +{ + return ice_staticId(); +} + +const ::std::string& +RoboCompCameraRGBDSimple::CameraRGBDSimple::ice_staticId() +{ + static const ::std::string typeId = "::RoboCompCameraRGBDSimple::CameraRGBDSimple"; + return typeId; +} + +/// \cond INTERNAL +bool +RoboCompCameraRGBDSimple::CameraRGBDSimple::_iceD_getAll(::IceInternal::Incoming& inS, const ::Ice::Current& current) +{ + _iceCheckMode(::Ice::OperationMode::Normal, current.mode); + auto istr = inS.startReadParams(); + ::std::string iceP_camera; + istr->readAll(iceP_camera); + inS.endReadParams(); + TRGBD ret = this->getAll(::std::move(iceP_camera), current); + auto ostr = inS.startWriteParams(); + ostr->writeAll(ret); + inS.endWriteParams(); + return true; +} +/// \endcond + +/// \cond INTERNAL +bool +RoboCompCameraRGBDSimple::CameraRGBDSimple::_iceD_getDepth(::IceInternal::Incoming& inS, const ::Ice::Current& current) +{ + _iceCheckMode(::Ice::OperationMode::Normal, current.mode); + auto istr = inS.startReadParams(); + ::std::string iceP_camera; + istr->readAll(iceP_camera); + inS.endReadParams(); + TDepth ret = this->getDepth(::std::move(iceP_camera), current); + auto ostr = inS.startWriteParams(); + ostr->writeAll(ret); + inS.endWriteParams(); + return true; +} +/// \endcond + +/// \cond INTERNAL +bool +RoboCompCameraRGBDSimple::CameraRGBDSimple::_iceD_getImage(::IceInternal::Incoming& inS, const ::Ice::Current& current) +{ + _iceCheckMode(::Ice::OperationMode::Normal, current.mode); + auto istr = inS.startReadParams(); + ::std::string iceP_camera; + istr->readAll(iceP_camera); + inS.endReadParams(); + TImage ret = this->getImage(::std::move(iceP_camera), current); + auto ostr = inS.startWriteParams(); + ostr->writeAll(ret); + inS.endWriteParams(); + return true; +} +/// \endcond + +/// \cond INTERNAL +bool +RoboCompCameraRGBDSimple::CameraRGBDSimple::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current) +{ + ::std::pair r = ::std::equal_range(iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_ops, iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_ops + 7, current.operation); + if(r.first == r.second) + { + throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); + } + + switch(r.first - iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_ops) + { + case 0: + { + return _iceD_getAll(in, current); + } + case 1: + { + return _iceD_getDepth(in, current); + } + case 2: + { + return _iceD_getImage(in, current); + } + case 3: + { + return _iceD_ice_id(in, current); + } + case 4: + { + return _iceD_ice_ids(in, current); + } + case 5: + { + return _iceD_ice_isA(in, current); + } + case 6: + { + return _iceD_ice_ping(in, current); + } + default: + { + assert(false); + throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); + } + } +} +/// \endcond + +/// \cond INTERNAL +void +RoboCompCameraRGBDSimple::CameraRGBDSimplePrx::_iceI_getAll(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<::RoboCompCameraRGBDSimple::TRGBD>>& outAsync, const ::std::string& iceP_camera, const ::Ice::Context& context) +{ + _checkTwowayOnly(iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_getAll_name); + outAsync->invoke(iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_getAll_name, ::Ice::OperationMode::Normal, ::Ice::FormatType::DefaultFormat, context, + [&](::Ice::OutputStream* ostr) + { + ostr->writeAll(iceP_camera); + }, + [](const ::Ice::UserException& ex) + { + try + { + ex.ice_throw(); + } + catch(const HardwareFailedException&) + { + throw; + } + catch(const ::Ice::UserException&) + { + } + }); +} +/// \endcond + +/// \cond INTERNAL +void +RoboCompCameraRGBDSimple::CameraRGBDSimplePrx::_iceI_getDepth(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<::RoboCompCameraRGBDSimple::TDepth>>& outAsync, const ::std::string& iceP_camera, const ::Ice::Context& context) +{ + _checkTwowayOnly(iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_getDepth_name); + outAsync->invoke(iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_getDepth_name, ::Ice::OperationMode::Normal, ::Ice::FormatType::DefaultFormat, context, + [&](::Ice::OutputStream* ostr) + { + ostr->writeAll(iceP_camera); + }, + [](const ::Ice::UserException& ex) + { + try + { + ex.ice_throw(); + } + catch(const HardwareFailedException&) + { + throw; + } + catch(const ::Ice::UserException&) + { + } + }); +} +/// \endcond + +/// \cond INTERNAL +void +RoboCompCameraRGBDSimple::CameraRGBDSimplePrx::_iceI_getImage(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<::RoboCompCameraRGBDSimple::TImage>>& outAsync, const ::std::string& iceP_camera, const ::Ice::Context& context) +{ + _checkTwowayOnly(iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_getImage_name); + outAsync->invoke(iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_getImage_name, ::Ice::OperationMode::Normal, ::Ice::FormatType::DefaultFormat, context, + [&](::Ice::OutputStream* ostr) + { + ostr->writeAll(iceP_camera); + }, + [](const ::Ice::UserException& ex) + { + try + { + ex.ice_throw(); + } + catch(const HardwareFailedException&) + { + throw; + } + catch(const ::Ice::UserException&) + { + } + }); +} +/// \endcond + +/// \cond INTERNAL +::std::shared_ptr<::Ice::ObjectPrx> +RoboCompCameraRGBDSimple::CameraRGBDSimplePrx::_newInstance() const +{ + return ::IceInternal::createProxy(); +} +/// \endcond + +const ::std::string& +RoboCompCameraRGBDSimple::CameraRGBDSimplePrx::ice_staticId() +{ + return CameraRGBDSimple::ice_staticId(); +} + +namespace Ice +{ +} + +#else // C++98 mapping + +namespace +{ + +const ::std::string iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_getAll_name = "getAll"; + +const ::std::string iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_getDepth_name = "getDepth"; + +const ::std::string iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_getImage_name = "getImage"; + +} + +namespace +{ + +const ::IceInternal::DefaultUserExceptionFactoryInit< ::RoboCompCameraRGBDSimple::HardwareFailedException> iceC_RoboCompCameraRGBDSimple_HardwareFailedException_init("::RoboCompCameraRGBDSimple::HardwareFailedException"); + +} + +RoboCompCameraRGBDSimple::HardwareFailedException::HardwareFailedException(const ::std::string& what) : + ::Ice::UserException(), + what(what) +{ +} + +RoboCompCameraRGBDSimple::HardwareFailedException::~HardwareFailedException() throw() +{ +} + +::std::string +RoboCompCameraRGBDSimple::HardwareFailedException::ice_id() const +{ + return "::RoboCompCameraRGBDSimple::HardwareFailedException"; +} + +RoboCompCameraRGBDSimple::HardwareFailedException* +RoboCompCameraRGBDSimple::HardwareFailedException::ice_clone() const +{ + return new HardwareFailedException(*this); +} + +void +RoboCompCameraRGBDSimple::HardwareFailedException::ice_throw() const +{ + throw *this; +} + +/// \cond STREAM +void +RoboCompCameraRGBDSimple::HardwareFailedException::_writeImpl(::Ice::OutputStream* ostr) const +{ + ostr->startSlice("::RoboCompCameraRGBDSimple::HardwareFailedException", -1, true); + ::Ice::StreamWriter< HardwareFailedException, ::Ice::OutputStream>::write(ostr, *this); + ostr->endSlice(); +} + +void +RoboCompCameraRGBDSimple::HardwareFailedException::_readImpl(::Ice::InputStream* istr) +{ + istr->startSlice(); + ::Ice::StreamReader< HardwareFailedException, ::Ice::InputStream>::read(istr, *this); + istr->endSlice(); +} +/// \endcond + +/// \cond INTERNAL +::IceProxy::Ice::Object* ::IceProxy::RoboCompCameraRGBDSimple::upCast(CameraRGBDSimple* p) { return p; } + +void +::IceProxy::RoboCompCameraRGBDSimple::_readProxy(::Ice::InputStream* istr, ::IceInternal::ProxyHandle< CameraRGBDSimple>& v) +{ + ::Ice::ObjectPrx proxy; + istr->read(proxy); + if(!proxy) + { + v = 0; + } + else + { + v = new CameraRGBDSimple; + v->_copyFrom(proxy); + } +} +/// \endcond + +::Ice::AsyncResultPtr +IceProxy::RoboCompCameraRGBDSimple::CameraRGBDSimple::_iceI_begin_getAll(const ::std::string& iceP_camera, const ::Ice::Context& context, const ::IceInternal::CallbackBasePtr& del, const ::Ice::LocalObjectPtr& cookie, bool sync) +{ + _checkTwowayOnly(iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_getAll_name, sync); + ::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(this, iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_getAll_name, del, cookie, sync); + try + { + result->prepare(iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_getAll_name, ::Ice::Normal, context); + ::Ice::OutputStream* ostr = result->startWriteParams(::Ice::DefaultFormat); + ostr->write(iceP_camera); + result->endWriteParams(); + result->invoke(iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_getAll_name); + } + catch(const ::Ice::Exception& ex) + { + result->abort(ex); + } + return result; +} + +::RoboCompCameraRGBDSimple::TRGBD +IceProxy::RoboCompCameraRGBDSimple::CameraRGBDSimple::end_getAll(const ::Ice::AsyncResultPtr& result) +{ + ::Ice::AsyncResult::_check(result, this, iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_getAll_name); + ::RoboCompCameraRGBDSimple::TRGBD ret; + if(!result->_waitForResponse()) + { + try + { + result->_throwUserException(); + } + catch(const ::RoboCompCameraRGBDSimple::HardwareFailedException&) + { + throw; + } + catch(const ::Ice::UserException& ex) + { + throw ::Ice::UnknownUserException(__FILE__, __LINE__, ex.ice_id()); + } + } + ::Ice::InputStream* istr = result->_startReadParams(); + istr->read(ret); + result->_endReadParams(); + return ret; +} + +::Ice::AsyncResultPtr +IceProxy::RoboCompCameraRGBDSimple::CameraRGBDSimple::_iceI_begin_getDepth(const ::std::string& iceP_camera, const ::Ice::Context& context, const ::IceInternal::CallbackBasePtr& del, const ::Ice::LocalObjectPtr& cookie, bool sync) +{ + _checkTwowayOnly(iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_getDepth_name, sync); + ::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(this, iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_getDepth_name, del, cookie, sync); + try + { + result->prepare(iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_getDepth_name, ::Ice::Normal, context); + ::Ice::OutputStream* ostr = result->startWriteParams(::Ice::DefaultFormat); + ostr->write(iceP_camera); + result->endWriteParams(); + result->invoke(iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_getDepth_name); + } + catch(const ::Ice::Exception& ex) + { + result->abort(ex); + } + return result; +} + +::RoboCompCameraRGBDSimple::TDepth +IceProxy::RoboCompCameraRGBDSimple::CameraRGBDSimple::end_getDepth(const ::Ice::AsyncResultPtr& result) +{ + ::Ice::AsyncResult::_check(result, this, iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_getDepth_name); + ::RoboCompCameraRGBDSimple::TDepth ret; + if(!result->_waitForResponse()) + { + try + { + result->_throwUserException(); + } + catch(const ::RoboCompCameraRGBDSimple::HardwareFailedException&) + { + throw; + } + catch(const ::Ice::UserException& ex) + { + throw ::Ice::UnknownUserException(__FILE__, __LINE__, ex.ice_id()); + } + } + ::Ice::InputStream* istr = result->_startReadParams(); + istr->read(ret); + result->_endReadParams(); + return ret; +} + +::Ice::AsyncResultPtr +IceProxy::RoboCompCameraRGBDSimple::CameraRGBDSimple::_iceI_begin_getImage(const ::std::string& iceP_camera, const ::Ice::Context& context, const ::IceInternal::CallbackBasePtr& del, const ::Ice::LocalObjectPtr& cookie, bool sync) +{ + _checkTwowayOnly(iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_getImage_name, sync); + ::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(this, iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_getImage_name, del, cookie, sync); + try + { + result->prepare(iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_getImage_name, ::Ice::Normal, context); + ::Ice::OutputStream* ostr = result->startWriteParams(::Ice::DefaultFormat); + ostr->write(iceP_camera); + result->endWriteParams(); + result->invoke(iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_getImage_name); + } + catch(const ::Ice::Exception& ex) + { + result->abort(ex); + } + return result; +} + +::RoboCompCameraRGBDSimple::TImage +IceProxy::RoboCompCameraRGBDSimple::CameraRGBDSimple::end_getImage(const ::Ice::AsyncResultPtr& result) +{ + ::Ice::AsyncResult::_check(result, this, iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_getImage_name); + ::RoboCompCameraRGBDSimple::TImage ret; + if(!result->_waitForResponse()) + { + try + { + result->_throwUserException(); + } + catch(const ::RoboCompCameraRGBDSimple::HardwareFailedException&) + { + throw; + } + catch(const ::Ice::UserException& ex) + { + throw ::Ice::UnknownUserException(__FILE__, __LINE__, ex.ice_id()); + } + } + ::Ice::InputStream* istr = result->_startReadParams(); + istr->read(ret); + result->_endReadParams(); + return ret; +} + +/// \cond INTERNAL +::IceProxy::Ice::Object* +IceProxy::RoboCompCameraRGBDSimple::CameraRGBDSimple::_newInstance() const +{ + return new CameraRGBDSimple; +} +/// \endcond + +const ::std::string& +IceProxy::RoboCompCameraRGBDSimple::CameraRGBDSimple::ice_staticId() +{ + return ::RoboCompCameraRGBDSimple::CameraRGBDSimple::ice_staticId(); +} + +RoboCompCameraRGBDSimple::CameraRGBDSimple::~CameraRGBDSimple() +{ +} + +/// \cond INTERNAL +::Ice::Object* RoboCompCameraRGBDSimple::upCast(CameraRGBDSimple* p) { return p; } + +/// \endcond + +namespace +{ +const ::std::string iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_ids[2] = +{ + "::Ice::Object", + "::RoboCompCameraRGBDSimple::CameraRGBDSimple" +}; + +} + +bool +RoboCompCameraRGBDSimple::CameraRGBDSimple::ice_isA(const ::std::string& s, const ::Ice::Current&) const +{ + return ::std::binary_search(iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_ids, iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_ids + 2, s); +} + +::std::vector< ::std::string> +RoboCompCameraRGBDSimple::CameraRGBDSimple::ice_ids(const ::Ice::Current&) const +{ + return ::std::vector< ::std::string>(&iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_ids[0], &iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_ids[2]); +} + +const ::std::string& +RoboCompCameraRGBDSimple::CameraRGBDSimple::ice_id(const ::Ice::Current&) const +{ + return ice_staticId(); +} + +const ::std::string& +RoboCompCameraRGBDSimple::CameraRGBDSimple::ice_staticId() +{ +#ifdef ICE_HAS_THREAD_SAFE_LOCAL_STATIC + static const ::std::string typeId = "::RoboCompCameraRGBDSimple::CameraRGBDSimple"; + return typeId; +#else + return iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_ids[1]; +#endif +} + +/// \cond INTERNAL +bool +RoboCompCameraRGBDSimple::CameraRGBDSimple::_iceD_getAll(::IceInternal::Incoming& inS, const ::Ice::Current& current) +{ + _iceCheckMode(::Ice::Normal, current.mode); + ::Ice::InputStream* istr = inS.startReadParams(); + ::std::string iceP_camera; + istr->read(iceP_camera); + inS.endReadParams(); + TRGBD ret = this->getAll(iceP_camera, current); + ::Ice::OutputStream* ostr = inS.startWriteParams(); + ostr->write(ret); + inS.endWriteParams(); + return true; +} +/// \endcond + +/// \cond INTERNAL +bool +RoboCompCameraRGBDSimple::CameraRGBDSimple::_iceD_getDepth(::IceInternal::Incoming& inS, const ::Ice::Current& current) +{ + _iceCheckMode(::Ice::Normal, current.mode); + ::Ice::InputStream* istr = inS.startReadParams(); + ::std::string iceP_camera; + istr->read(iceP_camera); + inS.endReadParams(); + TDepth ret = this->getDepth(iceP_camera, current); + ::Ice::OutputStream* ostr = inS.startWriteParams(); + ostr->write(ret); + inS.endWriteParams(); + return true; +} +/// \endcond + +/// \cond INTERNAL +bool +RoboCompCameraRGBDSimple::CameraRGBDSimple::_iceD_getImage(::IceInternal::Incoming& inS, const ::Ice::Current& current) +{ + _iceCheckMode(::Ice::Normal, current.mode); + ::Ice::InputStream* istr = inS.startReadParams(); + ::std::string iceP_camera; + istr->read(iceP_camera); + inS.endReadParams(); + TImage ret = this->getImage(iceP_camera, current); + ::Ice::OutputStream* ostr = inS.startWriteParams(); + ostr->write(ret); + inS.endWriteParams(); + return true; +} +/// \endcond + +namespace +{ +const ::std::string iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_all[] = +{ + "getAll", + "getDepth", + "getImage", + "ice_id", + "ice_ids", + "ice_isA", + "ice_ping" +}; + +} + +/// \cond INTERNAL +bool +RoboCompCameraRGBDSimple::CameraRGBDSimple::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current) +{ + ::std::pair r = ::std::equal_range(iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_all, iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_all + 7, current.operation); + if(r.first == r.second) + { + throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); + } + + switch(r.first - iceC_RoboCompCameraRGBDSimple_CameraRGBDSimple_all) + { + case 0: + { + return _iceD_getAll(in, current); + } + case 1: + { + return _iceD_getDepth(in, current); + } + case 2: + { + return _iceD_getImage(in, current); + } + case 3: + { + return _iceD_ice_id(in, current); + } + case 4: + { + return _iceD_ice_ids(in, current); + } + case 5: + { + return _iceD_ice_isA(in, current); + } + case 6: + { + return _iceD_ice_ping(in, current); + } + default: + { + assert(false); + throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); + } + } +} +/// \endcond + +/// \cond STREAM +void +RoboCompCameraRGBDSimple::CameraRGBDSimple::_iceWriteImpl(::Ice::OutputStream* ostr) const +{ + ostr->startSlice(ice_staticId(), -1, true); + ::Ice::StreamWriter< CameraRGBDSimple, ::Ice::OutputStream>::write(ostr, *this); + ostr->endSlice(); +} + +void +RoboCompCameraRGBDSimple::CameraRGBDSimple::_iceReadImpl(::Ice::InputStream* istr) +{ + istr->startSlice(); + ::Ice::StreamReader< CameraRGBDSimple, ::Ice::InputStream>::read(istr, *this); + istr->endSlice(); +} +/// \endcond + +/// \cond INTERNAL +void +RoboCompCameraRGBDSimple::_icePatchObjectPtr(CameraRGBDSimplePtr& handle, const ::Ice::ObjectPtr& v) +{ + handle = CameraRGBDSimplePtr::dynamicCast(v); + if(v && !handle) + { + IceInternal::Ex::throwUOE(CameraRGBDSimple::ice_staticId(), v); + } +} +/// \endcond + +namespace Ice +{ +} + +#endif diff --git a/components/depthDSR/src/CameraRGBDSimple.h b/components/depthDSR/src/CameraRGBDSimple.h new file mode 100644 index 00000000..390dd2d0 --- /dev/null +++ b/components/depthDSR/src/CameraRGBDSimple.h @@ -0,0 +1,1379 @@ +// +// Copyright (c) ZeroC, Inc. All rights reserved. +// +// +// Ice version 3.7.3 +// +// +// +// Generated from file `CameraRGBDSimple.ice' +// +// Warning: do not edit this file. +// +// +// + +#ifndef __CameraRGBDSimple_h__ +#define __CameraRGBDSimple_h__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef ICE_IGNORE_VERSION +# if ICE_INT_VERSION / 100 != 307 +# error Ice version mismatch! +# endif +# if ICE_INT_VERSION % 100 >= 50 +# error Beta header file detected +# endif +# if ICE_INT_VERSION % 100 < 3 +# error Ice patch level mismatch! +# endif +#endif + +#ifdef ICE_CPP11_MAPPING // C++11 mapping + +namespace RoboCompCameraRGBDSimple +{ + +class CameraRGBDSimple; +class CameraRGBDSimplePrx; + +} + +namespace RoboCompCameraRGBDSimple +{ + +class HardwareFailedException : public ::Ice::UserExceptionHelper +{ +public: + + virtual ~HardwareFailedException(); + + HardwareFailedException(const HardwareFailedException&) = default; + + HardwareFailedException() = default; + + /** + * One-shot constructor to initialize all data members. + */ + HardwareFailedException(const ::std::string& what) : + what(::std::move(what)) + { + } + + /** + * Obtains a tuple containing all of the exception's data members. + * @return The data members in a tuple. + */ + std::tuple ice_tuple() const + { + return std::tie(what); + } + + /** + * Obtains the Slice type ID of this exception. + * @return The fully-scoped type ID. + */ + static const ::std::string& ice_staticId(); + + ::std::string what; +}; + +/// \cond INTERNAL +static HardwareFailedException _iceS_HardwareFailedException_init; +/// \endcond + +using ImgType = ::std::vector<::Ice::Byte>; + +using DepthType = ::std::vector<::Ice::Byte>; + +struct TImage +{ + int cameraID; + int width; + int height; + int depth; + int focalx; + int focaly; + int alivetime; + ::RoboCompCameraRGBDSimple::ImgType image; + + /** + * Obtains a tuple containing all of the struct's data members. + * @return The data members in a tuple. + */ + std::tuple ice_tuple() const + { + return std::tie(cameraID, width, height, depth, focalx, focaly, alivetime, image); + } +}; + +struct TDepth +{ + int cameraID; + int width; + int height; + int focalx; + int focaly; + int alivetime; + float depthFactor; + ::RoboCompCameraRGBDSimple::DepthType depth; + + /** + * Obtains a tuple containing all of the struct's data members. + * @return The data members in a tuple. + */ + std::tuple ice_tuple() const + { + return std::tie(cameraID, width, height, focalx, focaly, alivetime, depthFactor, depth); + } +}; + +struct TRGBD +{ + ::RoboCompCameraRGBDSimple::TImage image; + ::RoboCompCameraRGBDSimple::TDepth depth; + + /** + * Obtains a tuple containing all of the struct's data members. + * @return The data members in a tuple. + */ + std::tuple ice_tuple() const + { + return std::tie(image, depth); + } +}; + +using Ice::operator<; +using Ice::operator<=; +using Ice::operator>; +using Ice::operator>=; +using Ice::operator==; +using Ice::operator!=; + +} + +namespace RoboCompCameraRGBDSimple +{ + +class CameraRGBDSimple : public virtual ::Ice::Object +{ +public: + + using ProxyType = CameraRGBDSimplePrx; + + /** + * Determines whether this object supports an interface with the given Slice type ID. + * @param id The fully-scoped Slice type ID. + * @param current The Current object for the invocation. + * @return True if this object supports the interface, false, otherwise. + */ + virtual bool ice_isA(::std::string id, const ::Ice::Current& current) const override; + + /** + * Obtains a list of the Slice type IDs representing the interfaces supported by this object. + * @param current The Current object for the invocation. + * @return A list of fully-scoped type IDs. + */ + virtual ::std::vector<::std::string> ice_ids(const ::Ice::Current& current) const override; + + /** + * Obtains a Slice type ID representing the most-derived interface supported by this object. + * @param current The Current object for the invocation. + * @return A fully-scoped type ID. + */ + virtual ::std::string ice_id(const ::Ice::Current& current) const override; + + /** + * Obtains the Slice type ID corresponding to this class. + * @return A fully-scoped type ID. + */ + static const ::std::string& ice_staticId(); + + virtual TRGBD getAll(::std::string camera, const ::Ice::Current& current) = 0; + /// \cond INTERNAL + bool _iceD_getAll(::IceInternal::Incoming&, const ::Ice::Current&); + /// \endcond + + virtual TDepth getDepth(::std::string camera, const ::Ice::Current& current) = 0; + /// \cond INTERNAL + bool _iceD_getDepth(::IceInternal::Incoming&, const ::Ice::Current&); + /// \endcond + + virtual TImage getImage(::std::string camera, const ::Ice::Current& current) = 0; + /// \cond INTERNAL + bool _iceD_getImage(::IceInternal::Incoming&, const ::Ice::Current&); + /// \endcond + + /// \cond INTERNAL + virtual bool _iceDispatch(::IceInternal::Incoming&, const ::Ice::Current&) override; + /// \endcond +}; + +} + +namespace RoboCompCameraRGBDSimple +{ + +class CameraRGBDSimplePrx : public virtual ::Ice::Proxy +{ +public: + + TRGBD getAll(const ::std::string& camera, const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return _makePromiseOutgoing<::RoboCompCameraRGBDSimple::TRGBD>(true, this, &CameraRGBDSimplePrx::_iceI_getAll, camera, context).get(); + } + + template class P = ::std::promise> + auto getAllAsync(const ::std::string& camera, const ::Ice::Context& context = ::Ice::noExplicitContext) + -> decltype(::std::declval>().get_future()) + { + return _makePromiseOutgoing<::RoboCompCameraRGBDSimple::TRGBD, P>(false, this, &CameraRGBDSimplePrx::_iceI_getAll, camera, context); + } + + ::std::function + getAllAsync(const ::std::string& camera, + ::std::function response, + ::std::function ex = nullptr, + ::std::function sent = nullptr, + const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return _makeLamdaOutgoing<::RoboCompCameraRGBDSimple::TRGBD>(response, ex, sent, this, &RoboCompCameraRGBDSimple::CameraRGBDSimplePrx::_iceI_getAll, camera, context); + } + + /// \cond INTERNAL + void _iceI_getAll(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<::RoboCompCameraRGBDSimple::TRGBD>>&, const ::std::string&, const ::Ice::Context&); + /// \endcond + + TDepth getDepth(const ::std::string& camera, const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return _makePromiseOutgoing<::RoboCompCameraRGBDSimple::TDepth>(true, this, &CameraRGBDSimplePrx::_iceI_getDepth, camera, context).get(); + } + + template class P = ::std::promise> + auto getDepthAsync(const ::std::string& camera, const ::Ice::Context& context = ::Ice::noExplicitContext) + -> decltype(::std::declval>().get_future()) + { + return _makePromiseOutgoing<::RoboCompCameraRGBDSimple::TDepth, P>(false, this, &CameraRGBDSimplePrx::_iceI_getDepth, camera, context); + } + + ::std::function + getDepthAsync(const ::std::string& camera, + ::std::function response, + ::std::function ex = nullptr, + ::std::function sent = nullptr, + const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return _makeLamdaOutgoing<::RoboCompCameraRGBDSimple::TDepth>(response, ex, sent, this, &RoboCompCameraRGBDSimple::CameraRGBDSimplePrx::_iceI_getDepth, camera, context); + } + + /// \cond INTERNAL + void _iceI_getDepth(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<::RoboCompCameraRGBDSimple::TDepth>>&, const ::std::string&, const ::Ice::Context&); + /// \endcond + + TImage getImage(const ::std::string& camera, const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return _makePromiseOutgoing<::RoboCompCameraRGBDSimple::TImage>(true, this, &CameraRGBDSimplePrx::_iceI_getImage, camera, context).get(); + } + + template class P = ::std::promise> + auto getImageAsync(const ::std::string& camera, const ::Ice::Context& context = ::Ice::noExplicitContext) + -> decltype(::std::declval>().get_future()) + { + return _makePromiseOutgoing<::RoboCompCameraRGBDSimple::TImage, P>(false, this, &CameraRGBDSimplePrx::_iceI_getImage, camera, context); + } + + ::std::function + getImageAsync(const ::std::string& camera, + ::std::function response, + ::std::function ex = nullptr, + ::std::function sent = nullptr, + const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return _makeLamdaOutgoing<::RoboCompCameraRGBDSimple::TImage>(response, ex, sent, this, &RoboCompCameraRGBDSimple::CameraRGBDSimplePrx::_iceI_getImage, camera, context); + } + + /// \cond INTERNAL + void _iceI_getImage(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<::RoboCompCameraRGBDSimple::TImage>>&, const ::std::string&, const ::Ice::Context&); + /// \endcond + + /** + * Obtains the Slice type ID of this interface. + * @return The fully-scoped type ID. + */ + static const ::std::string& ice_staticId(); + +protected: + + /// \cond INTERNAL + CameraRGBDSimplePrx() = default; + friend ::std::shared_ptr IceInternal::createProxy(); + + virtual ::std::shared_ptr<::Ice::ObjectPrx> _newInstance() const override; + /// \endcond +}; + +} + +/// \cond STREAM +namespace Ice +{ + +template +struct StreamReader<::RoboCompCameraRGBDSimple::HardwareFailedException, S> +{ + static void read(S* istr, ::RoboCompCameraRGBDSimple::HardwareFailedException& v) + { + istr->readAll(v.what); + } +}; + +template<> +struct StreamableTraits<::RoboCompCameraRGBDSimple::TImage> +{ + static const StreamHelperCategory helper = StreamHelperCategoryStruct; + static const int minWireSize = 29; + static const bool fixedLength = false; +}; + +template +struct StreamReader<::RoboCompCameraRGBDSimple::TImage, S> +{ + static void read(S* istr, ::RoboCompCameraRGBDSimple::TImage& v) + { + istr->readAll(v.cameraID, v.width, v.height, v.depth, v.focalx, v.focaly, v.alivetime, v.image); + } +}; + +template<> +struct StreamableTraits<::RoboCompCameraRGBDSimple::TDepth> +{ + static const StreamHelperCategory helper = StreamHelperCategoryStruct; + static const int minWireSize = 29; + static const bool fixedLength = false; +}; + +template +struct StreamReader<::RoboCompCameraRGBDSimple::TDepth, S> +{ + static void read(S* istr, ::RoboCompCameraRGBDSimple::TDepth& v) + { + istr->readAll(v.cameraID, v.width, v.height, v.focalx, v.focaly, v.alivetime, v.depthFactor, v.depth); + } +}; + +template<> +struct StreamableTraits<::RoboCompCameraRGBDSimple::TRGBD> +{ + static const StreamHelperCategory helper = StreamHelperCategoryStruct; + static const int minWireSize = 58; + static const bool fixedLength = false; +}; + +template +struct StreamReader<::RoboCompCameraRGBDSimple::TRGBD, S> +{ + static void read(S* istr, ::RoboCompCameraRGBDSimple::TRGBD& v) + { + istr->readAll(v.image, v.depth); + } +}; + +} +/// \endcond + +/// \cond INTERNAL +namespace RoboCompCameraRGBDSimple +{ + +using CameraRGBDSimplePtr = ::std::shared_ptr; +using CameraRGBDSimplePrxPtr = ::std::shared_ptr; + +} +/// \endcond + +#else // C++98 mapping + +namespace IceProxy +{ + +namespace RoboCompCameraRGBDSimple +{ + +class CameraRGBDSimple; +/// \cond INTERNAL +void _readProxy(::Ice::InputStream*, ::IceInternal::ProxyHandle< CameraRGBDSimple>&); +::IceProxy::Ice::Object* upCast(CameraRGBDSimple*); +/// \endcond + +} + +} + +namespace RoboCompCameraRGBDSimple +{ + +class CameraRGBDSimple; +/// \cond INTERNAL +::Ice::Object* upCast(CameraRGBDSimple*); +/// \endcond +typedef ::IceInternal::Handle< CameraRGBDSimple> CameraRGBDSimplePtr; +typedef ::IceInternal::ProxyHandle< ::IceProxy::RoboCompCameraRGBDSimple::CameraRGBDSimple> CameraRGBDSimplePrx; +typedef CameraRGBDSimplePrx CameraRGBDSimplePrxPtr; +/// \cond INTERNAL +void _icePatchObjectPtr(CameraRGBDSimplePtr&, const ::Ice::ObjectPtr&); +/// \endcond + +} + +namespace RoboCompCameraRGBDSimple +{ + +class HardwareFailedException : public ::Ice::UserException +{ +public: + + HardwareFailedException() {} + /** + * One-shot constructor to initialize all data members. + */ + explicit HardwareFailedException(const ::std::string& what); + virtual ~HardwareFailedException() throw(); + + /** + * Obtains the Slice type ID of this exception. + * @return The fully-scoped type ID. + */ + virtual ::std::string ice_id() const; + /** + * Polymporphically clones this exception. + * @return A shallow copy of this exception. + */ + virtual HardwareFailedException* ice_clone() const; + /** + * Throws this exception. + */ + virtual void ice_throw() const; + + ::std::string what; + +protected: + + /// \cond STREAM + virtual void _writeImpl(::Ice::OutputStream*) const; + virtual void _readImpl(::Ice::InputStream*); + /// \endcond +}; + +/// \cond INTERNAL +static HardwareFailedException _iceS_HardwareFailedException_init; +/// \endcond + +typedef ::std::vector< ::Ice::Byte> ImgType; + +typedef ::std::vector< ::Ice::Byte> DepthType; + +struct TImage +{ + ::Ice::Int cameraID; + ::Ice::Int width; + ::Ice::Int height; + ::Ice::Int depth; + ::Ice::Int focalx; + ::Ice::Int focaly; + ::Ice::Int alivetime; + ::RoboCompCameraRGBDSimple::ImgType image; +}; + +struct TDepth +{ + ::Ice::Int cameraID; + ::Ice::Int width; + ::Ice::Int height; + ::Ice::Int focalx; + ::Ice::Int focaly; + ::Ice::Int alivetime; + ::Ice::Float depthFactor; + ::RoboCompCameraRGBDSimple::DepthType depth; +}; + +struct TRGBD +{ + ::RoboCompCameraRGBDSimple::TImage image; + ::RoboCompCameraRGBDSimple::TDepth depth; +}; + +} + +namespace RoboCompCameraRGBDSimple +{ + +/** + * Base class for asynchronous callback wrapper classes used for calls to + * IceProxy::RoboCompCameraRGBDSimple::CameraRGBDSimple::begin_getAll. + * Create a wrapper instance by calling ::RoboCompCameraRGBDSimple::newCallback_CameraRGBDSimple_getAll. + */ +class Callback_CameraRGBDSimple_getAll_Base : public virtual ::IceInternal::CallbackBase { }; +typedef ::IceUtil::Handle< Callback_CameraRGBDSimple_getAll_Base> Callback_CameraRGBDSimple_getAllPtr; + +/** + * Base class for asynchronous callback wrapper classes used for calls to + * IceProxy::RoboCompCameraRGBDSimple::CameraRGBDSimple::begin_getDepth. + * Create a wrapper instance by calling ::RoboCompCameraRGBDSimple::newCallback_CameraRGBDSimple_getDepth. + */ +class Callback_CameraRGBDSimple_getDepth_Base : public virtual ::IceInternal::CallbackBase { }; +typedef ::IceUtil::Handle< Callback_CameraRGBDSimple_getDepth_Base> Callback_CameraRGBDSimple_getDepthPtr; + +/** + * Base class for asynchronous callback wrapper classes used for calls to + * IceProxy::RoboCompCameraRGBDSimple::CameraRGBDSimple::begin_getImage. + * Create a wrapper instance by calling ::RoboCompCameraRGBDSimple::newCallback_CameraRGBDSimple_getImage. + */ +class Callback_CameraRGBDSimple_getImage_Base : public virtual ::IceInternal::CallbackBase { }; +typedef ::IceUtil::Handle< Callback_CameraRGBDSimple_getImage_Base> Callback_CameraRGBDSimple_getImagePtr; + +} + +namespace IceProxy +{ + +namespace RoboCompCameraRGBDSimple +{ + +class CameraRGBDSimple : public virtual ::Ice::Proxy +{ +public: + + ::RoboCompCameraRGBDSimple::TRGBD getAll(const ::std::string& camera, const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return end_getAll(_iceI_begin_getAll(camera, context, ::IceInternal::dummyCallback, 0, true)); + } + + ::Ice::AsyncResultPtr begin_getAll(const ::std::string& camera, const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return _iceI_begin_getAll(camera, context, ::IceInternal::dummyCallback, 0); + } + + ::Ice::AsyncResultPtr begin_getAll(const ::std::string& camera, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_getAll(camera, ::Ice::noExplicitContext, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_getAll(const ::std::string& camera, const ::Ice::Context& context, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_getAll(camera, context, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_getAll(const ::std::string& camera, const ::RoboCompCameraRGBDSimple::Callback_CameraRGBDSimple_getAllPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_getAll(camera, ::Ice::noExplicitContext, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_getAll(const ::std::string& camera, const ::Ice::Context& context, const ::RoboCompCameraRGBDSimple::Callback_CameraRGBDSimple_getAllPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_getAll(camera, context, cb, cookie); + } + + ::RoboCompCameraRGBDSimple::TRGBD end_getAll(const ::Ice::AsyncResultPtr& result); + +private: + + ::Ice::AsyncResultPtr _iceI_begin_getAll(const ::std::string&, const ::Ice::Context&, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& cookie = 0, bool sync = false); + +public: + + ::RoboCompCameraRGBDSimple::TDepth getDepth(const ::std::string& camera, const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return end_getDepth(_iceI_begin_getDepth(camera, context, ::IceInternal::dummyCallback, 0, true)); + } + + ::Ice::AsyncResultPtr begin_getDepth(const ::std::string& camera, const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return _iceI_begin_getDepth(camera, context, ::IceInternal::dummyCallback, 0); + } + + ::Ice::AsyncResultPtr begin_getDepth(const ::std::string& camera, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_getDepth(camera, ::Ice::noExplicitContext, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_getDepth(const ::std::string& camera, const ::Ice::Context& context, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_getDepth(camera, context, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_getDepth(const ::std::string& camera, const ::RoboCompCameraRGBDSimple::Callback_CameraRGBDSimple_getDepthPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_getDepth(camera, ::Ice::noExplicitContext, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_getDepth(const ::std::string& camera, const ::Ice::Context& context, const ::RoboCompCameraRGBDSimple::Callback_CameraRGBDSimple_getDepthPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_getDepth(camera, context, cb, cookie); + } + + ::RoboCompCameraRGBDSimple::TDepth end_getDepth(const ::Ice::AsyncResultPtr& result); + +private: + + ::Ice::AsyncResultPtr _iceI_begin_getDepth(const ::std::string&, const ::Ice::Context&, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& cookie = 0, bool sync = false); + +public: + + ::RoboCompCameraRGBDSimple::TImage getImage(const ::std::string& camera, const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return end_getImage(_iceI_begin_getImage(camera, context, ::IceInternal::dummyCallback, 0, true)); + } + + ::Ice::AsyncResultPtr begin_getImage(const ::std::string& camera, const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return _iceI_begin_getImage(camera, context, ::IceInternal::dummyCallback, 0); + } + + ::Ice::AsyncResultPtr begin_getImage(const ::std::string& camera, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_getImage(camera, ::Ice::noExplicitContext, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_getImage(const ::std::string& camera, const ::Ice::Context& context, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_getImage(camera, context, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_getImage(const ::std::string& camera, const ::RoboCompCameraRGBDSimple::Callback_CameraRGBDSimple_getImagePtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_getImage(camera, ::Ice::noExplicitContext, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_getImage(const ::std::string& camera, const ::Ice::Context& context, const ::RoboCompCameraRGBDSimple::Callback_CameraRGBDSimple_getImagePtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_getImage(camera, context, cb, cookie); + } + + ::RoboCompCameraRGBDSimple::TImage end_getImage(const ::Ice::AsyncResultPtr& result); + +private: + + ::Ice::AsyncResultPtr _iceI_begin_getImage(const ::std::string&, const ::Ice::Context&, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& cookie = 0, bool sync = false); + +public: + + /** + * Obtains the Slice type ID corresponding to this interface. + * @return A fully-scoped type ID. + */ + static const ::std::string& ice_staticId(); + +protected: + /// \cond INTERNAL + + virtual ::IceProxy::Ice::Object* _newInstance() const; + /// \endcond +}; + +} + +} + +namespace RoboCompCameraRGBDSimple +{ + +class CameraRGBDSimple : public virtual ::Ice::Object +{ +public: + + typedef CameraRGBDSimplePrx ProxyType; + typedef CameraRGBDSimplePtr PointerType; + + virtual ~CameraRGBDSimple(); + + /** + * Determines whether this object supports an interface with the given Slice type ID. + * @param id The fully-scoped Slice type ID. + * @param current The Current object for the invocation. + * @return True if this object supports the interface, false, otherwise. + */ + virtual bool ice_isA(const ::std::string& id, const ::Ice::Current& current = ::Ice::emptyCurrent) const; + + /** + * Obtains a list of the Slice type IDs representing the interfaces supported by this object. + * @param current The Current object for the invocation. + * @return A list of fully-scoped type IDs. + */ + virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& current = ::Ice::emptyCurrent) const; + + /** + * Obtains a Slice type ID representing the most-derived interface supported by this object. + * @param current The Current object for the invocation. + * @return A fully-scoped type ID. + */ + virtual const ::std::string& ice_id(const ::Ice::Current& current = ::Ice::emptyCurrent) const; + + /** + * Obtains the Slice type ID corresponding to this class. + * @return A fully-scoped type ID. + */ + static const ::std::string& ice_staticId(); + + virtual TRGBD getAll(const ::std::string& camera, const ::Ice::Current& current = ::Ice::emptyCurrent) = 0; + /// \cond INTERNAL + bool _iceD_getAll(::IceInternal::Incoming&, const ::Ice::Current&); + /// \endcond + + virtual TDepth getDepth(const ::std::string& camera, const ::Ice::Current& current = ::Ice::emptyCurrent) = 0; + /// \cond INTERNAL + bool _iceD_getDepth(::IceInternal::Incoming&, const ::Ice::Current&); + /// \endcond + + virtual TImage getImage(const ::std::string& camera, const ::Ice::Current& current = ::Ice::emptyCurrent) = 0; + /// \cond INTERNAL + bool _iceD_getImage(::IceInternal::Incoming&, const ::Ice::Current&); + /// \endcond + + /// \cond INTERNAL + virtual bool _iceDispatch(::IceInternal::Incoming&, const ::Ice::Current&); + /// \endcond + +protected: + + /// \cond STREAM + virtual void _iceWriteImpl(::Ice::OutputStream*) const; + virtual void _iceReadImpl(::Ice::InputStream*); + /// \endcond +}; + +/// \cond INTERNAL +inline bool operator==(const CameraRGBDSimple& lhs, const CameraRGBDSimple& rhs) +{ + return static_cast(lhs) == static_cast(rhs); +} + +inline bool operator<(const CameraRGBDSimple& lhs, const CameraRGBDSimple& rhs) +{ + return static_cast(lhs) < static_cast(rhs); +} +/// \endcond + +} + +/// \cond STREAM +namespace Ice +{ + +template<> +struct StreamableTraits< ::RoboCompCameraRGBDSimple::HardwareFailedException> +{ + static const StreamHelperCategory helper = StreamHelperCategoryUserException; +}; + +template +struct StreamWriter< ::RoboCompCameraRGBDSimple::HardwareFailedException, S> +{ + static void write(S* ostr, const ::RoboCompCameraRGBDSimple::HardwareFailedException& v) + { + ostr->write(v.what); + } +}; + +template +struct StreamReader< ::RoboCompCameraRGBDSimple::HardwareFailedException, S> +{ + static void read(S* istr, ::RoboCompCameraRGBDSimple::HardwareFailedException& v) + { + istr->read(v.what); + } +}; + +template<> +struct StreamableTraits< ::RoboCompCameraRGBDSimple::TImage> +{ + static const StreamHelperCategory helper = StreamHelperCategoryStruct; + static const int minWireSize = 29; + static const bool fixedLength = false; +}; + +template +struct StreamWriter< ::RoboCompCameraRGBDSimple::TImage, S> +{ + static void write(S* ostr, const ::RoboCompCameraRGBDSimple::TImage& v) + { + ostr->write(v.cameraID); + ostr->write(v.width); + ostr->write(v.height); + ostr->write(v.depth); + ostr->write(v.focalx); + ostr->write(v.focaly); + ostr->write(v.alivetime); + ostr->write(v.image); + } +}; + +template +struct StreamReader< ::RoboCompCameraRGBDSimple::TImage, S> +{ + static void read(S* istr, ::RoboCompCameraRGBDSimple::TImage& v) + { + istr->read(v.cameraID); + istr->read(v.width); + istr->read(v.height); + istr->read(v.depth); + istr->read(v.focalx); + istr->read(v.focaly); + istr->read(v.alivetime); + istr->read(v.image); + } +}; + +template<> +struct StreamableTraits< ::RoboCompCameraRGBDSimple::TDepth> +{ + static const StreamHelperCategory helper = StreamHelperCategoryStruct; + static const int minWireSize = 29; + static const bool fixedLength = false; +}; + +template +struct StreamWriter< ::RoboCompCameraRGBDSimple::TDepth, S> +{ + static void write(S* ostr, const ::RoboCompCameraRGBDSimple::TDepth& v) + { + ostr->write(v.cameraID); + ostr->write(v.width); + ostr->write(v.height); + ostr->write(v.focalx); + ostr->write(v.focaly); + ostr->write(v.alivetime); + ostr->write(v.depthFactor); + ostr->write(v.depth); + } +}; + +template +struct StreamReader< ::RoboCompCameraRGBDSimple::TDepth, S> +{ + static void read(S* istr, ::RoboCompCameraRGBDSimple::TDepth& v) + { + istr->read(v.cameraID); + istr->read(v.width); + istr->read(v.height); + istr->read(v.focalx); + istr->read(v.focaly); + istr->read(v.alivetime); + istr->read(v.depthFactor); + istr->read(v.depth); + } +}; + +template<> +struct StreamableTraits< ::RoboCompCameraRGBDSimple::TRGBD> +{ + static const StreamHelperCategory helper = StreamHelperCategoryStruct; + static const int minWireSize = 58; + static const bool fixedLength = false; +}; + +template +struct StreamWriter< ::RoboCompCameraRGBDSimple::TRGBD, S> +{ + static void write(S* ostr, const ::RoboCompCameraRGBDSimple::TRGBD& v) + { + ostr->write(v.image); + ostr->write(v.depth); + } +}; + +template +struct StreamReader< ::RoboCompCameraRGBDSimple::TRGBD, S> +{ + static void read(S* istr, ::RoboCompCameraRGBDSimple::TRGBD& v) + { + istr->read(v.image); + istr->read(v.depth); + } +}; + +} +/// \endcond + +namespace RoboCompCameraRGBDSimple +{ + +/** + * Type-safe asynchronous callback wrapper class used for calls to + * IceProxy::RoboCompCameraRGBDSimple::CameraRGBDSimple::begin_getAll. + * Create a wrapper instance by calling ::RoboCompCameraRGBDSimple::newCallback_CameraRGBDSimple_getAll. + */ +template +class CallbackNC_CameraRGBDSimple_getAll : public Callback_CameraRGBDSimple_getAll_Base, public ::IceInternal::TwowayCallbackNC +{ +public: + + typedef IceUtil::Handle TPtr; + + typedef void (T::*Exception)(const ::Ice::Exception&); + typedef void (T::*Sent)(bool); + typedef void (T::*Response)(const TRGBD&); + + CallbackNC_CameraRGBDSimple_getAll(const TPtr& obj, Response cb, Exception excb, Sent sentcb) + : ::IceInternal::TwowayCallbackNC(obj, cb != 0, excb, sentcb), _response(cb) + { + } + + /// \cond INTERNAL + virtual void completed(const ::Ice::AsyncResultPtr& result) const + { + CameraRGBDSimplePrx proxy = CameraRGBDSimplePrx::uncheckedCast(result->getProxy()); + TRGBD ret; + try + { + ret = proxy->end_getAll(result); + } + catch(const ::Ice::Exception& ex) + { + ::IceInternal::CallbackNC::exception(result, ex); + return; + } + if(_response) + { + (::IceInternal::CallbackNC::_callback.get()->*_response)(ret); + } + } + /// \endcond + +private: + + Response _response; +}; + +/** + * Creates a callback wrapper instance that delegates to your object. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCameraRGBDSimple::CameraRGBDSimple::begin_getAll. + */ +template Callback_CameraRGBDSimple_getAllPtr +newCallback_CameraRGBDSimple_getAll(const IceUtil::Handle& instance, void (T::*cb)(const TRGBD&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0) +{ + return new CallbackNC_CameraRGBDSimple_getAll(instance, cb, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCameraRGBDSimple::CameraRGBDSimple::begin_getAll. + */ +template Callback_CameraRGBDSimple_getAllPtr +newCallback_CameraRGBDSimple_getAll(T* instance, void (T::*cb)(const TRGBD&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0) +{ + return new CallbackNC_CameraRGBDSimple_getAll(instance, cb, excb, sentcb); +} + +/** + * Type-safe asynchronous callback wrapper class with cookie support used for calls to + * IceProxy::RoboCompCameraRGBDSimple::CameraRGBDSimple::begin_getAll. + * Create a wrapper instance by calling ::RoboCompCameraRGBDSimple::newCallback_CameraRGBDSimple_getAll. + */ +template +class Callback_CameraRGBDSimple_getAll : public Callback_CameraRGBDSimple_getAll_Base, public ::IceInternal::TwowayCallback +{ +public: + + typedef IceUtil::Handle TPtr; + + typedef void (T::*Exception)(const ::Ice::Exception& , const CT&); + typedef void (T::*Sent)(bool , const CT&); + typedef void (T::*Response)(const TRGBD&, const CT&); + + Callback_CameraRGBDSimple_getAll(const TPtr& obj, Response cb, Exception excb, Sent sentcb) + : ::IceInternal::TwowayCallback(obj, cb != 0, excb, sentcb), _response(cb) + { + } + + /// \cond INTERNAL + virtual void completed(const ::Ice::AsyncResultPtr& result) const + { + CameraRGBDSimplePrx proxy = CameraRGBDSimplePrx::uncheckedCast(result->getProxy()); + TRGBD ret; + try + { + ret = proxy->end_getAll(result); + } + catch(const ::Ice::Exception& ex) + { + ::IceInternal::Callback::exception(result, ex); + return; + } + if(_response) + { + (::IceInternal::Callback::_callback.get()->*_response)(ret, CT::dynamicCast(result->getCookie())); + } + } + /// \endcond + +private: + + Response _response; +}; + +/** + * Creates a callback wrapper instance that delegates to your object. + * Use this overload when your callback methods receive a cookie value. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCameraRGBDSimple::CameraRGBDSimple::begin_getAll. + */ +template Callback_CameraRGBDSimple_getAllPtr +newCallback_CameraRGBDSimple_getAll(const IceUtil::Handle& instance, void (T::*cb)(const TRGBD&, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0) +{ + return new Callback_CameraRGBDSimple_getAll(instance, cb, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * Use this overload when your callback methods receive a cookie value. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCameraRGBDSimple::CameraRGBDSimple::begin_getAll. + */ +template Callback_CameraRGBDSimple_getAllPtr +newCallback_CameraRGBDSimple_getAll(T* instance, void (T::*cb)(const TRGBD&, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0) +{ + return new Callback_CameraRGBDSimple_getAll(instance, cb, excb, sentcb); +} + +/** + * Type-safe asynchronous callback wrapper class used for calls to + * IceProxy::RoboCompCameraRGBDSimple::CameraRGBDSimple::begin_getDepth. + * Create a wrapper instance by calling ::RoboCompCameraRGBDSimple::newCallback_CameraRGBDSimple_getDepth. + */ +template +class CallbackNC_CameraRGBDSimple_getDepth : public Callback_CameraRGBDSimple_getDepth_Base, public ::IceInternal::TwowayCallbackNC +{ +public: + + typedef IceUtil::Handle TPtr; + + typedef void (T::*Exception)(const ::Ice::Exception&); + typedef void (T::*Sent)(bool); + typedef void (T::*Response)(const TDepth&); + + CallbackNC_CameraRGBDSimple_getDepth(const TPtr& obj, Response cb, Exception excb, Sent sentcb) + : ::IceInternal::TwowayCallbackNC(obj, cb != 0, excb, sentcb), _response(cb) + { + } + + /// \cond INTERNAL + virtual void completed(const ::Ice::AsyncResultPtr& result) const + { + CameraRGBDSimplePrx proxy = CameraRGBDSimplePrx::uncheckedCast(result->getProxy()); + TDepth ret; + try + { + ret = proxy->end_getDepth(result); + } + catch(const ::Ice::Exception& ex) + { + ::IceInternal::CallbackNC::exception(result, ex); + return; + } + if(_response) + { + (::IceInternal::CallbackNC::_callback.get()->*_response)(ret); + } + } + /// \endcond + +private: + + Response _response; +}; + +/** + * Creates a callback wrapper instance that delegates to your object. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCameraRGBDSimple::CameraRGBDSimple::begin_getDepth. + */ +template Callback_CameraRGBDSimple_getDepthPtr +newCallback_CameraRGBDSimple_getDepth(const IceUtil::Handle& instance, void (T::*cb)(const TDepth&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0) +{ + return new CallbackNC_CameraRGBDSimple_getDepth(instance, cb, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCameraRGBDSimple::CameraRGBDSimple::begin_getDepth. + */ +template Callback_CameraRGBDSimple_getDepthPtr +newCallback_CameraRGBDSimple_getDepth(T* instance, void (T::*cb)(const TDepth&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0) +{ + return new CallbackNC_CameraRGBDSimple_getDepth(instance, cb, excb, sentcb); +} + +/** + * Type-safe asynchronous callback wrapper class with cookie support used for calls to + * IceProxy::RoboCompCameraRGBDSimple::CameraRGBDSimple::begin_getDepth. + * Create a wrapper instance by calling ::RoboCompCameraRGBDSimple::newCallback_CameraRGBDSimple_getDepth. + */ +template +class Callback_CameraRGBDSimple_getDepth : public Callback_CameraRGBDSimple_getDepth_Base, public ::IceInternal::TwowayCallback +{ +public: + + typedef IceUtil::Handle TPtr; + + typedef void (T::*Exception)(const ::Ice::Exception& , const CT&); + typedef void (T::*Sent)(bool , const CT&); + typedef void (T::*Response)(const TDepth&, const CT&); + + Callback_CameraRGBDSimple_getDepth(const TPtr& obj, Response cb, Exception excb, Sent sentcb) + : ::IceInternal::TwowayCallback(obj, cb != 0, excb, sentcb), _response(cb) + { + } + + /// \cond INTERNAL + virtual void completed(const ::Ice::AsyncResultPtr& result) const + { + CameraRGBDSimplePrx proxy = CameraRGBDSimplePrx::uncheckedCast(result->getProxy()); + TDepth ret; + try + { + ret = proxy->end_getDepth(result); + } + catch(const ::Ice::Exception& ex) + { + ::IceInternal::Callback::exception(result, ex); + return; + } + if(_response) + { + (::IceInternal::Callback::_callback.get()->*_response)(ret, CT::dynamicCast(result->getCookie())); + } + } + /// \endcond + +private: + + Response _response; +}; + +/** + * Creates a callback wrapper instance that delegates to your object. + * Use this overload when your callback methods receive a cookie value. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCameraRGBDSimple::CameraRGBDSimple::begin_getDepth. + */ +template Callback_CameraRGBDSimple_getDepthPtr +newCallback_CameraRGBDSimple_getDepth(const IceUtil::Handle& instance, void (T::*cb)(const TDepth&, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0) +{ + return new Callback_CameraRGBDSimple_getDepth(instance, cb, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * Use this overload when your callback methods receive a cookie value. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCameraRGBDSimple::CameraRGBDSimple::begin_getDepth. + */ +template Callback_CameraRGBDSimple_getDepthPtr +newCallback_CameraRGBDSimple_getDepth(T* instance, void (T::*cb)(const TDepth&, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0) +{ + return new Callback_CameraRGBDSimple_getDepth(instance, cb, excb, sentcb); +} + +/** + * Type-safe asynchronous callback wrapper class used for calls to + * IceProxy::RoboCompCameraRGBDSimple::CameraRGBDSimple::begin_getImage. + * Create a wrapper instance by calling ::RoboCompCameraRGBDSimple::newCallback_CameraRGBDSimple_getImage. + */ +template +class CallbackNC_CameraRGBDSimple_getImage : public Callback_CameraRGBDSimple_getImage_Base, public ::IceInternal::TwowayCallbackNC +{ +public: + + typedef IceUtil::Handle TPtr; + + typedef void (T::*Exception)(const ::Ice::Exception&); + typedef void (T::*Sent)(bool); + typedef void (T::*Response)(const TImage&); + + CallbackNC_CameraRGBDSimple_getImage(const TPtr& obj, Response cb, Exception excb, Sent sentcb) + : ::IceInternal::TwowayCallbackNC(obj, cb != 0, excb, sentcb), _response(cb) + { + } + + /// \cond INTERNAL + virtual void completed(const ::Ice::AsyncResultPtr& result) const + { + CameraRGBDSimplePrx proxy = CameraRGBDSimplePrx::uncheckedCast(result->getProxy()); + TImage ret; + try + { + ret = proxy->end_getImage(result); + } + catch(const ::Ice::Exception& ex) + { + ::IceInternal::CallbackNC::exception(result, ex); + return; + } + if(_response) + { + (::IceInternal::CallbackNC::_callback.get()->*_response)(ret); + } + } + /// \endcond + +private: + + Response _response; +}; + +/** + * Creates a callback wrapper instance that delegates to your object. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCameraRGBDSimple::CameraRGBDSimple::begin_getImage. + */ +template Callback_CameraRGBDSimple_getImagePtr +newCallback_CameraRGBDSimple_getImage(const IceUtil::Handle& instance, void (T::*cb)(const TImage&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0) +{ + return new CallbackNC_CameraRGBDSimple_getImage(instance, cb, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCameraRGBDSimple::CameraRGBDSimple::begin_getImage. + */ +template Callback_CameraRGBDSimple_getImagePtr +newCallback_CameraRGBDSimple_getImage(T* instance, void (T::*cb)(const TImage&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0) +{ + return new CallbackNC_CameraRGBDSimple_getImage(instance, cb, excb, sentcb); +} + +/** + * Type-safe asynchronous callback wrapper class with cookie support used for calls to + * IceProxy::RoboCompCameraRGBDSimple::CameraRGBDSimple::begin_getImage. + * Create a wrapper instance by calling ::RoboCompCameraRGBDSimple::newCallback_CameraRGBDSimple_getImage. + */ +template +class Callback_CameraRGBDSimple_getImage : public Callback_CameraRGBDSimple_getImage_Base, public ::IceInternal::TwowayCallback +{ +public: + + typedef IceUtil::Handle TPtr; + + typedef void (T::*Exception)(const ::Ice::Exception& , const CT&); + typedef void (T::*Sent)(bool , const CT&); + typedef void (T::*Response)(const TImage&, const CT&); + + Callback_CameraRGBDSimple_getImage(const TPtr& obj, Response cb, Exception excb, Sent sentcb) + : ::IceInternal::TwowayCallback(obj, cb != 0, excb, sentcb), _response(cb) + { + } + + /// \cond INTERNAL + virtual void completed(const ::Ice::AsyncResultPtr& result) const + { + CameraRGBDSimplePrx proxy = CameraRGBDSimplePrx::uncheckedCast(result->getProxy()); + TImage ret; + try + { + ret = proxy->end_getImage(result); + } + catch(const ::Ice::Exception& ex) + { + ::IceInternal::Callback::exception(result, ex); + return; + } + if(_response) + { + (::IceInternal::Callback::_callback.get()->*_response)(ret, CT::dynamicCast(result->getCookie())); + } + } + /// \endcond + +private: + + Response _response; +}; + +/** + * Creates a callback wrapper instance that delegates to your object. + * Use this overload when your callback methods receive a cookie value. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCameraRGBDSimple::CameraRGBDSimple::begin_getImage. + */ +template Callback_CameraRGBDSimple_getImagePtr +newCallback_CameraRGBDSimple_getImage(const IceUtil::Handle& instance, void (T::*cb)(const TImage&, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0) +{ + return new Callback_CameraRGBDSimple_getImage(instance, cb, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * Use this overload when your callback methods receive a cookie value. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCameraRGBDSimple::CameraRGBDSimple::begin_getImage. + */ +template Callback_CameraRGBDSimple_getImagePtr +newCallback_CameraRGBDSimple_getImage(T* instance, void (T::*cb)(const TImage&, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0) +{ + return new Callback_CameraRGBDSimple_getImage(instance, cb, excb, sentcb); +} + +} + +#endif + +#include +#endif diff --git a/components/depthDSR/src/CommonBehavior.cpp b/components/depthDSR/src/CommonBehavior.cpp new file mode 100644 index 00000000..08a32e83 --- /dev/null +++ b/components/depthDSR/src/CommonBehavior.cpp @@ -0,0 +1,987 @@ +// +// Copyright (c) ZeroC, Inc. All rights reserved. +// +// +// Ice version 3.7.3 +// +// +// +// Generated from file `CommonBehavior.ice' +// +// Warning: do not edit this file. +// +// +// + +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(_MSC_VER) +# pragma warning(disable:4458) // declaration of ... hides class member +#elif defined(__clang__) +# pragma clang diagnostic ignored "-Wshadow" +#elif defined(__GNUC__) +# pragma GCC diagnostic ignored "-Wshadow" +#endif + +#ifndef ICE_IGNORE_VERSION +# if ICE_INT_VERSION / 100 != 307 +# error Ice version mismatch! +# endif +# if ICE_INT_VERSION % 100 >= 50 +# error Beta header file detected +# endif +# if ICE_INT_VERSION % 100 < 3 +# error Ice patch level mismatch! +# endif +#endif + +#ifdef ICE_CPP11_MAPPING // C++11 mapping + +namespace +{ + +const ::std::string iceC_RoboCompCommonBehavior_CommonBehavior_ids[2] = +{ + "::Ice::Object", + "::RoboCompCommonBehavior::CommonBehavior" +}; +const ::std::string iceC_RoboCompCommonBehavior_CommonBehavior_ops[] = +{ + "getParameterList", + "getPeriod", + "getState", + "ice_id", + "ice_ids", + "ice_isA", + "ice_ping", + "killYourSelf", + "reloadConfig", + "setParameterList", + "setPeriod", + "timeAwake" +}; +const ::std::string iceC_RoboCompCommonBehavior_CommonBehavior_getParameterList_name = "getParameterList"; +const ::std::string iceC_RoboCompCommonBehavior_CommonBehavior_getPeriod_name = "getPeriod"; +const ::std::string iceC_RoboCompCommonBehavior_CommonBehavior_getState_name = "getState"; +const ::std::string iceC_RoboCompCommonBehavior_CommonBehavior_killYourSelf_name = "killYourSelf"; +const ::std::string iceC_RoboCompCommonBehavior_CommonBehavior_reloadConfig_name = "reloadConfig"; +const ::std::string iceC_RoboCompCommonBehavior_CommonBehavior_setParameterList_name = "setParameterList"; +const ::std::string iceC_RoboCompCommonBehavior_CommonBehavior_setPeriod_name = "setPeriod"; +const ::std::string iceC_RoboCompCommonBehavior_CommonBehavior_timeAwake_name = "timeAwake"; + +} + +bool +RoboCompCommonBehavior::CommonBehavior::ice_isA(::std::string s, const ::Ice::Current&) const +{ + return ::std::binary_search(iceC_RoboCompCommonBehavior_CommonBehavior_ids, iceC_RoboCompCommonBehavior_CommonBehavior_ids + 2, s); +} + +::std::vector<::std::string> +RoboCompCommonBehavior::CommonBehavior::ice_ids(const ::Ice::Current&) const +{ + return ::std::vector<::std::string>(&iceC_RoboCompCommonBehavior_CommonBehavior_ids[0], &iceC_RoboCompCommonBehavior_CommonBehavior_ids[2]); +} + +::std::string +RoboCompCommonBehavior::CommonBehavior::ice_id(const ::Ice::Current&) const +{ + return ice_staticId(); +} + +const ::std::string& +RoboCompCommonBehavior::CommonBehavior::ice_staticId() +{ + static const ::std::string typeId = "::RoboCompCommonBehavior::CommonBehavior"; + return typeId; +} + +/// \cond INTERNAL +bool +RoboCompCommonBehavior::CommonBehavior::_iceD_getParameterList(::IceInternal::Incoming& inS, const ::Ice::Current& current) +{ + _iceCheckMode(::Ice::OperationMode::Normal, current.mode); + inS.readEmptyParams(); + ParameterList ret = this->getParameterList(current); + auto ostr = inS.startWriteParams(); + ostr->writeAll(ret); + inS.endWriteParams(); + return true; +} +/// \endcond + +/// \cond INTERNAL +bool +RoboCompCommonBehavior::CommonBehavior::_iceD_getPeriod(::IceInternal::Incoming& inS, const ::Ice::Current& current) +{ + _iceCheckMode(::Ice::OperationMode::Idempotent, current.mode); + inS.readEmptyParams(); + int ret = this->getPeriod(current); + auto ostr = inS.startWriteParams(); + ostr->writeAll(ret); + inS.endWriteParams(); + return true; +} +/// \endcond + +/// \cond INTERNAL +bool +RoboCompCommonBehavior::CommonBehavior::_iceD_getState(::IceInternal::Incoming& inS, const ::Ice::Current& current) +{ + _iceCheckMode(::Ice::OperationMode::Normal, current.mode); + inS.readEmptyParams(); + State ret = this->getState(current); + auto ostr = inS.startWriteParams(); + ostr->writeAll(ret); + inS.endWriteParams(); + return true; +} +/// \endcond + +/// \cond INTERNAL +bool +RoboCompCommonBehavior::CommonBehavior::_iceD_killYourSelf(::IceInternal::Incoming& inS, const ::Ice::Current& current) +{ + _iceCheckMode(::Ice::OperationMode::Normal, current.mode); + inS.readEmptyParams(); + this->killYourSelf(current); + inS.writeEmptyParams(); + return true; +} +/// \endcond + +/// \cond INTERNAL +bool +RoboCompCommonBehavior::CommonBehavior::_iceD_reloadConfig(::IceInternal::Incoming& inS, const ::Ice::Current& current) +{ + _iceCheckMode(::Ice::OperationMode::Normal, current.mode); + inS.readEmptyParams(); + this->reloadConfig(current); + inS.writeEmptyParams(); + return true; +} +/// \endcond + +/// \cond INTERNAL +bool +RoboCompCommonBehavior::CommonBehavior::_iceD_setParameterList(::IceInternal::Incoming& inS, const ::Ice::Current& current) +{ + _iceCheckMode(::Ice::OperationMode::Normal, current.mode); + auto istr = inS.startReadParams(); + ParameterList iceP_l; + istr->readAll(iceP_l); + inS.endReadParams(); + this->setParameterList(::std::move(iceP_l), current); + inS.writeEmptyParams(); + return true; +} +/// \endcond + +/// \cond INTERNAL +bool +RoboCompCommonBehavior::CommonBehavior::_iceD_setPeriod(::IceInternal::Incoming& inS, const ::Ice::Current& current) +{ + _iceCheckMode(::Ice::OperationMode::Normal, current.mode); + auto istr = inS.startReadParams(); + int iceP_period; + istr->readAll(iceP_period); + inS.endReadParams(); + this->setPeriod(iceP_period, current); + inS.writeEmptyParams(); + return true; +} +/// \endcond + +/// \cond INTERNAL +bool +RoboCompCommonBehavior::CommonBehavior::_iceD_timeAwake(::IceInternal::Incoming& inS, const ::Ice::Current& current) +{ + _iceCheckMode(::Ice::OperationMode::Idempotent, current.mode); + inS.readEmptyParams(); + int ret = this->timeAwake(current); + auto ostr = inS.startWriteParams(); + ostr->writeAll(ret); + inS.endWriteParams(); + return true; +} +/// \endcond + +/// \cond INTERNAL +bool +RoboCompCommonBehavior::CommonBehavior::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current) +{ + ::std::pair r = ::std::equal_range(iceC_RoboCompCommonBehavior_CommonBehavior_ops, iceC_RoboCompCommonBehavior_CommonBehavior_ops + 12, current.operation); + if(r.first == r.second) + { + throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); + } + + switch(r.first - iceC_RoboCompCommonBehavior_CommonBehavior_ops) + { + case 0: + { + return _iceD_getParameterList(in, current); + } + case 1: + { + return _iceD_getPeriod(in, current); + } + case 2: + { + return _iceD_getState(in, current); + } + case 3: + { + return _iceD_ice_id(in, current); + } + case 4: + { + return _iceD_ice_ids(in, current); + } + case 5: + { + return _iceD_ice_isA(in, current); + } + case 6: + { + return _iceD_ice_ping(in, current); + } + case 7: + { + return _iceD_killYourSelf(in, current); + } + case 8: + { + return _iceD_reloadConfig(in, current); + } + case 9: + { + return _iceD_setParameterList(in, current); + } + case 10: + { + return _iceD_setPeriod(in, current); + } + case 11: + { + return _iceD_timeAwake(in, current); + } + default: + { + assert(false); + throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); + } + } +} +/// \endcond + +/// \cond INTERNAL +void +RoboCompCommonBehavior::CommonBehaviorPrx::_iceI_getParameterList(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<::RoboCompCommonBehavior::ParameterList>>& outAsync, const ::Ice::Context& context) +{ + _checkTwowayOnly(iceC_RoboCompCommonBehavior_CommonBehavior_getParameterList_name); + outAsync->invoke(iceC_RoboCompCommonBehavior_CommonBehavior_getParameterList_name, ::Ice::OperationMode::Normal, ::Ice::FormatType::DefaultFormat, context, + nullptr, + nullptr); +} +/// \endcond + +/// \cond INTERNAL +void +RoboCompCommonBehavior::CommonBehaviorPrx::_iceI_getPeriod(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT>& outAsync, const ::Ice::Context& context) +{ + _checkTwowayOnly(iceC_RoboCompCommonBehavior_CommonBehavior_getPeriod_name); + outAsync->invoke(iceC_RoboCompCommonBehavior_CommonBehavior_getPeriod_name, ::Ice::OperationMode::Idempotent, ::Ice::FormatType::DefaultFormat, context, + nullptr, + nullptr); +} +/// \endcond + +/// \cond INTERNAL +void +RoboCompCommonBehavior::CommonBehaviorPrx::_iceI_getState(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<::RoboCompCommonBehavior::State>>& outAsync, const ::Ice::Context& context) +{ + _checkTwowayOnly(iceC_RoboCompCommonBehavior_CommonBehavior_getState_name); + outAsync->invoke(iceC_RoboCompCommonBehavior_CommonBehavior_getState_name, ::Ice::OperationMode::Normal, ::Ice::FormatType::DefaultFormat, context, + nullptr, + nullptr); +} +/// \endcond + +/// \cond INTERNAL +void +RoboCompCommonBehavior::CommonBehaviorPrx::_iceI_killYourSelf(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT>& outAsync, const ::Ice::Context& context) +{ + outAsync->invoke(iceC_RoboCompCommonBehavior_CommonBehavior_killYourSelf_name, ::Ice::OperationMode::Normal, ::Ice::FormatType::DefaultFormat, context, + nullptr, + nullptr); +} +/// \endcond + +/// \cond INTERNAL +void +RoboCompCommonBehavior::CommonBehaviorPrx::_iceI_reloadConfig(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT>& outAsync, const ::Ice::Context& context) +{ + outAsync->invoke(iceC_RoboCompCommonBehavior_CommonBehavior_reloadConfig_name, ::Ice::OperationMode::Normal, ::Ice::FormatType::DefaultFormat, context, + nullptr, + nullptr); +} +/// \endcond + +/// \cond INTERNAL +void +RoboCompCommonBehavior::CommonBehaviorPrx::_iceI_setParameterList(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT>& outAsync, const ParameterList& iceP_l, const ::Ice::Context& context) +{ + outAsync->invoke(iceC_RoboCompCommonBehavior_CommonBehavior_setParameterList_name, ::Ice::OperationMode::Normal, ::Ice::FormatType::DefaultFormat, context, + [&](::Ice::OutputStream* ostr) + { + ostr->writeAll(iceP_l); + }, + nullptr); +} +/// \endcond + +/// \cond INTERNAL +void +RoboCompCommonBehavior::CommonBehaviorPrx::_iceI_setPeriod(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT>& outAsync, int iceP_period, const ::Ice::Context& context) +{ + outAsync->invoke(iceC_RoboCompCommonBehavior_CommonBehavior_setPeriod_name, ::Ice::OperationMode::Normal, ::Ice::FormatType::DefaultFormat, context, + [&](::Ice::OutputStream* ostr) + { + ostr->writeAll(iceP_period); + }, + nullptr); +} +/// \endcond + +/// \cond INTERNAL +void +RoboCompCommonBehavior::CommonBehaviorPrx::_iceI_timeAwake(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT>& outAsync, const ::Ice::Context& context) +{ + _checkTwowayOnly(iceC_RoboCompCommonBehavior_CommonBehavior_timeAwake_name); + outAsync->invoke(iceC_RoboCompCommonBehavior_CommonBehavior_timeAwake_name, ::Ice::OperationMode::Idempotent, ::Ice::FormatType::DefaultFormat, context, + nullptr, + nullptr); +} +/// \endcond + +/// \cond INTERNAL +::std::shared_ptr<::Ice::ObjectPrx> +RoboCompCommonBehavior::CommonBehaviorPrx::_newInstance() const +{ + return ::IceInternal::createProxy(); +} +/// \endcond + +const ::std::string& +RoboCompCommonBehavior::CommonBehaviorPrx::ice_staticId() +{ + return CommonBehavior::ice_staticId(); +} + +namespace Ice +{ +} + +#else // C++98 mapping + +namespace +{ + +const ::std::string iceC_RoboCompCommonBehavior_CommonBehavior_getParameterList_name = "getParameterList"; + +const ::std::string iceC_RoboCompCommonBehavior_CommonBehavior_getPeriod_name = "getPeriod"; + +const ::std::string iceC_RoboCompCommonBehavior_CommonBehavior_getState_name = "getState"; + +const ::std::string iceC_RoboCompCommonBehavior_CommonBehavior_killYourSelf_name = "killYourSelf"; + +const ::std::string iceC_RoboCompCommonBehavior_CommonBehavior_reloadConfig_name = "reloadConfig"; + +const ::std::string iceC_RoboCompCommonBehavior_CommonBehavior_setParameterList_name = "setParameterList"; + +const ::std::string iceC_RoboCompCommonBehavior_CommonBehavior_setPeriod_name = "setPeriod"; + +const ::std::string iceC_RoboCompCommonBehavior_CommonBehavior_timeAwake_name = "timeAwake"; + +} + +/// \cond INTERNAL +::IceProxy::Ice::Object* ::IceProxy::RoboCompCommonBehavior::upCast(CommonBehavior* p) { return p; } + +void +::IceProxy::RoboCompCommonBehavior::_readProxy(::Ice::InputStream* istr, ::IceInternal::ProxyHandle< CommonBehavior>& v) +{ + ::Ice::ObjectPrx proxy; + istr->read(proxy); + if(!proxy) + { + v = 0; + } + else + { + v = new CommonBehavior; + v->_copyFrom(proxy); + } +} +/// \endcond + +::Ice::AsyncResultPtr +IceProxy::RoboCompCommonBehavior::CommonBehavior::_iceI_begin_getParameterList(const ::Ice::Context& context, const ::IceInternal::CallbackBasePtr& del, const ::Ice::LocalObjectPtr& cookie, bool sync) +{ + _checkTwowayOnly(iceC_RoboCompCommonBehavior_CommonBehavior_getParameterList_name, sync); + ::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(this, iceC_RoboCompCommonBehavior_CommonBehavior_getParameterList_name, del, cookie, sync); + try + { + result->prepare(iceC_RoboCompCommonBehavior_CommonBehavior_getParameterList_name, ::Ice::Normal, context); + result->writeEmptyParams(); + result->invoke(iceC_RoboCompCommonBehavior_CommonBehavior_getParameterList_name); + } + catch(const ::Ice::Exception& ex) + { + result->abort(ex); + } + return result; +} + +::RoboCompCommonBehavior::ParameterList +IceProxy::RoboCompCommonBehavior::CommonBehavior::end_getParameterList(const ::Ice::AsyncResultPtr& result) +{ + ::Ice::AsyncResult::_check(result, this, iceC_RoboCompCommonBehavior_CommonBehavior_getParameterList_name); + ::RoboCompCommonBehavior::ParameterList ret; + if(!result->_waitForResponse()) + { + try + { + result->_throwUserException(); + } + catch(const ::Ice::UserException& ex) + { + throw ::Ice::UnknownUserException(__FILE__, __LINE__, ex.ice_id()); + } + } + ::Ice::InputStream* istr = result->_startReadParams(); + istr->read(ret); + result->_endReadParams(); + return ret; +} + +::Ice::AsyncResultPtr +IceProxy::RoboCompCommonBehavior::CommonBehavior::_iceI_begin_getPeriod(const ::Ice::Context& context, const ::IceInternal::CallbackBasePtr& del, const ::Ice::LocalObjectPtr& cookie, bool sync) +{ + _checkTwowayOnly(iceC_RoboCompCommonBehavior_CommonBehavior_getPeriod_name, sync); + ::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(this, iceC_RoboCompCommonBehavior_CommonBehavior_getPeriod_name, del, cookie, sync); + try + { + result->prepare(iceC_RoboCompCommonBehavior_CommonBehavior_getPeriod_name, ::Ice::Idempotent, context); + result->writeEmptyParams(); + result->invoke(iceC_RoboCompCommonBehavior_CommonBehavior_getPeriod_name); + } + catch(const ::Ice::Exception& ex) + { + result->abort(ex); + } + return result; +} + +::Ice::Int +IceProxy::RoboCompCommonBehavior::CommonBehavior::end_getPeriod(const ::Ice::AsyncResultPtr& result) +{ + ::Ice::AsyncResult::_check(result, this, iceC_RoboCompCommonBehavior_CommonBehavior_getPeriod_name); + ::Ice::Int ret; + if(!result->_waitForResponse()) + { + try + { + result->_throwUserException(); + } + catch(const ::Ice::UserException& ex) + { + throw ::Ice::UnknownUserException(__FILE__, __LINE__, ex.ice_id()); + } + } + ::Ice::InputStream* istr = result->_startReadParams(); + istr->read(ret); + result->_endReadParams(); + return ret; +} + +::Ice::AsyncResultPtr +IceProxy::RoboCompCommonBehavior::CommonBehavior::_iceI_begin_getState(const ::Ice::Context& context, const ::IceInternal::CallbackBasePtr& del, const ::Ice::LocalObjectPtr& cookie, bool sync) +{ + _checkTwowayOnly(iceC_RoboCompCommonBehavior_CommonBehavior_getState_name, sync); + ::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(this, iceC_RoboCompCommonBehavior_CommonBehavior_getState_name, del, cookie, sync); + try + { + result->prepare(iceC_RoboCompCommonBehavior_CommonBehavior_getState_name, ::Ice::Normal, context); + result->writeEmptyParams(); + result->invoke(iceC_RoboCompCommonBehavior_CommonBehavior_getState_name); + } + catch(const ::Ice::Exception& ex) + { + result->abort(ex); + } + return result; +} + +::RoboCompCommonBehavior::State +IceProxy::RoboCompCommonBehavior::CommonBehavior::end_getState(const ::Ice::AsyncResultPtr& result) +{ + ::Ice::AsyncResult::_check(result, this, iceC_RoboCompCommonBehavior_CommonBehavior_getState_name); + ::RoboCompCommonBehavior::State ret; + if(!result->_waitForResponse()) + { + try + { + result->_throwUserException(); + } + catch(const ::Ice::UserException& ex) + { + throw ::Ice::UnknownUserException(__FILE__, __LINE__, ex.ice_id()); + } + } + ::Ice::InputStream* istr = result->_startReadParams(); + istr->read(ret); + result->_endReadParams(); + return ret; +} + +::Ice::AsyncResultPtr +IceProxy::RoboCompCommonBehavior::CommonBehavior::_iceI_begin_killYourSelf(const ::Ice::Context& context, const ::IceInternal::CallbackBasePtr& del, const ::Ice::LocalObjectPtr& cookie, bool sync) +{ + ::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(this, iceC_RoboCompCommonBehavior_CommonBehavior_killYourSelf_name, del, cookie, sync); + try + { + result->prepare(iceC_RoboCompCommonBehavior_CommonBehavior_killYourSelf_name, ::Ice::Normal, context); + result->writeEmptyParams(); + result->invoke(iceC_RoboCompCommonBehavior_CommonBehavior_killYourSelf_name); + } + catch(const ::Ice::Exception& ex) + { + result->abort(ex); + } + return result; +} + +void +IceProxy::RoboCompCommonBehavior::CommonBehavior::end_killYourSelf(const ::Ice::AsyncResultPtr& result) +{ + _end(result, iceC_RoboCompCommonBehavior_CommonBehavior_killYourSelf_name); +} + +::Ice::AsyncResultPtr +IceProxy::RoboCompCommonBehavior::CommonBehavior::_iceI_begin_reloadConfig(const ::Ice::Context& context, const ::IceInternal::CallbackBasePtr& del, const ::Ice::LocalObjectPtr& cookie, bool sync) +{ + ::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(this, iceC_RoboCompCommonBehavior_CommonBehavior_reloadConfig_name, del, cookie, sync); + try + { + result->prepare(iceC_RoboCompCommonBehavior_CommonBehavior_reloadConfig_name, ::Ice::Normal, context); + result->writeEmptyParams(); + result->invoke(iceC_RoboCompCommonBehavior_CommonBehavior_reloadConfig_name); + } + catch(const ::Ice::Exception& ex) + { + result->abort(ex); + } + return result; +} + +void +IceProxy::RoboCompCommonBehavior::CommonBehavior::end_reloadConfig(const ::Ice::AsyncResultPtr& result) +{ + _end(result, iceC_RoboCompCommonBehavior_CommonBehavior_reloadConfig_name); +} + +::Ice::AsyncResultPtr +IceProxy::RoboCompCommonBehavior::CommonBehavior::_iceI_begin_setParameterList(const ::RoboCompCommonBehavior::ParameterList& iceP_l, const ::Ice::Context& context, const ::IceInternal::CallbackBasePtr& del, const ::Ice::LocalObjectPtr& cookie, bool sync) +{ + ::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(this, iceC_RoboCompCommonBehavior_CommonBehavior_setParameterList_name, del, cookie, sync); + try + { + result->prepare(iceC_RoboCompCommonBehavior_CommonBehavior_setParameterList_name, ::Ice::Normal, context); + ::Ice::OutputStream* ostr = result->startWriteParams(::Ice::DefaultFormat); + ostr->write(iceP_l); + result->endWriteParams(); + result->invoke(iceC_RoboCompCommonBehavior_CommonBehavior_setParameterList_name); + } + catch(const ::Ice::Exception& ex) + { + result->abort(ex); + } + return result; +} + +void +IceProxy::RoboCompCommonBehavior::CommonBehavior::end_setParameterList(const ::Ice::AsyncResultPtr& result) +{ + _end(result, iceC_RoboCompCommonBehavior_CommonBehavior_setParameterList_name); +} + +::Ice::AsyncResultPtr +IceProxy::RoboCompCommonBehavior::CommonBehavior::_iceI_begin_setPeriod(::Ice::Int iceP_period, const ::Ice::Context& context, const ::IceInternal::CallbackBasePtr& del, const ::Ice::LocalObjectPtr& cookie, bool sync) +{ + ::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(this, iceC_RoboCompCommonBehavior_CommonBehavior_setPeriod_name, del, cookie, sync); + try + { + result->prepare(iceC_RoboCompCommonBehavior_CommonBehavior_setPeriod_name, ::Ice::Normal, context); + ::Ice::OutputStream* ostr = result->startWriteParams(::Ice::DefaultFormat); + ostr->write(iceP_period); + result->endWriteParams(); + result->invoke(iceC_RoboCompCommonBehavior_CommonBehavior_setPeriod_name); + } + catch(const ::Ice::Exception& ex) + { + result->abort(ex); + } + return result; +} + +void +IceProxy::RoboCompCommonBehavior::CommonBehavior::end_setPeriod(const ::Ice::AsyncResultPtr& result) +{ + _end(result, iceC_RoboCompCommonBehavior_CommonBehavior_setPeriod_name); +} + +::Ice::AsyncResultPtr +IceProxy::RoboCompCommonBehavior::CommonBehavior::_iceI_begin_timeAwake(const ::Ice::Context& context, const ::IceInternal::CallbackBasePtr& del, const ::Ice::LocalObjectPtr& cookie, bool sync) +{ + _checkTwowayOnly(iceC_RoboCompCommonBehavior_CommonBehavior_timeAwake_name, sync); + ::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(this, iceC_RoboCompCommonBehavior_CommonBehavior_timeAwake_name, del, cookie, sync); + try + { + result->prepare(iceC_RoboCompCommonBehavior_CommonBehavior_timeAwake_name, ::Ice::Idempotent, context); + result->writeEmptyParams(); + result->invoke(iceC_RoboCompCommonBehavior_CommonBehavior_timeAwake_name); + } + catch(const ::Ice::Exception& ex) + { + result->abort(ex); + } + return result; +} + +::Ice::Int +IceProxy::RoboCompCommonBehavior::CommonBehavior::end_timeAwake(const ::Ice::AsyncResultPtr& result) +{ + ::Ice::AsyncResult::_check(result, this, iceC_RoboCompCommonBehavior_CommonBehavior_timeAwake_name); + ::Ice::Int ret; + if(!result->_waitForResponse()) + { + try + { + result->_throwUserException(); + } + catch(const ::Ice::UserException& ex) + { + throw ::Ice::UnknownUserException(__FILE__, __LINE__, ex.ice_id()); + } + } + ::Ice::InputStream* istr = result->_startReadParams(); + istr->read(ret); + result->_endReadParams(); + return ret; +} + +/// \cond INTERNAL +::IceProxy::Ice::Object* +IceProxy::RoboCompCommonBehavior::CommonBehavior::_newInstance() const +{ + return new CommonBehavior; +} +/// \endcond + +const ::std::string& +IceProxy::RoboCompCommonBehavior::CommonBehavior::ice_staticId() +{ + return ::RoboCompCommonBehavior::CommonBehavior::ice_staticId(); +} + +RoboCompCommonBehavior::CommonBehavior::~CommonBehavior() +{ +} + +/// \cond INTERNAL +::Ice::Object* RoboCompCommonBehavior::upCast(CommonBehavior* p) { return p; } + +/// \endcond + +namespace +{ +const ::std::string iceC_RoboCompCommonBehavior_CommonBehavior_ids[2] = +{ + "::Ice::Object", + "::RoboCompCommonBehavior::CommonBehavior" +}; + +} + +bool +RoboCompCommonBehavior::CommonBehavior::ice_isA(const ::std::string& s, const ::Ice::Current&) const +{ + return ::std::binary_search(iceC_RoboCompCommonBehavior_CommonBehavior_ids, iceC_RoboCompCommonBehavior_CommonBehavior_ids + 2, s); +} + +::std::vector< ::std::string> +RoboCompCommonBehavior::CommonBehavior::ice_ids(const ::Ice::Current&) const +{ + return ::std::vector< ::std::string>(&iceC_RoboCompCommonBehavior_CommonBehavior_ids[0], &iceC_RoboCompCommonBehavior_CommonBehavior_ids[2]); +} + +const ::std::string& +RoboCompCommonBehavior::CommonBehavior::ice_id(const ::Ice::Current&) const +{ + return ice_staticId(); +} + +const ::std::string& +RoboCompCommonBehavior::CommonBehavior::ice_staticId() +{ +#ifdef ICE_HAS_THREAD_SAFE_LOCAL_STATIC + static const ::std::string typeId = "::RoboCompCommonBehavior::CommonBehavior"; + return typeId; +#else + return iceC_RoboCompCommonBehavior_CommonBehavior_ids[1]; +#endif +} + +/// \cond INTERNAL +bool +RoboCompCommonBehavior::CommonBehavior::_iceD_getParameterList(::IceInternal::Incoming& inS, const ::Ice::Current& current) +{ + _iceCheckMode(::Ice::Normal, current.mode); + inS.readEmptyParams(); + ParameterList ret = this->getParameterList(current); + ::Ice::OutputStream* ostr = inS.startWriteParams(); + ostr->write(ret); + inS.endWriteParams(); + return true; +} +/// \endcond + +/// \cond INTERNAL +bool +RoboCompCommonBehavior::CommonBehavior::_iceD_getPeriod(::IceInternal::Incoming& inS, const ::Ice::Current& current) +{ + _iceCheckMode(::Ice::Idempotent, current.mode); + inS.readEmptyParams(); + ::Ice::Int ret = this->getPeriod(current); + ::Ice::OutputStream* ostr = inS.startWriteParams(); + ostr->write(ret); + inS.endWriteParams(); + return true; +} +/// \endcond + +/// \cond INTERNAL +bool +RoboCompCommonBehavior::CommonBehavior::_iceD_getState(::IceInternal::Incoming& inS, const ::Ice::Current& current) +{ + _iceCheckMode(::Ice::Normal, current.mode); + inS.readEmptyParams(); + State ret = this->getState(current); + ::Ice::OutputStream* ostr = inS.startWriteParams(); + ostr->write(ret); + inS.endWriteParams(); + return true; +} +/// \endcond + +/// \cond INTERNAL +bool +RoboCompCommonBehavior::CommonBehavior::_iceD_killYourSelf(::IceInternal::Incoming& inS, const ::Ice::Current& current) +{ + _iceCheckMode(::Ice::Normal, current.mode); + inS.readEmptyParams(); + this->killYourSelf(current); + inS.writeEmptyParams(); + return true; +} +/// \endcond + +/// \cond INTERNAL +bool +RoboCompCommonBehavior::CommonBehavior::_iceD_reloadConfig(::IceInternal::Incoming& inS, const ::Ice::Current& current) +{ + _iceCheckMode(::Ice::Normal, current.mode); + inS.readEmptyParams(); + this->reloadConfig(current); + inS.writeEmptyParams(); + return true; +} +/// \endcond + +/// \cond INTERNAL +bool +RoboCompCommonBehavior::CommonBehavior::_iceD_setParameterList(::IceInternal::Incoming& inS, const ::Ice::Current& current) +{ + _iceCheckMode(::Ice::Normal, current.mode); + ::Ice::InputStream* istr = inS.startReadParams(); + ParameterList iceP_l; + istr->read(iceP_l); + inS.endReadParams(); + this->setParameterList(iceP_l, current); + inS.writeEmptyParams(); + return true; +} +/// \endcond + +/// \cond INTERNAL +bool +RoboCompCommonBehavior::CommonBehavior::_iceD_setPeriod(::IceInternal::Incoming& inS, const ::Ice::Current& current) +{ + _iceCheckMode(::Ice::Normal, current.mode); + ::Ice::InputStream* istr = inS.startReadParams(); + ::Ice::Int iceP_period; + istr->read(iceP_period); + inS.endReadParams(); + this->setPeriod(iceP_period, current); + inS.writeEmptyParams(); + return true; +} +/// \endcond + +/// \cond INTERNAL +bool +RoboCompCommonBehavior::CommonBehavior::_iceD_timeAwake(::IceInternal::Incoming& inS, const ::Ice::Current& current) +{ + _iceCheckMode(::Ice::Idempotent, current.mode); + inS.readEmptyParams(); + ::Ice::Int ret = this->timeAwake(current); + ::Ice::OutputStream* ostr = inS.startWriteParams(); + ostr->write(ret); + inS.endWriteParams(); + return true; +} +/// \endcond + +namespace +{ +const ::std::string iceC_RoboCompCommonBehavior_CommonBehavior_all[] = +{ + "getParameterList", + "getPeriod", + "getState", + "ice_id", + "ice_ids", + "ice_isA", + "ice_ping", + "killYourSelf", + "reloadConfig", + "setParameterList", + "setPeriod", + "timeAwake" +}; + +} + +/// \cond INTERNAL +bool +RoboCompCommonBehavior::CommonBehavior::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current) +{ + ::std::pair r = ::std::equal_range(iceC_RoboCompCommonBehavior_CommonBehavior_all, iceC_RoboCompCommonBehavior_CommonBehavior_all + 12, current.operation); + if(r.first == r.second) + { + throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); + } + + switch(r.first - iceC_RoboCompCommonBehavior_CommonBehavior_all) + { + case 0: + { + return _iceD_getParameterList(in, current); + } + case 1: + { + return _iceD_getPeriod(in, current); + } + case 2: + { + return _iceD_getState(in, current); + } + case 3: + { + return _iceD_ice_id(in, current); + } + case 4: + { + return _iceD_ice_ids(in, current); + } + case 5: + { + return _iceD_ice_isA(in, current); + } + case 6: + { + return _iceD_ice_ping(in, current); + } + case 7: + { + return _iceD_killYourSelf(in, current); + } + case 8: + { + return _iceD_reloadConfig(in, current); + } + case 9: + { + return _iceD_setParameterList(in, current); + } + case 10: + { + return _iceD_setPeriod(in, current); + } + case 11: + { + return _iceD_timeAwake(in, current); + } + default: + { + assert(false); + throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); + } + } +} +/// \endcond + +/// \cond STREAM +void +RoboCompCommonBehavior::CommonBehavior::_iceWriteImpl(::Ice::OutputStream* ostr) const +{ + ostr->startSlice(ice_staticId(), -1, true); + ::Ice::StreamWriter< CommonBehavior, ::Ice::OutputStream>::write(ostr, *this); + ostr->endSlice(); +} + +void +RoboCompCommonBehavior::CommonBehavior::_iceReadImpl(::Ice::InputStream* istr) +{ + istr->startSlice(); + ::Ice::StreamReader< CommonBehavior, ::Ice::InputStream>::read(istr, *this); + istr->endSlice(); +} +/// \endcond + +/// \cond INTERNAL +void +RoboCompCommonBehavior::_icePatchObjectPtr(CommonBehaviorPtr& handle, const ::Ice::ObjectPtr& v) +{ + handle = CommonBehaviorPtr::dynamicCast(v); + if(v && !handle) + { + IceInternal::Ex::throwUOE(CommonBehavior::ice_staticId(), v); + } +} +/// \endcond + +namespace Ice +{ +} + +#endif diff --git a/components/depthDSR/src/CommonBehavior.h b/components/depthDSR/src/CommonBehavior.h new file mode 100644 index 00000000..389407fe --- /dev/null +++ b/components/depthDSR/src/CommonBehavior.h @@ -0,0 +1,2368 @@ +// +// Copyright (c) ZeroC, Inc. All rights reserved. +// +// +// Ice version 3.7.3 +// +// +// +// Generated from file `CommonBehavior.ice' +// +// Warning: do not edit this file. +// +// +// + +#ifndef __CommonBehavior_h__ +#define __CommonBehavior_h__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef ICE_IGNORE_VERSION +# if ICE_INT_VERSION / 100 != 307 +# error Ice version mismatch! +# endif +# if ICE_INT_VERSION % 100 >= 50 +# error Beta header file detected +# endif +# if ICE_INT_VERSION % 100 < 3 +# error Ice patch level mismatch! +# endif +#endif + +#ifdef ICE_CPP11_MAPPING // C++11 mapping + +namespace RoboCompCommonBehavior +{ + +class CommonBehavior; +class CommonBehaviorPrx; + +} + +namespace RoboCompCommonBehavior +{ + +enum class State : unsigned char +{ + Starting, + Running +}; + +struct Parameter +{ + bool editable; + ::std::string value; + ::std::string type; + + /** + * Obtains a tuple containing all of the struct's data members. + * @return The data members in a tuple. + */ + std::tuple ice_tuple() const + { + return std::tie(editable, value, type); + } +}; + +using ParameterList = ::std::map<::std::string, Parameter>; + +using Ice::operator<; +using Ice::operator<=; +using Ice::operator>; +using Ice::operator>=; +using Ice::operator==; +using Ice::operator!=; + +} + +namespace RoboCompCommonBehavior +{ + +class CommonBehavior : public virtual ::Ice::Object +{ +public: + + using ProxyType = CommonBehaviorPrx; + + /** + * Determines whether this object supports an interface with the given Slice type ID. + * @param id The fully-scoped Slice type ID. + * @param current The Current object for the invocation. + * @return True if this object supports the interface, false, otherwise. + */ + virtual bool ice_isA(::std::string id, const ::Ice::Current& current) const override; + + /** + * Obtains a list of the Slice type IDs representing the interfaces supported by this object. + * @param current The Current object for the invocation. + * @return A list of fully-scoped type IDs. + */ + virtual ::std::vector<::std::string> ice_ids(const ::Ice::Current& current) const override; + + /** + * Obtains a Slice type ID representing the most-derived interface supported by this object. + * @param current The Current object for the invocation. + * @return A fully-scoped type ID. + */ + virtual ::std::string ice_id(const ::Ice::Current& current) const override; + + /** + * Obtains the Slice type ID corresponding to this class. + * @return A fully-scoped type ID. + */ + static const ::std::string& ice_staticId(); + + virtual ParameterList getParameterList(const ::Ice::Current& current) = 0; + /// \cond INTERNAL + bool _iceD_getParameterList(::IceInternal::Incoming&, const ::Ice::Current&); + /// \endcond + + virtual int getPeriod(const ::Ice::Current& current) = 0; + /// \cond INTERNAL + bool _iceD_getPeriod(::IceInternal::Incoming&, const ::Ice::Current&); + /// \endcond + + virtual State getState(const ::Ice::Current& current) = 0; + /// \cond INTERNAL + bool _iceD_getState(::IceInternal::Incoming&, const ::Ice::Current&); + /// \endcond + + virtual void killYourSelf(const ::Ice::Current& current) = 0; + /// \cond INTERNAL + bool _iceD_killYourSelf(::IceInternal::Incoming&, const ::Ice::Current&); + /// \endcond + + virtual void reloadConfig(const ::Ice::Current& current) = 0; + /// \cond INTERNAL + bool _iceD_reloadConfig(::IceInternal::Incoming&, const ::Ice::Current&); + /// \endcond + + virtual void setParameterList(ParameterList l, const ::Ice::Current& current) = 0; + /// \cond INTERNAL + bool _iceD_setParameterList(::IceInternal::Incoming&, const ::Ice::Current&); + /// \endcond + + virtual void setPeriod(int period, const ::Ice::Current& current) = 0; + /// \cond INTERNAL + bool _iceD_setPeriod(::IceInternal::Incoming&, const ::Ice::Current&); + /// \endcond + + virtual int timeAwake(const ::Ice::Current& current) = 0; + /// \cond INTERNAL + bool _iceD_timeAwake(::IceInternal::Incoming&, const ::Ice::Current&); + /// \endcond + + /// \cond INTERNAL + virtual bool _iceDispatch(::IceInternal::Incoming&, const ::Ice::Current&) override; + /// \endcond +}; + +} + +namespace RoboCompCommonBehavior +{ + +class CommonBehaviorPrx : public virtual ::Ice::Proxy +{ +public: + + ParameterList getParameterList(const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return _makePromiseOutgoing<::RoboCompCommonBehavior::ParameterList>(true, this, &CommonBehaviorPrx::_iceI_getParameterList, context).get(); + } + + template class P = ::std::promise> + auto getParameterListAsync(const ::Ice::Context& context = ::Ice::noExplicitContext) + -> decltype(::std::declval>().get_future()) + { + return _makePromiseOutgoing<::RoboCompCommonBehavior::ParameterList, P>(false, this, &CommonBehaviorPrx::_iceI_getParameterList, context); + } + + ::std::function + getParameterListAsync(::std::function response, + ::std::function ex = nullptr, + ::std::function sent = nullptr, + const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return _makeLamdaOutgoing<::RoboCompCommonBehavior::ParameterList>(response, ex, sent, this, &RoboCompCommonBehavior::CommonBehaviorPrx::_iceI_getParameterList, context); + } + + /// \cond INTERNAL + void _iceI_getParameterList(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<::RoboCompCommonBehavior::ParameterList>>&, const ::Ice::Context&); + /// \endcond + + int getPeriod(const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return _makePromiseOutgoing(true, this, &CommonBehaviorPrx::_iceI_getPeriod, context).get(); + } + + template class P = ::std::promise> + auto getPeriodAsync(const ::Ice::Context& context = ::Ice::noExplicitContext) + -> decltype(::std::declval>().get_future()) + { + return _makePromiseOutgoing(false, this, &CommonBehaviorPrx::_iceI_getPeriod, context); + } + + ::std::function + getPeriodAsync(::std::function response, + ::std::function ex = nullptr, + ::std::function sent = nullptr, + const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return _makeLamdaOutgoing(response, ex, sent, this, &RoboCompCommonBehavior::CommonBehaviorPrx::_iceI_getPeriod, context); + } + + /// \cond INTERNAL + void _iceI_getPeriod(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT>&, const ::Ice::Context&); + /// \endcond + + State getState(const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return _makePromiseOutgoing<::RoboCompCommonBehavior::State>(true, this, &CommonBehaviorPrx::_iceI_getState, context).get(); + } + + template class P = ::std::promise> + auto getStateAsync(const ::Ice::Context& context = ::Ice::noExplicitContext) + -> decltype(::std::declval>().get_future()) + { + return _makePromiseOutgoing<::RoboCompCommonBehavior::State, P>(false, this, &CommonBehaviorPrx::_iceI_getState, context); + } + + ::std::function + getStateAsync(::std::function response, + ::std::function ex = nullptr, + ::std::function sent = nullptr, + const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return _makeLamdaOutgoing<::RoboCompCommonBehavior::State>(response, ex, sent, this, &RoboCompCommonBehavior::CommonBehaviorPrx::_iceI_getState, context); + } + + /// \cond INTERNAL + void _iceI_getState(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<::RoboCompCommonBehavior::State>>&, const ::Ice::Context&); + /// \endcond + + void killYourSelf(const ::Ice::Context& context = ::Ice::noExplicitContext) + { + _makePromiseOutgoing(true, this, &CommonBehaviorPrx::_iceI_killYourSelf, context).get(); + } + + template class P = ::std::promise> + auto killYourSelfAsync(const ::Ice::Context& context = ::Ice::noExplicitContext) + -> decltype(::std::declval>().get_future()) + { + return _makePromiseOutgoing(false, this, &CommonBehaviorPrx::_iceI_killYourSelf, context); + } + + ::std::function + killYourSelfAsync(::std::function response, + ::std::function ex = nullptr, + ::std::function sent = nullptr, + const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return _makeLamdaOutgoing(response, ex, sent, this, &RoboCompCommonBehavior::CommonBehaviorPrx::_iceI_killYourSelf, context); + } + + /// \cond INTERNAL + void _iceI_killYourSelf(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT>&, const ::Ice::Context&); + /// \endcond + + void reloadConfig(const ::Ice::Context& context = ::Ice::noExplicitContext) + { + _makePromiseOutgoing(true, this, &CommonBehaviorPrx::_iceI_reloadConfig, context).get(); + } + + template class P = ::std::promise> + auto reloadConfigAsync(const ::Ice::Context& context = ::Ice::noExplicitContext) + -> decltype(::std::declval>().get_future()) + { + return _makePromiseOutgoing(false, this, &CommonBehaviorPrx::_iceI_reloadConfig, context); + } + + ::std::function + reloadConfigAsync(::std::function response, + ::std::function ex = nullptr, + ::std::function sent = nullptr, + const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return _makeLamdaOutgoing(response, ex, sent, this, &RoboCompCommonBehavior::CommonBehaviorPrx::_iceI_reloadConfig, context); + } + + /// \cond INTERNAL + void _iceI_reloadConfig(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT>&, const ::Ice::Context&); + /// \endcond + + void setParameterList(const ParameterList& l, const ::Ice::Context& context = ::Ice::noExplicitContext) + { + _makePromiseOutgoing(true, this, &CommonBehaviorPrx::_iceI_setParameterList, l, context).get(); + } + + template class P = ::std::promise> + auto setParameterListAsync(const ParameterList& l, const ::Ice::Context& context = ::Ice::noExplicitContext) + -> decltype(::std::declval>().get_future()) + { + return _makePromiseOutgoing(false, this, &CommonBehaviorPrx::_iceI_setParameterList, l, context); + } + + ::std::function + setParameterListAsync(const ParameterList& l, + ::std::function response, + ::std::function ex = nullptr, + ::std::function sent = nullptr, + const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return _makeLamdaOutgoing(response, ex, sent, this, &RoboCompCommonBehavior::CommonBehaviorPrx::_iceI_setParameterList, l, context); + } + + /// \cond INTERNAL + void _iceI_setParameterList(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT>&, const ParameterList&, const ::Ice::Context&); + /// \endcond + + void setPeriod(int period, const ::Ice::Context& context = ::Ice::noExplicitContext) + { + _makePromiseOutgoing(true, this, &CommonBehaviorPrx::_iceI_setPeriod, period, context).get(); + } + + template class P = ::std::promise> + auto setPeriodAsync(int period, const ::Ice::Context& context = ::Ice::noExplicitContext) + -> decltype(::std::declval>().get_future()) + { + return _makePromiseOutgoing(false, this, &CommonBehaviorPrx::_iceI_setPeriod, period, context); + } + + ::std::function + setPeriodAsync(int period, + ::std::function response, + ::std::function ex = nullptr, + ::std::function sent = nullptr, + const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return _makeLamdaOutgoing(response, ex, sent, this, &RoboCompCommonBehavior::CommonBehaviorPrx::_iceI_setPeriod, period, context); + } + + /// \cond INTERNAL + void _iceI_setPeriod(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT>&, int, const ::Ice::Context&); + /// \endcond + + int timeAwake(const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return _makePromiseOutgoing(true, this, &CommonBehaviorPrx::_iceI_timeAwake, context).get(); + } + + template class P = ::std::promise> + auto timeAwakeAsync(const ::Ice::Context& context = ::Ice::noExplicitContext) + -> decltype(::std::declval>().get_future()) + { + return _makePromiseOutgoing(false, this, &CommonBehaviorPrx::_iceI_timeAwake, context); + } + + ::std::function + timeAwakeAsync(::std::function response, + ::std::function ex = nullptr, + ::std::function sent = nullptr, + const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return _makeLamdaOutgoing(response, ex, sent, this, &RoboCompCommonBehavior::CommonBehaviorPrx::_iceI_timeAwake, context); + } + + /// \cond INTERNAL + void _iceI_timeAwake(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT>&, const ::Ice::Context&); + /// \endcond + + /** + * Obtains the Slice type ID of this interface. + * @return The fully-scoped type ID. + */ + static const ::std::string& ice_staticId(); + +protected: + + /// \cond INTERNAL + CommonBehaviorPrx() = default; + friend ::std::shared_ptr IceInternal::createProxy(); + + virtual ::std::shared_ptr<::Ice::ObjectPrx> _newInstance() const override; + /// \endcond +}; + +} + +/// \cond STREAM +namespace Ice +{ + +template<> +struct StreamableTraits< ::RoboCompCommonBehavior::State> +{ + static const StreamHelperCategory helper = StreamHelperCategoryEnum; + static const int minValue = 0; + static const int maxValue = 1; + static const int minWireSize = 1; + static const bool fixedLength = false; +}; + +template<> +struct StreamableTraits<::RoboCompCommonBehavior::Parameter> +{ + static const StreamHelperCategory helper = StreamHelperCategoryStruct; + static const int minWireSize = 3; + static const bool fixedLength = false; +}; + +template +struct StreamReader<::RoboCompCommonBehavior::Parameter, S> +{ + static void read(S* istr, ::RoboCompCommonBehavior::Parameter& v) + { + istr->readAll(v.editable, v.value, v.type); + } +}; + +} +/// \endcond + +/// \cond INTERNAL +namespace RoboCompCommonBehavior +{ + +using CommonBehaviorPtr = ::std::shared_ptr; +using CommonBehaviorPrxPtr = ::std::shared_ptr; + +} +/// \endcond + +#else // C++98 mapping + +namespace IceProxy +{ + +namespace RoboCompCommonBehavior +{ + +class CommonBehavior; +/// \cond INTERNAL +void _readProxy(::Ice::InputStream*, ::IceInternal::ProxyHandle< CommonBehavior>&); +::IceProxy::Ice::Object* upCast(CommonBehavior*); +/// \endcond + +} + +} + +namespace RoboCompCommonBehavior +{ + +class CommonBehavior; +/// \cond INTERNAL +::Ice::Object* upCast(CommonBehavior*); +/// \endcond +typedef ::IceInternal::Handle< CommonBehavior> CommonBehaviorPtr; +typedef ::IceInternal::ProxyHandle< ::IceProxy::RoboCompCommonBehavior::CommonBehavior> CommonBehaviorPrx; +typedef CommonBehaviorPrx CommonBehaviorPrxPtr; +/// \cond INTERNAL +void _icePatchObjectPtr(CommonBehaviorPtr&, const ::Ice::ObjectPtr&); +/// \endcond + +} + +namespace RoboCompCommonBehavior +{ + +enum State +{ + Starting, + Running +}; + +struct Parameter +{ + bool editable; + ::std::string value; + ::std::string type; + + bool operator==(const Parameter& rhs_) const + { + if(this == &rhs_) + { + return true; + } + if(editable != rhs_.editable) + { + return false; + } + if(value != rhs_.value) + { + return false; + } + if(type != rhs_.type) + { + return false; + } + return true; + } + + bool operator<(const Parameter& rhs_) const + { + if(this == &rhs_) + { + return false; + } + if(editable < rhs_.editable) + { + return true; + } + else if(rhs_.editable < editable) + { + return false; + } + if(value < rhs_.value) + { + return true; + } + else if(rhs_.value < value) + { + return false; + } + if(type < rhs_.type) + { + return true; + } + else if(rhs_.type < type) + { + return false; + } + return false; + } + + bool operator!=(const Parameter& rhs_) const + { + return !operator==(rhs_); + } + bool operator<=(const Parameter& rhs_) const + { + return operator<(rhs_) || operator==(rhs_); + } + bool operator>(const Parameter& rhs_) const + { + return !operator<(rhs_) && !operator==(rhs_); + } + bool operator>=(const Parameter& rhs_) const + { + return !operator<(rhs_); + } +}; + +typedef ::std::map< ::std::string, Parameter> ParameterList; + +} + +namespace RoboCompCommonBehavior +{ + +/** + * Base class for asynchronous callback wrapper classes used for calls to + * IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_getParameterList. + * Create a wrapper instance by calling ::RoboCompCommonBehavior::newCallback_CommonBehavior_getParameterList. + */ +class Callback_CommonBehavior_getParameterList_Base : public virtual ::IceInternal::CallbackBase { }; +typedef ::IceUtil::Handle< Callback_CommonBehavior_getParameterList_Base> Callback_CommonBehavior_getParameterListPtr; + +/** + * Base class for asynchronous callback wrapper classes used for calls to + * IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_getPeriod. + * Create a wrapper instance by calling ::RoboCompCommonBehavior::newCallback_CommonBehavior_getPeriod. + */ +class Callback_CommonBehavior_getPeriod_Base : public virtual ::IceInternal::CallbackBase { }; +typedef ::IceUtil::Handle< Callback_CommonBehavior_getPeriod_Base> Callback_CommonBehavior_getPeriodPtr; + +/** + * Base class for asynchronous callback wrapper classes used for calls to + * IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_getState. + * Create a wrapper instance by calling ::RoboCompCommonBehavior::newCallback_CommonBehavior_getState. + */ +class Callback_CommonBehavior_getState_Base : public virtual ::IceInternal::CallbackBase { }; +typedef ::IceUtil::Handle< Callback_CommonBehavior_getState_Base> Callback_CommonBehavior_getStatePtr; + +/** + * Base class for asynchronous callback wrapper classes used for calls to + * IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_killYourSelf. + * Create a wrapper instance by calling ::RoboCompCommonBehavior::newCallback_CommonBehavior_killYourSelf. + */ +class Callback_CommonBehavior_killYourSelf_Base : public virtual ::IceInternal::CallbackBase { }; +typedef ::IceUtil::Handle< Callback_CommonBehavior_killYourSelf_Base> Callback_CommonBehavior_killYourSelfPtr; + +/** + * Base class for asynchronous callback wrapper classes used for calls to + * IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_reloadConfig. + * Create a wrapper instance by calling ::RoboCompCommonBehavior::newCallback_CommonBehavior_reloadConfig. + */ +class Callback_CommonBehavior_reloadConfig_Base : public virtual ::IceInternal::CallbackBase { }; +typedef ::IceUtil::Handle< Callback_CommonBehavior_reloadConfig_Base> Callback_CommonBehavior_reloadConfigPtr; + +/** + * Base class for asynchronous callback wrapper classes used for calls to + * IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_setParameterList. + * Create a wrapper instance by calling ::RoboCompCommonBehavior::newCallback_CommonBehavior_setParameterList. + */ +class Callback_CommonBehavior_setParameterList_Base : public virtual ::IceInternal::CallbackBase { }; +typedef ::IceUtil::Handle< Callback_CommonBehavior_setParameterList_Base> Callback_CommonBehavior_setParameterListPtr; + +/** + * Base class for asynchronous callback wrapper classes used for calls to + * IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_setPeriod. + * Create a wrapper instance by calling ::RoboCompCommonBehavior::newCallback_CommonBehavior_setPeriod. + */ +class Callback_CommonBehavior_setPeriod_Base : public virtual ::IceInternal::CallbackBase { }; +typedef ::IceUtil::Handle< Callback_CommonBehavior_setPeriod_Base> Callback_CommonBehavior_setPeriodPtr; + +/** + * Base class for asynchronous callback wrapper classes used for calls to + * IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_timeAwake. + * Create a wrapper instance by calling ::RoboCompCommonBehavior::newCallback_CommonBehavior_timeAwake. + */ +class Callback_CommonBehavior_timeAwake_Base : public virtual ::IceInternal::CallbackBase { }; +typedef ::IceUtil::Handle< Callback_CommonBehavior_timeAwake_Base> Callback_CommonBehavior_timeAwakePtr; + +} + +namespace IceProxy +{ + +namespace RoboCompCommonBehavior +{ + +class CommonBehavior : public virtual ::Ice::Proxy +{ +public: + + ::RoboCompCommonBehavior::ParameterList getParameterList(const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return end_getParameterList(_iceI_begin_getParameterList(context, ::IceInternal::dummyCallback, 0, true)); + } + + ::Ice::AsyncResultPtr begin_getParameterList(const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return _iceI_begin_getParameterList(context, ::IceInternal::dummyCallback, 0); + } + + ::Ice::AsyncResultPtr begin_getParameterList(const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_getParameterList(::Ice::noExplicitContext, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_getParameterList(const ::Ice::Context& context, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_getParameterList(context, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_getParameterList(const ::RoboCompCommonBehavior::Callback_CommonBehavior_getParameterListPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_getParameterList(::Ice::noExplicitContext, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_getParameterList(const ::Ice::Context& context, const ::RoboCompCommonBehavior::Callback_CommonBehavior_getParameterListPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_getParameterList(context, cb, cookie); + } + + ::RoboCompCommonBehavior::ParameterList end_getParameterList(const ::Ice::AsyncResultPtr& result); + +private: + + ::Ice::AsyncResultPtr _iceI_begin_getParameterList(const ::Ice::Context&, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& cookie = 0, bool sync = false); + +public: + + ::Ice::Int getPeriod(const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return end_getPeriod(_iceI_begin_getPeriod(context, ::IceInternal::dummyCallback, 0, true)); + } + + ::Ice::AsyncResultPtr begin_getPeriod(const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return _iceI_begin_getPeriod(context, ::IceInternal::dummyCallback, 0); + } + + ::Ice::AsyncResultPtr begin_getPeriod(const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_getPeriod(::Ice::noExplicitContext, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_getPeriod(const ::Ice::Context& context, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_getPeriod(context, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_getPeriod(const ::RoboCompCommonBehavior::Callback_CommonBehavior_getPeriodPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_getPeriod(::Ice::noExplicitContext, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_getPeriod(const ::Ice::Context& context, const ::RoboCompCommonBehavior::Callback_CommonBehavior_getPeriodPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_getPeriod(context, cb, cookie); + } + + ::Ice::Int end_getPeriod(const ::Ice::AsyncResultPtr& result); + +private: + + ::Ice::AsyncResultPtr _iceI_begin_getPeriod(const ::Ice::Context&, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& cookie = 0, bool sync = false); + +public: + + ::RoboCompCommonBehavior::State getState(const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return end_getState(_iceI_begin_getState(context, ::IceInternal::dummyCallback, 0, true)); + } + + ::Ice::AsyncResultPtr begin_getState(const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return _iceI_begin_getState(context, ::IceInternal::dummyCallback, 0); + } + + ::Ice::AsyncResultPtr begin_getState(const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_getState(::Ice::noExplicitContext, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_getState(const ::Ice::Context& context, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_getState(context, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_getState(const ::RoboCompCommonBehavior::Callback_CommonBehavior_getStatePtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_getState(::Ice::noExplicitContext, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_getState(const ::Ice::Context& context, const ::RoboCompCommonBehavior::Callback_CommonBehavior_getStatePtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_getState(context, cb, cookie); + } + + ::RoboCompCommonBehavior::State end_getState(const ::Ice::AsyncResultPtr& result); + +private: + + ::Ice::AsyncResultPtr _iceI_begin_getState(const ::Ice::Context&, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& cookie = 0, bool sync = false); + +public: + + void killYourSelf(const ::Ice::Context& context = ::Ice::noExplicitContext) + { + end_killYourSelf(_iceI_begin_killYourSelf(context, ::IceInternal::dummyCallback, 0, true)); + } + + ::Ice::AsyncResultPtr begin_killYourSelf(const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return _iceI_begin_killYourSelf(context, ::IceInternal::dummyCallback, 0); + } + + ::Ice::AsyncResultPtr begin_killYourSelf(const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_killYourSelf(::Ice::noExplicitContext, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_killYourSelf(const ::Ice::Context& context, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_killYourSelf(context, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_killYourSelf(const ::RoboCompCommonBehavior::Callback_CommonBehavior_killYourSelfPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_killYourSelf(::Ice::noExplicitContext, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_killYourSelf(const ::Ice::Context& context, const ::RoboCompCommonBehavior::Callback_CommonBehavior_killYourSelfPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_killYourSelf(context, cb, cookie); + } + + void end_killYourSelf(const ::Ice::AsyncResultPtr& result); + +private: + + ::Ice::AsyncResultPtr _iceI_begin_killYourSelf(const ::Ice::Context&, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& cookie = 0, bool sync = false); + +public: + + void reloadConfig(const ::Ice::Context& context = ::Ice::noExplicitContext) + { + end_reloadConfig(_iceI_begin_reloadConfig(context, ::IceInternal::dummyCallback, 0, true)); + } + + ::Ice::AsyncResultPtr begin_reloadConfig(const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return _iceI_begin_reloadConfig(context, ::IceInternal::dummyCallback, 0); + } + + ::Ice::AsyncResultPtr begin_reloadConfig(const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_reloadConfig(::Ice::noExplicitContext, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_reloadConfig(const ::Ice::Context& context, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_reloadConfig(context, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_reloadConfig(const ::RoboCompCommonBehavior::Callback_CommonBehavior_reloadConfigPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_reloadConfig(::Ice::noExplicitContext, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_reloadConfig(const ::Ice::Context& context, const ::RoboCompCommonBehavior::Callback_CommonBehavior_reloadConfigPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_reloadConfig(context, cb, cookie); + } + + void end_reloadConfig(const ::Ice::AsyncResultPtr& result); + +private: + + ::Ice::AsyncResultPtr _iceI_begin_reloadConfig(const ::Ice::Context&, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& cookie = 0, bool sync = false); + +public: + + void setParameterList(const ::RoboCompCommonBehavior::ParameterList& l, const ::Ice::Context& context = ::Ice::noExplicitContext) + { + end_setParameterList(_iceI_begin_setParameterList(l, context, ::IceInternal::dummyCallback, 0, true)); + } + + ::Ice::AsyncResultPtr begin_setParameterList(const ::RoboCompCommonBehavior::ParameterList& l, const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return _iceI_begin_setParameterList(l, context, ::IceInternal::dummyCallback, 0); + } + + ::Ice::AsyncResultPtr begin_setParameterList(const ::RoboCompCommonBehavior::ParameterList& l, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_setParameterList(l, ::Ice::noExplicitContext, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_setParameterList(const ::RoboCompCommonBehavior::ParameterList& l, const ::Ice::Context& context, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_setParameterList(l, context, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_setParameterList(const ::RoboCompCommonBehavior::ParameterList& l, const ::RoboCompCommonBehavior::Callback_CommonBehavior_setParameterListPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_setParameterList(l, ::Ice::noExplicitContext, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_setParameterList(const ::RoboCompCommonBehavior::ParameterList& l, const ::Ice::Context& context, const ::RoboCompCommonBehavior::Callback_CommonBehavior_setParameterListPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_setParameterList(l, context, cb, cookie); + } + + void end_setParameterList(const ::Ice::AsyncResultPtr& result); + +private: + + ::Ice::AsyncResultPtr _iceI_begin_setParameterList(const ::RoboCompCommonBehavior::ParameterList&, const ::Ice::Context&, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& cookie = 0, bool sync = false); + +public: + + void setPeriod(::Ice::Int period, const ::Ice::Context& context = ::Ice::noExplicitContext) + { + end_setPeriod(_iceI_begin_setPeriod(period, context, ::IceInternal::dummyCallback, 0, true)); + } + + ::Ice::AsyncResultPtr begin_setPeriod(::Ice::Int period, const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return _iceI_begin_setPeriod(period, context, ::IceInternal::dummyCallback, 0); + } + + ::Ice::AsyncResultPtr begin_setPeriod(::Ice::Int period, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_setPeriod(period, ::Ice::noExplicitContext, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_setPeriod(::Ice::Int period, const ::Ice::Context& context, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_setPeriod(period, context, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_setPeriod(::Ice::Int period, const ::RoboCompCommonBehavior::Callback_CommonBehavior_setPeriodPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_setPeriod(period, ::Ice::noExplicitContext, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_setPeriod(::Ice::Int period, const ::Ice::Context& context, const ::RoboCompCommonBehavior::Callback_CommonBehavior_setPeriodPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_setPeriod(period, context, cb, cookie); + } + + void end_setPeriod(const ::Ice::AsyncResultPtr& result); + +private: + + ::Ice::AsyncResultPtr _iceI_begin_setPeriod(::Ice::Int, const ::Ice::Context&, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& cookie = 0, bool sync = false); + +public: + + ::Ice::Int timeAwake(const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return end_timeAwake(_iceI_begin_timeAwake(context, ::IceInternal::dummyCallback, 0, true)); + } + + ::Ice::AsyncResultPtr begin_timeAwake(const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return _iceI_begin_timeAwake(context, ::IceInternal::dummyCallback, 0); + } + + ::Ice::AsyncResultPtr begin_timeAwake(const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_timeAwake(::Ice::noExplicitContext, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_timeAwake(const ::Ice::Context& context, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_timeAwake(context, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_timeAwake(const ::RoboCompCommonBehavior::Callback_CommonBehavior_timeAwakePtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_timeAwake(::Ice::noExplicitContext, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_timeAwake(const ::Ice::Context& context, const ::RoboCompCommonBehavior::Callback_CommonBehavior_timeAwakePtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_timeAwake(context, cb, cookie); + } + + ::Ice::Int end_timeAwake(const ::Ice::AsyncResultPtr& result); + +private: + + ::Ice::AsyncResultPtr _iceI_begin_timeAwake(const ::Ice::Context&, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& cookie = 0, bool sync = false); + +public: + + /** + * Obtains the Slice type ID corresponding to this interface. + * @return A fully-scoped type ID. + */ + static const ::std::string& ice_staticId(); + +protected: + /// \cond INTERNAL + + virtual ::IceProxy::Ice::Object* _newInstance() const; + /// \endcond +}; + +} + +} + +namespace RoboCompCommonBehavior +{ + +class CommonBehavior : public virtual ::Ice::Object +{ +public: + + typedef CommonBehaviorPrx ProxyType; + typedef CommonBehaviorPtr PointerType; + + virtual ~CommonBehavior(); + + /** + * Determines whether this object supports an interface with the given Slice type ID. + * @param id The fully-scoped Slice type ID. + * @param current The Current object for the invocation. + * @return True if this object supports the interface, false, otherwise. + */ + virtual bool ice_isA(const ::std::string& id, const ::Ice::Current& current = ::Ice::emptyCurrent) const; + + /** + * Obtains a list of the Slice type IDs representing the interfaces supported by this object. + * @param current The Current object for the invocation. + * @return A list of fully-scoped type IDs. + */ + virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& current = ::Ice::emptyCurrent) const; + + /** + * Obtains a Slice type ID representing the most-derived interface supported by this object. + * @param current The Current object for the invocation. + * @return A fully-scoped type ID. + */ + virtual const ::std::string& ice_id(const ::Ice::Current& current = ::Ice::emptyCurrent) const; + + /** + * Obtains the Slice type ID corresponding to this class. + * @return A fully-scoped type ID. + */ + static const ::std::string& ice_staticId(); + + virtual ParameterList getParameterList(const ::Ice::Current& current = ::Ice::emptyCurrent) = 0; + /// \cond INTERNAL + bool _iceD_getParameterList(::IceInternal::Incoming&, const ::Ice::Current&); + /// \endcond + + virtual ::Ice::Int getPeriod(const ::Ice::Current& current = ::Ice::emptyCurrent) = 0; + /// \cond INTERNAL + bool _iceD_getPeriod(::IceInternal::Incoming&, const ::Ice::Current&); + /// \endcond + + virtual State getState(const ::Ice::Current& current = ::Ice::emptyCurrent) = 0; + /// \cond INTERNAL + bool _iceD_getState(::IceInternal::Incoming&, const ::Ice::Current&); + /// \endcond + + virtual void killYourSelf(const ::Ice::Current& current = ::Ice::emptyCurrent) = 0; + /// \cond INTERNAL + bool _iceD_killYourSelf(::IceInternal::Incoming&, const ::Ice::Current&); + /// \endcond + + virtual void reloadConfig(const ::Ice::Current& current = ::Ice::emptyCurrent) = 0; + /// \cond INTERNAL + bool _iceD_reloadConfig(::IceInternal::Incoming&, const ::Ice::Current&); + /// \endcond + + virtual void setParameterList(const ParameterList& l, const ::Ice::Current& current = ::Ice::emptyCurrent) = 0; + /// \cond INTERNAL + bool _iceD_setParameterList(::IceInternal::Incoming&, const ::Ice::Current&); + /// \endcond + + virtual void setPeriod(::Ice::Int period, const ::Ice::Current& current = ::Ice::emptyCurrent) = 0; + /// \cond INTERNAL + bool _iceD_setPeriod(::IceInternal::Incoming&, const ::Ice::Current&); + /// \endcond + + virtual ::Ice::Int timeAwake(const ::Ice::Current& current = ::Ice::emptyCurrent) = 0; + /// \cond INTERNAL + bool _iceD_timeAwake(::IceInternal::Incoming&, const ::Ice::Current&); + /// \endcond + + /// \cond INTERNAL + virtual bool _iceDispatch(::IceInternal::Incoming&, const ::Ice::Current&); + /// \endcond + +protected: + + /// \cond STREAM + virtual void _iceWriteImpl(::Ice::OutputStream*) const; + virtual void _iceReadImpl(::Ice::InputStream*); + /// \endcond +}; + +/// \cond INTERNAL +inline bool operator==(const CommonBehavior& lhs, const CommonBehavior& rhs) +{ + return static_cast(lhs) == static_cast(rhs); +} + +inline bool operator<(const CommonBehavior& lhs, const CommonBehavior& rhs) +{ + return static_cast(lhs) < static_cast(rhs); +} +/// \endcond + +} + +/// \cond STREAM +namespace Ice +{ + +template<> +struct StreamableTraits< ::RoboCompCommonBehavior::State> +{ + static const StreamHelperCategory helper = StreamHelperCategoryEnum; + static const int minValue = 0; + static const int maxValue = 1; + static const int minWireSize = 1; + static const bool fixedLength = false; +}; + +template<> +struct StreamableTraits< ::RoboCompCommonBehavior::Parameter> +{ + static const StreamHelperCategory helper = StreamHelperCategoryStruct; + static const int minWireSize = 3; + static const bool fixedLength = false; +}; + +template +struct StreamWriter< ::RoboCompCommonBehavior::Parameter, S> +{ + static void write(S* ostr, const ::RoboCompCommonBehavior::Parameter& v) + { + ostr->write(v.editable); + ostr->write(v.value); + ostr->write(v.type); + } +}; + +template +struct StreamReader< ::RoboCompCommonBehavior::Parameter, S> +{ + static void read(S* istr, ::RoboCompCommonBehavior::Parameter& v) + { + istr->read(v.editable); + istr->read(v.value); + istr->read(v.type); + } +}; + +} +/// \endcond + +namespace RoboCompCommonBehavior +{ + +/** + * Type-safe asynchronous callback wrapper class used for calls to + * IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_getParameterList. + * Create a wrapper instance by calling ::RoboCompCommonBehavior::newCallback_CommonBehavior_getParameterList. + */ +template +class CallbackNC_CommonBehavior_getParameterList : public Callback_CommonBehavior_getParameterList_Base, public ::IceInternal::TwowayCallbackNC +{ +public: + + typedef IceUtil::Handle TPtr; + + typedef void (T::*Exception)(const ::Ice::Exception&); + typedef void (T::*Sent)(bool); + typedef void (T::*Response)(const ParameterList&); + + CallbackNC_CommonBehavior_getParameterList(const TPtr& obj, Response cb, Exception excb, Sent sentcb) + : ::IceInternal::TwowayCallbackNC(obj, cb != 0, excb, sentcb), _response(cb) + { + } + + /// \cond INTERNAL + virtual void completed(const ::Ice::AsyncResultPtr& result) const + { + CommonBehaviorPrx proxy = CommonBehaviorPrx::uncheckedCast(result->getProxy()); + ParameterList ret; + try + { + ret = proxy->end_getParameterList(result); + } + catch(const ::Ice::Exception& ex) + { + ::IceInternal::CallbackNC::exception(result, ex); + return; + } + if(_response) + { + (::IceInternal::CallbackNC::_callback.get()->*_response)(ret); + } + } + /// \endcond + +private: + + Response _response; +}; + +/** + * Creates a callback wrapper instance that delegates to your object. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_getParameterList. + */ +template Callback_CommonBehavior_getParameterListPtr +newCallback_CommonBehavior_getParameterList(const IceUtil::Handle& instance, void (T::*cb)(const ParameterList&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0) +{ + return new CallbackNC_CommonBehavior_getParameterList(instance, cb, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_getParameterList. + */ +template Callback_CommonBehavior_getParameterListPtr +newCallback_CommonBehavior_getParameterList(T* instance, void (T::*cb)(const ParameterList&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0) +{ + return new CallbackNC_CommonBehavior_getParameterList(instance, cb, excb, sentcb); +} + +/** + * Type-safe asynchronous callback wrapper class with cookie support used for calls to + * IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_getParameterList. + * Create a wrapper instance by calling ::RoboCompCommonBehavior::newCallback_CommonBehavior_getParameterList. + */ +template +class Callback_CommonBehavior_getParameterList : public Callback_CommonBehavior_getParameterList_Base, public ::IceInternal::TwowayCallback +{ +public: + + typedef IceUtil::Handle TPtr; + + typedef void (T::*Exception)(const ::Ice::Exception& , const CT&); + typedef void (T::*Sent)(bool , const CT&); + typedef void (T::*Response)(const ParameterList&, const CT&); + + Callback_CommonBehavior_getParameterList(const TPtr& obj, Response cb, Exception excb, Sent sentcb) + : ::IceInternal::TwowayCallback(obj, cb != 0, excb, sentcb), _response(cb) + { + } + + /// \cond INTERNAL + virtual void completed(const ::Ice::AsyncResultPtr& result) const + { + CommonBehaviorPrx proxy = CommonBehaviorPrx::uncheckedCast(result->getProxy()); + ParameterList ret; + try + { + ret = proxy->end_getParameterList(result); + } + catch(const ::Ice::Exception& ex) + { + ::IceInternal::Callback::exception(result, ex); + return; + } + if(_response) + { + (::IceInternal::Callback::_callback.get()->*_response)(ret, CT::dynamicCast(result->getCookie())); + } + } + /// \endcond + +private: + + Response _response; +}; + +/** + * Creates a callback wrapper instance that delegates to your object. + * Use this overload when your callback methods receive a cookie value. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_getParameterList. + */ +template Callback_CommonBehavior_getParameterListPtr +newCallback_CommonBehavior_getParameterList(const IceUtil::Handle& instance, void (T::*cb)(const ParameterList&, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0) +{ + return new Callback_CommonBehavior_getParameterList(instance, cb, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * Use this overload when your callback methods receive a cookie value. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_getParameterList. + */ +template Callback_CommonBehavior_getParameterListPtr +newCallback_CommonBehavior_getParameterList(T* instance, void (T::*cb)(const ParameterList&, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0) +{ + return new Callback_CommonBehavior_getParameterList(instance, cb, excb, sentcb); +} + +/** + * Type-safe asynchronous callback wrapper class used for calls to + * IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_getPeriod. + * Create a wrapper instance by calling ::RoboCompCommonBehavior::newCallback_CommonBehavior_getPeriod. + */ +template +class CallbackNC_CommonBehavior_getPeriod : public Callback_CommonBehavior_getPeriod_Base, public ::IceInternal::TwowayCallbackNC +{ +public: + + typedef IceUtil::Handle TPtr; + + typedef void (T::*Exception)(const ::Ice::Exception&); + typedef void (T::*Sent)(bool); + typedef void (T::*Response)(::Ice::Int); + + CallbackNC_CommonBehavior_getPeriod(const TPtr& obj, Response cb, Exception excb, Sent sentcb) + : ::IceInternal::TwowayCallbackNC(obj, cb != 0, excb, sentcb), _response(cb) + { + } + + /// \cond INTERNAL + virtual void completed(const ::Ice::AsyncResultPtr& result) const + { + CommonBehaviorPrx proxy = CommonBehaviorPrx::uncheckedCast(result->getProxy()); + ::Ice::Int ret; + try + { + ret = proxy->end_getPeriod(result); + } + catch(const ::Ice::Exception& ex) + { + ::IceInternal::CallbackNC::exception(result, ex); + return; + } + if(_response) + { + (::IceInternal::CallbackNC::_callback.get()->*_response)(ret); + } + } + /// \endcond + +private: + + Response _response; +}; + +/** + * Creates a callback wrapper instance that delegates to your object. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_getPeriod. + */ +template Callback_CommonBehavior_getPeriodPtr +newCallback_CommonBehavior_getPeriod(const IceUtil::Handle& instance, void (T::*cb)(::Ice::Int), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0) +{ + return new CallbackNC_CommonBehavior_getPeriod(instance, cb, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_getPeriod. + */ +template Callback_CommonBehavior_getPeriodPtr +newCallback_CommonBehavior_getPeriod(T* instance, void (T::*cb)(::Ice::Int), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0) +{ + return new CallbackNC_CommonBehavior_getPeriod(instance, cb, excb, sentcb); +} + +/** + * Type-safe asynchronous callback wrapper class with cookie support used for calls to + * IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_getPeriod. + * Create a wrapper instance by calling ::RoboCompCommonBehavior::newCallback_CommonBehavior_getPeriod. + */ +template +class Callback_CommonBehavior_getPeriod : public Callback_CommonBehavior_getPeriod_Base, public ::IceInternal::TwowayCallback +{ +public: + + typedef IceUtil::Handle TPtr; + + typedef void (T::*Exception)(const ::Ice::Exception& , const CT&); + typedef void (T::*Sent)(bool , const CT&); + typedef void (T::*Response)(::Ice::Int, const CT&); + + Callback_CommonBehavior_getPeriod(const TPtr& obj, Response cb, Exception excb, Sent sentcb) + : ::IceInternal::TwowayCallback(obj, cb != 0, excb, sentcb), _response(cb) + { + } + + /// \cond INTERNAL + virtual void completed(const ::Ice::AsyncResultPtr& result) const + { + CommonBehaviorPrx proxy = CommonBehaviorPrx::uncheckedCast(result->getProxy()); + ::Ice::Int ret; + try + { + ret = proxy->end_getPeriod(result); + } + catch(const ::Ice::Exception& ex) + { + ::IceInternal::Callback::exception(result, ex); + return; + } + if(_response) + { + (::IceInternal::Callback::_callback.get()->*_response)(ret, CT::dynamicCast(result->getCookie())); + } + } + /// \endcond + +private: + + Response _response; +}; + +/** + * Creates a callback wrapper instance that delegates to your object. + * Use this overload when your callback methods receive a cookie value. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_getPeriod. + */ +template Callback_CommonBehavior_getPeriodPtr +newCallback_CommonBehavior_getPeriod(const IceUtil::Handle& instance, void (T::*cb)(::Ice::Int, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0) +{ + return new Callback_CommonBehavior_getPeriod(instance, cb, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * Use this overload when your callback methods receive a cookie value. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_getPeriod. + */ +template Callback_CommonBehavior_getPeriodPtr +newCallback_CommonBehavior_getPeriod(T* instance, void (T::*cb)(::Ice::Int, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0) +{ + return new Callback_CommonBehavior_getPeriod(instance, cb, excb, sentcb); +} + +/** + * Type-safe asynchronous callback wrapper class used for calls to + * IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_getState. + * Create a wrapper instance by calling ::RoboCompCommonBehavior::newCallback_CommonBehavior_getState. + */ +template +class CallbackNC_CommonBehavior_getState : public Callback_CommonBehavior_getState_Base, public ::IceInternal::TwowayCallbackNC +{ +public: + + typedef IceUtil::Handle TPtr; + + typedef void (T::*Exception)(const ::Ice::Exception&); + typedef void (T::*Sent)(bool); + typedef void (T::*Response)(State); + + CallbackNC_CommonBehavior_getState(const TPtr& obj, Response cb, Exception excb, Sent sentcb) + : ::IceInternal::TwowayCallbackNC(obj, cb != 0, excb, sentcb), _response(cb) + { + } + + /// \cond INTERNAL + virtual void completed(const ::Ice::AsyncResultPtr& result) const + { + CommonBehaviorPrx proxy = CommonBehaviorPrx::uncheckedCast(result->getProxy()); + State ret; + try + { + ret = proxy->end_getState(result); + } + catch(const ::Ice::Exception& ex) + { + ::IceInternal::CallbackNC::exception(result, ex); + return; + } + if(_response) + { + (::IceInternal::CallbackNC::_callback.get()->*_response)(ret); + } + } + /// \endcond + +private: + + Response _response; +}; + +/** + * Creates a callback wrapper instance that delegates to your object. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_getState. + */ +template Callback_CommonBehavior_getStatePtr +newCallback_CommonBehavior_getState(const IceUtil::Handle& instance, void (T::*cb)(State), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0) +{ + return new CallbackNC_CommonBehavior_getState(instance, cb, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_getState. + */ +template Callback_CommonBehavior_getStatePtr +newCallback_CommonBehavior_getState(T* instance, void (T::*cb)(State), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0) +{ + return new CallbackNC_CommonBehavior_getState(instance, cb, excb, sentcb); +} + +/** + * Type-safe asynchronous callback wrapper class with cookie support used for calls to + * IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_getState. + * Create a wrapper instance by calling ::RoboCompCommonBehavior::newCallback_CommonBehavior_getState. + */ +template +class Callback_CommonBehavior_getState : public Callback_CommonBehavior_getState_Base, public ::IceInternal::TwowayCallback +{ +public: + + typedef IceUtil::Handle TPtr; + + typedef void (T::*Exception)(const ::Ice::Exception& , const CT&); + typedef void (T::*Sent)(bool , const CT&); + typedef void (T::*Response)(State, const CT&); + + Callback_CommonBehavior_getState(const TPtr& obj, Response cb, Exception excb, Sent sentcb) + : ::IceInternal::TwowayCallback(obj, cb != 0, excb, sentcb), _response(cb) + { + } + + /// \cond INTERNAL + virtual void completed(const ::Ice::AsyncResultPtr& result) const + { + CommonBehaviorPrx proxy = CommonBehaviorPrx::uncheckedCast(result->getProxy()); + State ret; + try + { + ret = proxy->end_getState(result); + } + catch(const ::Ice::Exception& ex) + { + ::IceInternal::Callback::exception(result, ex); + return; + } + if(_response) + { + (::IceInternal::Callback::_callback.get()->*_response)(ret, CT::dynamicCast(result->getCookie())); + } + } + /// \endcond + +private: + + Response _response; +}; + +/** + * Creates a callback wrapper instance that delegates to your object. + * Use this overload when your callback methods receive a cookie value. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_getState. + */ +template Callback_CommonBehavior_getStatePtr +newCallback_CommonBehavior_getState(const IceUtil::Handle& instance, void (T::*cb)(State, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0) +{ + return new Callback_CommonBehavior_getState(instance, cb, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * Use this overload when your callback methods receive a cookie value. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_getState. + */ +template Callback_CommonBehavior_getStatePtr +newCallback_CommonBehavior_getState(T* instance, void (T::*cb)(State, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0) +{ + return new Callback_CommonBehavior_getState(instance, cb, excb, sentcb); +} + +/** + * Type-safe asynchronous callback wrapper class used for calls to + * IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_killYourSelf. + * Create a wrapper instance by calling ::RoboCompCommonBehavior::newCallback_CommonBehavior_killYourSelf. + */ +template +class CallbackNC_CommonBehavior_killYourSelf : public Callback_CommonBehavior_killYourSelf_Base, public ::IceInternal::OnewayCallbackNC +{ +public: + + typedef IceUtil::Handle TPtr; + + typedef void (T::*Exception)(const ::Ice::Exception&); + typedef void (T::*Sent)(bool); + typedef void (T::*Response)(); + + CallbackNC_CommonBehavior_killYourSelf(const TPtr& obj, Response cb, Exception excb, Sent sentcb) + : ::IceInternal::OnewayCallbackNC(obj, cb, excb, sentcb) + { + } +}; + +/** + * Creates a callback wrapper instance that delegates to your object. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_killYourSelf. + */ +template Callback_CommonBehavior_killYourSelfPtr +newCallback_CommonBehavior_killYourSelf(const IceUtil::Handle& instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0) +{ + return new CallbackNC_CommonBehavior_killYourSelf(instance, cb, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * @param instance The callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_killYourSelf. + */ +template Callback_CommonBehavior_killYourSelfPtr +newCallback_CommonBehavior_killYourSelf(const IceUtil::Handle& instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0) +{ + return new CallbackNC_CommonBehavior_killYourSelf(instance, 0, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_killYourSelf. + */ +template Callback_CommonBehavior_killYourSelfPtr +newCallback_CommonBehavior_killYourSelf(T* instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0) +{ + return new CallbackNC_CommonBehavior_killYourSelf(instance, cb, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * @param instance The callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_killYourSelf. + */ +template Callback_CommonBehavior_killYourSelfPtr +newCallback_CommonBehavior_killYourSelf(T* instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0) +{ + return new CallbackNC_CommonBehavior_killYourSelf(instance, 0, excb, sentcb); +} + +/** + * Type-safe asynchronous callback wrapper class with cookie support used for calls to + * IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_killYourSelf. + * Create a wrapper instance by calling ::RoboCompCommonBehavior::newCallback_CommonBehavior_killYourSelf. + */ +template +class Callback_CommonBehavior_killYourSelf : public Callback_CommonBehavior_killYourSelf_Base, public ::IceInternal::OnewayCallback +{ +public: + + typedef IceUtil::Handle TPtr; + + typedef void (T::*Exception)(const ::Ice::Exception& , const CT&); + typedef void (T::*Sent)(bool , const CT&); + typedef void (T::*Response)(const CT&); + + Callback_CommonBehavior_killYourSelf(const TPtr& obj, Response cb, Exception excb, Sent sentcb) + : ::IceInternal::OnewayCallback(obj, cb, excb, sentcb) + { + } +}; + +/** + * Creates a callback wrapper instance that delegates to your object. + * Use this overload when your callback methods receive a cookie value. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_killYourSelf. + */ +template Callback_CommonBehavior_killYourSelfPtr +newCallback_CommonBehavior_killYourSelf(const IceUtil::Handle& instance, void (T::*cb)(const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0) +{ + return new Callback_CommonBehavior_killYourSelf(instance, cb, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * Use this overload when your callback methods receive a cookie value. + * @param instance The callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_killYourSelf. + */ +template Callback_CommonBehavior_killYourSelfPtr +newCallback_CommonBehavior_killYourSelf(const IceUtil::Handle& instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0) +{ + return new Callback_CommonBehavior_killYourSelf(instance, 0, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * Use this overload when your callback methods receive a cookie value. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_killYourSelf. + */ +template Callback_CommonBehavior_killYourSelfPtr +newCallback_CommonBehavior_killYourSelf(T* instance, void (T::*cb)(const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0) +{ + return new Callback_CommonBehavior_killYourSelf(instance, cb, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * Use this overload when your callback methods receive a cookie value. + * @param instance The callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_killYourSelf. + */ +template Callback_CommonBehavior_killYourSelfPtr +newCallback_CommonBehavior_killYourSelf(T* instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0) +{ + return new Callback_CommonBehavior_killYourSelf(instance, 0, excb, sentcb); +} + +/** + * Type-safe asynchronous callback wrapper class used for calls to + * IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_reloadConfig. + * Create a wrapper instance by calling ::RoboCompCommonBehavior::newCallback_CommonBehavior_reloadConfig. + */ +template +class CallbackNC_CommonBehavior_reloadConfig : public Callback_CommonBehavior_reloadConfig_Base, public ::IceInternal::OnewayCallbackNC +{ +public: + + typedef IceUtil::Handle TPtr; + + typedef void (T::*Exception)(const ::Ice::Exception&); + typedef void (T::*Sent)(bool); + typedef void (T::*Response)(); + + CallbackNC_CommonBehavior_reloadConfig(const TPtr& obj, Response cb, Exception excb, Sent sentcb) + : ::IceInternal::OnewayCallbackNC(obj, cb, excb, sentcb) + { + } +}; + +/** + * Creates a callback wrapper instance that delegates to your object. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_reloadConfig. + */ +template Callback_CommonBehavior_reloadConfigPtr +newCallback_CommonBehavior_reloadConfig(const IceUtil::Handle& instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0) +{ + return new CallbackNC_CommonBehavior_reloadConfig(instance, cb, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * @param instance The callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_reloadConfig. + */ +template Callback_CommonBehavior_reloadConfigPtr +newCallback_CommonBehavior_reloadConfig(const IceUtil::Handle& instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0) +{ + return new CallbackNC_CommonBehavior_reloadConfig(instance, 0, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_reloadConfig. + */ +template Callback_CommonBehavior_reloadConfigPtr +newCallback_CommonBehavior_reloadConfig(T* instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0) +{ + return new CallbackNC_CommonBehavior_reloadConfig(instance, cb, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * @param instance The callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_reloadConfig. + */ +template Callback_CommonBehavior_reloadConfigPtr +newCallback_CommonBehavior_reloadConfig(T* instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0) +{ + return new CallbackNC_CommonBehavior_reloadConfig(instance, 0, excb, sentcb); +} + +/** + * Type-safe asynchronous callback wrapper class with cookie support used for calls to + * IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_reloadConfig. + * Create a wrapper instance by calling ::RoboCompCommonBehavior::newCallback_CommonBehavior_reloadConfig. + */ +template +class Callback_CommonBehavior_reloadConfig : public Callback_CommonBehavior_reloadConfig_Base, public ::IceInternal::OnewayCallback +{ +public: + + typedef IceUtil::Handle TPtr; + + typedef void (T::*Exception)(const ::Ice::Exception& , const CT&); + typedef void (T::*Sent)(bool , const CT&); + typedef void (T::*Response)(const CT&); + + Callback_CommonBehavior_reloadConfig(const TPtr& obj, Response cb, Exception excb, Sent sentcb) + : ::IceInternal::OnewayCallback(obj, cb, excb, sentcb) + { + } +}; + +/** + * Creates a callback wrapper instance that delegates to your object. + * Use this overload when your callback methods receive a cookie value. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_reloadConfig. + */ +template Callback_CommonBehavior_reloadConfigPtr +newCallback_CommonBehavior_reloadConfig(const IceUtil::Handle& instance, void (T::*cb)(const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0) +{ + return new Callback_CommonBehavior_reloadConfig(instance, cb, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * Use this overload when your callback methods receive a cookie value. + * @param instance The callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_reloadConfig. + */ +template Callback_CommonBehavior_reloadConfigPtr +newCallback_CommonBehavior_reloadConfig(const IceUtil::Handle& instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0) +{ + return new Callback_CommonBehavior_reloadConfig(instance, 0, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * Use this overload when your callback methods receive a cookie value. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_reloadConfig. + */ +template Callback_CommonBehavior_reloadConfigPtr +newCallback_CommonBehavior_reloadConfig(T* instance, void (T::*cb)(const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0) +{ + return new Callback_CommonBehavior_reloadConfig(instance, cb, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * Use this overload when your callback methods receive a cookie value. + * @param instance The callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_reloadConfig. + */ +template Callback_CommonBehavior_reloadConfigPtr +newCallback_CommonBehavior_reloadConfig(T* instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0) +{ + return new Callback_CommonBehavior_reloadConfig(instance, 0, excb, sentcb); +} + +/** + * Type-safe asynchronous callback wrapper class used for calls to + * IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_setParameterList. + * Create a wrapper instance by calling ::RoboCompCommonBehavior::newCallback_CommonBehavior_setParameterList. + */ +template +class CallbackNC_CommonBehavior_setParameterList : public Callback_CommonBehavior_setParameterList_Base, public ::IceInternal::OnewayCallbackNC +{ +public: + + typedef IceUtil::Handle TPtr; + + typedef void (T::*Exception)(const ::Ice::Exception&); + typedef void (T::*Sent)(bool); + typedef void (T::*Response)(); + + CallbackNC_CommonBehavior_setParameterList(const TPtr& obj, Response cb, Exception excb, Sent sentcb) + : ::IceInternal::OnewayCallbackNC(obj, cb, excb, sentcb) + { + } +}; + +/** + * Creates a callback wrapper instance that delegates to your object. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_setParameterList. + */ +template Callback_CommonBehavior_setParameterListPtr +newCallback_CommonBehavior_setParameterList(const IceUtil::Handle& instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0) +{ + return new CallbackNC_CommonBehavior_setParameterList(instance, cb, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * @param instance The callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_setParameterList. + */ +template Callback_CommonBehavior_setParameterListPtr +newCallback_CommonBehavior_setParameterList(const IceUtil::Handle& instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0) +{ + return new CallbackNC_CommonBehavior_setParameterList(instance, 0, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_setParameterList. + */ +template Callback_CommonBehavior_setParameterListPtr +newCallback_CommonBehavior_setParameterList(T* instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0) +{ + return new CallbackNC_CommonBehavior_setParameterList(instance, cb, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * @param instance The callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_setParameterList. + */ +template Callback_CommonBehavior_setParameterListPtr +newCallback_CommonBehavior_setParameterList(T* instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0) +{ + return new CallbackNC_CommonBehavior_setParameterList(instance, 0, excb, sentcb); +} + +/** + * Type-safe asynchronous callback wrapper class with cookie support used for calls to + * IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_setParameterList. + * Create a wrapper instance by calling ::RoboCompCommonBehavior::newCallback_CommonBehavior_setParameterList. + */ +template +class Callback_CommonBehavior_setParameterList : public Callback_CommonBehavior_setParameterList_Base, public ::IceInternal::OnewayCallback +{ +public: + + typedef IceUtil::Handle TPtr; + + typedef void (T::*Exception)(const ::Ice::Exception& , const CT&); + typedef void (T::*Sent)(bool , const CT&); + typedef void (T::*Response)(const CT&); + + Callback_CommonBehavior_setParameterList(const TPtr& obj, Response cb, Exception excb, Sent sentcb) + : ::IceInternal::OnewayCallback(obj, cb, excb, sentcb) + { + } +}; + +/** + * Creates a callback wrapper instance that delegates to your object. + * Use this overload when your callback methods receive a cookie value. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_setParameterList. + */ +template Callback_CommonBehavior_setParameterListPtr +newCallback_CommonBehavior_setParameterList(const IceUtil::Handle& instance, void (T::*cb)(const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0) +{ + return new Callback_CommonBehavior_setParameterList(instance, cb, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * Use this overload when your callback methods receive a cookie value. + * @param instance The callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_setParameterList. + */ +template Callback_CommonBehavior_setParameterListPtr +newCallback_CommonBehavior_setParameterList(const IceUtil::Handle& instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0) +{ + return new Callback_CommonBehavior_setParameterList(instance, 0, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * Use this overload when your callback methods receive a cookie value. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_setParameterList. + */ +template Callback_CommonBehavior_setParameterListPtr +newCallback_CommonBehavior_setParameterList(T* instance, void (T::*cb)(const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0) +{ + return new Callback_CommonBehavior_setParameterList(instance, cb, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * Use this overload when your callback methods receive a cookie value. + * @param instance The callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_setParameterList. + */ +template Callback_CommonBehavior_setParameterListPtr +newCallback_CommonBehavior_setParameterList(T* instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0) +{ + return new Callback_CommonBehavior_setParameterList(instance, 0, excb, sentcb); +} + +/** + * Type-safe asynchronous callback wrapper class used for calls to + * IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_setPeriod. + * Create a wrapper instance by calling ::RoboCompCommonBehavior::newCallback_CommonBehavior_setPeriod. + */ +template +class CallbackNC_CommonBehavior_setPeriod : public Callback_CommonBehavior_setPeriod_Base, public ::IceInternal::OnewayCallbackNC +{ +public: + + typedef IceUtil::Handle TPtr; + + typedef void (T::*Exception)(const ::Ice::Exception&); + typedef void (T::*Sent)(bool); + typedef void (T::*Response)(); + + CallbackNC_CommonBehavior_setPeriod(const TPtr& obj, Response cb, Exception excb, Sent sentcb) + : ::IceInternal::OnewayCallbackNC(obj, cb, excb, sentcb) + { + } +}; + +/** + * Creates a callback wrapper instance that delegates to your object. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_setPeriod. + */ +template Callback_CommonBehavior_setPeriodPtr +newCallback_CommonBehavior_setPeriod(const IceUtil::Handle& instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0) +{ + return new CallbackNC_CommonBehavior_setPeriod(instance, cb, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * @param instance The callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_setPeriod. + */ +template Callback_CommonBehavior_setPeriodPtr +newCallback_CommonBehavior_setPeriod(const IceUtil::Handle& instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0) +{ + return new CallbackNC_CommonBehavior_setPeriod(instance, 0, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_setPeriod. + */ +template Callback_CommonBehavior_setPeriodPtr +newCallback_CommonBehavior_setPeriod(T* instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0) +{ + return new CallbackNC_CommonBehavior_setPeriod(instance, cb, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * @param instance The callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_setPeriod. + */ +template Callback_CommonBehavior_setPeriodPtr +newCallback_CommonBehavior_setPeriod(T* instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0) +{ + return new CallbackNC_CommonBehavior_setPeriod(instance, 0, excb, sentcb); +} + +/** + * Type-safe asynchronous callback wrapper class with cookie support used for calls to + * IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_setPeriod. + * Create a wrapper instance by calling ::RoboCompCommonBehavior::newCallback_CommonBehavior_setPeriod. + */ +template +class Callback_CommonBehavior_setPeriod : public Callback_CommonBehavior_setPeriod_Base, public ::IceInternal::OnewayCallback +{ +public: + + typedef IceUtil::Handle TPtr; + + typedef void (T::*Exception)(const ::Ice::Exception& , const CT&); + typedef void (T::*Sent)(bool , const CT&); + typedef void (T::*Response)(const CT&); + + Callback_CommonBehavior_setPeriod(const TPtr& obj, Response cb, Exception excb, Sent sentcb) + : ::IceInternal::OnewayCallback(obj, cb, excb, sentcb) + { + } +}; + +/** + * Creates a callback wrapper instance that delegates to your object. + * Use this overload when your callback methods receive a cookie value. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_setPeriod. + */ +template Callback_CommonBehavior_setPeriodPtr +newCallback_CommonBehavior_setPeriod(const IceUtil::Handle& instance, void (T::*cb)(const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0) +{ + return new Callback_CommonBehavior_setPeriod(instance, cb, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * Use this overload when your callback methods receive a cookie value. + * @param instance The callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_setPeriod. + */ +template Callback_CommonBehavior_setPeriodPtr +newCallback_CommonBehavior_setPeriod(const IceUtil::Handle& instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0) +{ + return new Callback_CommonBehavior_setPeriod(instance, 0, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * Use this overload when your callback methods receive a cookie value. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_setPeriod. + */ +template Callback_CommonBehavior_setPeriodPtr +newCallback_CommonBehavior_setPeriod(T* instance, void (T::*cb)(const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0) +{ + return new Callback_CommonBehavior_setPeriod(instance, cb, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * Use this overload when your callback methods receive a cookie value. + * @param instance The callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_setPeriod. + */ +template Callback_CommonBehavior_setPeriodPtr +newCallback_CommonBehavior_setPeriod(T* instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0) +{ + return new Callback_CommonBehavior_setPeriod(instance, 0, excb, sentcb); +} + +/** + * Type-safe asynchronous callback wrapper class used for calls to + * IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_timeAwake. + * Create a wrapper instance by calling ::RoboCompCommonBehavior::newCallback_CommonBehavior_timeAwake. + */ +template +class CallbackNC_CommonBehavior_timeAwake : public Callback_CommonBehavior_timeAwake_Base, public ::IceInternal::TwowayCallbackNC +{ +public: + + typedef IceUtil::Handle TPtr; + + typedef void (T::*Exception)(const ::Ice::Exception&); + typedef void (T::*Sent)(bool); + typedef void (T::*Response)(::Ice::Int); + + CallbackNC_CommonBehavior_timeAwake(const TPtr& obj, Response cb, Exception excb, Sent sentcb) + : ::IceInternal::TwowayCallbackNC(obj, cb != 0, excb, sentcb), _response(cb) + { + } + + /// \cond INTERNAL + virtual void completed(const ::Ice::AsyncResultPtr& result) const + { + CommonBehaviorPrx proxy = CommonBehaviorPrx::uncheckedCast(result->getProxy()); + ::Ice::Int ret; + try + { + ret = proxy->end_timeAwake(result); + } + catch(const ::Ice::Exception& ex) + { + ::IceInternal::CallbackNC::exception(result, ex); + return; + } + if(_response) + { + (::IceInternal::CallbackNC::_callback.get()->*_response)(ret); + } + } + /// \endcond + +private: + + Response _response; +}; + +/** + * Creates a callback wrapper instance that delegates to your object. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_timeAwake. + */ +template Callback_CommonBehavior_timeAwakePtr +newCallback_CommonBehavior_timeAwake(const IceUtil::Handle& instance, void (T::*cb)(::Ice::Int), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0) +{ + return new CallbackNC_CommonBehavior_timeAwake(instance, cb, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_timeAwake. + */ +template Callback_CommonBehavior_timeAwakePtr +newCallback_CommonBehavior_timeAwake(T* instance, void (T::*cb)(::Ice::Int), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0) +{ + return new CallbackNC_CommonBehavior_timeAwake(instance, cb, excb, sentcb); +} + +/** + * Type-safe asynchronous callback wrapper class with cookie support used for calls to + * IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_timeAwake. + * Create a wrapper instance by calling ::RoboCompCommonBehavior::newCallback_CommonBehavior_timeAwake. + */ +template +class Callback_CommonBehavior_timeAwake : public Callback_CommonBehavior_timeAwake_Base, public ::IceInternal::TwowayCallback +{ +public: + + typedef IceUtil::Handle TPtr; + + typedef void (T::*Exception)(const ::Ice::Exception& , const CT&); + typedef void (T::*Sent)(bool , const CT&); + typedef void (T::*Response)(::Ice::Int, const CT&); + + Callback_CommonBehavior_timeAwake(const TPtr& obj, Response cb, Exception excb, Sent sentcb) + : ::IceInternal::TwowayCallback(obj, cb != 0, excb, sentcb), _response(cb) + { + } + + /// \cond INTERNAL + virtual void completed(const ::Ice::AsyncResultPtr& result) const + { + CommonBehaviorPrx proxy = CommonBehaviorPrx::uncheckedCast(result->getProxy()); + ::Ice::Int ret; + try + { + ret = proxy->end_timeAwake(result); + } + catch(const ::Ice::Exception& ex) + { + ::IceInternal::Callback::exception(result, ex); + return; + } + if(_response) + { + (::IceInternal::Callback::_callback.get()->*_response)(ret, CT::dynamicCast(result->getCookie())); + } + } + /// \endcond + +private: + + Response _response; +}; + +/** + * Creates a callback wrapper instance that delegates to your object. + * Use this overload when your callback methods receive a cookie value. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_timeAwake. + */ +template Callback_CommonBehavior_timeAwakePtr +newCallback_CommonBehavior_timeAwake(const IceUtil::Handle& instance, void (T::*cb)(::Ice::Int, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0) +{ + return new Callback_CommonBehavior_timeAwake(instance, cb, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * Use this overload when your callback methods receive a cookie value. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompCommonBehavior::CommonBehavior::begin_timeAwake. + */ +template Callback_CommonBehavior_timeAwakePtr +newCallback_CommonBehavior_timeAwake(T* instance, void (T::*cb)(::Ice::Int, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0) +{ + return new Callback_CommonBehavior_timeAwake(instance, cb, excb, sentcb); +} + +} + +#endif + +#include +#endif diff --git a/components/depthDSR/src/DepthEstimation.cpp b/components/depthDSR/src/DepthEstimation.cpp new file mode 100644 index 00000000..3bb6cc65 --- /dev/null +++ b/components/depthDSR/src/DepthEstimation.cpp @@ -0,0 +1,439 @@ +// +// Copyright (c) ZeroC, Inc. All rights reserved. +// +// +// Ice version 3.7.3 +// +// +// +// Generated from file `DepthEstimation.ice' +// +// Warning: do not edit this file. +// +// +// + +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(_MSC_VER) +# pragma warning(disable:4458) // declaration of ... hides class member +#elif defined(__clang__) +# pragma clang diagnostic ignored "-Wshadow" +#elif defined(__GNUC__) +# pragma GCC diagnostic ignored "-Wshadow" +#endif + +#ifndef ICE_IGNORE_VERSION +# if ICE_INT_VERSION / 100 != 307 +# error Ice version mismatch! +# endif +# if ICE_INT_VERSION % 100 >= 50 +# error Beta header file detected +# endif +# if ICE_INT_VERSION % 100 < 3 +# error Ice patch level mismatch! +# endif +#endif + +#ifdef ICE_CPP11_MAPPING // C++11 mapping + +namespace +{ + +const ::std::string iceC_RoboCompDepthEstimation_DepthEstimation_ids[2] = +{ + "::Ice::Object", + "::RoboCompDepthEstimation::DepthEstimation" +}; +const ::std::string iceC_RoboCompDepthEstimation_DepthEstimation_ops[] = +{ + "getDepthEstimation", + "ice_id", + "ice_ids", + "ice_isA", + "ice_ping" +}; +const ::std::string iceC_RoboCompDepthEstimation_DepthEstimation_getDepthEstimation_name = "getDepthEstimation"; + +} + +bool +RoboCompDepthEstimation::DepthEstimation::ice_isA(::std::string s, const ::Ice::Current&) const +{ + return ::std::binary_search(iceC_RoboCompDepthEstimation_DepthEstimation_ids, iceC_RoboCompDepthEstimation_DepthEstimation_ids + 2, s); +} + +::std::vector<::std::string> +RoboCompDepthEstimation::DepthEstimation::ice_ids(const ::Ice::Current&) const +{ + return ::std::vector<::std::string>(&iceC_RoboCompDepthEstimation_DepthEstimation_ids[0], &iceC_RoboCompDepthEstimation_DepthEstimation_ids[2]); +} + +::std::string +RoboCompDepthEstimation::DepthEstimation::ice_id(const ::Ice::Current&) const +{ + return ice_staticId(); +} + +const ::std::string& +RoboCompDepthEstimation::DepthEstimation::ice_staticId() +{ + static const ::std::string typeId = "::RoboCompDepthEstimation::DepthEstimation"; + return typeId; +} + +/// \cond INTERNAL +bool +RoboCompDepthEstimation::DepthEstimation::_iceD_getDepthEstimation(::IceInternal::Incoming& inS, const ::Ice::Current& current) +{ + _iceCheckMode(::Ice::OperationMode::Idempotent, current.mode); + auto istr = inS.startReadParams(); + TImage iceP_depthImg; + istr->readAll(iceP_depthImg); + inS.endReadParams(); + DepthScene iceP_result; + this->getDepthEstimation(::std::move(iceP_depthImg), iceP_result, current); + auto ostr = inS.startWriteParams(); + ostr->writeAll(iceP_result); + inS.endWriteParams(); + return true; +} +/// \endcond + +/// \cond INTERNAL +bool +RoboCompDepthEstimation::DepthEstimation::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current) +{ + ::std::pair r = ::std::equal_range(iceC_RoboCompDepthEstimation_DepthEstimation_ops, iceC_RoboCompDepthEstimation_DepthEstimation_ops + 5, current.operation); + if(r.first == r.second) + { + throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); + } + + switch(r.first - iceC_RoboCompDepthEstimation_DepthEstimation_ops) + { + case 0: + { + return _iceD_getDepthEstimation(in, current); + } + case 1: + { + return _iceD_ice_id(in, current); + } + case 2: + { + return _iceD_ice_ids(in, current); + } + case 3: + { + return _iceD_ice_isA(in, current); + } + case 4: + { + return _iceD_ice_ping(in, current); + } + default: + { + assert(false); + throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); + } + } +} +/// \endcond + +/// \cond INTERNAL +void +RoboCompDepthEstimation::DepthEstimationPrx::_iceI_getDepthEstimation(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<::RoboCompDepthEstimation::DepthScene>>& outAsync, const TImage& iceP_depthImg, const ::Ice::Context& context) +{ + _checkTwowayOnly(iceC_RoboCompDepthEstimation_DepthEstimation_getDepthEstimation_name); + outAsync->invoke(iceC_RoboCompDepthEstimation_DepthEstimation_getDepthEstimation_name, ::Ice::OperationMode::Idempotent, ::Ice::FormatType::DefaultFormat, context, + [&](::Ice::OutputStream* ostr) + { + ostr->writeAll(iceP_depthImg); + }, + nullptr); +} +/// \endcond + +/// \cond INTERNAL +::std::shared_ptr<::Ice::ObjectPrx> +RoboCompDepthEstimation::DepthEstimationPrx::_newInstance() const +{ + return ::IceInternal::createProxy(); +} +/// \endcond + +const ::std::string& +RoboCompDepthEstimation::DepthEstimationPrx::ice_staticId() +{ + return DepthEstimation::ice_staticId(); +} + +namespace Ice +{ +} + +#else // C++98 mapping + +namespace +{ + +const ::std::string iceC_RoboCompDepthEstimation_DepthEstimation_getDepthEstimation_name = "getDepthEstimation"; + +} + +/// \cond INTERNAL +::IceProxy::Ice::Object* ::IceProxy::RoboCompDepthEstimation::upCast(DepthEstimation* p) { return p; } + +void +::IceProxy::RoboCompDepthEstimation::_readProxy(::Ice::InputStream* istr, ::IceInternal::ProxyHandle< DepthEstimation>& v) +{ + ::Ice::ObjectPrx proxy; + istr->read(proxy); + if(!proxy) + { + v = 0; + } + else + { + v = new DepthEstimation; + v->_copyFrom(proxy); + } +} +/// \endcond + +::Ice::AsyncResultPtr +IceProxy::RoboCompDepthEstimation::DepthEstimation::_iceI_begin_getDepthEstimation(const ::RoboCompDepthEstimation::TImage& iceP_depthImg, const ::Ice::Context& context, const ::IceInternal::CallbackBasePtr& del, const ::Ice::LocalObjectPtr& cookie, bool sync) +{ + _checkTwowayOnly(iceC_RoboCompDepthEstimation_DepthEstimation_getDepthEstimation_name, sync); + ::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(this, iceC_RoboCompDepthEstimation_DepthEstimation_getDepthEstimation_name, del, cookie, sync); + try + { + result->prepare(iceC_RoboCompDepthEstimation_DepthEstimation_getDepthEstimation_name, ::Ice::Idempotent, context); + ::Ice::OutputStream* ostr = result->startWriteParams(::Ice::DefaultFormat); + ostr->write(iceP_depthImg); + result->endWriteParams(); + result->invoke(iceC_RoboCompDepthEstimation_DepthEstimation_getDepthEstimation_name); + } + catch(const ::Ice::Exception& ex) + { + result->abort(ex); + } + return result; +} + +void +IceProxy::RoboCompDepthEstimation::DepthEstimation::end_getDepthEstimation(::RoboCompDepthEstimation::DepthScene& iceP_result, const ::Ice::AsyncResultPtr& result) +{ + ::Ice::AsyncResult::_check(result, this, iceC_RoboCompDepthEstimation_DepthEstimation_getDepthEstimation_name); + if(!result->_waitForResponse()) + { + try + { + result->_throwUserException(); + } + catch(const ::Ice::UserException& ex) + { + throw ::Ice::UnknownUserException(__FILE__, __LINE__, ex.ice_id()); + } + } + ::Ice::InputStream* istr = result->_startReadParams(); + istr->read(iceP_result); + result->_endReadParams(); +} + +void IceProxy::RoboCompDepthEstimation::DepthEstimation::_iceI_end_getDepthEstimation(::RoboCompDepthEstimation::DepthScene& iceP_result, const ::Ice::AsyncResultPtr& result) +{ + ::Ice::AsyncResult::_check(result, this, iceC_RoboCompDepthEstimation_DepthEstimation_getDepthEstimation_name); + if(!result->_waitForResponse()) + { + try + { + result->_throwUserException(); + } + catch(const ::Ice::UserException& ex) + { + throw ::Ice::UnknownUserException(__FILE__, __LINE__, ex.ice_id()); + } + } + ::Ice::InputStream* istr = result->_startReadParams(); + istr->read(iceP_result); + result->_endReadParams(); +} + +/// \cond INTERNAL +::IceProxy::Ice::Object* +IceProxy::RoboCompDepthEstimation::DepthEstimation::_newInstance() const +{ + return new DepthEstimation; +} +/// \endcond + +const ::std::string& +IceProxy::RoboCompDepthEstimation::DepthEstimation::ice_staticId() +{ + return ::RoboCompDepthEstimation::DepthEstimation::ice_staticId(); +} + +RoboCompDepthEstimation::DepthEstimation::~DepthEstimation() +{ +} + +/// \cond INTERNAL +::Ice::Object* RoboCompDepthEstimation::upCast(DepthEstimation* p) { return p; } + +/// \endcond + +namespace +{ +const ::std::string iceC_RoboCompDepthEstimation_DepthEstimation_ids[2] = +{ + "::Ice::Object", + "::RoboCompDepthEstimation::DepthEstimation" +}; + +} + +bool +RoboCompDepthEstimation::DepthEstimation::ice_isA(const ::std::string& s, const ::Ice::Current&) const +{ + return ::std::binary_search(iceC_RoboCompDepthEstimation_DepthEstimation_ids, iceC_RoboCompDepthEstimation_DepthEstimation_ids + 2, s); +} + +::std::vector< ::std::string> +RoboCompDepthEstimation::DepthEstimation::ice_ids(const ::Ice::Current&) const +{ + return ::std::vector< ::std::string>(&iceC_RoboCompDepthEstimation_DepthEstimation_ids[0], &iceC_RoboCompDepthEstimation_DepthEstimation_ids[2]); +} + +const ::std::string& +RoboCompDepthEstimation::DepthEstimation::ice_id(const ::Ice::Current&) const +{ + return ice_staticId(); +} + +const ::std::string& +RoboCompDepthEstimation::DepthEstimation::ice_staticId() +{ +#ifdef ICE_HAS_THREAD_SAFE_LOCAL_STATIC + static const ::std::string typeId = "::RoboCompDepthEstimation::DepthEstimation"; + return typeId; +#else + return iceC_RoboCompDepthEstimation_DepthEstimation_ids[1]; +#endif +} + +/// \cond INTERNAL +bool +RoboCompDepthEstimation::DepthEstimation::_iceD_getDepthEstimation(::IceInternal::Incoming& inS, const ::Ice::Current& current) +{ + _iceCheckMode(::Ice::Idempotent, current.mode); + ::Ice::InputStream* istr = inS.startReadParams(); + TImage iceP_depthImg; + istr->read(iceP_depthImg); + inS.endReadParams(); + DepthScene iceP_result; + this->getDepthEstimation(iceP_depthImg, iceP_result, current); + ::Ice::OutputStream* ostr = inS.startWriteParams(); + ostr->write(iceP_result); + inS.endWriteParams(); + return true; +} +/// \endcond + +namespace +{ +const ::std::string iceC_RoboCompDepthEstimation_DepthEstimation_all[] = +{ + "getDepthEstimation", + "ice_id", + "ice_ids", + "ice_isA", + "ice_ping" +}; + +} + +/// \cond INTERNAL +bool +RoboCompDepthEstimation::DepthEstimation::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current) +{ + ::std::pair r = ::std::equal_range(iceC_RoboCompDepthEstimation_DepthEstimation_all, iceC_RoboCompDepthEstimation_DepthEstimation_all + 5, current.operation); + if(r.first == r.second) + { + throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); + } + + switch(r.first - iceC_RoboCompDepthEstimation_DepthEstimation_all) + { + case 0: + { + return _iceD_getDepthEstimation(in, current); + } + case 1: + { + return _iceD_ice_id(in, current); + } + case 2: + { + return _iceD_ice_ids(in, current); + } + case 3: + { + return _iceD_ice_isA(in, current); + } + case 4: + { + return _iceD_ice_ping(in, current); + } + default: + { + assert(false); + throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); + } + } +} +/// \endcond + +/// \cond STREAM +void +RoboCompDepthEstimation::DepthEstimation::_iceWriteImpl(::Ice::OutputStream* ostr) const +{ + ostr->startSlice(ice_staticId(), -1, true); + ::Ice::StreamWriter< DepthEstimation, ::Ice::OutputStream>::write(ostr, *this); + ostr->endSlice(); +} + +void +RoboCompDepthEstimation::DepthEstimation::_iceReadImpl(::Ice::InputStream* istr) +{ + istr->startSlice(); + ::Ice::StreamReader< DepthEstimation, ::Ice::InputStream>::read(istr, *this); + istr->endSlice(); +} +/// \endcond + +/// \cond INTERNAL +void +RoboCompDepthEstimation::_icePatchObjectPtr(DepthEstimationPtr& handle, const ::Ice::ObjectPtr& v) +{ + handle = DepthEstimationPtr::dynamicCast(v); + if(v && !handle) + { + IceInternal::Ex::throwUOE(DepthEstimation::ice_staticId(), v); + } +} +/// \endcond + +namespace Ice +{ +} + +#endif diff --git a/components/depthDSR/src/DepthEstimation.h b/components/depthDSR/src/DepthEstimation.h new file mode 100644 index 00000000..c2c3702f --- /dev/null +++ b/components/depthDSR/src/DepthEstimation.h @@ -0,0 +1,703 @@ +// +// Copyright (c) ZeroC, Inc. All rights reserved. +// +// +// Ice version 3.7.3 +// +// +// +// Generated from file `DepthEstimation.ice' +// +// Warning: do not edit this file. +// +// +// + +#ifndef __DepthEstimation_h__ +#define __DepthEstimation_h__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef ICE_IGNORE_VERSION +# if ICE_INT_VERSION / 100 != 307 +# error Ice version mismatch! +# endif +# if ICE_INT_VERSION % 100 >= 50 +# error Beta header file detected +# endif +# if ICE_INT_VERSION % 100 < 3 +# error Ice patch level mismatch! +# endif +#endif + +#ifdef ICE_CPP11_MAPPING // C++11 mapping + +namespace RoboCompDepthEstimation +{ + +class DepthEstimation; +class DepthEstimationPrx; + +} + +namespace RoboCompDepthEstimation +{ + +using ImgType = ::std::vector<::Ice::Byte>; + +struct TImage +{ + int width; + int height; + int depth; + ::RoboCompDepthEstimation::ImgType image; + + /** + * Obtains a tuple containing all of the struct's data members. + * @return The data members in a tuple. + */ + std::tuple ice_tuple() const + { + return std::tie(width, height, depth, image); + } +}; + +using DepthValue = ::std::vector; + +struct DepthScene +{ + ::RoboCompDepthEstimation::DepthValue value; + int width; + int height; + int depth; + + /** + * Obtains a tuple containing all of the struct's data members. + * @return The data members in a tuple. + */ + std::tuple ice_tuple() const + { + return std::tie(value, width, height, depth); + } +}; + +using Ice::operator<; +using Ice::operator<=; +using Ice::operator>; +using Ice::operator>=; +using Ice::operator==; +using Ice::operator!=; + +} + +namespace RoboCompDepthEstimation +{ + +class DepthEstimation : public virtual ::Ice::Object +{ +public: + + using ProxyType = DepthEstimationPrx; + + /** + * Determines whether this object supports an interface with the given Slice type ID. + * @param id The fully-scoped Slice type ID. + * @param current The Current object for the invocation. + * @return True if this object supports the interface, false, otherwise. + */ + virtual bool ice_isA(::std::string id, const ::Ice::Current& current) const override; + + /** + * Obtains a list of the Slice type IDs representing the interfaces supported by this object. + * @param current The Current object for the invocation. + * @return A list of fully-scoped type IDs. + */ + virtual ::std::vector<::std::string> ice_ids(const ::Ice::Current& current) const override; + + /** + * Obtains a Slice type ID representing the most-derived interface supported by this object. + * @param current The Current object for the invocation. + * @return A fully-scoped type ID. + */ + virtual ::std::string ice_id(const ::Ice::Current& current) const override; + + /** + * Obtains the Slice type ID corresponding to this class. + * @return A fully-scoped type ID. + */ + static const ::std::string& ice_staticId(); + + virtual void getDepthEstimation(TImage depthImg, DepthScene& result, const ::Ice::Current& current) = 0; + /// \cond INTERNAL + bool _iceD_getDepthEstimation(::IceInternal::Incoming&, const ::Ice::Current&); + /// \endcond + + /// \cond INTERNAL + virtual bool _iceDispatch(::IceInternal::Incoming&, const ::Ice::Current&) override; + /// \endcond +}; + +} + +namespace RoboCompDepthEstimation +{ + +class DepthEstimationPrx : public virtual ::Ice::Proxy +{ +public: + + void getDepthEstimation(const TImage& depthImg, DepthScene& result, const ::Ice::Context& context = ::Ice::noExplicitContext) + { + result = _makePromiseOutgoing<::RoboCompDepthEstimation::DepthScene>(true, this, &DepthEstimationPrx::_iceI_getDepthEstimation, depthImg, context).get(); + } + + template class P = ::std::promise> + auto getDepthEstimationAsync(const TImage& depthImg, const ::Ice::Context& context = ::Ice::noExplicitContext) + -> decltype(::std::declval>().get_future()) + { + return _makePromiseOutgoing<::RoboCompDepthEstimation::DepthScene, P>(false, this, &DepthEstimationPrx::_iceI_getDepthEstimation, depthImg, context); + } + + ::std::function + getDepthEstimationAsync(const TImage& depthImg, + ::std::function response, + ::std::function ex = nullptr, + ::std::function sent = nullptr, + const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return _makeLamdaOutgoing<::RoboCompDepthEstimation::DepthScene>(response, ex, sent, this, &RoboCompDepthEstimation::DepthEstimationPrx::_iceI_getDepthEstimation, depthImg, context); + } + + /// \cond INTERNAL + void _iceI_getDepthEstimation(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<::RoboCompDepthEstimation::DepthScene>>&, const TImage&, const ::Ice::Context&); + /// \endcond + + /** + * Obtains the Slice type ID of this interface. + * @return The fully-scoped type ID. + */ + static const ::std::string& ice_staticId(); + +protected: + + /// \cond INTERNAL + DepthEstimationPrx() = default; + friend ::std::shared_ptr IceInternal::createProxy(); + + virtual ::std::shared_ptr<::Ice::ObjectPrx> _newInstance() const override; + /// \endcond +}; + +} + +/// \cond STREAM +namespace Ice +{ + +template<> +struct StreamableTraits<::RoboCompDepthEstimation::TImage> +{ + static const StreamHelperCategory helper = StreamHelperCategoryStruct; + static const int minWireSize = 13; + static const bool fixedLength = false; +}; + +template +struct StreamReader<::RoboCompDepthEstimation::TImage, S> +{ + static void read(S* istr, ::RoboCompDepthEstimation::TImage& v) + { + istr->readAll(v.width, v.height, v.depth, v.image); + } +}; + +template<> +struct StreamableTraits<::RoboCompDepthEstimation::DepthScene> +{ + static const StreamHelperCategory helper = StreamHelperCategoryStruct; + static const int minWireSize = 13; + static const bool fixedLength = false; +}; + +template +struct StreamReader<::RoboCompDepthEstimation::DepthScene, S> +{ + static void read(S* istr, ::RoboCompDepthEstimation::DepthScene& v) + { + istr->readAll(v.value, v.width, v.height, v.depth); + } +}; + +} +/// \endcond + +/// \cond INTERNAL +namespace RoboCompDepthEstimation +{ + +using DepthEstimationPtr = ::std::shared_ptr; +using DepthEstimationPrxPtr = ::std::shared_ptr; + +} +/// \endcond + +#else // C++98 mapping + +namespace IceProxy +{ + +namespace RoboCompDepthEstimation +{ + +class DepthEstimation; +/// \cond INTERNAL +void _readProxy(::Ice::InputStream*, ::IceInternal::ProxyHandle< DepthEstimation>&); +::IceProxy::Ice::Object* upCast(DepthEstimation*); +/// \endcond + +} + +} + +namespace RoboCompDepthEstimation +{ + +class DepthEstimation; +/// \cond INTERNAL +::Ice::Object* upCast(DepthEstimation*); +/// \endcond +typedef ::IceInternal::Handle< DepthEstimation> DepthEstimationPtr; +typedef ::IceInternal::ProxyHandle< ::IceProxy::RoboCompDepthEstimation::DepthEstimation> DepthEstimationPrx; +typedef DepthEstimationPrx DepthEstimationPrxPtr; +/// \cond INTERNAL +void _icePatchObjectPtr(DepthEstimationPtr&, const ::Ice::ObjectPtr&); +/// \endcond + +} + +namespace RoboCompDepthEstimation +{ + +typedef ::std::vector< ::Ice::Byte> ImgType; + +struct TImage +{ + ::Ice::Int width; + ::Ice::Int height; + ::Ice::Int depth; + ::RoboCompDepthEstimation::ImgType image; +}; + +typedef ::std::vector< ::Ice::Float> DepthValue; + +struct DepthScene +{ + ::RoboCompDepthEstimation::DepthValue value; + ::Ice::Int width; + ::Ice::Int height; + ::Ice::Int depth; +}; + +} + +namespace RoboCompDepthEstimation +{ + +/** + * Base class for asynchronous callback wrapper classes used for calls to + * IceProxy::RoboCompDepthEstimation::DepthEstimation::begin_getDepthEstimation. + * Create a wrapper instance by calling ::RoboCompDepthEstimation::newCallback_DepthEstimation_getDepthEstimation. + */ +class Callback_DepthEstimation_getDepthEstimation_Base : public virtual ::IceInternal::CallbackBase { }; +typedef ::IceUtil::Handle< Callback_DepthEstimation_getDepthEstimation_Base> Callback_DepthEstimation_getDepthEstimationPtr; + +} + +namespace IceProxy +{ + +namespace RoboCompDepthEstimation +{ + +class DepthEstimation : public virtual ::Ice::Proxy +{ +public: + + void getDepthEstimation(const ::RoboCompDepthEstimation::TImage& depthImg, ::RoboCompDepthEstimation::DepthScene& result, const ::Ice::Context& context = ::Ice::noExplicitContext) + { + end_getDepthEstimation(result, _iceI_begin_getDepthEstimation(depthImg, context, ::IceInternal::dummyCallback, 0, true)); + } + + ::Ice::AsyncResultPtr begin_getDepthEstimation(const ::RoboCompDepthEstimation::TImage& depthImg, const ::Ice::Context& context = ::Ice::noExplicitContext) + { + return _iceI_begin_getDepthEstimation(depthImg, context, ::IceInternal::dummyCallback, 0); + } + + ::Ice::AsyncResultPtr begin_getDepthEstimation(const ::RoboCompDepthEstimation::TImage& depthImg, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_getDepthEstimation(depthImg, ::Ice::noExplicitContext, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_getDepthEstimation(const ::RoboCompDepthEstimation::TImage& depthImg, const ::Ice::Context& context, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_getDepthEstimation(depthImg, context, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_getDepthEstimation(const ::RoboCompDepthEstimation::TImage& depthImg, const ::RoboCompDepthEstimation::Callback_DepthEstimation_getDepthEstimationPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_getDepthEstimation(depthImg, ::Ice::noExplicitContext, cb, cookie); + } + + ::Ice::AsyncResultPtr begin_getDepthEstimation(const ::RoboCompDepthEstimation::TImage& depthImg, const ::Ice::Context& context, const ::RoboCompDepthEstimation::Callback_DepthEstimation_getDepthEstimationPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0) + { + return _iceI_begin_getDepthEstimation(depthImg, context, cb, cookie); + } + + void end_getDepthEstimation(::RoboCompDepthEstimation::DepthScene& result, const ::Ice::AsyncResultPtr& result_); + /// \cond INTERNAL + + void _iceI_end_getDepthEstimation(::RoboCompDepthEstimation::DepthScene& iceP_result, const ::Ice::AsyncResultPtr&); + /// \endcond + +private: + + ::Ice::AsyncResultPtr _iceI_begin_getDepthEstimation(const ::RoboCompDepthEstimation::TImage&, const ::Ice::Context&, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& cookie = 0, bool sync = false); + +public: + + /** + * Obtains the Slice type ID corresponding to this interface. + * @return A fully-scoped type ID. + */ + static const ::std::string& ice_staticId(); + +protected: + /// \cond INTERNAL + + virtual ::IceProxy::Ice::Object* _newInstance() const; + /// \endcond +}; + +} + +} + +namespace RoboCompDepthEstimation +{ + +class DepthEstimation : public virtual ::Ice::Object +{ +public: + + typedef DepthEstimationPrx ProxyType; + typedef DepthEstimationPtr PointerType; + + virtual ~DepthEstimation(); + + /** + * Determines whether this object supports an interface with the given Slice type ID. + * @param id The fully-scoped Slice type ID. + * @param current The Current object for the invocation. + * @return True if this object supports the interface, false, otherwise. + */ + virtual bool ice_isA(const ::std::string& id, const ::Ice::Current& current = ::Ice::emptyCurrent) const; + + /** + * Obtains a list of the Slice type IDs representing the interfaces supported by this object. + * @param current The Current object for the invocation. + * @return A list of fully-scoped type IDs. + */ + virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& current = ::Ice::emptyCurrent) const; + + /** + * Obtains a Slice type ID representing the most-derived interface supported by this object. + * @param current The Current object for the invocation. + * @return A fully-scoped type ID. + */ + virtual const ::std::string& ice_id(const ::Ice::Current& current = ::Ice::emptyCurrent) const; + + /** + * Obtains the Slice type ID corresponding to this class. + * @return A fully-scoped type ID. + */ + static const ::std::string& ice_staticId(); + + virtual void getDepthEstimation(const TImage& depthImg, DepthScene& result, const ::Ice::Current& current = ::Ice::emptyCurrent) = 0; + /// \cond INTERNAL + bool _iceD_getDepthEstimation(::IceInternal::Incoming&, const ::Ice::Current&); + /// \endcond + + /// \cond INTERNAL + virtual bool _iceDispatch(::IceInternal::Incoming&, const ::Ice::Current&); + /// \endcond + +protected: + + /// \cond STREAM + virtual void _iceWriteImpl(::Ice::OutputStream*) const; + virtual void _iceReadImpl(::Ice::InputStream*); + /// \endcond +}; + +/// \cond INTERNAL +inline bool operator==(const DepthEstimation& lhs, const DepthEstimation& rhs) +{ + return static_cast(lhs) == static_cast(rhs); +} + +inline bool operator<(const DepthEstimation& lhs, const DepthEstimation& rhs) +{ + return static_cast(lhs) < static_cast(rhs); +} +/// \endcond + +} + +/// \cond STREAM +namespace Ice +{ + +template<> +struct StreamableTraits< ::RoboCompDepthEstimation::TImage> +{ + static const StreamHelperCategory helper = StreamHelperCategoryStruct; + static const int minWireSize = 13; + static const bool fixedLength = false; +}; + +template +struct StreamWriter< ::RoboCompDepthEstimation::TImage, S> +{ + static void write(S* ostr, const ::RoboCompDepthEstimation::TImage& v) + { + ostr->write(v.width); + ostr->write(v.height); + ostr->write(v.depth); + ostr->write(v.image); + } +}; + +template +struct StreamReader< ::RoboCompDepthEstimation::TImage, S> +{ + static void read(S* istr, ::RoboCompDepthEstimation::TImage& v) + { + istr->read(v.width); + istr->read(v.height); + istr->read(v.depth); + istr->read(v.image); + } +}; + +template<> +struct StreamableTraits< ::RoboCompDepthEstimation::DepthScene> +{ + static const StreamHelperCategory helper = StreamHelperCategoryStruct; + static const int minWireSize = 13; + static const bool fixedLength = false; +}; + +template +struct StreamWriter< ::RoboCompDepthEstimation::DepthScene, S> +{ + static void write(S* ostr, const ::RoboCompDepthEstimation::DepthScene& v) + { + ostr->write(v.value); + ostr->write(v.width); + ostr->write(v.height); + ostr->write(v.depth); + } +}; + +template +struct StreamReader< ::RoboCompDepthEstimation::DepthScene, S> +{ + static void read(S* istr, ::RoboCompDepthEstimation::DepthScene& v) + { + istr->read(v.value); + istr->read(v.width); + istr->read(v.height); + istr->read(v.depth); + } +}; + +} +/// \endcond + +namespace RoboCompDepthEstimation +{ + +/** + * Type-safe asynchronous callback wrapper class used for calls to + * IceProxy::RoboCompDepthEstimation::DepthEstimation::begin_getDepthEstimation. + * Create a wrapper instance by calling ::RoboCompDepthEstimation::newCallback_DepthEstimation_getDepthEstimation. + */ +template +class CallbackNC_DepthEstimation_getDepthEstimation : public Callback_DepthEstimation_getDepthEstimation_Base, public ::IceInternal::TwowayCallbackNC +{ +public: + + typedef IceUtil::Handle TPtr; + + typedef void (T::*Exception)(const ::Ice::Exception&); + typedef void (T::*Sent)(bool); + typedef void (T::*Response)(const DepthScene&); + + CallbackNC_DepthEstimation_getDepthEstimation(const TPtr& obj, Response cb, Exception excb, Sent sentcb) + : ::IceInternal::TwowayCallbackNC(obj, cb != 0, excb, sentcb), _response(cb) + { + } + + /// \cond INTERNAL + virtual void completed(const ::Ice::AsyncResultPtr& result) const + { + DepthEstimationPrx proxy = DepthEstimationPrx::uncheckedCast(result->getProxy()); + DepthScene iceP_result; + try + { + proxy->end_getDepthEstimation(iceP_result, result); + } + catch(const ::Ice::Exception& ex) + { + ::IceInternal::CallbackNC::exception(result, ex); + return; + } + if(_response) + { + (::IceInternal::CallbackNC::_callback.get()->*_response)(iceP_result); + } + } + /// \endcond + +private: + + Response _response; +}; + +/** + * Creates a callback wrapper instance that delegates to your object. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompDepthEstimation::DepthEstimation::begin_getDepthEstimation. + */ +template Callback_DepthEstimation_getDepthEstimationPtr +newCallback_DepthEstimation_getDepthEstimation(const IceUtil::Handle& instance, void (T::*cb)(const DepthScene&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0) +{ + return new CallbackNC_DepthEstimation_getDepthEstimation(instance, cb, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompDepthEstimation::DepthEstimation::begin_getDepthEstimation. + */ +template Callback_DepthEstimation_getDepthEstimationPtr +newCallback_DepthEstimation_getDepthEstimation(T* instance, void (T::*cb)(const DepthScene&), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0) +{ + return new CallbackNC_DepthEstimation_getDepthEstimation(instance, cb, excb, sentcb); +} + +/** + * Type-safe asynchronous callback wrapper class with cookie support used for calls to + * IceProxy::RoboCompDepthEstimation::DepthEstimation::begin_getDepthEstimation. + * Create a wrapper instance by calling ::RoboCompDepthEstimation::newCallback_DepthEstimation_getDepthEstimation. + */ +template +class Callback_DepthEstimation_getDepthEstimation : public Callback_DepthEstimation_getDepthEstimation_Base, public ::IceInternal::TwowayCallback +{ +public: + + typedef IceUtil::Handle TPtr; + + typedef void (T::*Exception)(const ::Ice::Exception& , const CT&); + typedef void (T::*Sent)(bool , const CT&); + typedef void (T::*Response)(const DepthScene&, const CT&); + + Callback_DepthEstimation_getDepthEstimation(const TPtr& obj, Response cb, Exception excb, Sent sentcb) + : ::IceInternal::TwowayCallback(obj, cb != 0, excb, sentcb), _response(cb) + { + } + + /// \cond INTERNAL + virtual void completed(const ::Ice::AsyncResultPtr& result) const + { + DepthEstimationPrx proxy = DepthEstimationPrx::uncheckedCast(result->getProxy()); + DepthScene iceP_result; + try + { + proxy->end_getDepthEstimation(iceP_result, result); + } + catch(const ::Ice::Exception& ex) + { + ::IceInternal::Callback::exception(result, ex); + return; + } + if(_response) + { + (::IceInternal::Callback::_callback.get()->*_response)(iceP_result, CT::dynamicCast(result->getCookie())); + } + } + /// \endcond + +private: + + Response _response; +}; + +/** + * Creates a callback wrapper instance that delegates to your object. + * Use this overload when your callback methods receive a cookie value. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompDepthEstimation::DepthEstimation::begin_getDepthEstimation. + */ +template Callback_DepthEstimation_getDepthEstimationPtr +newCallback_DepthEstimation_getDepthEstimation(const IceUtil::Handle& instance, void (T::*cb)(const DepthScene&, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0) +{ + return new Callback_DepthEstimation_getDepthEstimation(instance, cb, excb, sentcb); +} + +/** + * Creates a callback wrapper instance that delegates to your object. + * Use this overload when your callback methods receive a cookie value. + * @param instance The callback object. + * @param cb The success method of the callback object. + * @param excb The exception method of the callback object. + * @param sentcb The sent method of the callback object. + * @return An object that can be passed to an asynchronous invocation of IceProxy::RoboCompDepthEstimation::DepthEstimation::begin_getDepthEstimation. + */ +template Callback_DepthEstimation_getDepthEstimationPtr +newCallback_DepthEstimation_getDepthEstimation(T* instance, void (T::*cb)(const DepthScene&, const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0) +{ + return new Callback_DepthEstimation_getDepthEstimation(instance, cb, excb, sentcb); +} + +} + +#endif + +#include +#endif diff --git a/components/depthDSR/src/commonbehaviorI.cpp b/components/depthDSR/src/commonbehaviorI.cpp new file mode 100644 index 00000000..5ec85401 --- /dev/null +++ b/components/depthDSR/src/commonbehaviorI.cpp @@ -0,0 +1,87 @@ +/* + * Copyright (C) 2021 by RoboLab - University of Extremadura + * + * This file is part of RoboComp + * + * RoboComp is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RoboComp is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RoboComp. If not, see . + */ +#include "commonbehaviorI.h" +/** +* \brief Default constructor +*/ +CommonBehaviorI::CommonBehaviorI(GenericMonitor *_monitor) +{ + monitor = _monitor; +} + +// Component functions, implementation +/** +* \brief Return compute period in ms +* @return Compute period in ms +*/ +int CommonBehaviorI::getPeriod( const Ice::Current&) +{ + return monitor->getPeriod(); +} +/** +* \brief Change compute period +* @param per Period in ms +*/ +void CommonBehaviorI::setPeriod(int period, const Ice::Current&) +{ + monitor->setPeriod(period); +} +/** +* \brief Get Component time awake +* @return int Time alive in seconds +*/ +int CommonBehaviorI::timeAwake( const Ice::Current&) +{ + return monitor->timeAwake(); +} +/** +* \brief Kill component +*/ +void CommonBehaviorI::killYourSelf( const Ice::Current&) +{ + monitor->killYourSelf(); +} +/** +* \brief Return components parameters +* @return AttrList Configuration parameters list +*/ +RoboCompCommonBehavior::ParameterList CommonBehaviorI::getParameterList( const Ice::Current&) +{ + return monitor->getParameterList(); +} +/** +* \brief Change configurations parameters to worker +* @param l Configuration parameters list +*/ +void CommonBehaviorI::setParameterList( RoboCompCommonBehavior::ParameterList l, const Ice::Current&) +{ + monitor->setParameterList(l); +} +void CommonBehaviorI::reloadConfig( const Ice::Current&) +{ + //monitor->readConfig(); +} +/** +* \brief Get component execution state +* @return State Component state +*/ +RoboCompCommonBehavior::State CommonBehaviorI::getState(const Ice::Current&) +{ + return monitor->getState(); +} diff --git a/components/depthDSR/src/commonbehaviorI.h b/components/depthDSR/src/commonbehaviorI.h new file mode 100644 index 00000000..36654c8b --- /dev/null +++ b/components/depthDSR/src/commonbehaviorI.h @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2021 by RoboLab - University of Extremadura + * + * This file is part of RoboComp + * + * RoboComp is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RoboComp is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RoboComp. If not, see . + */ +#ifndef COMMONBEHAVIORI_H +#define COMMONBEHAVIORI_H + +// Ice includes +#include +#include + +#include + +#include "genericworker.h" +#include "genericmonitor.h" + +/** + \class CommonBehaviorI

Servant for components common behaviors. This class implements the methods of the public interface of CommonBehavior. +*/ +class CommonBehaviorI : public virtual RoboCompCommonBehavior::CommonBehavior +{ +public: + CommonBehaviorI( GenericMonitor *_monitor ); + + int getPeriod( const Ice::Current & = Ice::Current()); + void setPeriod(int period, const Ice::Current & = Ice::Current()); + int timeAwake( const Ice::Current & = Ice::Current()); + void killYourSelf( const Ice::Current & = Ice::Current()); + RoboCompCommonBehavior::ParameterList getParameterList( const Ice::Current & = Ice::Current()); + void setParameterList( RoboCompCommonBehavior::ParameterList l, const Ice::Current & = Ice::Current()); + void reloadConfig( const Ice::Current& = Ice::Current()); + RoboCompCommonBehavior::State getState(const Ice::Current& = Ice::Current()); + +private: + GenericMonitor *monitor; ///*. + */ + +/** + \brief + @author authorname +*/ + + + +#ifndef CUSTOMWIDGET_H +#define CUSTOMWIDGET_H + +#if Qt5_FOUND + #include +#else + #include +#endif + +#include + + +class Custom_widget : public QWidget, public Ui_local_guiDlg +{ +Q_OBJECT +public: + Custom_widget() : Ui_local_guiDlg() + { + setupUi(this); + } + ~Custom_widget() + { + + } + + + +}; +#endif diff --git a/components/depthDSR/src/genericmonitor.cpp b/components/depthDSR/src/genericmonitor.cpp new file mode 100644 index 00000000..0dd53719 --- /dev/null +++ b/components/depthDSR/src/genericmonitor.cpp @@ -0,0 +1,217 @@ +/* + * Copyright (C) 2010 by RoboLab - University of Extremadura + * + * This file is part of RoboComp + * + * RoboComp is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RoboComp is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RoboComp. If not, see . + */ +#include "genericmonitor.h" +/** +* \brief Default constructor +*/ +GenericMonitor::GenericMonitor(GenericWorker *_worker,Ice::CommunicatorPtr _communicator) +{ + worker = _worker; + this->communicator = _communicator; + period = 100; + state = RoboCompCommonBehavior::State::Starting; + QObject::connect(this, SIGNAL(initializeWorker(int)), worker, SLOT(initialize(int))); +} +/** +* \brief Default destructor +*/ +GenericMonitor::~GenericMonitor() +{ + +} + +/** +* \brief Get component execution state +* @return State Component state +*/ +RoboCompCommonBehavior::State GenericMonitor::getState() +{ + return state; +} + +/** +* \brief Get worker period +* @return int Worker period in ms +*/ +int GenericMonitor::getPeriod() +{ + return period; +} +/** +* \brief Change worker period +* @param per Period in ms +*/ +void GenericMonitor::setPeriod(int _period) +{ + period =_period; + worker->setPeriod(_period); +} +/** +* \brief Kill component +*/ +void GenericMonitor::killYourSelf() +{ + rDebug("Killing myself"); + worker->killYourSelf(); + emit kill(); + +} +/** +* \brief Get Component time awake +* @return int Time alive in seconds +*/ +int GenericMonitor::timeAwake() +{ + return initialTime.secsTo(QTime::currentTime()); +} +/** +* \brief Return components parameters +* @return AttrList Configuration parameters list +*/ +RoboCompCommonBehavior::ParameterList GenericMonitor::getParameterList() +{ + return config_params; +} +/** +* \brief Change configurations parameters to worker +* @param l Configuration parameters list +*/ +void GenericMonitor::setParameterList(RoboCompCommonBehavior::ParameterList l) +{ + rInfo("Changing configuration params"); + sendParamsToWorker(l); +} + +/** +* \brief Read parameters from pconf file. This method will be empty if there is not any pconf file available. +* @param l Configuration parameters list +*/ +void GenericMonitor::readPConfParams(RoboCompCommonBehavior::ParameterList ¶ms) +{ + //nothing to do +} + +//Ice method to read a variable from file +//name, parameter config value +//return value of parameter config +//default value for the parameter +//return false if the parameter does not exist. Throw exception in other case. +//if you need one parameter mandatory you can pass empty string in default_value +bool GenericMonitor::configGetString(const std::string prefix, const std::string name, std::string &value, const std::string default_value, QStringList *list) +{ + return GenericMonitor::configGetString(communicator, prefix, name, value, default_value, list); +} + +bool GenericMonitor::configGetString(Ice::CommunicatorPtr communicator, const std::string prefix, const std::string name, std::string &value, const std::string default_value, QStringList *list) +{ + std::string compound = name; + if (prefix.size() > 0) compound = prefix+std::string(".")+name; + + value = communicator->getProperties()->getProperty(compound); + + if ( value.length() == 0) + { + if (default_value.length() != 0) + { + value = default_value; + return false; + } + else if (default_value.length() == 0) + { + QString error = QString("Error: can't get configuration string for variable without default value: ")+QString::fromStdString(compound); + qDebug() << error; + throw error; + } + } + + if (list != NULL) + { + if (list->contains(QString::fromStdString(value)) == false) + { + qFatal("Reading config file: %s is not a valid string", compound.c_str()); + rError("Reading config file:"+compound+" is not a valid string"); + } + QString error = QString("not valid configuration value"); + qDebug() << error; + throw error; + } + + auto parts = QString::fromStdString(value).split("@"); + QString variableName=QString::fromStdString(compound); + + + if (parts.size() > 1) + { + if (parts[0].size() > 0) + { + variableName = parts[0]; + } + parts.removeFirst(); + value = std::string("@") + parts.join("@").toStdString(); + } + +// printf("variableName = %s\n", variableName.toStdString().c_str()); +// printf("value = %s\n", value.c_str()); + + + if (value[0]=='@') + { + QString qstr = QString::fromStdString(value).remove(0,1); + QFile ff(qstr); + if (not ff.exists()) + { + qFatal("Not such file: %s\n", qstr.toStdString().c_str()); + } + if (!ff.open(QIODevice::ReadOnly | QIODevice::Text)) + { + qFatal("Can't open file: %s\n", qstr.toStdString().c_str()); + } + + bool found = false; + while (!ff.atEnd()) + { + QString content = QString(ff.readLine()).simplified(); +// printf("line: %s\n", content.toStdString().c_str()); + + if (content.startsWith(variableName)) + { +// printf("swn %s\n", content.toStdString().c_str()); + content = content.right(content.size()-variableName.size()).simplified(); +// printf("swn %s\n", content.toStdString().c_str()); + if (content.startsWith("=")) + { + content = content.remove(0,1).simplified(); + value = content.toStdString(); + found = true; + } + else + { + printf("warning (=) %s\n", content.toStdString().c_str()); + } + + } + } + if (not found) + { + } + } + std::cout << compound << " " << value << std::endl; + return true; +} + diff --git a/components/depthDSR/src/genericmonitor.h b/components/depthDSR/src/genericmonitor.h new file mode 100644 index 00000000..20631d88 --- /dev/null +++ b/components/depthDSR/src/genericmonitor.h @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2010 by RoboLab - University of Extremadura + * + * This file is part of RoboComp + * + * RoboComp is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RoboComp is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RoboComp. If not, see . + */ +#ifndef GENERICMONITOR_H +#define GENERICMONITOR_H + +#include +#include +#include "genericworker.h" +#include "config.h" +#include +#include + +/** + \brief + @author authorname +*/ +class GenericMonitor : public QThread +{ +Q_OBJECT + +public: + GenericMonitor(GenericWorker *_worker, Ice::CommunicatorPtr _communicator); + virtual ~GenericMonitor(); + + + //CommonBehavior + int getPeriod(); + void setPeriod(int period); + void killYourSelf(); + int timeAwake(); + RoboCompCommonBehavior::ParameterList getParameterList(); + void setParameterList(RoboCompCommonBehavior::ParameterList l); + RoboCompCommonBehavior::State getState(); + + void readPConfParams(RoboCompCommonBehavior::ParameterList ¶ms); + virtual void readConfig(RoboCompCommonBehavior::ParameterList ¶ms ) = 0; + virtual void run() = 0; + virtual void initialize() = 0; + +protected: + int period; + GenericWorker *worker; + Ice::CommunicatorPtr communicator; + QTime initialTime; + RoboCompCommonBehavior::ParameterList config_params; + RoboCompCommonBehavior::State state; + + virtual bool sendParamsToWorker(RoboCompCommonBehavior::ParameterList params) = 0; + virtual bool checkParams(RoboCompCommonBehavior::ParameterList l) = 0; + + bool configGetString(const std::string prefix, const std::string name, std::string &value, const std::string default_value, QStringList *list = NULL); +public: + static bool configGetString(Ice::CommunicatorPtr communicator, const std::string prefix, const std::string name, std::string &value, const std::string default_value, QStringList *list=NULL); + +signals: + void kill(); + void initializeWorker(int); +}; + +#endif // GENERICMONITOR_H diff --git a/components/depthDSR/src/genericworker.cpp b/components/depthDSR/src/genericworker.cpp new file mode 100644 index 00000000..b32b6f73 --- /dev/null +++ b/components/depthDSR/src/genericworker.cpp @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2021 by YOUR NAME HERE + * + * This file is part of RoboComp + * + * RoboComp is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RoboComp is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RoboComp. If not, see . + */ +#include "genericworker.h" +/** +* \brief Default constructor +*/ +GenericWorker::GenericWorker(TuplePrx tprx) : Ui_guiDlg() +{ + + depthestimation_proxy = std::get<0>(tprx); + + mutex = new QMutex(QMutex::Recursive); + + + #ifdef USE_QTGUI + setupUi(this); + show(); + #endif + Period = BASIC_PERIOD; + connect(&timer, SIGNAL(timeout()), this, SLOT(compute())); + +} + +/** +* \brief Default destructor +*/ +GenericWorker::~GenericWorker() +{ + +} +void GenericWorker::killYourSelf() +{ + rDebug("Killing myself"); + emit kill(); +} +/** +* \brief Change compute period +* @param per Period in ms +*/ +void GenericWorker::setPeriod(int p) +{ + rDebug("Period changed"+QString::number(p)); + Period = p; + timer.start(Period); +} diff --git a/components/depthDSR/src/genericworker.h b/components/depthDSR/src/genericworker.h new file mode 100644 index 00000000..5297f9d4 --- /dev/null +++ b/components/depthDSR/src/genericworker.h @@ -0,0 +1,78 @@ +/* + * Copyright (C) 2021 by YOUR NAME HERE + * + * This file is part of RoboComp + * + * RoboComp is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RoboComp is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RoboComp. If not, see . + */ +#ifndef GENERICWORKER_H +#define GENERICWORKER_H + +#include "config.h" +#include +#include + +#if Qt5_FOUND + #include +#else + #include +#endif +#include +#include + +#include +#include + + + +#define CHECK_PERIOD 5000 +#define BASIC_PERIOD 100 + + +using TuplePrx = std::tuple; +//using TuplePrx = std::tuple<>; + +class GenericWorker : public QMainWindow, public Ui_guiDlg +{ +Q_OBJECT +public: + GenericWorker(TuplePrx tprx); + virtual ~GenericWorker(); + virtual void killYourSelf(); + virtual void setPeriod(int p); + + virtual bool setParams(RoboCompCommonBehavior::ParameterList params) = 0; + QMutex *mutex; + + + RoboCompDepthEstimation::DepthEstimationPrxPtr depthestimation_proxy; + + +protected: + + QTimer timer; + int Period; + +private: + + +public slots: + virtual void compute() = 0; + virtual void initialize(int period) = 0; + +signals: + void kill(); +}; + +#endif diff --git a/components/depthDSR/src/localUI.ui b/components/depthDSR/src/localUI.ui new file mode 100644 index 00000000..9d9abdf3 --- /dev/null +++ b/components/depthDSR/src/localUI.ui @@ -0,0 +1,63 @@ + + + local_guiDlg + + + + 0 + 0 + 1046 + 627 + + + + + 640 + 480 + + + + Form + + + + + + + + + 0 + 0 + + + + + 640 + 480 + + + + Image + + + + + + + + 640 + 480 + + + + TextLabel + + + + + + + + + + diff --git a/components/depthDSR/src/main.cpp b/components/depthDSR/src/main.cpp new file mode 100644 index 00000000..c13ea503 --- /dev/null +++ b/components/depthDSR/src/main.cpp @@ -0,0 +1,283 @@ +/* + * Copyright (C) 2021 by YOUR NAME HERE + * + * This file is part of RoboComp + * + * RoboComp is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RoboComp is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RoboComp. If not, see . + */ + + +/** \mainpage RoboComp::graspDSR + * + * \section intro_sec Introduction + * + * The graspDSR component... + * + * \section interface_sec Interface + * + * interface... + * + * \section install_sec Installation + * + * \subsection install1_ssec Software depencences + * ... + * + * \subsection install2_ssec Compile and install + * cd graspDSR + *
+ * cmake . && make + *
+ * To install: + *
+ * sudo make install + * + * \section guide_sec User guide + * + * \subsection config_ssec Configuration file + * + *

+ * The configuration file etc/config... + *

+ * + * \subsection execution_ssec Execution + * + * Just: "${PATH_TO_BINARY}/graspDSR --Ice.Config=${PATH_TO_CONFIG_FILE}" + * + * \subsection running_ssec Once running + * + * ... + * + */ +#include + +// QT includes +#include +#include + +// ICE includes +#include +#include +#include + +#include +#include +#include + +#include "config.h" +#include "genericmonitor.h" +#include "genericworker.h" +#include "specificworker.h" +#include "specificmonitor.h" +#include "commonbehaviorI.h" + + +#include + + + +class depthDSR : public RoboComp::Application +{ +public: + depthDSR (QString prfx, bool startup_check) { prefix = prfx.toStdString(); this->startup_check_flag=startup_check; } +private: + void initialize(); + std::string prefix; + TuplePrx tprx; + bool startup_check_flag = false; + +public: + virtual int run(int, char*[]); +}; + +void ::depthDSR::initialize() +{ + // Config file properties read example + // configGetString( PROPERTY_NAME_1, property1_holder, PROPERTY_1_DEFAULT_VALUE ); + // configGetInt( PROPERTY_NAME_2, property1_holder, PROPERTY_2_DEFAULT_VALUE ); +} + +int ::depthDSR::run(int argc, char* argv[]) +{ +#ifdef USE_QTGUI + QApplication a(argc, argv); // GUI application +#else + QCoreApplication a(argc, argv); // NON-GUI application +#endif + + + sigset_t sigs; + sigemptyset(&sigs); + sigaddset(&sigs, SIGHUP); + sigaddset(&sigs, SIGINT); + sigaddset(&sigs, SIGTERM); + sigprocmask(SIG_UNBLOCK, &sigs, 0); + + UnixSignalWatcher sigwatch; + sigwatch.watchForSignal(SIGINT); + sigwatch.watchForSignal(SIGTERM); + QObject::connect(&sigwatch, SIGNAL(unixSignal(int)), &a, SLOT(quit())); + + int status=EXIT_SUCCESS; + + RoboCompDepthEstimation::DepthEstimationPrxPtr depthestimation_proxy; + + string proxy, tmp; + initialize(); + + try + { + if (not GenericMonitor::configGetString(communicator(), prefix, "DepthEstimationProxy", proxy, "")) + { + cout << "[" << PROGRAM_NAME << "]: Can't read configuration for proxy DepthEstimationProxy\n"; + } + depthestimation_proxy = Ice::uncheckedCast( communicator()->stringToProxy( proxy ) ); + } + catch(const Ice::Exception& ex) + { + cout << "[" << PROGRAM_NAME << "]: Exception creating proxy DepthEstimation: " << ex; + return EXIT_FAILURE; + } + rInfo("DepthEstimationProxy initialized Ok!"); + + + tprx = std::make_tuple(depthestimation_proxy); + //tprx = std::tuple<>(); + SpecificWorker *worker = new SpecificWorker(tprx, startup_check_flag); + //Monitor thread + SpecificMonitor *monitor = new SpecificMonitor(worker,communicator()); + QObject::connect(monitor, SIGNAL(kill()), &a, SLOT(quit())); + QObject::connect(worker, SIGNAL(kill()), &a, SLOT(quit())); + monitor->start(); + + if ( !monitor->isRunning() ) + return status; + + while (!monitor->ready) + { + usleep(10000); + } + + try + { + try { + // Server adapter creation and publication + if (not GenericMonitor::configGetString(communicator(), prefix, "CommonBehavior.Endpoints", tmp, "")) { + cout << "[" << PROGRAM_NAME << "]: Can't read configuration for proxy CommonBehavior\n"; + } + Ice::ObjectAdapterPtr adapterCommonBehavior = communicator()->createObjectAdapterWithEndpoints("commonbehavior", tmp); + auto commonbehaviorI = std::make_shared(monitor); + adapterCommonBehavior->add(commonbehaviorI, Ice::stringToIdentity("commonbehavior")); + adapterCommonBehavior->activate(); + } + catch(const Ice::Exception& ex) + { + status = EXIT_FAILURE; + + cout << "[" << PROGRAM_NAME << "]: Exception raised while creating CommonBehavior adapter: " << endl; + cout << ex; + + } + + + + // Server adapter creation and publication + cout << SERVER_FULL_NAME " started" << endl; + + // User defined QtGui elements ( main window, dialogs, etc ) + + #ifdef USE_QTGUI + //ignoreInterrupt(); // Uncomment if you want the component to ignore console SIGINT signal (ctrl+c). + a.setQuitOnLastWindowClosed( true ); + #endif + // Run QT Application Event Loop + a.exec(); + + + status = EXIT_SUCCESS; + } + catch(const Ice::Exception& ex) + { + status = EXIT_FAILURE; + + cout << "[" << PROGRAM_NAME << "]: Exception raised on main thread: " << endl; + cout << ex; + + } + #ifdef USE_QTGUI + a.quit(); + #endif + + status = EXIT_SUCCESS; + monitor->terminate(); + monitor->wait(); + delete worker; + delete monitor; + return status; +} + +int main(int argc, char* argv[]) +{ + string arg; + + // Set config file + QString configFile("etc/config"); + bool startup_check_flag = false; + QString prefix(""); + if (argc > 1) + { + QString initIC = QString("--Ice.Config="); + for (int i = 1; i < argc; ++i) + { + arg = argv[i]; + if (arg.find(initIC.toStdString(), 0) == 0) + { + configFile = QString::fromStdString(arg).remove(0, initIC.size()); + } + else + { + configFile = QString::fromStdString(argv[1]); + } + } + + // Search in argument list for --prefix= argument (if exist) + QString prfx = QString("--prefix="); + for (int i = 2; i < argc; ++i) + { + arg = argv[i]; + if (arg.find(prfx.toStdString(), 0) == 0) + { + prefix = QString::fromStdString(arg).remove(0, prfx.size()); + if (prefix.size()>0) + prefix += QString("."); + printf("Configuration prefix: <%s>\n", prefix.toStdString().c_str()); + } + } + + // Search in argument list for --test argument (if exist) + QString startup = QString("--startup-check"); + for (int i = 0; i < argc; ++i) + { + arg = argv[i]; + if (arg.find(startup.toStdString(), 0) == 0) + { + startup_check_flag = true; + cout << "Startup check = True"<< endl; + } + } + + } + ::depthDSR app(prefix, startup_check_flag); + + return app.main(argc, argv, configFile.toLocal8Bit().data()); +} diff --git a/components/depthDSR/src/mainUI.ui b/components/depthDSR/src/mainUI.ui new file mode 100644 index 00000000..67af8d82 --- /dev/null +++ b/components/depthDSR/src/mainUI.ui @@ -0,0 +1,78 @@ + + + guiDlg + + + + 0 + 0 + 1800 + 662 + + + + depthDSR + + + + + + + true + + + + 700 + 600 + + + + Qt::Horizontal + + + + + 0 + 0 + + + + Qt::Vertical + + + + + + + + + + 0 + 0 + 1800 + 22 + + + + + Simulation + + + + + + + + + Save + + + + + Start/Stop + + + + + + diff --git a/components/depthDSR/src/specificmonitor.cpp b/components/depthDSR/src/specificmonitor.cpp new file mode 100644 index 00000000..e7ab1d95 --- /dev/null +++ b/components/depthDSR/src/specificmonitor.cpp @@ -0,0 +1,115 @@ +/* + * Copyright (C) 2010 by RoboLab - University of Extremadura + * + * This file is part of RoboComp + * + * RoboComp is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RoboComp is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RoboComp. If not, see . + */ +#include "specificmonitor.h" +/** +* \brief Default constructor +*/ +SpecificMonitor::SpecificMonitor(GenericWorker *_worker,Ice::CommunicatorPtr _communicator):GenericMonitor(_worker, _communicator) +{ + ready = false; +} +/** +* \brief Default destructor +*/ +SpecificMonitor::~SpecificMonitor() +{ + std::cout << "Destroying SpecificMonitor" << std::endl; +} + +void SpecificMonitor::run() +{ + initialize(); + ready = true; + forever + { + //rDebug("specific monitor run"); + this->sleep(period); + } +} + +/** + * \brief Reads components parameters and checks set integrity before signaling the Worker thread to start running + * (1) Ice parameters + * (2) Local component parameters read at start + * + */ +void SpecificMonitor::initialize() +{ + rInfo("Starting monitor ..."); + initialTime=QTime::currentTime(); + RoboCompCommonBehavior::ParameterList params; + readPConfParams(params); + readConfig(params); + if(!sendParamsToWorker(params)) + { + rError("Error reading config parameters. Exiting"); + killYourSelf(); + } + state = RoboCompCommonBehavior::State::Running; + emit initializeWorker(period); +} + +bool SpecificMonitor::sendParamsToWorker(RoboCompCommonBehavior::ParameterList params) +{ + if(checkParams(params)) + { + //Set params to worker + if(worker->setParams(params)) + return true; + } + else + { + rError("Incorrect parameters"); + } + return false; + +} + +///Local Component parameters read at start +///Reading parameters from config file or passed in command line, with Ice machinery +///We need to supply a list of accepted values to each call +void SpecificMonitor::readConfig(RoboCompCommonBehavior::ParameterList ¶ms ) +{ +// RoboCompCommonBehavior::Parameter aux; +// aux.editable = true; +// configGetString( "","InnerModelPath", aux.value, "nofile"); +// params["InnerModelPath"] = aux; + RoboCompCommonBehavior::Parameter aux; + configGetString( "","agent_name", aux.value,""); + params["agent_name"] = aux; + configGetString( "","agent_id", aux.value,"false"); + params["agent_id"] = aux; + + configGetString( "","tree_view", aux.value, "none"); + params["tree_view"] = aux; + configGetString( "","graph_view", aux.value, "none"); + params["graph_view"] = aux; + configGetString( "","2d_view", aux.value, "none"); + params["2d_view"] = aux; + configGetString( "","3d_view", aux.value, "none"); + params["3d_view"] = aux; +} + +//Check parameters and transform them to worker structure +bool SpecificMonitor::checkParams(RoboCompCommonBehavior::ParameterList l) +{ + bool correct = true; + return correct; +} + diff --git a/components/depthDSR/src/specificmonitor.h b/components/depthDSR/src/specificmonitor.h new file mode 100644 index 00000000..b4a781fe --- /dev/null +++ b/components/depthDSR/src/specificmonitor.h @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2010 by RoboLab - University of Extremadura + * + * This file is part of RoboComp + * + * RoboComp is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RoboComp is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RoboComp. If not, see . + */ +#ifndef SPECIFICMONITOR_H +#define SPECIFICMONITOR_H + +#include "genericmonitor.h" + +/** + \brief + @author authorname +*/ +class SpecificMonitor : public GenericMonitor +{ + Q_OBJECT + + public: + SpecificMonitor(GenericWorker *_worker, Ice::CommunicatorPtr _communicator); + ~SpecificMonitor(); + + void readConfig(RoboCompCommonBehavior::ParameterList ¶ms ); + void run(); + void initialize(); + + bool sendParamsToWorker(RoboCompCommonBehavior::ParameterList params); + bool checkParams(RoboCompCommonBehavior::ParameterList l); + + bool ready; +}; + +#endif // GENERICMONITOR_H diff --git a/components/depthDSR/src/specificworker.cpp b/components/depthDSR/src/specificworker.cpp new file mode 100644 index 00000000..f1f44153 --- /dev/null +++ b/components/depthDSR/src/specificworker.cpp @@ -0,0 +1,207 @@ +/* + * Copyright (C) 2020 by YOUR NAME HERE + * + * This file is part of RoboComp + * + * RoboComp is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RoboComp is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RoboComp. If not, see . + */ +#include "specificworker.h" + +/** +* \brief Default constructor +*/ +SpecificWorker::SpecificWorker(TuplePrx tprx, bool startup_check) : GenericWorker(tprx) +{ + this->startup_check_flag = startup_check; + QLoggingCategory::setFilterRules("*.debug=false\n"); +} + +/** +* \brief Default destructor +*/ +SpecificWorker::~SpecificWorker() +{ + std::cout << "Destroying SpecificWorker" << std::endl; + G->write_to_json_file("./"+agent_name+".json"); + G.reset(); +} + +bool SpecificWorker::setParams(RoboCompCommonBehavior::ParameterList params) +{ + agent_name = params["agent_name"].value; + agent_id = stoi(params["agent_id"].value); + tree_view = params["tree_view"].value == "true"; + graph_view = params["graph_view"].value == "true"; + qscene_2d_view = params["2d_view"].value == "true"; + osg_3d_view = params["3d_view"].value == "true"; + + return true; +} + +void SpecificWorker::initialize(int period) +{ + std::cout << "Initialize worker" << std::endl; + this->Period = period; + if(this->startup_check_flag) + { + this->startup_check(); + } + else + { + timer.start(Period); + // create graph + G = std::make_shared(0, agent_name, agent_id); // Init nodes + std::cout<< __FUNCTION__ << "Graph loaded" << std::endl; + + // Graph viewer + using opts = DSR::DSRViewer::view; + int current_opts = 0; + opts main = opts::none; + if(tree_view) + { + current_opts = current_opts | opts::tree; + } + if(graph_view) + { + current_opts = current_opts | opts::graph; + main = opts::graph; + } + if(qscene_2d_view) + { + current_opts = current_opts | opts::scene; + } + if(osg_3d_view) + { + current_opts = current_opts | opts::osg; + } + graph_viewer = std::make_unique(this, G, current_opts, main); + graph_viewer->add_custom_widget_to_dock("DepthMap", &custom_widget); // custom_widget + + setWindowTitle(QString::fromStdString(agent_name + "-") + QString::number(agent_id)); + + // get inner eigen model sub-API + inner_eigen_api = G->get_inner_eigen_api(); + + // get RT sub-API + rt_api = G->get_rt_api(); + + // get camera sub-API + auto cam = G->get_node(viriato_head_camera_name); + if (cam.has_value()) + { + cam_api = G->get_camera_api(cam.value()); + } + else + { + qFatal("Terminate in Initialize. No node rgbd found"); + } + + + this->Period = period; + timer.start(Period); + } +} + +void SpecificWorker::compute() +{ + // read RGBD image from graph + RoboCompCameraRGBDSimple::TImage rgb = get_rgb_from_G(); + + // cast RGB image to OpenCV Mat + cv::Mat img = cv::Mat(rgb.height, rgb.width, CV_8UC3, &rgb.image[0]); + + RoboCompDepthEstimation::DepthScene result; + try + { + result = this->depthestimation_proxy->getDepthEstimation(rgb); + } + catch (const Ice::Exception &e) + { + std::cout << e << " No DepthEstimation component found" << std::endl; + } + + // display RGB image on QT widget + show_image(img,result); + + // inject estimated depth into graph + // std::cout << "Inject DNN-estimated depth into G" << std::endl; + // this->inject_estimated(); + // } +} + +///////////////////////////////////////////////////////////////// +// G read utilities +///////////////////////////////////////////////////////////////// + +RoboCompCameraRGBDSimple::TImage SpecificWorker::get_rgb_from_G() +{ + // get head camera node + auto cam = G->get_node(viriato_head_camera_name); + if (cam.has_value()) + { + // read RGB data attributes from graph + RoboCompCameraRGBDSimple::TImage rgb; + try + { + auto rgb_data = cam_api->get_rgb_image(); + const auto width = G->get_attrib_by_name(cam.value()); + const auto height = G->get_attrib_by_name(cam.value()); + const auto depth = G->get_attrib_by_name(cam.value()); + const auto cam_id = G->get_attrib_by_name(cam.value()); + const auto focalx = G->get_attrib_by_name(cam.value()); + const auto focaly = G->get_attrib_by_name(cam.value()); + const auto alivetime = G->get_attrib_by_name(cam.value()); + + // assign attributes to RoboCompCameraRGBDSimple::TImage + rgb.image = rgb_data.value(); + rgb.width = width.value(); + rgb.height = height.value(); + rgb.depth = depth.value(); + rgb.cameraID = cam_id.value(); + rgb.focalx = focalx.value(); + rgb.focaly = focaly.value(); + rgb.alivetime = alivetime.value(); + + return rgb; + } + catch (const std::exception &e) + { + std::cout << __FILE__ << __FUNCTION__ << __LINE__ << " " << e.what() << std::endl; + std::terminate(); + } + } + else + { + qFatal("Terminate in Compute. No node rgbd found"); + } +} + +void SpecificWorker::show_image(cv::Mat &img,RoboCompDepthEstimation::DepthScene result) +{ + // create QImage and display it on the widget + cv::Mat depthmap = cv::Mat(result.height, result.width, CV_8UC3, &result.image[0]); + auto pix1 = QPixmap::fromImage(QImage(img.data, img.cols, img.rows, QImage::Format_RGB888)); + auto pix2 = QPixmap::fromImage(QImage(depthmap.data, depthmap.cols, depthmap.rows, QImage::Format_RGB888)); + custom_widget.rgb_image->setPixmap(pix1); + custom_widget.depth_image->setPixmap(pix2); +} + + +int SpecificWorker::startup_check() +{ + std::cout << "Startup check" << std::endl; + QTimer::singleShot(200, qApp, SLOT(quit())); + return 0; +} + diff --git a/components/depthDSR/src/specificworker.h b/components/depthDSR/src/specificworker.h new file mode 100644 index 00000000..e5cd7e77 --- /dev/null +++ b/components/depthDSR/src/specificworker.h @@ -0,0 +1,92 @@ +/* + * Copyright (C) 2020 by YOUR NAME HERE + * + * This file is part of RoboComp + * + * RoboComp is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RoboComp is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RoboComp. If not, see . + */ + +/** + \brief + @author authorname +*/ + +#ifndef SPECIFICWORKER_H +#define SPECIFICWORKER_H + +#include +#include +#include "dsr/api/dsr_api.h" +#include "dsr/gui/dsr_gui.h" +#include +#include +#include +#include +#include +#include +#include "../../../etc/viriato_graph_names.h" + +class SpecificWorker : public GenericWorker +{ +Q_OBJECT +public: + SpecificWorker(TuplePrx tprx, bool startup_check); + ~SpecificWorker(); + bool setParams(RoboCompCommonBehavior::ParameterList params); + +public slots: + void compute(); + int startup_check(); + void initialize(int period); + + +private: + // DSR graph + std::shared_ptr G; + std::shared_ptr inner_eigen_api; + std::unique_ptr rt_api; + std::unique_ptr cam_api; + + // DSR params + std::string agent_name; + int agent_id; + bool tree_view; + bool graph_view; + bool qscene_2d_view; + bool osg_3d_view; + + // DSR graph viewer + std::unique_ptr graph_viewer; + QHBoxLayout mainLayout; + QWidget window; + bool startup_check_flag; + + // Local widget + Custom_widget custom_widget; + + + + // G read utilities + RoboCompCameraRGBDSimple::TImage get_rgb_from_G(); + + // G injection utilities + //void inject_estimated(); + + + // Display utilities + void show_image(cv::Mat &img, RoboCompDepthEstimation::DepthScene result); + +}; + +#endif diff --git a/components/depthDSR/src/ui_mainUI.h b/components/depthDSR/src/ui_mainUI.h new file mode 100644 index 00000000..e24f8179 --- /dev/null +++ b/components/depthDSR/src/ui_mainUI.h @@ -0,0 +1,103 @@ +/******************************************************************************** +** Form generated from reading UI file 'mainUI.ui' +** +** Created by: Qt User Interface Compiler version 5.12.8 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef UI_MAINUI_H +#define UI_MAINUI_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Ui_guiDlg +{ +public: + QAction *actionSave; + QAction *actionStart_Stop; + QWidget *centralwidget; + QVBoxLayout *verticalLayout; + QSplitter *splitter_1; + QSplitter *splitter_2; + QMenuBar *menubar; + QMenu *menuSimulation; + QStatusBar *statusbar; + + void setupUi(QMainWindow *guiDlg) + { + if (guiDlg->objectName().isEmpty()) + guiDlg->setObjectName(QString::fromUtf8("guiDlg")); + guiDlg->resize(1800, 662); + actionSave = new QAction(guiDlg); + actionSave->setObjectName(QString::fromUtf8("actionSave")); + actionStart_Stop = new QAction(guiDlg); + actionStart_Stop->setObjectName(QString::fromUtf8("actionStart_Stop")); + centralwidget = new QWidget(guiDlg); + centralwidget->setObjectName(QString::fromUtf8("centralwidget")); + verticalLayout = new QVBoxLayout(centralwidget); + verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + splitter_1 = new QSplitter(centralwidget); + splitter_1->setObjectName(QString::fromUtf8("splitter_1")); + splitter_1->setEnabled(true); + splitter_1->setMinimumSize(QSize(700, 600)); + splitter_1->setOrientation(Qt::Horizontal); + splitter_2 = new QSplitter(splitter_1); + splitter_2->setObjectName(QString::fromUtf8("splitter_2")); + QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Expanding); + sizePolicy.setHorizontalStretch(0); + sizePolicy.setVerticalStretch(0); + sizePolicy.setHeightForWidth(splitter_2->sizePolicy().hasHeightForWidth()); + splitter_2->setSizePolicy(sizePolicy); + splitter_2->setOrientation(Qt::Vertical); + splitter_1->addWidget(splitter_2); + + verticalLayout->addWidget(splitter_1); + + guiDlg->setCentralWidget(centralwidget); + menubar = new QMenuBar(guiDlg); + menubar->setObjectName(QString::fromUtf8("menubar")); + menubar->setGeometry(QRect(0, 0, 1800, 22)); + menuSimulation = new QMenu(menubar); + menuSimulation->setObjectName(QString::fromUtf8("menuSimulation")); + guiDlg->setMenuBar(menubar); + statusbar = new QStatusBar(guiDlg); + statusbar->setObjectName(QString::fromUtf8("statusbar")); + guiDlg->setStatusBar(statusbar); + + menubar->addAction(menuSimulation->menuAction()); + menuSimulation->addAction(actionStart_Stop); + + retranslateUi(guiDlg); + + QMetaObject::connectSlotsByName(guiDlg); + } // setupUi + + void retranslateUi(QMainWindow *guiDlg) + { + guiDlg->setWindowTitle(QApplication::translate("guiDlg", "depthDSR", nullptr)); + actionSave->setText(QApplication::translate("guiDlg", "Save", nullptr)); + actionStart_Stop->setText(QApplication::translate("guiDlg", "Start/Stop", nullptr)); + menuSimulation->setTitle(QApplication::translate("guiDlg", "Simulation", nullptr)); + } // retranslateUi + +}; + +namespace Ui { + class guiDlg: public Ui_guiDlg {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // UI_MAINUI_H From 16d1199598805f936db763aef525648b61f77e75 Mon Sep 17 00:00:00 2001 From: Vaibhaw Khemka <46538042+vaibhawkhemka@users.noreply.github.com> Date: Sat, 14 Aug 2021 13:41:49 +0530 Subject: [PATCH 08/13] Delete text.txt --- components/depthDSR/etc/text.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 components/depthDSR/etc/text.txt diff --git a/components/depthDSR/etc/text.txt b/components/depthDSR/etc/text.txt deleted file mode 100644 index 8e27be7d..00000000 --- a/components/depthDSR/etc/text.txt +++ /dev/null @@ -1 +0,0 @@ -text From fd17f802ba047be79196f30b3b0f12f31ca748ac Mon Sep 17 00:00:00 2001 From: Vaibhaw Khemka <46538042+vaibhawkhemka@users.noreply.github.com> Date: Sat, 14 Aug 2021 13:42:02 +0530 Subject: [PATCH 09/13] Delete text.txt --- components/depthDSR/src/text.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 components/depthDSR/src/text.txt diff --git a/components/depthDSR/src/text.txt b/components/depthDSR/src/text.txt deleted file mode 100644 index 8e27be7d..00000000 --- a/components/depthDSR/src/text.txt +++ /dev/null @@ -1 +0,0 @@ -text From c7b5a7cc48d069b8a691a8755a3a67b748e13aea Mon Sep 17 00:00:00 2001 From: Vaibhaw Khemka <46538042+vaibhawkhemka@users.noreply.github.com> Date: Sat, 14 Aug 2021 13:42:40 +0530 Subject: [PATCH 10/13] Create README.md --- components/depthDSR/README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 components/depthDSR/README.md diff --git a/components/depthDSR/README.md b/components/depthDSR/README.md new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/components/depthDSR/README.md @@ -0,0 +1 @@ + From 2f420018488c8f83f7ab41ab91850af5fd5da01b Mon Sep 17 00:00:00 2001 From: Vaibhaw Khemka <46538042+vaibhawkhemka@users.noreply.github.com> Date: Sat, 14 Aug 2021 13:53:27 +0530 Subject: [PATCH 11/13] Update README.md --- components/depthDSR/README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/components/depthDSR/README.md b/components/depthDSR/README.md index 8b137891..2dd01050 100644 --- a/components/depthDSR/README.md +++ b/components/depthDSR/README.md @@ -1 +1,21 @@ +# depthDSR +The agent is responsible for estimating depths in real-time from RGBD data in Graph(G). Depth is estimated using `depthEstimation`, which is a DNN component. +## Configuration Parameters +depthDSR needs a configuration file to start. In etc/config, you can change the ports and other parameters in the configuration file, according to your setting. + +## Starting the Component +To run graspDSR component, navigate to the component directory :
+ +`cd `
+ +Compile the component :
+ +`cmake .`
+`make`
+ +Now run the component :
+ +`./bin/depthDSR etc/config` + + From 02741529b5abf2add77d263947473c5bb4a18515 Mon Sep 17 00:00:00 2001 From: Vaibhaw Khemka <46538042+vaibhawkhemka@users.noreply.github.com> Date: Sat, 14 Aug 2021 13:56:06 +0530 Subject: [PATCH 12/13] Update README.md --- components/depthDSR/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/depthDSR/README.md b/components/depthDSR/README.md index 2dd01050..5bda2119 100644 --- a/components/depthDSR/README.md +++ b/components/depthDSR/README.md @@ -1,7 +1,7 @@ # depthDSR The agent is responsible for estimating depths in real-time from RGBD data in Graph(G). Depth is estimated using `depthEstimation`, which is a DNN component. ## Configuration Parameters -depthDSR needs a configuration file to start. In etc/config, you can change the ports and other parameters in the configuration file, according to your setting. +depthDSR needs a configuration file to start. In etc/config, you can change the ports and other parameters in the configuration file, according to your setting.
## Starting the Component To run graspDSR component, navigate to the component directory :
From 8466ae79a44d31af1a0b53a87fb3c0af22e8c516 Mon Sep 17 00:00:00 2001 From: Vaibhaw Khemka <46538042+vaibhawkhemka@users.noreply.github.com> Date: Sat, 14 Aug 2021 13:57:17 +0530 Subject: [PATCH 13/13] Update specificworker.cpp --- components/depthDSR/src/specificworker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/depthDSR/src/specificworker.cpp b/components/depthDSR/src/specificworker.cpp index f1f44153..088d1055 100644 --- a/components/depthDSR/src/specificworker.cpp +++ b/components/depthDSR/src/specificworker.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 by YOUR NAME HERE + * Copyright (C) 2020 by vaibhaw khemka * * This file is part of RoboComp *