Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpcUaObjectTypeGenerator whith missing namespace names #582

Open
huebl opened this issue Jan 19, 2025 · 0 comments
Open

OpcUaObjectTypeGenerator whith missing namespace names #582

huebl opened this issue Jan 19, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@huebl
Copy link
Contributor

huebl commented Jan 19, 2025

We create an object with methods in its own namespace. This leads to the following source code.

#ifndef __OpcUaModbusGateway_ModbusClientInterface_h__
#define __OpcUaModbusGateway_ModbusClientInterface_h__

#include "OpcUaStackServer/StandardVariableType/VariableBase.h"
#include "OpcUaStackServer/StandardObjectType/ObjectBase.h"

namespace OpcUaModbusGateway
{
   
   class DLLEXPORT ModbusClientInterface
   : public ObjectBase
   {
     public:
       typedef boost::shared_ptr<ModbusClientInterface> SPtr;
       typedef std::vector<ModbusClientInterface::SPtr> Vec;
   
       ModbusClientInterface(void);
       ModbusClientInterface(const ModbusClientInterface& value);
       virtual ~ModbusClientInterface(void);

        virtual void call_ReadCoils_Method(OpcUaStackCore::ApplicationMethodContext* applicationMethodContext);

        virtual void call_ReadDiscreteInputs_Method(OpcUaStackCore::ApplicationMethodContext* applicationMethodContext);

        virtual void call_ReadInputRegisters_Method(OpcUaStackCore::ApplicationMethodContext* applicationMethodContext);

        virtual void call_ReadMultiHoldingRegisters_Method(OpcUaStackCore::ApplicationMethodContext* applicationMethodContext);

        virtual void call_WriteMultipleCoils_Method(OpcUaStackCore::ApplicationMethodContext* applicationMethodContext);

        virtual void call_WriteMultipleHoldingRegisters_Method(OpcUaStackCore::ApplicationMethodContext* applicationMethodContext);

        virtual void call_WriteSingleCoil_Method(OpcUaStackCore::ApplicationMethodContext* applicationMethodContext);

        virtual void call_WriteSingleHoldingRegister_Method(OpcUaStackCore::ApplicationMethodContext* applicationMethodContext);
    
      private:
        ServerMethod::SPtr readCoils_Method_;
        ServerMethod::SPtr readDiscreteInputs_Method_;
        ServerMethod::SPtr readInputRegisters_Method_;
        ServerMethod::SPtr readMultiHoldingRegisters_Method_;
        ServerMethod::SPtr writeMultipleCoils_Method_;
        ServerMethod::SPtr writeMultipleHoldingRegisters_Method_;
        ServerMethod::SPtr writeSingleCoil_Method_;
        ServerMethod::SPtr writeSingleHoldingRegister_Method_;
   
   };

}

#endif

The following errors are contained in the source code if OPcUaStackServer is not used as the project namespace.

  • ObjectBase -> OpcUaStackServer::ObjectBase
  • ServerMethode -> OpcUaStackServer::ServerMethode

There are also such errors in the header file.
`

@huebl huebl added the bug Something isn't working label Jan 19, 2025
@huebl huebl self-assigned this Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant