03-24-2020 01:47 PM
We have an old version of LabView, 8.6.
Trying to set the end point for a URL. I cannot find a way to do it. It's for a UDP packet.
We can send messages to an address OK (ie. xxx.xxx.xxx.xxx ). But if I add an endpoint (xxx.xxx.xxx.xxx/Endpoint) the address is now unresolved. I know I need to generate the endpoint, but how. I have searched the pallets and examples but no joy.
Any advice?
03-24-2020 03:53 PM - edited 03-24-2020 04:06 PM
This will not work. It is up to the receiving end to map the destination port to a service.
(If the listener is based on LabVIEW and under your control, you could put encoded instructions inside the message, for example)
If you are trying to talk to some external device, please shows us the relevant sections of the manual. I am sure you misunderstood.
03-24-2020 04:14 PM - edited 03-24-2020 04:15 PM
@F4 wrote:
Trying to set the end point for a URL. I cannot find a way to do it.
Could it be you are talking about datasocket open? In that case you can create a URL by specifying the correct protocol (e.g. psp, dstp , opc , ftp, http, and file)...
03-25-2020 09:14 AM
I have attached a vi to explain.
We have telematics devices reporting CoAP messages to our "listeners" on our backend servers. Generally our other devices are sent to just a port and address. They are all UDP messages. We build simulators for all our devices so we can work on back end items without burning cell time.
We have a new device that sends CoAP messages (basically JSON formed packets but still UDP). These devices are sending to an address and an endpoint (like xxx.xxx.xxx.xxx/CoAPEvent).
The attached vi works fine for sending to a port/address. But when adding the /endpoint, the address no longer resolves from the strip IP function.
I found vi's for setting endoints but on the version we have (8.6) I cannot find them.
Anyway, thanks for looking at it, let me know what you think (anyone).
03-25-2020 11:48 AM
A UDP address is a U32 integer, nothing else. On each device, you have a listening port which is U16, giving you 6 bytes of targeting information, nothing more. Everything else needs to be encoded in the payload in a form both sides agree on.
A hostname can be translated into an IP address using name services.
Similarly, port numbers can be locally assigned to a nice string, so you might have a local service that translates Strings such as "CoAPEvent" into port numbers. All this needs to happen before the message is sent.
@F4 wrote:
We have a new device that sends CoAP messages (basically JSON formed packets but still UDP). These devices are sending to an address and an endpoint (like xxx.xxx.xxx.xxx/CoAPEvent).
Can you attach a manual where this is described. CoAP is an application protocol, so you need to have either a driver suite or implement the RFC yourself, which would then translate CoAP into low level UDP.
@F4 wrote:
I found vi's for setting endoints but on the version we have (8.6) I cannot find them.
Most likely these are from a third party toolkit. What are the name of these VIs. Is there an online manual? Were they written in-house? See also this discussion.
03-25-2020 02:27 PM
One example I found:
http://zone.ni.com/reference/en-XX/help/371361J-01/lvconcepts/endpointurls/
I don't see these functions in my pallets.
03-25-2020 02:36 PM - edited 03-25-2020 02:36 PM