RTC6 boards
Doc. Rev. 1.0.21 en-US
16 Appendix A: The RTC6 Ethernet Board
920
16.9.7 About C++ Remote Interface
Wrapper
The total functionality from
•
rtc6_rif_wrapper.cpp
(Source file for C++ Remote Interface Wrapper)
•
rtc6_rif_wrapper.h
(Header file for C++ Remote Interface Wrapper)
•
telegrams.h
(Header file for
rtc6_rif_wrapper.h
. Defines the
Command Telegram structure as well as
Remote Command IDs)
is referred to in this document as:
• C++ Remote Interface Wrapper
The C++ Remote Interface Wrapper offers the basic
logic for:
• Generating Command Telegrams
• Sending
(1)(2)
Command Telegrams
• Receiving of Command Telegrams
• Retry handling
• A simple error detection
For sending and receiving Command Telegrams to
work, you must provide a platform-specific
implementation for the following virtual socket
functions, see Figure 89 as well as the example
implementation
example_1.cpp
from RTC6 Software
Package:
•
send
•
recv
•
select
The C++ Remote Interface Wrapper provides a
similar interface to
RTC6impl.h
and
RTC6impl.hpp
.
Signatures of the wrapper functions (in
rtc6_rif_wrapper.h
) and RTC6 DLL are largely the
same.
Only in the C++ Remote Interface Wrapper are
available:
• wrapper function get_remote_error
• wrapper function disable_remote_interface
• wrapper function get_network_error
Not available in the C++ Remote Interface Wrapper:
• RTC6 command eth_get_last_error
• RTC6 command eth_get_error
Replacement is the wrapper function
get_network_error with 2 predefined error codes
which can be set by C++ Remote Interface
Wrapper:
–
NETWORK_ERR_TIMEOUT
A timeout occurred while receiving a
Answer Telegram, see also
eth_set_com_timeouts_auto.
–
NETWORK_ERR_WRONG_ID
The wrapper function IDs do not match in
Answer Telegram and Command Telegram.
You can define the remaining error codes yourself
and correspond to the last return value of
send
/
recv
/
select
.
(1) Command Telegrams are to be sent to the
RTC6 Ethernet Board via UDP. The port to be used is the
same as for conventional transmission
(eth_get_port_numbers(
UDPexcl
),
eth_set_port_numbers(
UDPexcl
)).
(2) Only 1 list command (not several) per
Command Telegram.