From e70bb0c131cdeff7892bc605858e55c755232395 Mon Sep 17 00:00:00 2001 From: vdm-dev Date: Thu, 24 Mar 2022 12:00:11 +0400 Subject: [PATCH] Release 1.4.0 --- C3Bridge.vcxproj | 10 +- C3Bridge.vcxproj.filters | 6 + CHANGELOG.md | 17 + CMakeLists.txt | 35 +- LICENSE | 2 +- README.md | 7 +- dependencies/compatibility/cstdint | 4 + .../css/style.css | 314 + .../images/dot.gif | Bin 0 -> 46 bytes .../images/logo.png | Bin 0 -> 10559 bytes .../index.htm | 9895 +++++++++++++++++ source/aboutdialog.cpp | 10 +- source/handlers/client_file.cpp | 7 +- source/mainwindow.cpp | 7 +- source/mainwindow.h | 3 +- source/proxy.cpp | 6 +- source/proxy.h | 34 +- source/resource.h | 3 + source/resources.rc | 4 +- source/safe.cpp | 42 + source/safe.h | 44 + source/targetver.h | 83 +- 22 files changed, 10432 insertions(+), 101 deletions(-) create mode 100644 documents/C3 Bridge Interface Protocol 1.4/css/style.css create mode 100644 documents/C3 Bridge Interface Protocol 1.4/images/dot.gif create mode 100644 documents/C3 Bridge Interface Protocol 1.4/images/logo.png create mode 100644 documents/C3 Bridge Interface Protocol 1.4/index.htm create mode 100644 source/safe.cpp create mode 100644 source/safe.h diff --git a/C3Bridge.vcxproj b/C3Bridge.vcxproj index d59ec43..1126c44 100644 --- a/C3Bridge.vcxproj +++ b/C3Bridge.vcxproj @@ -15,21 +15,21 @@ {3EC3980F-E052-4E81-A188-7B3A152AC770} Win32Proj C3Bridge - 10.0.17763.0 + 10.0 Application true - v141 Unicode + v143 Application false - v141 true Unicode + v143 @@ -62,7 +62,6 @@ Disabled true WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - true $(SolutionDir)source;$(SolutionDir)include;$(SolutionDir)dependencies\win32xx MultiThreadedDebug @@ -81,7 +80,6 @@ true true WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true $(SolutionDir)source;$(SolutionDir)include;$(SolutionDir)dependencies\win32xx MultiThreaded @@ -123,6 +121,7 @@ + Create @@ -148,6 +147,7 @@ + diff --git a/C3Bridge.vcxproj.filters b/C3Bridge.vcxproj.filters index 89e05d4..8d7d5cc 100644 --- a/C3Bridge.vcxproj.filters +++ b/C3Bridge.vcxproj.filters @@ -120,6 +120,9 @@ Source Files\Application + + Source Files\System + @@ -185,6 +188,9 @@ Source Files\Application + + Source Files\System + diff --git a/CHANGELOG.md b/CHANGELOG.md index 9eb9d78..344d95a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,26 @@ # Changelog +## [1.4.0] (Open Source) - 2022-03-24 +Bug Fix Release +### Added + - C3 Bridge Interface Protocol version 1.4 +### Changed + - The old version of CMake (3.4) is now supported for building the project in Visual Studio .NET 2003 + - The program versions are now divided: + * Primary (compiled with Visual Studio 2022), required Windows 7 and higher + * Compatible (compiled with Visual Studio .NET 2003), required Windows XP and higher + * ANSI (compiled with Visual Studio .NET 2003), required Windows 95 and higher +### Fixed + - CommandFileWriteContent: integer overflow eliminated + - CommandFileReadContent: integer overflow eliminated + ## [1.3.0] (Open Source) - 2021-06-06 Bug Fix Release ### Fixed - CommandWriteMultiple now works correctly +### Known issues + - CommandFileWriteContent may not work correctly due to integer overflow + - CommandFileReadContent may not work correctly due to integer overflow ## [1.2.0] (Open Source) - 2021-06-05 ### Added diff --git a/CMakeLists.txt b/CMakeLists.txt index 5bb4408..a836126 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,29 +1,46 @@ -cmake_minimum_required (VERSION 3.15) +cmake_minimum_required (VERSION 3.4) -set (PROJECT C3Bridge) set (ANSI OFF CACHE BOOL "Make ANSI version") set (CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE) -project (${PROJECT}) +project (C3Bridge) if (MSVC) - set_property (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ${PROJECT}) set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO") if (MSVC_VERSION LESS 1600) message (STATUS "Using compatibility header for Visual Studio 2008 and earlier") include_directories(${CMAKE_SOURCE_DIR}/dependencies/compatibility) + add_definitions (-DRC_LEGACY) + project (C3BCOMPT) endif () + + set(CompilerFlags + CMAKE_CXX_FLAGS + CMAKE_CXX_FLAGS_DEBUG + CMAKE_CXX_FLAGS_RELEASE + CMAKE_C_FLAGS + CMAKE_C_FLAGS_DEBUG + CMAKE_C_FLAGS_RELEASE + ) + foreach(CompilerFlag ${CompilerFlags}) + string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}") + endforeach() endif () if (ANSI) message (STATUS "Making ANSI version of the application") - remove_definitions (-D_UNICODE) + remove_definitions (-D_UNICODE -DUNICODE) add_definitions (-D_MBCS) + project (C3BANSI) else () message (STATUS "Making UNICODE version of the application") remove_definitions (-D_MBCS) - add_definitions (-D_UNICODE) + add_definitions (-D_UNICODE -DUNICODE) +endif () + +if (MSVC) + set_property (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ${PROJECT_NAME}) endif () include_directories (${CMAKE_SOURCE_DIR}/dependencies/win32xx) @@ -84,6 +101,8 @@ set (SOURCES_PROXY set (SOURCES_SYSTEM source/main.cpp source/resource.h + source/safe.cpp + source/safe.h source/stdafx.cpp source/stdafx.h source/targetver.h @@ -120,5 +139,5 @@ set (SOURCES ${SOURCES_SYSTEM} ) -add_executable (${PROJECT} WIN32 ${SOURCES} ${RESOURCES}) -target_link_libraries (${PROJECT} "comctl32.lib ws2_32.lib") +add_executable (${PROJECT_NAME} WIN32 ${SOURCES} ${RESOURCES}) +target_link_libraries (${PROJECT_NAME} "comctl32.lib" "ws2_32.lib") diff --git a/LICENSE b/LICENSE index 0127c7b..ffa2358 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2020-2021 Dmitry Lavygin +Copyright (c) 2020-2022 Dmitry Lavygin S.P. Kapitsa Research Institute of Technology of Ulyanovsk State University. All rights reserved. diff --git a/README.md b/README.md index c7775c0..43bc0ad 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ The C3 Bridge Interface Server is a lightweight network application that allows remote clients to execute requests to the KUKA Cross 3 subsystem and return responses. The application provides advanced functionality and high performance. ## Features -* Well-documented [application protocol](https://github.com/ulsu-tech/c3bridge-server/raw/master/documents/C3%20Bridge%20Interface%20Protocol%201.3.pdf). It is fully compatible with KukavarProxy protocol, which means that existing client solutions (RoboDK, ROS) can be used. +* Well-documented [application protocol](http://c3.ulsu.tech/protocol/latest/). It is fully compatible with KukavarProxy protocol, which means that existing client solutions (RoboDK, ROS) can be used. * Executes more functions of the KUKA Cross 3 subsystem (in the future we hope to implement all available functions). * Controls the execution of a KRL program. * High performance. The software is written in C++ and can be compiled using both modern development tools and development tools of the past years (like Visual C++ 6.0). @@ -15,8 +15,11 @@ The C3 Bridge Interface Server is a lightweight network application that allows ## Changelog See the [document](CHANGELOG.md) for more information. +## Website +[HTTP://C3.ULSU.TECH/](http://c3.ulsu.tech/) + ## License -Copyright (c) 2020-2021 Dmitry Lavygin (vdm.inbox@gmail.com) +Copyright (c) 2020-2022 Dmitry Lavygin (vdm.inbox@gmail.com) S.P. Kapitsa Research Institute of Technology of Ulyanovsk State University. diff --git a/dependencies/compatibility/cstdint b/dependencies/compatibility/cstdint index e6f8c02..ea95cf7 100644 --- a/dependencies/compatibility/cstdint +++ b/dependencies/compatibility/cstdint @@ -10,10 +10,14 @@ #ifdef _STD_USING #undef _STD_USING + #define __STDC_LIMIT_MACROS + #define __STDC_CONSTANT_MACROS #include #define _STD_USING #else /* _STD_USING */ + #define __STDC_LIMIT_MACROS + #define __STDC_CONSTANT_MACROS #include #endif /* _STD_USING */ diff --git a/documents/C3 Bridge Interface Protocol 1.4/css/style.css b/documents/C3 Bridge Interface Protocol 1.4/css/style.css new file mode 100644 index 0000000..9a6d907 --- /dev/null +++ b/documents/C3 Bridge Interface Protocol 1.4/css/style.css @@ -0,0 +1,314 @@ +body { + background-color: #708090; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 14pt; + margin: 0; + padding: 0; +} + +a { + color: #0070C0; +} + +a:hover { + color: #C07000; +} + +#content { + background-color: #FFFFFF; + margin: 0 auto; + width: 800px; +} + +.titlepage { + border-top: 10px solid #708090; + border-bottom: 10px solid #708090; + padding: 20px; + font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif; + font-size: 18pt; + text-align: center; +} + +.titlepage h1 { + margin: 100px 0 50px 0; + font-size: 28pt; +} + +.titlepage p { + margin: 0; +} + +.titlepage .credits { + margin: 100px 0; + font-weight: bold; +} + +.titlepage .footer { + font-size: 12pt; + font-weight: bold; + letter-spacing: 0.65pt; +} + +.page { + border-bottom: 10px solid #708090; + padding: 20px; + line-height: 1.5; +} + +.page .small { + font-size: 12pt; +} + +.page h1 { + margin: 0 0 30pt 0; + border-bottom: 2px solid black; + color: #FF6C2C; + font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif; + font-size: 28pt; +} + +.page h2 { + margin: 0; + color: #FF6C2C; + font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif; + font-size: 18pt; +} + +.page h3 { + margin: 0; + color: #FF6C2C; + font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif; + font-size: 18pt; +} + +.page h4 { + margin: 0; + color: #FF6C2C; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 14pt; + font-weight: bold; +} + +.page h1 a, .page h1 a:hover, .page h2 a, .page h2 a:hover, .page h3 a, .page h3 a:hover, .page h4 a, .page h4 a:hover { + color: #FF6C2C; + text-decoration: none; +} + +.page h4 a, .page h4 a:hover { + font-weight: normal; +} + +.page p { + margin: 0; +} + +.page ol, .page ul { + margin: 0; + padding-left: 40px; +} + +.page .left { + text-align: left; +} + +.page .center { + text-align: center; +} + +.page .right { + text-align: right; +} + +.page .bold { + font-weight: bold; +} + +.page .italic { + font-style: italic; +} + +.page .normal { + font-weight: normal; + font-style: normal; +} + +.page .code { + font-family: "Courier New", Courier, monospace; +} + +.page .toc { + border-collapse: collapse; + width: 100%; + font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif; + font-size: 14pt; +} + +.page .toc a, .page .toc a:hover { + text-decoration: none; +} + +.page .toc td { + padding: 2px; + width: 1%; + white-space: nowrap; +} + +.page .toc .leader { + background: url('../images/dot.gif') repeat-x 0 70%; + width: auto; +} + +.page .toc .leader span { + padding-right: 2px; + background-color: #FFFFFF; +} + +.page .table { + border-collapse: collapse; + width: 100%; +} + +.page .table .corner { + border-top: none; + border-left: none; + background-color: transparent; +} + +.page .table th { + border: 1px solid #DADADA; + background-color: #2A3A5C; + color: white; + padding: 5px; + font-weight: bold; +} + +.page .table td { + border: 1px solid #DADADA; + background-color: white; + padding: 5px; +} + +.page .table .col-fit { + width: 1px; + white-space: nowrap; +} + +.page .table .col-5 { + width: 5%; +} + +.page .table .col-10 { + width: 10%; +} + +.page .table .col-15 { + width: 15%; +} + +.page .table .col-20 { + width: 20%; +} + +.page .table .col-25 { + width: 25%; +} + +.page .table .col-30 { + width: 30%; +} + +.page .table .col-35 { + width: 35%; +} + +.page .table .col-40 { + width: 40%; +} + +.page .table .col-45 { + width: 45%; +} + +.page .table .col-50 { + width: 50%; +} + +.page .table .col-55 { + width: 55%; +} + +.page .table .col-60 { + width: 60%; +} + +.page .table .col-65 { + width: 65%; +} + +.page .table .col-75 { + width: 75%; +} + +.page .table .col-80 { + width: 80%; +} + +.page .table .col-85 { + width: 85%; +} + +.page .table .col-90 { + width: 90%; +} + +.page .table .col-95 { + width: 95%; +} + +.page .table .col-100 { + width: 100%; +} + +.page .table .even td { + background-color: #EBF2F5; +} + +.page .footer { + font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif; + font-size: 10pt; + font-weight: bold; + letter-spacing: 0.65pt; + margin-top: 10px; + border-top: 2px solid #A9A9A9; + color: #A9A9A9; + width: 100%; +} + +.page .footer a, .page .footer a:hover { + text-decoration: none; +} + +.page .footer tr, .page .footer td { + padding: 0; +} + +.page .footer .left { + text-align: right; + width: 45%; +} + +.page .footer .center { + color: #000000; + font-size: 14pt; + text-align: center; +} + +.page .footer .right { + text-align: left; + width: 20%; +} + +.page .footer .tail { + text-align: right; + width: 25%; +} diff --git a/documents/C3 Bridge Interface Protocol 1.4/images/dot.gif b/documents/C3 Bridge Interface Protocol 1.4/images/dot.gif new file mode 100644 index 0000000000000000000000000000000000000000..de79dfa422404afca01d4ba9c0bbb579c7cc35b8 GIT binary patch literal 46 ucmZ?wbhEHbjEB<5wG8q|kKzxu40~2dcKSw7kgEau%!U%i- literal 0 HcmV?d00001 diff --git a/documents/C3 Bridge Interface Protocol 1.4/images/logo.png b/documents/C3 Bridge Interface Protocol 1.4/images/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..2425c524eb376370934f8c788b4e72c85952d6a3 GIT binary patch literal 10559 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 literal 0 HcmV?d00001 diff --git a/documents/C3 Bridge Interface Protocol 1.4/index.htm b/documents/C3 Bridge Interface Protocol 1.4/index.htm new file mode 100644 index 0000000..e26d30b --- /dev/null +++ b/documents/C3 Bridge Interface Protocol 1.4/index.htm @@ -0,0 +1,9895 @@ + + + + + C3 Bridge Interface — Application Protocol Specification + + + + +
+ +
+ C3 Bridge Interface +

