04-21-2016 10:40 AM
Hello,
in my project I'm using remote calls to execute certain subsequences on a separate machine. I would like this machine to get info about the caller, namely its hostname. It's clear that I can use a parameter to pass this info but I wonder whether there's any native method to do that?
Thanks in advance!
04-22-2016 04:54 PM - last edited on 11-01-2024 03:01 PM by Content Cleaner
Hi endeavor,
Passing the name as a parameter is generally the recommended way of doing this. The section of the TestStand manual which discusses remote sequence execution (attached below) indicates that you must pass values to remote sequences as parameters in order to access them.
Executing Sequences Remotely: https://www.ni.com/docs/en-US/bundle/teststand/page/executing-sequences-remotely.html
04-25-2016 02:52 AM
Hi Tom,
thanks for your reply. My question actually comes from an assumption that TestStand Remote Engine should be aware of who calls it, so it would be quite natural to get this info from the Engine.
04-26-2016 09:58 AM - last edited on 11-01-2024 03:02 PM by Content Cleaner
Hi endeavor,
It's certainly possible for a computer running the TestStand engine to pull its own name with the TestStand API, using the ComputerName property (documentation linked below). Whether you are able to pull the name of a calling computer is a different story. It could be possible, but if so it will likely be done through some low-level functionality which may not be well-documented.
On the client machine, calls to the TestStand API will generally refer to the instance of the TestStand engine running on that machine. So, it's a question of whether there is any documented way of referring to the instance of the TestStand engine from the server machine. Have you tried playing around with the ComputerName property on the client machine?
Also, if there is any way that you can retrieve the server machine's IP address through a call made within the TestStand engine on the client machine, then you could ping the server machine to grab its computer name.
ComputerName Property (Read Only): https://www.ni.com/docs/en-US/bundle/teststand-api-reference/page/tsapiref/engine-computername.html