
7. Using the Yocto-RangeFinder in command line
When you want to perform a punctual operation on your Yocto-RangeFinder, such as reading a
value, assigning a logical name, and so on, you can obviously use the Virtual Hub, but there is a
simpler, faster, and more efficient method: the command line API.
The command line API is a set of executables, one by type of functionality offered by the range of
Yoctopuce products. These executables are provided pre-compiled for all the Yoctopuce officially
supported platforms/OS. Naturally, the executable sources are also provided
1
.
7.1. Installing
Download the command line API
2
. You do not need to run any setup, simply copy the executables
corresponding to your platform/OS in a directory of your choice. You may add this directory to your
PATH variable to be able to access these executables from anywhere. You are all set, you only need
to connect your Yocto-RangeFinder, open a shell, and start working by typing for example:
C:\>
YRangeFinder
any
get_currentValue
To use the command API on Linux, you need either have root privileges or to define an
udev
rule for
your system. See the
Troubleshooting
chapter for more details.
7.2. Use: general description
All the command line API executables work on the same principle. They must be called the following
way
C:\>
Executable
[options]
[target]
command
[
parameter
]
[options]
manage the global workings of the commands, they allow you, for instance, to pilot a
module remotely through the network, or to force the module to save its configuration after executing
the command.
[target]
is the name of the module or of the function to which the command applies. Some very
generic commands do not need a target. You can also use the aliases "
any
" and "
all
", or a list of
names separated by comas without space.
1
If you want to recompile the command line API, you also need the C++ API.
2
http://www.yoctopuce.com/EN/libraries.php
www.yoctopuce.com
33
Summary of Contents for Yocto-RangeFinder
Page 1: ...Yocto RangeFinder User s guide...
Page 2: ......
Page 18: ...12 www yoctopuce com...
Page 26: ...20 www yoctopuce com...
Page 42: ...36 www yoctopuce com...
Page 70: ...gcc lyocto lm lpthread lusb 1 0 lstdc 10 Using Yocto RangeFinder with C 64 www yoctopuce com...
Page 90: ...84 www yoctopuce com...
Page 120: ...114 www yoctopuce com...
Page 130: ...124 www yoctopuce com...
Page 484: ...478 www yoctopuce com...
Page 488: ...482 www yoctopuce com...
Page 490: ...23 Characteristics 484 www yoctopuce com...
Page 491: ......
Page 492: ......