Application Protocol Specification

+

Version 1, Revision 4

+

10 February, 2022

+
+

Dmitry Lavygin

+

S.P. Kapitsa Research Institute of Technology

+

Ulyanovsk State University

+
+ +
+ + + +
+

DOCUMENT HISTORY

+ + + + + + + + + + + + + + + + + + + + + + +
RevisionNotesDate
1Initial release2020-08-04
2 +

Fixed

+
    +
  • Typo in the table in the section 1.1 (the port number should be 6999)
  • +
  • Typo in the description of the section 2
  • +
  • Bit counting in the section 3.8.2
  • +
  • Interpreter type in the section 3.6.1 must be INT16
  • +
+

Added

+
    +
  • 1.5. SOFTWARE VERSIONING
  • +
  • 2.7. PROXY LISTENING ADDRESS REQUEST
  • +
  • 2.8. PROXY LISTENING PORT REQUEST
  • +
  • 2.9. PROXY ENABLED REQUEST
  • +
  • 3.8.5. MESSAGE #17. PERFORM PROXY BENCHMARK
  • +
  • 3.9. MESSAGES FOR FILE OPERATIONS
  • +
+

Changed

+
    +
  • 1.4. DATA TYPES
  • +
  • 2.3. PROXY VERSION REQUEST
  • +
  • 3.4. MESSAGE TYPES
  • +
  • 3.5.1. MESSAGE #0. READ VARIABLE (ASCII)
  • +
  • 3.5.5. MESSAGE #4. READ VARIABLE
  • +
  • 3.5.7. MESSAGE #6. READ MULTIPLE VARIABLES
  • +
  • 3.5.8. MESSAGE #7. WRITE MULTIPLE VARIABLES
  • +
  • 3.8.1. MESSAGE #13. GET PROXY INFORMATION
  • +
+
2021-05-30
3 +

Fixed

+
    +
  • Recommended minimum version in the section 3.5.8
  • +
+
2021-06-06
4 +

Important

+

The documentation has migrated to HTML format

+

 

+

Fixed

+
    +
  • The word "inter process" in TERMS USED
  • +
  • Request size in 2.7 (it must be 14)
  • +
  • Byte offset in 3.5.6
  • +
  • The word "Submit" in 3.6.1
  • +
  • The word "Submit" in 3.7.2
  • +
  • Invalid message ID of 3.10.1 (it must be 63)
  • +
+

Added

+
    +
  • List of contributors in COPYRIGHT
  • +
  • Hexadecimal representation in sample messages
  • +
+

Changed

+
    +
  • SOFTWARE VERSIONING section has been renumbered from 1.5 to 1.1
  • +
  • Response examples in 2.9
  • +
  • Sample request/response in 3.5.2
  • +
  • Sample request/response in 3.5.6
  • +
  • Sample request/response in 3.5.8
  • +
  • Sample response in 3.8.2
  • +
+
2022-02-10
+ + + + + + + + +
+ +
+

TABLE OF CONTENTS

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1. OVERVIEW6
 1.1. SOFTWARE VERSIONING6
 1.2. TYPES AND PURPOSE OF PROTOCOLS7
 1.3. BYTE ORDER7
 1.4. HEXADECIMAL NUMBERS7
 1.5. DATA TYPES8
2. DISCOVERY PROTOCOL9
 2.1. PRESENCE REQUEST10
 2.2. PROXY TYPE REQUEST11
 2.3. PROXY VERSION REQUEST12
 2.4. PROXY FEATURES REQUEST13
 2.5. COMPUTER NAME REQUEST14
 2.6. DATE AND TIME REQUEST15
 2.7. PROXY LISTENING ADDRESS REQUEST16
 2.8. PROXY LISTENING PORT REQUEST17
 2.9. PROXY ENABLED REQUEST18
3. PRIMARY PROTOCOL19
 3.1. MESSAGE HEADER20
 3.2. RESPONSE FOOTER21
 3.3. ERROR CODES22
 3.4. MESSAGE TYPES23
 3.5. MESSAGES FOR VARIABLE HANDLING24
  3.5.1. MESSAGE #0. READ VARIABLE (ASCII)24
  3.5.2. MESSAGE #1. WRITE VARIABLE (ASCII)25
  3.5.3. MESSAGE #2. READ ARRAY (ASCII)26
  3.5.4. MESSAGE #3. WRITE ARRAY (ASCII)26
  3.5.5. MESSAGE #4. READ VARIABLE27
  3.5.6. MESSAGE #5. WRITE VARIABLE28
  3.5.7. MESSAGE #6. READ MULTIPLE VARIABLES29
  3.5.8. MESSAGE #7. WRITE MULTIPLE VARIABLES30
 3.6. MESSAGES FOR KRL PROGRAM HANDLING31
  3.6.1. MESSAGE #10. PROGRAM CONTROL (SUBTYPE I)31
  3.6.2. MESSAGE #10. PROGRAM CONTROL (SUBTYPE II)32
 3.7. MESSAGES FOR MANUAL ROBOT CONTROL33
  3.7.1. MESSAGE #11. MOTION CONTROL33
  3.7.2. MESSAGE #12. KCP KEY EMULATION34
 3.8. SERVICE MESSAGES35
  3.8.1. MESSAGE #13. GET PROXY INFORMATION35
  3.8.2. MESSAGE #14. GET PROXY FEATURES36
  3.8.3. MESSAGE #15. GET PROXY INFORMATION (EXTENDED)37
  3.8.4. MESSAGE #16. GET CROSS3 INFORMATION37
  3.8.5. MESSAGE #17. PERFORM PROXY BENCHMARK38
 3.9. MESSAGES FOR FILE OPERATIONS39
  3.9.1. CONSTANT VALUES39
  3.9.2. MESSAGE #20. SET FILE ATTRIBUTES40
  3.9.3. MESSAGE #21. LIST DIRECTORY CONTENTS41
  3.9.4. MESSAGE #22. CREATE NEW FILE42
  3.9.5. MESSAGE #23. DELETE FILE43
  3.9.6. MESSAGE #24. COPY FILE44
  3.9.7. MESSAGE #25. MOVE FILE45
  3.9.8. MESSAGE #26. GET FILE PROPERTIES46
  3.9.9. MESSAGE #27. GET FILE FULL PATH47
  3.9.10. MESSAGE #28. GET KRC PATH48
  3.9.11. MESSAGE #29. WRITE FILE CONTENT (BEGINNING)49
  3.9.12. MESSAGE #29. WRITE FILE CONTENT (DATA CHUNK)50
  3.9.13. MESSAGE #29. WRITE FILE CONTENT (CHECKSUM)51
  3.9.14. MESSAGE #29. WRITE FILE CONTENT (FINAL)52
  3.9.15. MESSAGE #30. READ FILE CONTENT (BEGINNING)53
  3.9.16. MESSAGE #30. READ FILE CONTENT (DATA CHUNK)54
  3.9.17. MESSAGE #30. READ FILE CONTENT (CHECKSUM)55
  3.9.18. MESSAGE #30. READ FILE CONTENT (FINAL)56
 3.10. MESSAGES FOR CROSSCOMMEXE COMPATIBILITY57
  3.10.1. MESSAGE #63. CONFIRM ALL57
+ + + + + + + + +
+ +
+

TERMS USED

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TermDescription
IP +

Internet Protocol

+

The Internet Protocol (IP) is the principal communications protocol in the Internet protocol suite. It is responsible for addressing host interfaces, encapsulating data into datagrams (including fragmentation and reassembly) and routing datagrams from a source host interface to a destination host interface across one or more IP networks.

+
TCP/IP +

Transmission Control Protocol

+

The Transmission Control Protocol provides a communication service at an intermediate level between an application program and the Internet Protocol. It provides host-to-host connectivity at the transport layer of the Internet model.

+
UDP/IP +

User Datagram Protocol

+

UDP is a simple message-oriented transport layer protocol that is documented in RFC 768. Although UDP provides integrity verification (via checksum) of the header and payload, it provides no guarantees to the upper layer protocol for message delivery and the UDP layer retains no state of UDP messages once sent.

+
KRC +

KUKA Robot Controller

+
KRL +

KUKA Robot Language

+

KUKA Robot programming language.

+
KUKA Cross 3 +

Internal mechanism of inter process communication in the KUKA robot control system.

+
KukavarProxy +

KukavarProxy is a TCP/IP server that allows KRL variables to be read and written over a network connection.

+
+ + + + + + + + +
+ +
+

1. OVERVIEW

+

This document describes the protocols used by the C3 Bridge Interface Server. The C3 Bridge Interface Server is a lightweight network application that allows remote clients to execute requests to KUKA Cross 3 subsystem and return responses. The application provides advanced functionality and high performance.

+

 

+

1.1. SOFTWARE VERSIONING

+

All products in the C3 Bridge family use versions consisting of three or, in some cases, four numbers. The first two numbers represent the major and minor components of the version. The third number denotes the type of build shown in the table below. The fourth number can only be used for internal builds.

+ + + + + + + + + + + + + + + + + + + + + +
Version NumberBuild Type
0Open Source
1Proprietary
2Freeware
3Internal Build
+ + + + + + + + +
+ +
+

1.2. TYPES AND PURPOSE OF PROTOCOLS

+

The C3 Bridge Interface Server can use two network protocols.

+

The first protocol, called the Discovery Protocol, is based on UDP and can be used to detect a remote server and find out its capabilities. The Discovery Protocol can operate in legacy or standard mode, or both. The legacy mode is implemented for compatibility with KukavarProxy features.

+

The second protocol is the primary one. It is based on TCP and is designed for remote interaction with the KUKA robot control system.

+

The table below shows a summary of the protocols and network ports on which they operate by default.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ProtocolBased onListening portPort to answerSupport in KukavarProxy
Discovery (legacy)UDP69997000Yes
Discovery (standard)UDP7000source port of peer 
PrimaryTCP7000Yes, limited
+

 

+

1.3. BYTE ORDER

+

All multibyte fields in protocol messages are composed using the network byte order (or big-endian, most significant byte is transmitted first). Although this is in contradiction with the Intel IA-32 platform byte order (little-endian), the network byte order was chosen to provide compatibility with the KukavarProxy protocol.

+

The exceptions to this order are characters and strings in UTF16 format. The system byte order (little-endian) is used for them.

+

 

+

1.4. HEXADECIMAL NUMBERS

+

Base 16 (hexadecimal) numbers are represented by a string of hexadecimal digits followed by the character "h" (for example, 0D0Ah). A hexadecimal digit is a character from the following set: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F.

+ + + + + + + + +
+ +
+

1.5. DATA TYPES

+

The following table gives information about the types of data used:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionSize (bytes)Range
MINMAX
UINT8Unsigned Integer, 8−bit10255
INT8Signed Integer, 8−bit1-128127
UINT16Unsigned Integer, 16−bit2065535
INT16Signed Integer, 16−bit2-3276832767
UINT32Unsigned Integer, 32−bit404294967295
INT32Signed Integer, 32−bit4-21474836482147483647
BOOLBoolean Type101[1]
CHARASCII / ISO/IEC 8859−1 Character1 
STRINGASCII / ISO/IEC 8859−1 Stringvariable 
WCHARUnicode Character
(encoded in UTF−16LE)
2 
WSTRINGUnicode String
(encoded in UTF−16LE)
variable (even) 
BINARYBinary Data
(array of UINT8)
variable 
+

NOTES

+
    +
  1. The Boolean value is encoded with one byte. This means that the actual value of this field may be between 0 and 255. The recipient must treat all non-zero values as TRUE and 0 as FALSE. The sender must encode the TRUE value with 1 and the FALSE value with 0.
  2. +
+ + + + + + + + +
+ +
+

2. DISCOVERY PROTOCOL

+

The Discovery Protocol uses the UDP datagrams that contain text messages of a predetermined length. In the legacy mode, the sender makes requests to the server on port 6999 and the server responds to port 7000 of the sender. In standard mode, the sender makes requests to the server on port 7000, and the server responds to the sender's address and port, allowing the sender to use any port to receive responses.

+ + + + + + + + +
+ +
+

2.1. PRESENCE REQUEST

+

Minimum supported version: 1.0.0 (Open Source)

+

Support in KukavarProxy: Yes

+

 

+

PURPOSE

+

Determination of the control system address and readiness of the control system to process requests of the primary protocol (indirectly).

+

 

+

REQUEST

+ + + + + + + + + + + + + +
Offset (bytes)Size (bytes)TypeValue
012STRINGWHEREAREYOU?
+

 

+

RESPONSE

+ + + + + + + + + + + + + +
Offset (bytes)Size (bytes)TypeValue
0variableSTRINGKUKA|<model name>|<serial #>
+

NOTES

+

<model name> is the value of $MODEL_NAME[] KRL variable.

+

<serial #> is the value of $KR_SERIALNO KRL variable.

+

 

+

NEGATIVE RESPONSE

+

In case of an error when accessing the KUKA Cross 3 subsystem, the fields <model name> and <serial #> may be empty. In this case, the response has the following form:

+ + + + + + + + + + + + + +
Offset (bytes)Size (bytes)TypeValue
06STRINGKUKA||
+ + + + + + + + +
+ +
+

2.2. PROXY TYPE REQUEST

+

Minimum supported version: 1.0.0 (Open Source)

+

Support in KukavarProxy: No

+

 

+

PURPOSE

+

Determining the type of proxy server. The C3 Bridge Interface responds to this request and KukavarProxy does not.

+

 

+

REQUEST

+ + + + + + + + + + + + + +
Offset (bytes)Size (bytes)TypeValue
011STRING@PROXY_TYPE
+

 

+

RESPONSE

+ + + + + + + + + + + + + +
Offset (bytes)Size (bytes)TypeValue
019STRINGC3 BRIDGE INTERFACE
+ + + + + + + + +
+ +
+

2.3. PROXY VERSION REQUEST

+

Minimum supported version: 1.0.0 (Open Source)

+

Support in KukavarProxy: No

+

 

+

PURPOSE

+

Obtaining information about the application version and license type.

+

 

+

REQUEST

+ + + + + + + + + + + + + +
Offset (bytes)Size (bytes)TypeValue
014STRING@PROXY_VERSION
+

 

+

RESPONSE

+ + + + + + + + + + + + + +
Offset (bytes)Size (bytes)TypeValue
0variableSTRING<major>.<minor> <type>
+

NOTES

+

<major> is the major number of the software version.

+

<minor> is the minor number of the software version.

+

<type> is the type of the software edition (look at section 1.1. SOFTWARE VERSIONING), it can be (OPEN SOURCE), (PROPRIETARY), (FREEWARE), or (INTERNAL BUILD).

+

 

+

SAMPLE RESPONSE

+ + + + + + + + + + + + + +
Offset (bytes)Size (bytes)TypeValue
017STRING1.0 (OPEN SOURCE)
+ + + + + + + + +
+ +
+

2.4. PROXY FEATURES REQUEST

+

Minimum supported version: 1.0.0 (Open Source)

+

Support in KukavarProxy: No

+

 

+

PURPOSE

+

Determining the list of supported messages for the primary protocol.

+

 

+

REQUEST

+ + + + + + + + + + + + + +
Offset (bytes)Size (bytes)TypeValue
015STRING@PROXY_FEATURES
+

 

+

RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeValueMeaning
R
E
Q
U
I
R
E
D
-11CHAR1Message #0 is available
0Message #0 is NOT available
-21CHAR1Message #1 is available
0Message #1 is NOT available
...
-81CHAR1Message #7 is available
0Message #7 is NOT available
O
P
T
I
O
N
A
L
-91CHAR1Message #8 is available
0Message #8 is NOT available
...
-2561CHAR1Message #255 is available
0Message #255 is NOT available

NOTES

+

Negative offset means bytes counted from the end of the received datagram. For example, -1 means the last byte, -2 means the penultimate byte, etc.

+

 

+

SAMPLE RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Offset (bytes)Size (bytes)TypeValueMeaning
-11CHAR1Message #0 is available
-21CHAR1Message #1 is available
-31CHAR0Message #2 is NOT available
-41CHAR0Message #3 is NOT available
-51CHAR1Message #4 is available
-61CHAR1Message #5 is available
-71CHAR1Message #6 is available
-81CHAR1Message #7 is available
-91CHAR0Message #8 is NOT available
-101CHAR0Message #9 is NOT available
-111CHAR1Message #10 is available
-121CHAR1Message #11 is available
-131CHAR1Message #12 is available
-141CHAR1Message #13 is available
-151CHAR1Message #14 is available
-161CHAR0Message #15 is NOT available
+

NOTES

+

In this example, the string representation of the received data is as follows: 0111110011110011.

+ + + + + + + + +
+ +
+

2.5. COMPUTER NAME REQUEST

+

Minimum supported version: 1.0.0 (Open Source)

+

Support in KukavarProxy: No

+

 

+

PURPOSE

+

Obtaining the computer name on which the robot control system is located.

+

 

+

REQUEST

+ + + + + + + + + + + + + +
Offset (bytes)Size (bytes)TypeValue
015STRING@PROXY_HOSTNAME
+

 

+

RESPONSE

+ + + + + + + + + + + + + +
Offset (bytes)Size (bytes)TypeValue
0variableSTRING<KRC hostname>
+

 

+

SAMPLE RESPONSE

+ + + + + + + + + + + + + +
Offset (bytes)Size (bytes)TypeValue
09STRINGC010-07VM
+ + + + + + + + +
+ +
+

2.6. DATE AND TIME REQUEST

+

Minimum supported version: 1.0.0 (Open Source)

+

Support in KukavarProxy: No

+

 

+

PURPOSE

+

Obtaining the date and time set on the robot control system in ISO 8601 format.

+

 

+

REQUEST

+ + + + + + + + + + + + + +
Offset (bytes)Size (bytes)TypeValue
011STRING@PROXY_TIME
+

 

+

RESPONSE

+ + + + + + + + + + + + + +
Offset (bytes)Size (bytes)TypeValue
020STRINGYYYY-MM-DDThh:mm:ssZ
+

NOTES

+

[YYYY] indicates a four-digit year, 1601 through 9999.

+

[MM] indicates a two-digit month of the year, 01 through 12.

+

[DD] indicates a two-digit day of that month, 01 through 31.

+

[DD] indicates a two-digit day of that month, 01 through 31.

+

[T] is just ANSI character T, which is used to separate the date and time.

+

[hh] refers to a zero-padded hour between 00 and 23.

+

[mm] refers to a zero-padded minute between 00 and 59.

+

[ss] refers to a zero-padded second between 00 and 59.

+

[Z] means that the Coordinated Universal Time (UTC) is used.

+

 

+

SAMPLE RESPONSE

+ + + + + + + + + + + + + +
Offset (bytes)Size (bytes)TypeValue
020STRING2020-08-04T06:46:10Z
+ + + + + + + + +
+ +
+

2.7. PROXY LISTENING ADDRESS REQUEST

+

Minimum supported version: 1.2.0 (Open Source)

+

Support in KukavarProxy: No

+

 

+

PURPOSE

+

Obtaining the TCP/IP address where the primary C3 Bridge Interface protocol is listening. The address 0.0.0.0 means that listening is performed on all available network interfaces.

+

 

+

REQUEST

+ + + + + + + + + + + + + +
Offset (bytes)Size (bytes)TypeValue
014STRING@PROXY_ADDRESS
+

 

+

RESPONSE

+ + + + + + + + + + + + + +
Offset (bytes)Size (bytes)TypeValue
0variableSTRING<TCP/IP address>
+

 

+

SAMPLE RESPONSE

+ + + + + + + + + + + + + +
Offset (bytes)Size (bytes)TypeValue
07STRING0.0.0.0
+ + + + + + + + +
+ +
+

2.8. PROXY LISTENING PORT REQUEST

+

Minimum supported version: 1.2.0 (Open Source)

+

Support in KukavarProxy: No

+

 

+

PURPOSE

+

Obtaining the TCP/IP port where the primary C3 Bridge Interface protocol is listening.

+

 

+

REQUEST

+ + + + + + + + + + + + + +
Offset (bytes)Size (bytes)TypeValue
011STRING@PROXY_PORT
+

 

+

RESPONSE

+ + + + + + + + + + + + + +
Offset (bytes)Size (bytes)TypeValue
0variableSTRING<TCP/IP port>
+

 

+

SAMPLE RESPONSE

+ + + + + + + + + + + + + +
Offset (bytes)Size (bytes)TypeValue
04STRING7000
+ + + + + + + + +
+ +
+

2.9. PROXY ENABLED REQUEST

+

Minimum supported version: 1.2.0 (Open Source)

+

Support in KukavarProxy: No

+

 

+

PURPOSE

+

Getting information about the status of the TCP/IP server of the primary protocol.

+

 

+

REQUEST

+ + + + + + + + + + + + + +
Offset (bytes)Size (bytes)TypeValue
014STRING@PROXY_ENABLED
+

 

+

POSITIVE RESPONSE

+ + + + + + + + + + + + + +
Offset (bytes)Size (bytes)TypeValue
04STRINGTRUE
+

 

+

NEGATIVE RESPONSE

+ + + + + + + + + + + + + +
Offset (bytes)Size (bytes)TypeValue
05STRINGFALSE
+ + + + + + + + +
+ +
+

3. PRIMARY PROTOCOL

+

The primary protocol uses long-term TCP/IP sessions. Data exchange takes place using binary messages of variable length. Transmitted messages are divided into requests and responses. The requests contain only the header and payload. The responses contain the header, payload, and error code at the end of the message. The server has the right not to reply to unknown or incorrect requests.

+ + + + + + + + +
+ +
+

3.1. MESSAGE HEADER

+

Each message begins with a header, the structure of which is shown in the table below.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Offset (bytes)Size (bytes)TypeMeaning
02UINT16

Tag ID

This field specifies the message identifier. The response from the server will contain the same identifier as the request. This identifier does not define the type of request and can accept any values in the range from 0 to 65 535.

22UINT16

Message Length

The full length of the message, excluding the Tag ID and Message Length fields.

41UINT8

Message Type

An important field that defines the type of message. The message type indicates the number of the function that will be or has been executed by the C3 Bridge Interface.

+ + + + + + + + +
+ + + +
+

3.3. ERROR CODES

+

The full list of error codes can be found in the file include/c3bi.h.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CodeNameDescription
0ErrorGeneralUnspecified error.
In some cases it may be the result of an E_FAIL error from the Windows COM subsystem.
1ErrorSuccessNot an error.
The operation was successful.
2ErrorAccessGeneral access denied error.
COM equivalent: E_ACCESSDENIED.
3ErrorArgumentOne or more arguments are not valid.
COM equivalent: E_INVALIDARG.
4ErrorMemoryFailed to allocate necessary memory.
COM equivalent: E_OUTOFMEMORY.
5ErrorPointerNULL was passed incorrectly for a pointer value.
COM equivalent: E_POINTER.
6ErrorUnexpectedUnexpected failure.
COM equivalent: E_UNEXPECTED.
7ErrorNotImplementedThe requested function has not been implemented.
In some cases it may be the result of an E_NOTIMPL error from the Windows COM subsystem. +
8ErrorNoInterfaceNo such interface supported.
COM equivalent: E_NOINTERFACE.
9ErrorProtocolError in message content, incorrect number of fields, or their values.
10ErrorLongAnswerThe response message is too big. The data cannot fit into a single message.
+ + + + + + + + +
+ +
+

3.4. MESSAGE TYPES

+

The full list of message types can be found in the file include/c3bi.h.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeName
0CommandReadVariableAscii
1CommandWriteVariableAscii
2CommandReadArrayAscii
3CommandWriteArrayAscii
4CommandReadVariable
5CommandWriteVariable
6CommandReadMultiple
7CommandWriteMultiple
8Reserved
9
10CommandProgramControl
11CommandMotion
12CommandKcpAction
13CommandProxyInfo
14CommandProxyFeatures
15CommandProxyInfoEx
16CommandProxyCrossInfo
17CommandProxyBenchmark
18Reserved
19
20CommandFileSetAttribute
21CommandFileNameList
22CommandFileCreate
23CommandFileDelete
24CommandFileCopy
25CommandFileMove
26CommandFileGetProperties
27CommandFileGetFullName
28CommandFileGetKrcName
29CommandFileWriteContent
30CommandFileReadContent
31Reserved
...
49
50CommandCrossSetInfoOn
51CommandCrossSetInfoOff
52CommandCrossGetRobotDirectory
53CommandCrossDownloadDiskToRobot
54CommandCrossDownloadMemToRobot
55CommandCrossUploadFromRobotToDisk
56CommandCrossUploadFromRobotToMem
57CommandCrossDeleteRobotProgram
58CommandCrossRobotLevelStop
59CommandCrossControlLevelStop
60CommandCrossRunControlLevel
61CommandCrossSelectModul
62CommandCrossCancelModul
63CommandCrossConfirmAll
64CommandCrossKrcOk
65CommandCrossIoRestart
66CommandCrossReserved
67
68
69
70Reserved
...
128
129Free Range
...
254
255CommandExtended
+ + + + + + + + +
+ +
+

3.5. MESSAGES FOR VARIABLE HANDLING

+

 

+

3.5.1. MESSAGE #0. READ VARIABLE (ASCII)

+

Minimum supported version: 1.0.0 (Open Source)

+

Support in KukavarProxy: Yes

+

 

+

PURPOSE

+

Retrieving the value of KRL variable or internal variable (ASCII version).

+

 

+

REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 0
P
A
Y
L
O
A
D
52UINT16

LVN

Length of Variable Name

7LVNSTRINGVariable Name
+

 

+

RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 0
P
A
Y
L
O
A
D
52UINT16

LVV

Length of Variable Value

7LVVSTRINGVariable Value
F
O
O
T
E
R
variable2UINT16Error Code
variable1BOOLSuccess Flag
+

 

+

SAMPLE REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 0123456789ABCDEF
000000100000E00000B24414343555F535441
000105445              
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeValue
H
E
A
D
E
R
02UINT16256
22UINT1614
41UINT80
P
A
Y
L
O
A
D
52UINT1611
711STRING$ACCU_STATE
+

 

+

SAMPLE RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 0123456789ABCDEF
000000100001000000A234348415247455F4F
000104B000101            
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeValue
H
E
A
D
E
R
02UINT16256
22UINT1616
41UINT80
P
A
Y
L
O
A
D
52UINT1610
710STRING#CHARGE_OK
F
O
O
T
E
R
172UINT161
191BOOLTRUE
+

 

+

POSSIBLE ERROR CODES

+ + + + + + + + + + + + + +
CodeName
0ErrorGeneral
1ErrorSuccess
+

 

+

INTERNAL VARIABLES

+

C3 Bridge Interface contains several internal variables whose values can be obtained with the Read Variable message. Access to the internal variable is possible provided that there is no variable with the same name in the KRL system.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Variable NameVariable Value
PINGPONG
@PROXY_TYPEC3 BRIDGE INTERFACE
@PROXY_VERSIONLook at section 2.3. PROXY VERSION REQUEST
@PROXY_FEATURESLook at section 2.4. PROXY FEATURES REQUEST
@PROXY_HOSTNAMELook at section 2.5. COMPUTER NAME REQUEST
@PROXY_TIMELook at section 2.6. DATE AND TIME REQUEST
@PROXY_ADDRESSLook at section 2.7. PROXY LISTENING ADDRESS REQUEST
@PROXY_PORTLook at section 2.8. PROXY LISTENING PORT REQUEST
@PROXY_ENABLEDLook at section 2.9. PROXY ENABLED REQUEST
+

NOTES

+
  • The PING variable is also supported by KukavarProxy.
+ + + + + + + + +
+ +
+

3.5.2. MESSAGE #1. WRITE VARIABLE (ASCII)

+

Minimum supported version: 1.0.0 (Open Source)

+

Support in KukavarProxy: Yes

+

 

+

PURPOSE

+

Writing the new value of the KRL variable (ASCII version).

+

 

+

REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 1
P
A
Y
L
O
A
D
52UINT16

LVN

Length of Variable Name

7LVNSTRINGVariable Name
variable2UINT16

LVV

Length of Variable Value

variableLVVSTRINGVariable Value
+

 

+

RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 1
P
A
Y
L
O
A
D
52UINT16

LVV

Length of Variable Value

7LVVSTRINGVariable Value
F
O
O
T
E
R
variable2UINT16Error Code
variable1BOOLSuccess Flag
+

 

+

SAMPLE REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 0123456789ABCDEF
000000100000E010007244F565F50524F0002
000103335              
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeValue
H
E
A
D
E
R
02UINT16256
22UINT1614
41UINT81
P
A
Y
L
O
A
D
52UINT167
77STRING$OV_PRO
142UINT162
162STRING35
+

 

+

SAMPLE RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 0123456789ABCDEF
00000010000080100023335000101    
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeValue
H
E
A
D
E
R
02UINT16256
22UINT168
41UINT81
P
A
Y
L
O
A
D
52UINT162
72STRING35
F
O
O
T
E
R
92UINT161
111BOOLTRUE
+

 

+

POSSIBLE ERROR CODES

+ + + + + + + + + + + + + +
CodeName
0ErrorGeneral
1ErrorSuccess
+ + + + + + + + +
+ +
+

3.5.3. MESSAGE #2. READ ARRAY (ASCII)

+

Minimum supported version: None

+

Support in KukavarProxy: Yes

+

 

+

PURPOSE

+

(Translated from KukavarProxy source code)

+

Reading and formatting an array variable for the PLC.

+

 

+

 

+

3.5.4. MESSAGE #3. WRITE ARRAY (ASCII)

+

Minimum supported version: None

+

Support in KukavarProxy: Yes

+

 

+

PURPOSE

+

(Translated from KukavarProxy source code)

+

Writing an array variable to the PLC.

+

 

+ + + + + + + + +
+ +
+

3.5.5. MESSAGE #4. READ VARIABLE

+

Minimum supported version: 1.0.0 (Open Source)

+

Support in KukavarProxy: No

+

 

+

PURPOSE

+

Retrieving the value of KRL variable or internal variable.

+

 

+

REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 4
P
A
Y
L
O
A
D
52UINT16

LVN

Length of Variable Name (in characters)

7LVN × 2WSTRINGVariable Name
+

 

+

RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 4
P
A
Y
L
O
A
D
52UINT16

LVV

Length of Variable Value (in characters)

7LVV × 2WSTRINGVariable Value
F
O
O
T
E
R
variable2UINT16Error Code
variable1BOOLSuccess Flag
+

 

+

SAMPLE REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 0123456789ABCDEF
000000200001504000924004100430054005F
00010004200410053004500       
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeValue
H
E
A
D
E
R
02UINT16512
22UINT1621
41UINT84
P
A
Y
L
O
A
D
52UINT169
718WSTRING$ACT_BASE
+

 

+

SAMPLE RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 0123456789ABCDEF
00000020000080400013100000101    
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeValue
H
E
A
D
E
R
02UINT16512
22UINT168
41UINT84
P
A
Y
L
O
A
D
52UINT161
72WSTRING1
F
O
O
T
E
R
92UINT161
111BOOLTRUE
+

 

+

POSSIBLE ERROR CODES

+ + + + + + + + + + + + + + + + + +
CodeName
0ErrorGeneral
1ErrorSuccess
9ErrorProtocol
+

 

+

INTERNAL VARIABLES

+

Look at section 3.5.1. MESSAGE #0. READ VARIABLE (ASCII).

+ + + + + + + + +
+ +
+

3.5.6. MESSAGE #5. WRITE VARIABLE

+

Minimum supported version: 1.0.0 (Open Source)

+

Support in KukavarProxy: No

+

 

+

PURPOSE

+

Writing the new value of the KRL variable.

+

 

+

REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 5
P
A
Y
L
O
A
D
52UINT16

LVN

Length of Variable Name (in characters)

7LVN × 2WSTRINGVariable Name
variable2UINT16

LVV

Length of Variable Value (in characters)

variableLVV × 2WSTRINGVariable Value
+

 

+

RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 5
P
A
Y
L
O
A
D
52UINT16

LVV

Length of Variable Value (in characters)

7LVV × 2WSTRINGVariable Value
F
O
O
T
E
R
variable2UINT16Error Code
variable1BOOLSuccess Flag
+

 

+

SAMPLE REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 0123456789ABCDEF
000000100001505000724004F0056005F0050
000100052004F0000013500       
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeValue
H
E
A
D
E
R
02UINT16256
22UINT1621
41UINT85
P
A
Y
L
O
A
D
52UINT167
714WSTRING$OV_PRO
212UINT161
232WSTRING5
+

 

+

SAMPLE RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 0123456789ABCDEF
00000010000080500013500000101    
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeValue
H
E
A
D
E
R
02UINT16256
22UINT168
41UINT85
P
A
Y
L
O
A
D
52UINT161
72WSTRING5
F
O
O
T
E
R
92UINT161
111BOOLTRUE
+

 

+

POSSIBLE ERROR CODES

+ + + + + + + + + + + + + + + + + +
CodeName
0ErrorGeneral
1ErrorSuccess
9ErrorProtocol
+ + + + + + + + +
+ +
+

3.5.7. MESSAGE #6. READ MULTIPLE VARIABLES

+

Minimum supported version: 1.0.0 (Open Source)

+

Support in KukavarProxy: No

+

 

+

WARNING

+

Do not use this function with the C3 Bridge Interface server versions lower than 1.2.0 (Open Source).

+

Earlier implementations did not work correctly.

+

 

+

PURPOSE

+

Retrieving the values of several KRL variables or internal variables.

+

 

+

REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 6
P
A
Y
L
O
A
D
51UINT8Number of Variables
Value: 0-255
OPTIONAL
62UINT16

LVN1

Length of Variable 1 (in characters)

8LVN1 × 2WSTRINGVariable 1
...
variable2UINT16

LVNL

Length of Last Variable (in characters)

variableLVNL × 2WSTRINGLast Variable
+

 

+

RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 6
P
A
Y
L
O
A
D
51UINT8Number of Variables
61UINT8

CODE1

Error code of Variable 1 request (look at section 3.3. ERROR CODES)

72UINT16

LVV1

Length of Variable 1 Value (in characters)

9LVV1 × 2WSTRINGVariable 1 Value
...
variable1UINT8

CODEL

Error code of Last Variable request (look at section 3.3. ERROR CODES)

variable2UINT16

LVVL

Length of Last Variable Value (in characters)

variableLVVL × 2WSTRINGLast Variable Value
F
O
O
T
E
R
variable2UINT16Error Code
variable1BOOLSuccess Flag
+

 

+

SAMPLE REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 0123456789ABCDEF
000000400002406020004500049004E004700
00010000B4000500052004F00580059005F00
0002050004F0052005400        
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeValue
H
E
A
D
E
R
02UINT161024
22UINT1636
41UINT86
P
A
Y
L
O
A
D
51UINT82
62UINT164
88WSTRINGPING
162UINT1611
1822WSTRING@PROXY_PORT
+

 

+

SAMPLE RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 0123456789ABCDEF
000000400001B060201000450004F004E0047
00010000100043700300030003000000101 
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeValue
H
E
A
D
E
R
02UINT161024
22UINT1627
41UINT86
P
A
Y
L
O
A
D
51UINT82
61UINT81
72UINT164
98WSTRINGPONG
171UINT81
182UINT164
208WSTRING7000
F
O
O
T
E
R
282UINT161
301BOOLTRUE
+

 

+

POSSIBLE ERROR CODES

+ + + + + + + + + + + + + + + + + + + + + +
CodeName
0ErrorGeneral
1ErrorSuccess
9ErrorProtocol
10ErrorLongAnswer
+

 

+

INTERNAL VARIABLES

+

Look at section 3.5.1. MESSAGE #0. READ VARIABLE (ASCII).

+ + + + + + + + +
+ +
+

3.5.8. MESSAGE #7. WRITE MULTIPLE VARIABLES

+

Minimum supported version: 1.0.0 (Open Source)

+

Support in KukavarProxy: No

+

 

+

WARNING

+

Do not use this function with the C3 Bridge Interface server versions lower than 1.3.0 (Open Source).

+

Earlier implementations did not work correctly.

+

 

+

PURPOSE

+

Writing new values of several KRL variables.

+

 

+

REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 7
P
A
Y
L
O
A
D
51UINT8Number of Variables
Value: 0-255
OPTIONAL
62UINT16

LVN1

Length of Variable 1 (in characters)

8LVN1 × 2WSTRINGVariable 1
variable2UINT16

LVV1

Length of Variable 1 Value (in characters)

variableLVV1 × 2WSTRINGVariable 1 Value
...
variable2UINT16

LVNL

Length of Last Variable (in characters)

variableLVNL × 2WSTRINGLast Variable
variable2UINT16

LVVL

Length of Last Variable Value (in characters)

variableLVVL × 2WSTRINGLast Variable Value
+

 

+

RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 7
P
A
Y
L
O
A
D
51UINT8Number of Variables
61UINT8

CODE1

Error code of Variable 1 request (look at section 3.3. ERROR CODES)

72UINT16

LVV1

Length of Variable 1 Value (in characters)

9LVV1 × 2WSTRINGVariable 1 Value
...
variable1UINT8

CODEL

Error code of Last Variable request (look at section 3.3. ERROR CODES)

variable2UINT16

LVVL

Length of Last Variable Value (in characters)

variableLVVL × 2WSTRINGLast Variable Value
F
O
O
T
E
R
variable2UINT16Error Code
variable1BOOLSuccess Flag
+

 

+

SAMPLE REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 0123456789ABCDEF
00000040000300702000724004F0056005F00
00010500052004F0000023300370000072400
000204F0056005F004A004F00470000033100
0003030003000            
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeValue
H
E
A
D
E
R
02UINT161024
22UINT1648
41UINT87
P
A
Y
L
O
A
D
51UINT82
62UINT167
814WSTRING$OV_PRO
222UINT162
244WSTRING37
282UINT167
3014WSTRING$OV_JOG
442UINT163
466WSTRING100
+

 

+

SAMPLE RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 0123456789ABCDEF
0000004000015070201000233003700010003
00010310030003000000101       
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeValue
H
E
A
D
E
R
02UINT161024
22UINT1621
41UINT87
P
A
Y
L
O
A
D
51UINT82
61UINT81
72UINT162
94WSTRING37
131UINT81
142UINT163
166WSTRING100
F
O
O
T
E
R
222UINT161
241BOOLTRUE
+

 

+

POSSIBLE ERROR CODES

+ + + + + + + + + + + + + + + + + + + + + +
CodeName
0ErrorGeneral
1ErrorSuccess
9ErrorProtocol
10ErrorLongAnswer
+ + + + + + + + +
+ +
+

3.6. MESSAGES FOR KRL PROGRAM HANDLING

+

 

+

3.6.1. MESSAGE #10. PROGRAM CONTROL (SUBTYPE I)

+

Minimum supported version: 1.0.0 (Open Source)

+

Support in KukavarProxy: No

+

 

+

PURPOSE

+

Reset, start, stop or cancel the KRL program.

+

 

+

REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 10
P
A
Y
L
O
A
D
51UINT8Command code:
1 — Reset
2 — Start
3 — Stop
4 — Cancel
62UINT16Interpreter Type:
0 — Submit Interpreter
1 — Robot Interpreter
+

 

+

RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 10
P
A
Y
L
O
A
D
51UINT8Command code
F
O
O
T
E
R
62UINT16Error Code
81BOOLSuccess Flag
+

 

+

SAMPLE REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 0123456789ABCDEF
00000028C00040A010000        
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeValue
H
E
A
D
E
R
02UINT16652
22UINT164
41UINT810
P
A
Y
L
O
A
D
51UINT81
62UINT160
+

 

+

SAMPLE RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 0123456789ABCDEF
00000028C00050A01000101       
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeValue
H
E
A
D
E
R
02UINT16652
22UINT165
41UINT810
P
A
Y
L
O
A
D
51UINT81
F
O
O
T
E
R
62UINT161
81BOOLTRUE
+

 

+

POSSIBLE ERROR CODES

+ + + + + + + + + + + + + + + + + + + + + +
CodeName
0ErrorGeneral
1ErrorSuccess
7ErrorNotImplemented
9ErrorProtocol
+ + + + + + + + +
+ +
+

3.6.2. MESSAGE #10. PROGRAM CONTROL (SUBTYPE II)

+

Minimum supported version: 1.0.0 (Open Source)

+

Support in KukavarProxy: No

+

 

+

PURPOSE

+

Select or run the KRL program.

+

 

+

REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 10
P
A
Y
L
O
A
D
51UINT8Command code:
5 — Select
6 — Run
62UINT16Interpreter Type
(NOT USED)
82UINT16

LN

Length of Name (in characters)

10LN × 2WSTRINGName
variable2UINT16

LP

Length of Parameters (in characters)

variableLP × 2WSTRINGParameters
variable1BOOLForce Select/Run
+

 

+

RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 10
P
A
Y
L
O
A
D
51UINT8Command code
F
O
O
T
E
R
62UINT16Error Code
81BOOLSuccess Flag
+

 

+

POSSIBLE ERROR CODES

+ + + + + + + + + + + + + + + + + + + + + +
CodeName
0ErrorGeneral
1ErrorSuccess
7ErrorNotImplemented
9ErrorProtocol
+ + + + + + + + +
+ +
+

3.7. MESSAGES FOR MANUAL ROBOT CONTROL

+

 

+

3.7.1. MESSAGE #11. MOTION CONTROL

+

Minimum supported version: 1.0.0 (Open Source)

+

Support in KukavarProxy: No

+

 

+

PURPOSE

+

Initiate a movement of type PTP, PTP_REL, LIN or LIN_REL.

+

 

+

REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 11
P
A
Y
L
O
A
D
51UINT8Motion Type:
1 — PTP
2 — LIN
3 — PTP_REL
4 — LIN_REL
62UINT16

LP

Length of Position String (in characters)

8LP × 2WSTRINGPosition String
+

 

+

RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 11
P
A
Y
L
O
A
D
51UINT8Motion Type
F
O
O
T
E
R
62UINT16Error Code
81BOOLSuccess Flag
+

 

+

SAMPLE REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 0123456789ABCDEF
000000080004A0B0100237B0050004F005300
000103A0020005800200030002C0020005900
00020200030002C0020005A00200030002C00
0003020004100200030002C00200042002000
0004030002C0020004300200030007D00  
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeValue
H
E
A
D
E
R
02UINT16128
22UINT1674
41UINT811
P
A
Y
L
O
A
D
51UINT81
62UINT1635
870WSTRING{POS: X 0, Y 0, Z 0, A 0, B 0, C 0}
+

 

+

SAMPLE RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 0123456789ABCDEF
00000008000050B01000101       
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeValue
H
E
A
D
E
R
02UINT16128
22UINT165
41UINT811
P
A
Y
L
O
A
D
51UINT81
F
O
O
T
E
R
62UINT161
81BOOLTRUE
+

 

+

POSSIBLE ERROR CODES

+ + + + + + + + + + + + + + + + + + + + + +
CodeName
0ErrorGeneral
1ErrorSuccess
7ErrorNotImplemented
9ErrorProtocol
+ + + + + + + + +
+ +
+

3.7.2. MESSAGE #12. KCP KEY EMULATION

+

Minimum supported version: 1.0.0 (Open Source)

+

Support in KukavarProxy: No

+

 

+

PURPOSE

+

Emulation of button pushing on the KCP device.

+

 

+

REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 12
P
A
Y
L
O
A
D
51UINT8Key Type:
1 — Start Key
2 — Stop Key
3 — Jog Key
4 — 6D Space Mouse
64INT32Interpreter Type:
0 — Submit Interpreter
1 — Robot Interpreter
or
Axis Number
104INT32Key Code
141BOOLDirection
+

 

+

RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 12
P
A
Y
L
O
A
D
51UINT8Key Type
F
O
O
T
E
R
62UINT16Error Code
81BOOLSuccess Flag
+

 

+

POSSIBLE ERROR CODES

+ + + + + + + + + + + + + + + + + + + + + +
CodeName
0ErrorGeneral
1ErrorSuccess
7ErrorNotImplemented
9ErrorProtocol
+ + + + + + + + +
+ +
+

3.8. SERVICE MESSAGES

+

 

+

3.8.1. MESSAGE #13. GET PROXY INFORMATION

+

Minimum supported version: 1.0.0 (Open Source)

+

Support in KukavarProxy: No

+

 

+

PURPOSE

+

Request information about the C3 Bridge Interface Server.

+

 

+

REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 13
P
A
Y
L
O
A
D
NO PAYLOAD
+

 

+

RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 13
P
A
Y
L
O
A
D
51UINT8Version Major Number
61UINT8Version Minor Number
71UINT8Version Type
(look at section 1.1. SOFTWARE VERSIONING)
82UINT16Current Year
102UINT16Current Month
122UINT16Current Day of Week
142UINT16Current Day
162UINT16Current Hour (UTC)
182UINT16Current Minute (UTC)
202UINT16Current Second (UTC)
222UINT16Current Millisecond
242UINT16

LCN

Length of Computer Name (in characters)

26LCN × 2WSTRINGComputer Name
F
O
O
T
E
R
variable2UINT16Error Code
variable1BOOLSuccess Flag
+

 

+

SAMPLE REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 0123456789ABCDEF
00000000000010D           
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeValue
H
E
A
D
E
R
02UINT160
22UINT161
41UINT813
+

 

+

SAMPLE RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 0123456789ABCDEF
000000000002F0D01000007E4000800020004
000100008003800060379000B560044004D00
0002048004F00530054005400450053005400
00030000101             
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeValue
H
E
A
D
E
R
02UINT160
22UINT1647
41UINT813
P
A
Y
L
O
A
D
51UINT81
61UINT80
71UINT80
82UINT162020
102UINT168
122UINT162
142UINT164
162UINT168
182UINT1656
202UINT166
222UINT16889
242UINT1611
2622WSTRINGVDMHOSTTEST
F
O
O
T
E
R
482UINT161
501BOOLTRUE
+

 

+

POSSIBLE ERROR CODES

+ + + + + + + + + +
CodeName
1ErrorSuccess
+ + + + + + + + +
+ +
+

3.8.2. MESSAGE #14. GET PROXY FEATURES

+

Minimum supported version: 1.0.0 (Open Source)

+

Support in KukavarProxy: No

+

 

+

PURPOSE

+

Request the list of supported messages for the primary protocol of the C3 Bridge Interface Server.

+

 

+

REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 14
P
A
Y
L
O
A
D
NO PAYLOAD
+

 

+

RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 14
P
A
Y
L
O
A
D
51UINT8Bit field of available messages:
from 255 to 248
61UINT8Bit field of available messages:
from 247 to 240
71UINT8Bit field of available messages:
from 239 to 232
81UINT8Bit field of available messages:
from 231 to 224
91UINT8Bit field of available messages:
from 223 to 216
101UINT8Bit field of available messages:
from 215 to 208
111UINT8Bit field of available messages:
from 207 to 200
121UINT8Bit field of available messages:
from 199 to 192
131UINT8Bit field of available messages:
from 191 to 184
141UINT8Bit field of available messages:
from 183 to 176
151UINT8Bit field of available messages:
from 175 to 168
161UINT8Bit field of available messages:
from 167 to 160
171UINT8Bit field of available messages:
from 159 to 152
181UINT8Bit field of available messages:
from 151 to 144
191UINT8Bit field of available messages:
from 143 to 136
201UINT8Bit field of available messages:
from 135 to 128
211UINT8Bit field of available messages:
from 127 to 120
221UINT8Bit field of available messages:
from 119 to 112
231UINT8Bit field of available messages:
from 111 to 104
241UINT8Bit field of available messages:
from 103 to 96
251UINT8Bit field of available messages:
from 95 to 88
261UINT8Bit field of available messages:
from 87 to 80
271UINT8Bit field of available messages:
from 79 to 72
281UINT8Bit field of available messages:
from 71 to 64
291UINT8Bit field of available messages:
from 63 to 56
301UINT8Bit field of available messages:
from 55 to 48
311UINT8Bit field of available messages:
from 47 to 40
321UINT8Bit field of available messages:
from 39 to 32
331UINT8Bit field of available messages:
from 31 to 24
341UINT8Bit field of available messages:
from 23 to 16
351UINT8Bit field of available messages:
from 15 to 8
361UINT8Bit field of available messages:
from 7 to 0
F
O
O
T
E
R
372UINT16Error Code
391BOOLSuccess Flag
+

 

+

SAMPLE REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 0123456789ABCDEF
00000000000010E           
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeValue
H
E
A
D
E
R
02UINT160
22UINT161
41UINT814
+

 

+

SAMPLE RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 0123456789ABCDEF
00000000000240E0000000000000000000000
0001000000000000000000000000000800000
000200000007CF3000101        
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeValue
H
E
A
D
E
R
02UINT160
22UINT1636
41UINT814
P
A
Y
L
O
A
D
51UINT80
61UINT80
71UINT80
81UINT80
91UINT80
101UINT80
111UINT80
121UINT80
131UINT80
141UINT80
151UINT80
161UINT80
171UINT80
181UINT80
191UINT80
201UINT80
211UINT80
221UINT80
231UINT80
241UINT80
251UINT80
261UINT80
271UINT80
281UINT80
291UINT8128
301UINT80
311UINT80
321UINT80
331UINT80
341UINT80
351UINT8124
361UINT8243
F
O
O
T
E
R
372UINT161
391BOOLTRUE
+

 

+

POSSIBLE ERROR CODES

+ + + + + + + + + +
CodeName
1ErrorSuccess
+ + + + + + + + +
+ +
+

3.8.3. MESSAGE #15. GET PROXY INFORMATION (EXTENDED)

+

Minimum supported version: None

+

Support in KukavarProxy: No

+

 

+

This feature has not yet been implemented; the section is reserved for future use.

+

 

+

 

+

3.8.4. MESSAGE #16. GET CROSS3 INFORMATION

+

Minimum supported version: None

+

Support in KukavarProxy: No

+

 

+

This feature has not yet been implemented; the section is reserved for future use.

+

 

+ + + + + + + + +
+ +
+

3.8.5. MESSAGE #17. PERFORM PROXY BENCHMARK

+

Minimum supported version: 1.2.0 (Open Source)

+

Support in KukavarProxy: No

+

 

+

PURPOSE

+

Calculation of execution time for multiple read or write operations of KRL variables.

+

 

+

REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 17
P
A
Y
L
O
A
D
51BOOL

WRITE

Type of Operation:
FALSE — Read
TRUE — Write

61UINT8Count of Variables
Value: 0-255
74UINT32Number of Iterations
Value: 0-4294967294
OPTIONAL
112UINT16

LVN1

Length of Variable 1 (in characters)

13LVN1 × 2WSTRINGVariable 1
variable2UINT16

LVV1

ONLY WHEN WRITE is TRUE
Length of Variable 1 Value (in characters)

variableLVV1 × 2WSTRINGONLY WHEN WRITE is TRUE
Variable 1 Value
...
variable2UINT16

LVNL

Length of Last Variable (in characters)

variableLVNL × 2WSTRINGLast Variable
variable2UINT16

LVVL

ONLY WHEN WRITE is TRUE
Length of Last Variable Value (in characters)

variableLVVL × 2WSTRINGONLY WHEN WRITE is TRUE
Last Variable Value
+

 

+

RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 17
P
A
Y
L
O
A
D
51BOOL

WRITE

Type of Operation:
FALSE — Read
TRUE — Write

61UINT8Count of Variables
74UINT32Number of Iterations
114UINT32Start Time (ms)
154UINT32Stop Time (ms)
194UINT32Time Difference (ms)
F
O
O
T
E
R
232UINT16Error Code
251BOOLSuccess Flag
+

 

+

POSSIBLE ERROR CODES

+ + + + + + + + + + + + + +
CodeName
1ErrorSuccess
9ErrorProtocol
+ + + + + + + + +
+ +
+

3.9. MESSAGES FOR FILE OPERATIONS

+

 

+

3.9.1. CONSTANT VALUES

+

This section lists the basic constants used in file system operations.

+

 

+

3.9.1.1. Item Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueName
0None
1Read Only
2Hidden
4System
16Directory
32Archive
16 384Encrypted
268 435 456Signed
+

 

+

3.9.1.2. Item Types

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueName
0Unknown
1Directory
2Virtual Directory
4Archive
8Binary File
16Text File
32Module
64Raw
128Motion File
256Protected File Container
+

 

+

3.9.1.3. Item List Flags

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueName
0None
1Recursive
2Expand
4Long
8Old Long
16No PFC
32PFC as File
64ZIP as File
+

 

+

3.9.1.4. Module Parts

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueName
0Unknown
1SUB
2SRC
4DAT
5SUBDAT
6SRCDAT
8Template
16Motion
+

 

+

3.9.1.5. Copy Flags

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueName
0None
1Archive
3Modify
4Continue
8Recursive
16Refresh
48Update
64Overwrite Exists
128No Directory Entries
256Junk Directory
512Force Binary
1024Force Text
2048No Version Check
4096Overwrite Read
8192No KRL Analysis
+

 

+

3.9.1.6. Item Property Flags

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueName
0None
1Type
2Name
4Size
8Attributes
16Creation Time
32Access Time
64Modified Time
128Edit Mode
256All
+

 

+

3.9.1.7. Edit Modes

+ + + + + + + + + + + + + + + + + + + + + + + + + +
ValueName
-1Unknown
0Full Edit
1DatKor
2ProKor
3Read Only
+

 

+

3.9.1.8. File IO Operations

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueName
0None
1Begin Operation
2Data Transfer
3Get Data Size
4End Operation
5Get Data Checksum
+ + + + + + + + +
+ +
+

3.9.2. MESSAGE #20. SET FILE ATTRIBUTES

+

Minimum supported version: 1.1.2 (Freeware)

+

Support in KukavarProxy: No

+

 

+

PURPOSE

+

Changes file attributes.

+

 

+

REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 20
P
A
Y
L
O
A
D
54INT32Attributes
3.9.1.1. Item Attributes
94INT32Mask
3.9.1.1. Item Attributes
132UINT16

LN

Length of Name (in characters)

15LN × 2WSTRINGName
+

 

+

RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 20
P
A
Y
L
O
A
D
NO PAYLOAD
F
O
O
T
E
R
52UINT16Error Code
71BOOLSuccess Flag
+

 

+

POSSIBLE ERROR CODES

+ + + + + + + + + + + + + + + + + + + + + +
CodeName
0ErrorGeneral
1ErrorSuccess
7ErrorNotImplemented
9ErrorProtocol
+ + + + + + + + +
+ +
+

3.9.3. MESSAGE #21. LIST DIRECTORY CONTENTS

+

Minimum supported version: 1.1.2 (Freeware)

+

Support in KukavarProxy: No

+

 

+

PURPOSE

+

Get a list of files and subdirectories in a directory.

+

 

+

REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 21
P
A
Y
L
O
A
D
54INT32Item Type
3.9.1.2. Item Types
94INT32Flags
3.9.1.3. Item List Flags
132UINT16

LP

Length of Path (in characters)

15LP × 2WSTRINGPath
+

 

+

RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 21
P
A
Y
L
O
A
D
52UINT16Count of Items
72UINT16

IL1

Length of First Item

9IL1 × 2WSTRINGFirst Item
...
variable2UINT16

ILL

Length of Last Item

variableILL × 2WSTRINGLast Item
variable2UINT16Count of Item Infos
variable2UINT16

IIL1

Length of First Item Info

variableIIL1 × 2WSTRINGFirst Item Info
...
variable2UINT16

IILL

Length of Last Item Info

variableIILL × 2WSTRINGLast Item Info
F
O
O
T
E
R
variable2UINT16Error Code
variable1BOOLSuccess Flag
+

 

+

POSSIBLE ERROR CODES

+ + + + + + + + + + + + + + + + + + + + + + + + + +
CodeName
0ErrorGeneral
1ErrorSuccess
7ErrorNotImplemented
9ErrorProtocol
10ErrorLongAnswer
+ + + + + + + + +
+ +
+

3.9.4. MESSAGE #22. CREATE NEW FILE

+

Minimum supported version: 1.1.2 (Freeware)

+

Support in KukavarProxy: No

+

 

+

PURPOSE

+

Create a new text file, binary file or KRL module.

+

 

+

REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 22
P
A
Y
L
O
A
D
52UINT16Item Type
3.9.1.2. Item Types
71UINT8Module Part
3.9.1.4. Module Parts
81BOOLAlways Create
92UINT16

LN

Length of Name (in characters)

11LN × 2WSTRINGName
variable2UINT16

LTP

Length of Template (in characters)

variableLTP × 2WSTRINGTemplate
+

 

+

RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 22
P
A
Y
L
O
A
D
NO PAYLOAD
F
O
O
T
E
R
52UINT16Error Code
71BOOLSuccess Flag
+

 

+

POSSIBLE ERROR CODES

+ + + + + + + + + + + + + + + + + + + + + +
CodeName
0ErrorGeneral
1ErrorSuccess
7ErrorNotImplemented
9ErrorProtocol
+ + + + + + + + +
+ +
+

3.9.5. MESSAGE #23. DELETE FILE

+

Minimum supported version: 1.1.2 (Freeware)

+

Support in KukavarProxy: No

+

 

+

PURPOSE

+

Delete a file.

+

 

+

REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 23
P
A
Y
L
O
A
D
51BOOLAlways Delete
62UINT16

LN

Length of Name (in characters)

8LN × 2WSTRINGName
+

 

+

RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 23
P
A
Y
L
O
A
D
NO PAYLOAD
F
O
O
T
E
R
52UINT16Error Code
71BOOLSuccess Flag
+

 

+

POSSIBLE ERROR CODES

+ + + + + + + + + + + + + + + + + + + + + +
CodeName
0ErrorGeneral
1ErrorSuccess
7ErrorNotImplemented
9ErrorProtocol
+ + + + + + + + +
+ +
+

3.9.6. MESSAGE #24. COPY FILE

+

Minimum supported version: 1.1.2 (Freeware)

+

Support in KukavarProxy: No

+

 

+

PURPOSE

+

Copy a file to another location.

+

 

+

REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 24
P
A
Y
L
O
A
D
54INT32Flags
3.9.1.5. Copy Flags
92UINT16

LS

Length of Source (in characters)

11LS × 2WSTRINGSource
variable2UINT16

LD

Length of Destination (in characters)

variableLD × 2WSTRINGDestination
+

 

+

RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 24
P
A
Y
L
O
A
D
NO PAYLOAD
F
O
O
T
E
R
52UINT16Error Code
71BOOLSuccess Flag
+

 

+

POSSIBLE ERROR CODES

+ + + + + + + + + + + + + + + + + + + + + +
CodeName
0ErrorGeneral
1ErrorSuccess
7ErrorNotImplemented
9ErrorProtocol
+ + + + + + + + +
+ +
+

3.9.7. MESSAGE #25. MOVE FILE

+

Minimum supported version: 1.1.2 (Freeware)

+

Support in KukavarProxy: No

+

 

+

PURPOSE

+

Move a file to another location.

+

 

+

REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 25
P
A
Y
L
O
A
D
54INT32Flags
3.9.1.5. Copy Flags
92UINT16

