Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion opendaq_ref
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e6f13d80fa7c64697e5549fc1d897b03ad813415
move_propertyImpl_to_cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

BEGIN_NAMESPACE_OPENDAQ_OPCUA_TMS

bool GetExecutePermission(const TmsClientContextPtr& clientContext, const ContextPtr& daqContext, const opcua::OpcUaNodeId& nodeId);

class TmsClientObjectImpl
{
public:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,13 @@
* limitations under the License.
*/
#pragma once
#include <coreobjects/property_ptr.h>
#include <opcuatms/opcuatms.h>
#include <opcuatms_client/objects/tms_client_context.h>
#include <opcuatms_client/objects/tms_client_property_impl.h>

BEGIN_NAMESPACE_OPENDAQ_OPCUA_TMS

OPENDAQ_DECLARE_CLASS_FACTORY_WITH_INTERFACE(INLINE_FACTORY,
TmsClientProperty, IProperty,
const daq::ContextPtr&, daqContext,
const daq::opcua::tms::TmsClientContextPtr&, ctx,
const opcua::OpcUaNodeId&, nodeId,
const daq::StringPtr&, propertyName)

OPENDAQ_DEFINE_CLASS_FACTORY_WITH_INTERFACE(INLINE_FACTORY,
TmsClientProperty, IProperty,
const daq::ContextPtr&, daqContext,
const daq::opcua::tms::TmsClientContextPtr&, client,
const opcua::OpcUaNodeId&, nodeId,
const daq::StringPtr&, propertyName)

inline PropertyPtr TmsClientProperty(const ContextPtr& daqContext, const TmsClientContextPtr& ctx, const OpcUaNodeId& nodeId, const StringPtr& propertyName = nullptr)
{
PropertyPtr obj(TmsClientProperty_Create(daqContext, ctx, nodeId, propertyName));
return obj;
}
// Reads a Property node from the OpcUa server and builds the corresponding openDAQ Property.
PropertyPtr TmsClientProperty(const ContextPtr& daqContext, const TmsClientContextPtr& ctx, const opcua::OpcUaNodeId& nodeId, const StringPtr& propertyName = nullptr);

END_NAMESPACE_OPENDAQ_OPCUA_TMS

This file was deleted.

3 changes: 1 addition & 2 deletions shared/libraries/opcuatms/opcuatms_client/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ set(SRC_Objects_Headers ${OBJECT_SRC_DIR}/tms_client_object_impl.h
${OBJECT_SRC_DIR}/tms_client_channel_impl.h
${OBJECT_SRC_DIR}/tms_client_channel_factory.h

${OBJECT_SRC_DIR}/tms_client_property_impl.h
${OBJECT_SRC_DIR}/tms_client_property_factory.h

${OBJECT_SRC_DIR}/tms_client_input_port_impl.h
Expand Down Expand Up @@ -77,7 +76,7 @@ set(SRC_Objects ${OBJECT_SRC_DIR}/tms_client_object_impl.cpp
${OBJECT_SRC_DIR}/tms_client_function_block_impl.cpp
${OBJECT_SRC_DIR}/tms_client_channel_impl.cpp
${OBJECT_SRC_DIR}/tms_client_input_port_impl.cpp
${OBJECT_SRC_DIR}/tms_client_property_impl.cpp
${OBJECT_SRC_DIR}/tms_client_property_factory.cpp
${OBJECT_SRC_DIR}/tms_client_property_object_impl.cpp
${OBJECT_SRC_DIR}/tms_client_device_impl.cpp
${OBJECT_SRC_DIR}/tms_client_folder_impl.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,13 @@ bool TmsClientObjectImpl::getAttributeWritePermission(const opcua::OpcUaNodeId&

bool TmsClientObjectImpl::getExecutePermission(const opcua::OpcUaNodeId& nodeId)
{
// Note: This method is used to determine if a method node is executable.
// Other nodes don't have executable attributes and this method will return true for them.
return GetExecutePermission(clientContext, daqContext, nodeId);
}

bool GetExecutePermission(const TmsClientContextPtr& clientContext, const ContextPtr& daqContext, const opcua::OpcUaNodeId& nodeId)
{
// Note: This function is used to determine if a method node is executable.
// Other nodes don't have executable attributes and this function will return true for them.
bool commonExecutable = true;
try
{
Expand All @@ -144,9 +149,9 @@ bool TmsClientObjectImpl::getExecutePermission(const opcua::OpcUaNodeId& nodeId)
}
catch (...)
{
if (this->daqContext.getLogger().assigned())
if (daqContext.getLogger().assigned())
{
auto loggerComponent = this->daqContext.getLogger().getOrAddComponent("OpcUaClientObject");
auto loggerComponent = daqContext.getLogger().getOrAddComponent("OpcUaClientObject");
LOG_W("Cannot read executable mask attributes for OpcUA node");
}
}
Expand Down
Loading
Loading