cancel
Showing results for 
Search instead for 
Did you mean: 

How to connect a ctrlx via udp protocol

How to connect a ctrlx via udp protocol

Josaphat_Aviles
Established Member

Hello Community,

Currently I have a compactRio sending millions of data via UDP protocol to a ordinary computer, I would like to replicate but with the CtrlX.
Do any of you know how to connect the CtrlX with the UDP protocol to be able to run C++ on the CtrlX to manage all this data?
I know that they are 3 debugging options with C++, but I can not find anything in documentation with UDP.

UDP_Protocol.png

Thanks in advance

8 REPLIES 8

Sgilk
Contributor

Hello @Josaphat_Aviles,

To clarify, you have c++ code that is handling the compactRio data? If you have this working on a separate computer, you can completely reuse the UDP networking code in a snap for ctrlX OS. To my knowledge, there are not any samples in the SDK utilizing UDP protocol, but there should be no technical problem for you to implement this in your application.

See the SDK cpp examples: samples-cpp 

Hello @Sgilk ,

Thanks for your prompt reply, that's right I already have the c++ code on the windows computer, which is supposed to be very easy to implement in ctrlx, however I can't find any specific information or documentation on how to do it.
What I do find is that there are three ways to debug C++ but none of them mention UDP, so I wanted to ask if anyone has worked on something similar and which of the three do you recommend?

Josaphat_Aviles_0-1701202301511.png

Meantime I will check cpp examples.

All three of these debugging methods will be useful. If this were me, I'd test the C++ application locally in my build environment using method #2 to start. This isn't really the focus here though... if your code is working on the other computer, there should be no need to debug immediately. The fact that you are using UDP is really not important to the integration with ctrlX OS.

What you need to do is package your c++ code as a snap to install in the ctrlX OS. See the quick start guide to get started. Please let me know if you have any questions throughout this process.

Also, what do you plan to do with the data once you've acquired it via UDP in your c++ application? You may want to look at the datalayer provider example here, as this will be a useful method of storing and communicating your application data to other ctrlX processes.

bostroemc
Occasional Contributor

@Josaphat_Aviles.

One tip:  In addition to sgilk's suggestions, you might want to review the network and network-bind snapcraft interfaces.

Thank you for your response, I use UDP because require 6 Million data peer second, I read that second one it is the slower, but let see what happend.
And once I have the data I just storage in csv file.  But perhaps the second stage is process in real time in C++ to AI models. This data layer that you mention is able to do that? It require a license?
Thank you

@bostroemc, thank you for the tip.

The datalayer is a feature of ctrlX OS and does not require a license to use. You can provide and consume data via this broker using real time memory maps. 

You can find documentation on the topic here: Datalayer Real Time 

And an example here: Example 

@Josaphat_Aviles Are there any news? Can this topic be closed?

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