LS

Length of Source (in characters)

11LS × 2WSTRINGSource
variable2UINT16

LD

Length of Destination (in characters)

variableLD × 2WSTRINGDestination
+

 

+

RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 25
P
A
Y
L
O
A
D
NO PAYLOAD
F
O
O
T
E
R
52UINT16Error Code
71BOOLSuccess Flag
+

 

+

POSSIBLE ERROR CODES

+ + + + + + + + + + + + + + + + + + + + + +
CodeName
0ErrorGeneral
1ErrorSuccess
7ErrorNotImplemented
9ErrorProtocol
+ + + + + + + + +
+ +
+

3.9.8. MESSAGE #26. GET FILE PROPERTIES

+

Minimum supported version: 1.1.2 (Freeware)

+

Support in KukavarProxy: No

+

 

+

PURPOSE

+

Getting a file's type, attributes, size and time.

+

 

+

REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 26
P
A
Y
L
O
A
D
54INT32Flags
3.9.1.6. Item Property Flags
92UINT16

LN

Length of Name (in characters)

11LN × 2WSTRINGName
+

 

+

RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 26
P
A
Y
L
O
A
D
54INT32Item Type
3.9.1.2. Item Types
94INT32Item Size (Low Part)
134INT32Item Size (High Part)
174INT32Attributes
3.9.1.1. Item Attributes
214INT32Creation Time (Low Part)
A Windows file creation time expressed in ticks
254INT32Creation Time (High Part)
294INT32Creation Time Bias (minutes)
334INT32Access Time (Low Part)
A Windows file last access time expressed in ticks
374INT32Access Time (High Part)
414INT32Access Time Bias (minutes)
454INT32Modified Time (Low Part)
A Windows file last modification time expressed in ticks
494INT32Modified Time (High Part)
534INT32Modified Time Bias (minutes)
574INT32Edit Mode
3.9.1.7. Edit Modes
612UINT16

LN

Length of Item Name (in characters)

63LN × 2WSTRINGItem Name
F
O
O
T
E
R
variable2UINT16Error Code
variable1BOOLSuccess Flag
+

 

+

POSSIBLE ERROR CODES

+ + + + + + + + + + + + + + + + + +
CodeName
0ErrorGeneral
1ErrorSuccess
9ErrorProtocol
+ + + + + + + + +
+ +
+

3.9.9. MESSAGE #27. GET FILE FULL PATH

+

Minimum supported version: 1.1.2 (Freeware)

+

Support in KukavarProxy: No

+

 

+

PURPOSE

+

Getting the full path to a file.

+

For example, the path "/R1/TEST.SRC" will be converted to "KRC:\R1\PROGRAM\TEST.SRC".

+

 

+

REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 27
P
A
Y
L
O
A
D
52UINT16

LP

Length of File Path (in characters)

7LP × 2WSTRINGFile Path
+

 

+

RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 27
P
A
Y
L
O
A
D
52UINT16

LP

Length of Output Path (in characters)

7LP × 2WSTRINGOutput Path
F
O
O
T
E
R
variable2UINT16Error Code
variable1BOOLSuccess Flag
+

 

+

POSSIBLE ERROR CODES

+ + + + + + + + + + + + + + + + + +
CodeName
0ErrorGeneral
1ErrorSuccess
9ErrorProtocol
+ + + + + + + + +
+ +
+

3.9.10. MESSAGE #28. GET KRC PATH

+

Minimum supported version: 1.1.2 (Freeware)

+

Support in KukavarProxy: No

+

 

+

PURPOSE

+

Getting the KRC path to a file.

+

For example, the path "KRC:\R1\PROGRAM\TEST.SRC" will be converted to "/R1/TEST.SRC".

+

 

+

REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 28
P
A
Y
L
O
A
D
52UINT16

LP

Length of File Path (in characters)

7LP × 2WSTRINGFile Path
+

 

+

RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 28
P
A
Y
L
O
A
D
52UINT16

LP

Length of Output Path (in characters)

7LP × 2WSTRINGOutput Path
F
O
O
T
E
R
variable2UINT16Error Code
variable1BOOLSuccess Flag
+

 

+

POSSIBLE ERROR CODES

+ + + + + + + + + + + + + + + + + +
CodeName
0ErrorGeneral
1ErrorSuccess
9ErrorProtocol
+ + + + + + + + +
+ +
+

3.9.11. MESSAGE #29. WRITE FILE CONTENT (BEGINNING)

+

Minimum supported version: 1.1.2 (Freeware)

+

Support in KukavarProxy: No

+

 

+

PURPOSE

+

FileIoBegin: Creates a new buffer of a given size for further data writing to it. Any previously created buffer is destroyed along with the data.

+

FileIoGetSize: Specifies the size of a previously allocated buffer, or 0 if no buffer exists.

+

 

+

REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 29
P
A
Y
L
O
A
D
51UINT8

OPERATION

3.9.1.8. File IO Operations
1 — FileIoBegin
3 — FileIoGetSize

64UINT32ONLY WHEN OPERATION is 1
Total Size (in bytes)
+

 

+

RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 29
P
A
Y
L
O
A
D
51UINT8Operation
64UINT32Buffer Size
F
O
O
T
E
R
102UINT16Error Code
121BOOLSuccess Flag
+

 

+

POSSIBLE ERROR CODES

+ + + + + + + + + + + + + + + + + + + + + +
CodeName
0ErrorGeneral
1ErrorSuccess
7ErrorNotImplemented
9ErrorProtocol
+ + + + + + + + +
+ +
+

3.9.12. MESSAGE #29. WRITE FILE CONTENT (DATA CHUNK)

+

Minimum supported version: 1.1.2 (Freeware)

+

Support in KukavarProxy: No

+

 

+

PURPOSE

+

FileIoData: Writes a chunk of data of a certain size to the buffer at the specified offset.

+

 

+

REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 29
P
A
Y
L
O
A
D
51UINT8

OPERATION

3.9.1.8. File IO Operations
2 — FileIoData

64UINT32Offset (in bytes)
104UINT32

SIZE

Chunk Size (in bytes)

14SIZEBINARYChunk Data
+

 

+

RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 29
P
A
Y
L
O
A
D
51UINT8Operation
Value: 2
64UINT32Offset (in bytes)
104UINT32Size of Bytes Written
F
O
O
T
E
R
142UINT16Error Code
161BOOLSuccess Flag
+

 

+

POSSIBLE ERROR CODES

+ + + + + + + + + + + + + + + + + + + + + +
CodeName
0ErrorGeneral
1ErrorSuccess
7ErrorNotImplemented
9ErrorProtocol
+ + + + + + + + +
+ +
+

3.9.13. MESSAGE #29. WRITE FILE CONTENT (CHECKSUM)

+

Minimum supported version: None

+

Support in KukavarProxy: No

+

 

+

This feature has not yet been implemented; the section is reserved for future use.

+

 

+ + + + + + + + +
+ +
+

3.9.14. MESSAGE #29. WRITE FILE CONTENT (FINAL)

+

Minimum supported version: 1.1.2 (Freeware)

+

Support in KukavarProxy: No

+

 

+

PURPOSE

+

FileIoEnd: Writes the contents of the buffer to a file on disk.

+

 

+

REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 29
P
A
Y
L
O
A
D
51UINT8

OPERATION

3.9.1.8. File IO Operations
4 — FileIoEnd

64INT32Flags
3.9.1.5. Copy Flags
102UINT16

LN

Length of File Name (in characters)

12LN × 2WSTRINGFile Name
+

 

+

RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 29
P
A
Y
L
O
A
D
51UINT8Operation
Value: 4
F
O
O
T
E
R
62UINT16Error Code
81BOOLSuccess Flag
+

 

+

POSSIBLE ERROR CODES

+ + + + + + + + + + + + + + + + + + + + + +
CodeName
0ErrorGeneral
1ErrorSuccess
7ErrorNotImplemented
9ErrorProtocol
+ + + + + + + + +
+ +
+

3.9.15. MESSAGE #30. READ FILE CONTENT (BEGINNING)

+

Minimum supported version: 1.1.2 (Freeware)

+

Support in KukavarProxy: No

+

 

+

PURPOSE

+

FileIoBegin: Transfers the contents of a file on disk to the read buffer and returns its size.

+

FileIoGetSize: Specifies the size of the read buffer, or 0 if no buffer exists.

+

 

+

REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 30
P
A
Y
L
O
A
D
51UINT8

OPERATION

3.9.1.8. File IO Operations
1 — FileIoBegin
3 — FileIoGetSize

ONLY WHEN OPERATION is 1
64INT32Flags
3.9.1.5. Copy Flags
104UINT32

LN

Flags
Length of File Name (in characters)

14LN × 2WSTRINGFile Name
+

 

+

RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 30
P
A
Y
L
O
A
D
51UINT8Operation
64UINT32Buffer Size
F
O
O
T
E
R
102UINT16Error Code
121BOOLSuccess Flag
+

 

+

POSSIBLE ERROR CODES

+ + + + + + + + + + + + + + + + + + + + + +
CodeName
0ErrorGeneral
1ErrorSuccess
7ErrorNotImplemented
9ErrorProtocol
+ + + + + + + + +
+ +
+

3.9.16. MESSAGE #30. READ FILE CONTENT (DATA CHUNK)

+

Minimum supported version: 1.1.2 (Freeware)

+

Support in KukavarProxy: No

+

 

+

PURPOSE

+

FileIoData: Reads a data fragment of the specified size into the buffer at the specified offset.

+

 

+

REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 30
P
A
Y
L
O
A
D
51UINT8

OPERATION

3.9.1.8. File IO Operations
2 — FileIoData

64UINT32Offset (in bytes)
104UINT32Maximum Chunk Size (in bytes)
This value can be FFFFFFFFh to read the largest amount of data at the time.
+

 

+

RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 30
P
A
Y
L
O
A
D
51UINT8Operation
Value: 2
64UINT32Offset (in bytes)
104UINT32

SIZE

Size of Bytes Read

14SIZEBINARYChunk Data
F
O
O
T
E
R
variable2UINT16Error Code
variable1BOOLSuccess Flag
+

 

+

POSSIBLE ERROR CODES

+ + + + + + + + + + + + + + + + + + + + + +
CodeName
0ErrorGeneral
1ErrorSuccess
7ErrorNotImplemented
9ErrorProtocol
+ + + + + + + + +
+ +
+

3.9.17. MESSAGE #30. READ FILE CONTENT (CHECKSUM)

+

Minimum supported version: None

+

Support in KukavarProxy: No

+

 

+

This feature has not yet been implemented; the section is reserved for future use.

+

 

+ + + + + + + + +
+ +
+

3.9.18. MESSAGE #30. READ FILE CONTENT (FINAL)

+

Minimum supported version: 1.1.2 (Freeware)

+

Support in KukavarProxy: No

+

 

+

PURPOSE

+

FileIoEnd: Clearing the read buffer and freeing the memory.

+

 

+

REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 30
P
A
Y
L
O
A
D
51UINT8

OPERATION

3.9.1.8. File IO Operations
4 — FileIoEnd

+

 

+

RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 30
P
A
Y
L
O
A
D
51UINT8Operation
Value: 4
F
O
O
T
E
R
62UINT16Error Code
81BOOLSuccess Flag
+

 

+

POSSIBLE ERROR CODES

+ + + + + + + + + + + + + + + + + + + + + +
CodeName
0ErrorGeneral
1ErrorSuccess
7ErrorNotImplemented
9ErrorProtocol
+ + + + + + + + +
+ +
+

3.10. MESSAGES FOR CROSSCOMMEXE COMPATIBILITY

+

 

+

3.10.1. MESSAGE #63. CONFIRM ALL

+

Minimum supported version: 1.0.0 (Open Source)

+

Support in KukavarProxy: No

+

 

+

PURPOSE

+

Reset all errors on the KRC (emulation of pressing the Confirm All button).

+

 

+

REQUEST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 63
P
A
Y
L
O
A
D
NO PAYLOAD
+

 

+

RESPONSE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Offset (bytes)Size (bytes)TypeMeaning
H
E
A
D
E
R
02UINT16Tag ID
22UINT16Message Length
41UINT8Message Type
Value: 63
P
A
Y
L
O
A
D
NO PAYLOAD
F
O
O
T
E
R
52UINT16Error Code
71BOOLSuccess Flag
+

 

+

POSSIBLE ERROR CODES

+ + + + + + + + + + + + + +
CodeName
0ErrorGeneral
1ErrorSuccess
+ + + + + + + + +
+ +
+ + diff --git a/source/aboutdialog.cpp b/source/aboutdialog.cpp index edecc08..9083171 100644 --- a/source/aboutdialog.cpp +++ b/source/aboutdialog.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2021 Dmitry Lavygin + * Copyright (c) 2020-2022 Dmitry Lavygin * S.P. Kapitsa Research Institute of Technology of Ulyanovsk State University. * All rights reserved. * @@ -64,7 +64,15 @@ BOOL AboutDialog::OnInitDialog() type.c_str(), _T(PROXY_COPYRIGHT), _T(PROXY_COMPANY)); SetDlgItemText(IDC_INFO, text.c_str()); +#if defined(_UNICODE) || defined(UNICODE) +# if defined(RC_LEGACY) + text.LoadString(IDW_MAIN_COMPAT); +# else // defined(RC_LEGACY) text.LoadString(IDW_MAIN); +# endif // defined(RC_LEGACY) +#else // defined(_UNICODE) || defined(UNICODE) + text.LoadString(IDW_MAIN_ANSI); +#endif // defined(_UNICODE) || defined(UNICODE) SetDlgItemText(IDC_TITLE, text.c_str()); text.LoadString(IDS_ABOUT_DISCLAIMER); diff --git a/source/handlers/client_file.cpp b/source/handlers/client_file.cpp index e2917b6..1b7928d 100644 --- a/source/handlers/client_file.cpp +++ b/source/handlers/client_file.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2021 Dmitry Lavygin + * Copyright (c) 2020-2022 Dmitry Lavygin * S.P. Kapitsa Research Institute of Technology of Ulyanovsk State University. * All rights reserved. * @@ -41,6 +41,7 @@ #include "messagebuilder.h" #include "messagereader.h" #include "log.h" +#include "safe.h" void Client::handleFileDummy(MessageReader& stream, MessageBuilder& output) @@ -401,7 +402,7 @@ void Client::handleFileWriteContent(MessageReader& stream, if (size > 0 && total > 0 && offset < total) { - if (offset + size > total) + if (!Safe::CheckAdd(offset, size) || offset + size > total) size = total - offset; ok = stream.getArray(&_fileOut[offset], size); @@ -502,7 +503,7 @@ void Client::handleFileReadContent(MessageReader& stream, if (size > 0 && total > 0 && offset < total) { - if (offset + size > total) + if (!Safe::CheckAdd(offset, size) || (offset + size > total)) size = total - offset; if (size > SafePayloadSize) diff --git a/source/mainwindow.cpp b/source/mainwindow.cpp index b7e136f..5aefb2c 100644 --- a/source/mainwindow.cpp +++ b/source/mainwindow.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2021 Dmitry Lavygin + * Copyright (c) 2020-2022 Dmitry Lavygin * S.P. Kapitsa Research Institute of Technology of Ulyanovsk State University. * All rights reserved. * @@ -274,6 +274,11 @@ BOOL MainWindow::OnHelp() return TRUE; } +LRESULT MainWindow::OnInitMenuPopup(UINT msg, WPARAM wparam, LPARAM lparam) +{ + return CWnd::WndProcDefault(WM_INITMENUPOPUP, wparam, lparam); +} + void MainWindow::PreCreate(CREATESTRUCT& cs) { UseIndicatorStatus(FALSE); diff --git a/source/mainwindow.h b/source/mainwindow.h index 4ce2e87..a777658 100644 --- a/source/mainwindow.h +++ b/source/mainwindow.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2021 Dmitry Lavygin + * Copyright (c) 2020-2022 Dmitry Lavygin * S.P. Kapitsa Research Institute of Technology of Ulyanovsk State University. * All rights reserved. * @@ -58,6 +58,7 @@ class MainWindow : public Win32xx::CFrame virtual void OnFileExit(); virtual void OnInitialUpdate(); virtual BOOL OnHelp(); + virtual LRESULT OnInitMenuPopup(UINT msg, WPARAM wparam, LPARAM lparam); virtual void PreCreate(CREATESTRUCT& cs); virtual LRESULT WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam); diff --git a/source/proxy.cpp b/source/proxy.cpp index 025cd2c..3dcd84c 100644 --- a/source/proxy.cpp +++ b/source/proxy.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2021 Dmitry Lavygin + * Copyright (c) 2020-2022 Dmitry Lavygin * S.P. Kapitsa Research Institute of Technology of Ulyanovsk State University. * All rights reserved. * @@ -40,9 +40,7 @@ Win32xx::CString Proxy::getComputerName() { - DWORD size = 0; - - GetComputerName(NULL, &size); + DWORD size = MAX_COMPUTERNAME_LENGTH + 1; Win32xx::CString result; diff --git a/source/proxy.h b/source/proxy.h index 340b1f5..6b8c0f6 100644 --- a/source/proxy.h +++ b/source/proxy.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2021 Dmitry Lavygin + * Copyright (c) 2020-2022 Dmitry Lavygin * S.P. Kapitsa Research Institute of Technology of Ulyanovsk State University. * All rights reserved. * @@ -36,12 +36,34 @@ #define PROXY_TYPE "C3 BRIDGE INTERFACE" -#define PROXY_NAME "C3 Bridge Interface Server" + +#if defined(_UNICODE) || defined(UNICODE) + +# if defined(RC_LEGACY) + +# define PROXY_NAME "C3 Bridge Interface Server (Compatible)" +# define PROXY_INTERNALNAME "C3BCOMPT" +# define PROXY_FILENAME "C3BCOMPT.EXE" + +# else // defined(RC_LEGACY) + +# define PROXY_NAME "C3 Bridge Interface Server" +# define PROXY_INTERNALNAME "C3BRIDGE" +# define PROXY_FILENAME "C3BRIDGE.EXE" + +# endif // defined(RC_LEGACY) + +#else // defined(_UNICODE) || defined(UNICODE) + +# define PROXY_NAME "C3 Bridge Interface Server (ANSI)" +# define PROXY_INTERNALNAME "C3BANSI" +# define PROXY_FILENAME "C3BANSI.EXE" + +#endif // defined(_UNICODE) || defined(UNICODE) + #define PROXY_PRODUCT "C3 Bridge Interface" #define PROXY_COMPANY "S.P. Kapitsa Research Institute of Technology of Ulyanovsk State University" -#define PROXY_COPYRIGHT "Copyright (C) 2020-2021 Dmitry Lavygin " -#define PROXY_INTERNALNAME "C3BRIDGE" -#define PROXY_FILENAME "C3BRIDGE.EXE" +#define PROXY_COPYRIGHT "Copyright (C) 2020-2022 Dmitry Lavygin " #define PROXY_DOMAIN "ulsu.tech" #define PROXY_VERSION_OPEN_SOURCE 0 @@ -50,7 +72,7 @@ #define PROXY_VERSION_INTERNAL 3 #define PROXY_VERSION_MAJOR 1 -#define PROXY_VERSION_MINOR 3 +#define PROXY_VERSION_MINOR 4 #define PROXY_VERSION_TYPE PROXY_VERSION_OPEN_SOURCE #define PROXY_STR_HELPER(x) #x diff --git a/source/resource.h b/source/resource.h index afdf4d6..78ec073 100644 --- a/source/resource.h +++ b/source/resource.h @@ -5,6 +5,9 @@ #define IDW_MAIN 41 #define IDW_ABOUT 42 +#define IDW_MAIN_ANSI 2041 +#define IDW_MAIN_COMPAT 3041 + #define IDM_FILE_EXIT 110 #define IDM_EDIT_COPY 111 #define IDM_EDIT_CLEAR 112 diff --git a/source/resources.rc b/source/resources.rc index 196c72f..924e0f0 100644 --- a/source/resources.rc +++ b/source/resources.rc @@ -119,7 +119,7 @@ END // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. -#ifdef VS_RC_60 // For Visual Studio 6 +#ifdef RC_LEGACY IDW_MAIN ICON "../resources/legacy.ico" #else IDW_MAIN ICON "../resources/main.ico" @@ -223,6 +223,8 @@ IDB_LOGO BITMAP "../resources/logo.bmp" STRINGTABLE BEGIN IDW_MAIN "C3 Bridge Interface Server" + IDW_MAIN_ANSI "C3 Bridge Interface Server (ANSI)" + IDW_MAIN_COMPAT "C3 Bridge Interface Server (Compatible)" END STRINGTABLE diff --git a/source/safe.cpp b/source/safe.cpp new file mode 100644 index 0000000..e89b8bf --- /dev/null +++ b/source/safe.cpp @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2020-2022 Dmitry Lavygin + * S.P. Kapitsa Research Institute of Technology of Ulyanovsk State University. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#include "stdafx.h" + +#include "safe.h" + + +bool Safe::CheckAdd(uint32_t left, uint32_t right) +{ + return ((~left) >= right); +} diff --git a/source/safe.h b/source/safe.h new file mode 100644 index 0000000..fcddd3b --- /dev/null +++ b/source/safe.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2020-2022 Dmitry Lavygin + * S.P. Kapitsa Research Institute of Technology of Ulyanovsk State University. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#ifndef SAFE_H_INCLUDED +#define SAFE_H_INCLUDED + + +class Safe +{ +public: + static bool CheckAdd(uint32_t left, uint32_t right); +}; + +#endif // SAFE_H_INCLUDED diff --git a/source/targetver.h b/source/targetver.h index 8491627..d2901af 100644 --- a/source/targetver.h +++ b/source/targetver.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2021 Dmitry Lavygin + * Copyright (c) 2020-2022 Dmitry Lavygin * S.P. Kapitsa Research Institute of Technology of Ulyanovsk State University. * All rights reserved. * @@ -31,70 +31,17 @@ */ - /////////////////////////////////////////////////////////////////////// -// targetver.h is used to define the Windows API macros that target the -// version of the Windows operating system you wish to support. - - -// For Windows 95 -//#define WINVER 0x0400 -//#define _WIN32_WINDOWS 0x0400 -//#define _WIN32_IE 0x0400 - -// For Windows 98 -#define WINVER 0x0410 -#define _WIN32_WINDOWS 0x0410 -#define _WIN32_IE 0x0401 - -// For Windows NT4 -//#define WINVER 0x0400 -//#define _WIN32_WINNT 0x0400 -//#define _WIN32_IE 0x0400 - -// For Windows ME -//#define WINVER 0x0500 -//#define _WIN32_WINNT 0x0500 -//#define _WIN32_IE 0x0500 - -// For Windows 2000 -//#define WINVER 0x0500 -//#define _WIN32_WINNT 0x0500 -//#define _WIN32_IE 0x0500 -//#define NTDDI_VERSION 0x05000000 - -// For Windows XP -//#define WINVER 0x0501 -//#define _WIN32_WINNT 0x0501 -//#define _WIN32_IE 0x0501 -//#define NTDDI_VERSION 0x05010000 - -// For Windows Vista -//#define WINVER 0x0600 -//#define _WIN32_WINNT 0x0600 -//#define _WIN32_IE 0x0600 -//#define NTDDI_VERSION 0x06000000 - -// For Windows 7 -//#define WINVER 0x0601 -//#define _WIN32_WINNT 0x0601 -//#define _WIN32_IE 0x0700 -//#define NTDDI_VERSION 0x06010000 - -// For Windows 8 -//#define WINVER 0x0602 -//#define _WIN32_WINNT 0x0602 -//#define _WIN32_IE 0x0A00 -//#define NTDDI_VERSION 0x06020000 - -//For Windows 8.1 -//#define WINVER 0x0602 -//#define _WIN32_WINNT 0x0602 -//#define _WIN32_IE 0x0A00 -//#define NTDDI_VERSION 0x06030000 - -//For Windows 10 -//#define WINVER 0x0A00 -//#define _WIN32_WINNT 0x0A00 -//#define _WIN32_IE 0x0A00 -//#define NTDDI_VERSION 0x0A000000 - +#if defined(RC_LEGACY) || (!defined(_UNICODE) && !defined(UNICODE)) +// Windows 95 / Windows NT 4.0 +# define WINVER 0x0400 +# define _WIN32_WINDOWS 0x0400 +# define _WIN32_WINNT 0x0400 +# define _WIN32_IE 0x0400 +#else +// Windows XP +# define WINVER 0x0501 +# define _WIN32_WINDOWS 0x0501 +# define _WIN32_WINNT 0x0501 +# define _WIN32_IE 0x0501 +# define NTDDI_VERSION 0x05010000 +#endif