Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important information on the platform change.

cancel
Showing results for 
Search instead for 
Did you mean: 
SOLVED

DL_INVALID_ADDRESS while ceate a node (createSync)

DL_INVALID_ADDRESS while ceate a node (createSync)

schwebo
Established Member

Hello folks,

i try to create/add a node into the datalayer. I run an vritual-device out fo XWorks (ubuntu 20), and play aorund with the data-layer samples (C++)...

I could successfully connect to the device with the "DataLayerClient" sample , and successfully ping the device.

i worte a generic fun to create nodes :

schwebo_0-1654601817790.png

but when i want to add (removeSync/createSync) a ne node the the dataLayer i get the "DL_INVALID_ADDRESS".

schwebo_1-1654601891474.png

 

Do i have wrong charakters in the node path , or what are the issue?

 

Thanks in advance

 

 

3 REPLIES 3

nickH
Community Moderator
Community Moderator

Hi schwebo, 

The Data Layer has a Client<->Broker<->Provider architecture. The Data Layer is the broker in this architecture. And any app can be a Client or a Provider (or both).

  • Clients can log in at a broker and can send quieres to nodes in the Data Layer. 
  • Providers provide data and also log in at the broker
  • The broker (Data Layer) forwards the client requests to the responsible provider and returns the response to the client.

source: https://docs.automation.boschrexroth.com/doc/825967159/data-transport-nrt/latest/en/source: https://docs.automation.boschrexroth.com/doc/825967159/data-transport-nrt/latest/en/

So in general, you need a provider to make Data accessable in the Data Layer.

 

If you want to create a node with the createSync()-Methode (or createAsync), you need a provider which implements a onCreate callback-method, which gets called by the broker if a client does a createSync() on a address in the Data Layer which is registered for your provider. In addition the metadata of the provided node have to permit a create to this address. 

You can have a look at the cpp-sample datalayer.provider.all-data. This sample-provider registers with a double wild card (see documentation for more information) to the address "sdk-cpp-all-data". Here it creates two branches "dynamic" and "static". At these branches the provider provides sub nodes for most of the data types of the Data Layer. The dynamic branch is changeable. Nodes can be written or even deleted by clients. Furthermore new nodes or whole sub branches can be created (with the use of createSync() of a client to a address below "sdk-cpp-alldata/dynamic").

Here you can get further and more detailed information about the Data Layer:

 

Best regards, 

Nick

schwebo
Established Member

Good morning, 

thank for your detail answer. But when we assume we have a bi-directnal connection, i have to instancuate a IClient and a IProvider interface in my app. That meand the IProvider does not implicit consume data like a IClient right !? (if i gathered from the API right)

 

Thank you Boris

nickH
Community Moderator
Community Moderator

Hi Boris, 

a provider does not send queries (e.g. browse, read, write, create, delete, metadata) to nodes in the Data Layer. But the provider knows the data it providers in the Data Layer, since it has to know the answer to these queries. 

In general you always have one provider for a specific path in the Data Layer, this provider has to keep the data for every node he is responsible for.

On the other hand you can have many different Clients which can consume this data, the provider makes available. 

 

Best regards,

Nick 

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist