diff --git a/erpcgen/Makefile b/erpcgen/Makefile index 9118d5c2..f1cdb274 100644 --- a/erpcgen/Makefile +++ b/erpcgen/Makefile @@ -70,7 +70,8 @@ SOURCES += $(OBJS_ROOT)/erpcgen_parser.tab.cpp \ # Prevent make from deleting these temp files. .SECONDARY: $(OBJS_ROOT)/erpcgen_parser.tab.cpp \ $(OBJS_ROOT)/erpcgen_lexer.cpp \ - $(OBJS_ROOT)/erpcgen/src/templates/c_common_header.c \ + $(OBJS_ROOT)/erpcgen/src/templates/c_common_standard_header.c \ + $(OBJS_ROOT)/erpcgen/src/templates/c_common_erpc_header.c \ $(OBJS_ROOT)/erpcgen/src/templates/cpp_interface_header.c \ $(OBJS_ROOT)/erpcgen/src/templates/cpp_interface_source.c \ $(OBJS_ROOT)/erpcgen/src/templates/cpp_client_header.c \ @@ -92,7 +93,8 @@ SOURCES += $(OBJS_ROOT)/erpcgen_parser.tab.cpp \ $(OBJS_ROOT)/erpcgen/src/templates/py_coders.c \ $(OBJS_ROOT)/erpcgen/src/templates/py_global_init.c -SOURCES += $(OBJS_ROOT)/erpcgen/src/templates/c_common_header.c \ +SOURCES += $(OBJS_ROOT)/erpcgen/src/templates/c_common_standard_header.c \ + $(OBJS_ROOT)/erpcgen/src/templates/c_common_erpc_header.c \ $(OBJS_ROOT)/erpcgen/src/templates/cpp_interface_header.c \ $(OBJS_ROOT)/erpcgen/src/templates/cpp_interface_source.c \ $(OBJS_ROOT)/erpcgen/src/templates/cpp_client_header.c \ diff --git a/erpcgen/VisualStudio_v14/.gitignore b/erpcgen/VisualStudio_v14/.gitignore index 024f1d9a..a1280e52 100644 --- a/erpcgen/VisualStudio_v14/.gitignore +++ b/erpcgen/VisualStudio_v14/.gitignore @@ -9,7 +9,8 @@ cpp_client_header.cpp cpp_server_header.cpp cpp_server_source.cpp cpp_coders.cpp -c_common_header.cpp +c_common_standard_header.cpp +c_common_erpc_header.cpp c_client_source.cpp c_client_header.cpp c_server_header.cpp diff --git a/erpcgen/VisualStudio_v14/erpcgen.vcxproj b/erpcgen/VisualStudio_v14/erpcgen.vcxproj index 9d37fc2e..538c3ff4 100644 --- a/erpcgen/VisualStudio_v14/erpcgen.vcxproj +++ b/erpcgen/VisualStudio_v14/erpcgen.vcxproj @@ -98,7 +98,8 @@ python.exe ..\bin\txt_to_c.py --output .\cpp_coders.cpp ..\src\templates\cpp_coders.template -python.exe ..\bin\txt_to_c.py --output .\c_common_header.cpp ..\src\templates\c_common_header.template +python.exe ..\bin\txt_to_c.py --output .\c_common_standard_header.cpp ..\src\templates\c_common_standard_header.template +python.exe ..\bin\txt_to_c.py --output .\c_common_erpc_header.cpp ..\src\templates\c_common_erpc_header.template python.exe ..\bin\txt_to_c.py --output .\cpp_interface_header.cpp ..\src\templates\cpp_interface_header.template python.exe ..\bin\txt_to_c.py --output .\cpp_interface_source.cpp ..\src\templates\cpp_interface_source.template python.exe ..\bin\txt_to_c.py --output .\cpp_client_header.cpp ..\src\templates\cpp_client_header.template @@ -145,7 +146,8 @@ python.exe ..\bin\txt_to_c.py --output .\py_global_init.cpp ..\src\templates\py_ python.exe ..\bin\txt_to_c.py --output .\cpp_coders.cpp ..\src\templates\cpp_coders.template -python.exe ..\bin\txt_to_c.py --output .\c_common_header.cpp ..\src\templates\c_common_header.template +python.exe ..\bin\txt_to_c.py --output .\c_common_standard_header.cpp ..\src\templates\c_common_standard_header.template +python.exe ..\bin\txt_to_c.py --output .\c_common_erpc_header.cpp ..\src\templates\c_common_erpc_header.template python.exe ..\bin\txt_to_c.py --output .\cpp_interface_header.cpp ..\src\templates\cpp_interface_header.template python.exe ..\bin\txt_to_c.py --output .\cpp_interface_source.cpp ..\src\templates\cpp_interface_source.template python.exe ..\bin\txt_to_c.py --output .\cpp_client_header.cpp ..\src\templates\cpp_client_header.template @@ -244,7 +246,8 @@ python.exe ..\bin\txt_to_c.py --output .\py_global_init.cpp ..\src\templates\py_ - + + diff --git a/erpcgen/VisualStudio_v14/erpcgen.vcxproj.filters b/erpcgen/VisualStudio_v14/erpcgen.vcxproj.filters index 1d72bbdb..7666e4c5 100644 --- a/erpcgen/VisualStudio_v14/erpcgen.vcxproj.filters +++ b/erpcgen/VisualStudio_v14/erpcgen.vcxproj.filters @@ -167,7 +167,10 @@ Source Files - + + Source Files + + Source Files diff --git a/erpcgen/src/CGenerator.cpp b/erpcgen/src/CGenerator.cpp index e7ff1b74..d1af5d80 100644 --- a/erpcgen/src/CGenerator.cpp +++ b/erpcgen/src/CGenerator.cpp @@ -31,7 +31,8 @@ using namespace std; static const char *const kIdentifierChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"; // Templates strings converted from text files by txt_to_c.py. -extern const char *const kCCommonHeader; +extern const char *const kCCommonStandardHeader; +extern const char *const kCCommonErpcHeader; extern const char *const kCppInterfaceHeader; extern const char *const kCppInterfaceSource; extern const char *const kCppClientHeader; @@ -78,7 +79,8 @@ CGenerator::CGenerator(InterfaceDefinition *def) void CGenerator::generateOutputFiles(const string &fileName) { - generateCommonCHeaderFiles(fileName); + generateCommonStandardCHeaderFiles(fileName); + generateCommonErpcCHeaderFiles(fileName); generateInterfaceCppHeaderFile(fileName); generateInterfaceCppSourceFile(fileName); @@ -96,12 +98,20 @@ void CGenerator::generateOutputFiles(const string &fileName) generateServerCSourceFile(fileName); } -void CGenerator::generateCommonCHeaderFiles(string fileName) +void CGenerator::generateCommonStandardCHeaderFiles(string fileName) { - fileName += "_common.h"; - m_templateData["commonCGuardMacro"] = generateIncludeGuardName(fileName); - m_templateData["commonCHeaderName"] = fileName; - generateOutputFile(fileName, "c_common_header", m_templateData, kCCommonHeader); + fileName += "_common_standard.h"; + m_templateData["commonStandardCGuardMacro"] = generateIncludeGuardName(fileName); + m_templateData["commonStandardCHeaderName"] = fileName; + generateOutputFile(fileName, "c_common_standard_header", m_templateData, kCCommonStandardHeader); +} + +void CGenerator::generateCommonErpcCHeaderFiles(string fileName) +{ + fileName += "_common_erpc.h"; + m_templateData["commonErpcCGuardMacro"] = generateIncludeGuardName(fileName); + m_templateData["commonErpcCHeaderName"] = fileName; + generateOutputFile(fileName, "c_common_erpc_header", m_templateData, kCCommonErpcHeader); } void CGenerator::generateInterfaceCppHeaderFile(string fileName) diff --git a/erpcgen/src/CGenerator.hpp b/erpcgen/src/CGenerator.hpp index bf1cef8a..591b9d95 100644 --- a/erpcgen/src/CGenerator.hpp +++ b/erpcgen/src/CGenerator.hpp @@ -92,11 +92,18 @@ class CGenerator : public Generator void generateOutputFiles(const std::string &fileNameExtension) override; /*! - * @brief This function generate output common header file. + * @brief This function generate header file output with common standard code. * - * @param[in] fileName Name for output client source file. + * @param[in] fileName Name for common standard header file output. + */ + void generateCommonStandardCHeaderFiles(std::string fileName); + + /*! + * @brief This function generate header file output with common eRPC code. + * + * @param[in] fileName Name for common eRPC header file output. */ - void generateCommonCHeaderFiles(std::string fileName); + void generateCommonErpcCHeaderFiles(std::string fileName); /*! * @brief This function generate output interface header file. diff --git a/erpcgen/src/Generator.cpp b/erpcgen/src/Generator.cpp index 095d560a..5b229cdb 100644 --- a/erpcgen/src/Generator.cpp +++ b/erpcgen/src/Generator.cpp @@ -91,6 +91,15 @@ Generator::Generator(InterfaceDefinition *def, generator_type_t generatorType) { scopeName = getAnnStringValue(program, SCOPE_NAME_ANNOTATION); } + + if (findAnnotation(m_def->getProgramSymbol(), NAMESPACE_ANNOTATION) != nullptr) + { + m_templateData["namespace"] = getAnnStringValue(m_def->getProgramSymbol(), NAMESPACE_ANNOTATION); + } + else + { + m_templateData["namespace"] = "erpcshim"; + } } m_templateData["scopeName"] = scopeName; diff --git a/erpcgen/src/annotations.h b/erpcgen/src/annotations.h index 9bdd36ba..c88f138f 100644 --- a/erpcgen/src/annotations.h +++ b/erpcgen/src/annotations.h @@ -40,6 +40,9 @@ //! Specify the symbol name. #define NAME_ANNOTATION "name" +//! Specify the namespace of program code. +#define NAMESPACE_ANNOTATION "namespace" + //! Turn off error checking code for allocations in generated output #define NO_ALLOC_ERRORS_ANNOTATION "no_alloc_errors" diff --git a/erpcgen/src/templates/c_client_header.template b/erpcgen/src/templates/c_client_header.template index 717405cb..c0d09f0f 100644 --- a/erpcgen/src/templates/c_client_header.template +++ b/erpcgen/src/templates/c_client_header.template @@ -7,7 +7,8 @@ #if !defined({$clientCGuardMacro}) #define {$clientCGuardMacro} -#include "{$commonCHeaderName}" +#include "{$commonStandardCHeaderName}" +#include "{$commonErpcCHeaderName}" #include "erpc_client_manager.h" {% for iface in group.interfaces %} {% for fn in iface.functions %} diff --git a/erpcgen/src/templates/c_client_source.template b/erpcgen/src/templates/c_client_source.template index ac27656f..ebb52115 100644 --- a/erpcgen/src/templates/c_client_source.template +++ b/erpcgen/src/templates/c_client_source.template @@ -16,6 +16,7 @@ using namespace erpc; using namespace std; +{$usingNamespace() >} {% for iface in group.interfaces %} {% if count(iface.callbacksAll) > 0 %} diff --git a/erpcgen/src/templates/c_common_header.template b/erpcgen/src/templates/c_common_erpc_header.template similarity index 87% rename from erpcgen/src/templates/c_common_header.template rename to erpcgen/src/templates/c_common_erpc_header.template index a2c67ed9..1df6aa15 100644 --- a/erpcgen/src/templates/c_common_header.template +++ b/erpcgen/src/templates/c_common_erpc_header.template @@ -4,32 +4,20 @@ {% endif %} {$commonHeader()} -#if !defined({$commonCGuardMacro}) -#define {$commonCGuardMacro} +#if !defined({$commonErpcCGuardMacro}) +#define {$commonErpcCGuardMacro} {% if usedUnionType %} #if defined(__CC_ARM) || defined(__ARMCC_VERSION) #pragma anon_unions #endif {% endif -- usedUnionType %} -#ifdef __cplusplus - -{% for inc in includes %} -#include "{$inc}" -{% endfor -- includes %} +#ifdef __cplusplus extern "C" { #endif -#include -#include -#include -#include "erpc_version.h" -{% if empty(crc16) == false %} -#include "{$crcHeaderName}" -{% endif -- empty(crc16) == false %} - {$checkVersion()} {$>checkCrc()} @@ -107,4 +95,4 @@ extern const {$c.typeAndName};{$c.ilComment}{$loop.addNewLineIfNotLast} } #endif // __cplusplus -#endif // {$commonCGuardMacro} +#endif // {$commonErpcCGuardMacro} diff --git a/erpcgen/src/templates/c_common_standard_header.template b/erpcgen/src/templates/c_common_standard_header.template new file mode 100644 index 00000000..56e335f5 --- /dev/null +++ b/erpcgen/src/templates/c_common_standard_header.template @@ -0,0 +1,35 @@ +{% if mlComment != ""%} +{$mlComment} + +{% endif %} +{$commonHeader()} + +#if !defined({$commonStandardCGuardMacro}) +#define {$commonStandardCGuardMacro} + +#ifdef __cplusplus + +{% for inc in includes %} +#include "{$inc}" +{% endfor -- includes %} + +extern "C" +{ +#endif + +#include +#include +#include +#include "erpc_version.h" +{% if empty(crc16) == false %} +#include "{$crcHeaderName}" +{% endif -- empty(crc16) == false %} + +{$checkVersion()} +{$>checkCrc()} + +#ifdef __cplusplus +} +#endif + +#endif // {$commonStandardCGuardMacro} diff --git a/erpcgen/src/templates/c_server_header.template b/erpcgen/src/templates/c_server_header.template index d35dcd14..0f495e6d 100644 --- a/erpcgen/src/templates/c_server_header.template +++ b/erpcgen/src/templates/c_server_header.template @@ -7,7 +7,8 @@ #if !defined({$serverCGuardMacro}) #define {$serverCGuardMacro} -#include "{$commonCHeaderName}" +#include "{$commonStandardCHeaderName}" +#include "{$commonErpcCHeaderName}" {% for iface in group.interfaces %} {% for fn in iface.functions %} {% for externalInterface in fn.externalInterfaces %} diff --git a/erpcgen/src/templates/c_server_source.template b/erpcgen/src/templates/c_server_source.template index 4750380c..7a8795a4 100644 --- a/erpcgen/src/templates/c_server_source.template +++ b/erpcgen/src/templates/c_server_source.template @@ -14,6 +14,7 @@ using namespace erpc; using namespace std; +{$usingNamespace() >} {% for iface in group.interfaces %} ERPC_MANUALLY_CONSTRUCTED_STATIC({$iface.serviceClassName}, s_{$iface.serviceClassName}); diff --git a/erpcgen/src/templates/cpp_client_header.template b/erpcgen/src/templates/cpp_client_header.template index da00e2f5..4ab1d2fd 100644 --- a/erpcgen/src/templates/cpp_client_header.template +++ b/erpcgen/src/templates/cpp_client_header.template @@ -10,14 +10,13 @@ #include "{$interfaceCppHeaderName}" #include "erpc_client_manager.h" +{$fillNamespaceBegin()>} -namespace erpc { {% for iface in group.interfaces %} - class {$iface.clientClassName}: public {$iface.interfaceClassName} { public: - {$iface.clientClassName}(ClientManager *manager); + {$iface.clientClassName}(erpc::ClientManager *manager); {% for fn in iface.functions if fn.isNonExternalFunction == true %} {% if fn.mlComment %} @@ -27,10 +26,9 @@ class {$iface.clientClassName}: public {$iface.interfaceClassName} {% endfor -- fn %} protected: - ClientManager *m_clientManager; + erpc::ClientManager *m_clientManager; }; -{% endfor -- iface %} - -} // namespace erpc +{% endfor -- iface %} +{$fillNamespaceEnd()} #endif // {$clientCppGuardMacro} diff --git a/erpcgen/src/templates/cpp_client_source.template b/erpcgen/src/templates/cpp_client_source.template index cee45d73..83c862c4 100644 --- a/erpcgen/src/templates/cpp_client_source.template +++ b/erpcgen/src/templates/cpp_client_source.template @@ -16,7 +16,7 @@ extern "C" {% if groupNames %} // import callbacks declaration from other groups {% for name in groupNames if name != group.name %} -#include "{$outputFilename}_{$name}_common.h" +#include "{$outputFilename}_{$name}_common_erpc.h" {% endfor %} {% endif %} } @@ -25,6 +25,7 @@ extern "C" {$>checkCrc()} using namespace erpc; using namespace std; +{$usingNamespace() >} {$generateCrcVariable()} {$> setSharedMemAddresses()} {$> constantsDefinitions(consts)} diff --git a/erpcgen/src/templates/cpp_common_functions.template b/erpcgen/src/templates/cpp_common_functions.template index bc5477e4..cc9b5551 100644 --- a/erpcgen/src/templates/cpp_common_functions.template +++ b/erpcgen/src/templates/cpp_common_functions.template @@ -32,6 +32,28 @@ extern const uint32_t erpc_generated_crc = {$crc16}; {% endif -- empty(crc16) == false %} {% enddef --checkCrc %} +{# ---------------- namespace ---------------- #} +{% def fillNamespaceBegin() %} +{% if empty(namespace) == false %} + +namespace {$namespace} +{ +{% endif -- empty(crc16) == false %} +{% enddef --checkCrc %} + +{% def fillNamespaceEnd() %} +{% if empty(namespace) == false %} +} // {$namespace} + +{% endif -- empty(crc16) == false %} +{% enddef --checkCrc %} + +{% def usingNamespace() %} +{% if empty(namespace) == false %} +using namespace {$namespace}; +{% endif -- empty(crc16) == false %} +{% enddef --checkCrc %} + {# ---------------- constantsDefinitions ---------------- #} {% def constantsDefinitions(consts) %} {% if not empty(consts) %} diff --git a/erpcgen/src/templates/cpp_interface_header.template b/erpcgen/src/templates/cpp_interface_header.template index c081c57a..2c8dc04e 100644 --- a/erpcgen/src/templates/cpp_interface_header.template +++ b/erpcgen/src/templates/cpp_interface_header.template @@ -7,8 +7,7 @@ #if !defined({$interfaceCppGuardMacro}) #define {$interfaceCppGuardMacro} -#include "{$commonCHeaderName}" - +#include "{$commonStandardCHeaderName}" {% for iface in group.interfaces %} {% for fn in iface.functions %} {% for externalInterface in fn.externalInterfaces %} @@ -20,8 +19,8 @@ {% endfor -- externalInterface %} {% endfor -- fn %} {% endfor -- iface %} - -namespace erpc { +{$fillNamespaceBegin()} +#include "{$commonErpcCHeaderName}" {% for iface in group.interfaces %} // Abstract base class for {$iface.name} @@ -56,7 +55,5 @@ private: {% endfor %} }; {% endfor -- iface %} - -} // namespace erpc - +{$fillNamespaceEnd()} #endif // {$interfaceCppGuardMacro} diff --git a/erpcgen/src/templates/cpp_interface_source.template b/erpcgen/src/templates/cpp_interface_source.template index 6448ab4e..346827e5 100644 --- a/erpcgen/src/templates/cpp_interface_source.template +++ b/erpcgen/src/templates/cpp_interface_source.template @@ -3,8 +3,8 @@ {$checkVersion()} {$>checkCrc()} -using namespace erpc; using namespace std; +{$usingNamespace() >} {% for iface in group.interfaces -- service subclass method impl %} {% for cb in iface.callbacksInt %} diff --git a/erpcgen/src/templates/cpp_server_header.template b/erpcgen/src/templates/cpp_server_header.template index 9fca8637..f6e47fbd 100644 --- a/erpcgen/src/templates/cpp_server_header.template +++ b/erpcgen/src/templates/cpp_server_header.template @@ -14,35 +14,33 @@ {$checkVersion()} {$>checkCrc()} +{$fillNamespaceBegin()>} -namespace erpc { {% for iface in group.interfaces %} - /*! * @brief Service subclass for {$iface.name}. */ -class {$iface.serviceClassName} : public Service +class {$iface.serviceClassName} : public erpc::Service { public: {$iface.serviceClassName}({$iface.interfaceClassName} *_{$iface.interfaceClassName}) : m_handler(_{$iface.interfaceClassName}) - , Service({$iface.interfaceClassName}::m_serviceId) {} + , erpc::Service({$iface.interfaceClassName}::m_serviceId) {} /*! @brief return service interface handler. */ {$iface.interfaceClassName}* getHandler(void); /*! @brief Call the correct server shim based on method unique ID. */ - virtual erpc_status_t handleInvocation(uint32_t methodId, uint32_t sequence, Codec * codec, MessageBufferFactory *messageFactory); + virtual erpc_status_t handleInvocation(uint32_t methodId, uint32_t sequence, erpc::Codec * codec, erpc::MessageBufferFactory *messageFactory); private: {$iface.interfaceClassName} *m_handler; {% for fn in iface.functions %} /*! @brief Server shim for {$fn.name} of {$iface.name} interface. */ - erpc_status_t {$fn.name}_shim({$codecClass} * codec, MessageBufferFactory *messageFactory, uint32_t sequence);{$loop.addNewLineIfNotLast} + erpc_status_t {$fn.name}_shim(erpc::{$codecClass} * codec, erpc::MessageBufferFactory *messageFactory, uint32_t sequence);{$loop.addNewLineIfNotLast} {% endfor -- fn %} }; -{% endfor -- iface %} - -} // namespace erpc +{% endfor -- iface %} +{$fillNamespaceEnd()} #endif // {$serverCppGuardMacro} diff --git a/erpcgen/src/templates/cpp_server_source.template b/erpcgen/src/templates/cpp_server_source.template index 1538766a..271b5f5c 100644 --- a/erpcgen/src/templates/cpp_server_source.template +++ b/erpcgen/src/templates/cpp_server_source.template @@ -16,6 +16,7 @@ {$>checkCrc()} using namespace erpc; using namespace std; +{$usingNamespace() >} #if ERPC_NESTED_CALLS_DETECTION extern bool nestingDetection; diff --git a/test/common/unit_test_client.cpp b/test/common/unit_test_client.cpp index 3ddfbe17..f26deb86 100644 --- a/test/common/unit_test_client.cpp +++ b/test/common/unit_test_client.cpp @@ -14,7 +14,7 @@ #include "gtest.h" #include "gtestListener.h" #include "myAlloc.h" -#include "test_unit_test_common_client.h" +#include "c_test_unit_test_common_client.h" #include "unit_test_wrapped.h" #if (defined(RPMSG) || defined(UART) || defined(MU)) diff --git a/test/common/unit_test_serial_server.cpp b/test/common/unit_test_serial_server.cpp index 4e2578f0..bbf49ff0 100644 --- a/test/common/unit_test_serial_server.cpp +++ b/test/common/unit_test_serial_server.cpp @@ -19,6 +19,7 @@ #include using namespace erpc; +using namespace erpcshim; class MyMessageBufferFactory : public MessageBufferFactory { diff --git a/test/common/unit_test_tcp_server.cpp b/test/common/unit_test_tcp_server.cpp index ee41ebe1..4e238a7d 100644 --- a/test/common/unit_test_tcp_server.cpp +++ b/test/common/unit_test_tcp_server.cpp @@ -17,6 +17,7 @@ #include "unit_test.h" using namespace erpc; +using namespace erpcshim; class MyMessageBufferFactory : public MessageBufferFactory { diff --git a/test/test_annotations/test_annotations_server_impl.cpp b/test/test_annotations/test_annotations_server_impl.cpp index 403699f8..95731933 100644 --- a/test/test_annotations/test_annotations_server_impl.cpp +++ b/test/test_annotations/test_annotations_server_impl.cpp @@ -18,6 +18,7 @@ #include using namespace erpc; +using namespace erpcshim; AnnotateTest_service *svc; diff --git a/test/test_arbitrator/test_arbitrator.erpc b/test/test_arbitrator/test_arbitrator.erpc index 62202f09..890c45cc 100644 --- a/test/test_arbitrator/test_arbitrator.erpc +++ b/test/test_arbitrator/test_arbitrator.erpc @@ -8,6 +8,7 @@ @crc @output_dir("erpc_outputs/") +@namespace("") program test; import "../common/unit_test_common.erpc" diff --git a/test/test_arrays/test_arrays_server_impl.cpp b/test/test_arrays/test_arrays_server_impl.cpp index 9a24e9aa..b2062c0a 100644 --- a/test/test_arrays/test_arrays_server_impl.cpp +++ b/test/test_arrays/test_arrays_server_impl.cpp @@ -18,6 +18,7 @@ #include using namespace erpc; +using namespace erpcshim; PointersService_service *svc; diff --git a/test/test_binary/test_binary_server_impl.cpp b/test/test_binary/test_binary_server_impl.cpp index 6f76226c..5269afba 100644 --- a/test/test_binary/test_binary_server_impl.cpp +++ b/test/test_binary/test_binary_server_impl.cpp @@ -16,6 +16,7 @@ #include using namespace erpc; +using namespace erpcshim; Binary_service *svc; diff --git a/test/test_builtin/test_builtin_server_impl.cpp b/test/test_builtin/test_builtin_server_impl.cpp index b7e8b20d..fc2ea07e 100644 --- a/test/test_builtin/test_builtin_server_impl.cpp +++ b/test/test_builtin/test_builtin_server_impl.cpp @@ -17,6 +17,7 @@ #include using namespace erpc; +using namespace erpcshim; BuiltinServices_service *svc; diff --git a/test/test_callbacks/test_callbacks_server_impl.cpp b/test/test_callbacks/test_callbacks_server_impl.cpp index f7b59828..81361563 100644 --- a/test/test_callbacks/test_callbacks_server_impl.cpp +++ b/test/test_callbacks/test_callbacks_server_impl.cpp @@ -17,6 +17,7 @@ #include using namespace erpc; +using namespace erpcshim; ClientCore0Services_service *svc; diff --git a/test/test_const/test_const_client_impl.cpp b/test/test_const/test_const_client_impl.cpp index f780d2d6..8698e470 100644 --- a/test/test_const/test_const_client_impl.cpp +++ b/test/test_const/test_const_client_impl.cpp @@ -7,7 +7,8 @@ */ #include "gtest.h" -#include "test_common.h" +#include "test_common_standard.h" +#include "test_common_erpc.h" #include "unit_test_wrapped.h" //////////////////////////////////////////////////////////////////////////////// diff --git a/test/test_enums/test_enums_server_impl.cpp b/test/test_enums/test_enums_server_impl.cpp index bb928060..b40a119d 100644 --- a/test/test_enums/test_enums_server_impl.cpp +++ b/test/test_enums/test_enums_server_impl.cpp @@ -17,6 +17,7 @@ #include using namespace erpc; +using namespace erpcshim; EnumsService_service *svc; diff --git a/test/test_lists/test_lists_server_impl.cpp b/test/test_lists/test_lists_server_impl.cpp index 8bad709f..78ca9b59 100644 --- a/test/test_lists/test_lists_server_impl.cpp +++ b/test/test_lists/test_lists_server_impl.cpp @@ -18,6 +18,7 @@ #include using namespace erpc; +using namespace erpcshim; PointersService_service *svc; diff --git a/test/test_shared/test_shared_server_impl.cpp b/test/test_shared/test_shared_server_impl.cpp index e3b12316..9e73e563 100644 --- a/test/test_shared/test_shared_server_impl.cpp +++ b/test/test_shared/test_shared_server_impl.cpp @@ -16,6 +16,7 @@ #include using namespace erpc; +using namespace erpcshim; SharedService_service *svc; diff --git a/test/test_struct/test_struct_server_impl.cpp b/test/test_struct/test_struct_server_impl.cpp index 618b470a..ed211699 100644 --- a/test/test_struct/test_struct_server_impl.cpp +++ b/test/test_struct/test_struct_server_impl.cpp @@ -18,6 +18,7 @@ #include using namespace erpc; +using namespace erpcshim; ArithmeticService1_service *svc1; ArithmeticService2_service *svc2; diff --git a/test/test_typedef/test_typedef_server_impl.cpp b/test/test_typedef/test_typedef_server_impl.cpp index afb94d6a..8838ccae 100644 --- a/test/test_typedef/test_typedef_server_impl.cpp +++ b/test/test_typedef/test_typedef_server_impl.cpp @@ -18,6 +18,7 @@ #include using namespace erpc; +using namespace erpcshim; TypedefService_service *svc; diff --git a/test/test_unions/test_unions_server_impl.cpp b/test/test_unions/test_unions_server_impl.cpp index 653c330a..21c4718f 100644 --- a/test/test_unions/test_unions_server_impl.cpp +++ b/test/test_unions/test_unions_server_impl.cpp @@ -18,6 +18,7 @@ #include using namespace erpc; +using namespace erpcshim; ArithmeticService_service *svc;