ats.senza client¶
With the provided client you can send data to a sensor emulator, which will immediately affect the behavior of the Android VM.
$ senza help
usage: senza [--version] [-v | -q] [--log-file LOG_FILE] [-h] [--debug]
[--config CONFIG] [--debug-requests]
senza
optional arguments:
--version show program's version number and exit
-v, --verbose Increase verbosity of output. Can be repeated.
-q, --quiet Suppress output except warnings and errors.
--log-file LOG_FILE Specify a file to log output. Disabled by default.
-h, --help Show help message and exit.
--debug Show tracebacks on errors.
--config CONFIG Configuration file (default: senza-client.ini)
--debug-requests Print request details
Commands:
accelerometer Send a command to the accelerometer emulator
battery Send a command to the battery emulator
camera Select a video file to provide as camera input
complete print bash completion command
gps Send a command to the gps emulator
gravity Send a command to the gravity sensor emulator
gsm call Send a call command to the GSM emulator
gsm network Send a command to the GSM emulator
gsm registration Send a gsm registration command to the GSM emulator
gsm signal Send a gsm network command to the GSM emulator
gsm sms Send a SMS to the GSM emulator
gyroscope Send a command to the gyroscope emulator
help print detailed help for another command
light Send a command to the light sensor emulator
linear-acc Send a command to the linear_acc emulator
magnetometer Send a command to the magnetometer emulator
orientation Send a command to the orientation sensor emulator
pressure Send a command to the pressure sensor emulator
proximity Send a command to the proximity sensor emulator
recorder Send a command to start or stop video recording
relative-humidity Send a command to the relative_humidity sensor emulator
rotation-vector Send a command to the rotation vector sensor emulator
schema Display JSON schema for a given subcommand
temperature Send a command to the thermometer emulator
Accelerometer¶
$ senza help accelerometer
usage: senza accelerometer [-h] avm_id x y z
Send a command to the accelerometer emulator
positional arguments:
avm_id AVM identifier
x orientation vector: x (float)
y orientation vector: y (float)
z orientation vector: z (float)
optional arguments:
-h, --help show this help message and exit
Battery¶
$ senza help battery
usage: senza battery [-h] avm_id level_percent ac_online [status]
Send a command to the battery emulator
positional arguments:
avm_id AVM identifier
level_percent battery level (1-100)
ac_online 0=battery; 1=AC
status One of CHARGING, DISCHARGING, NOTCHARGING, FULL, UNKNOWN;
default CHARGING
optional arguments:
-h, --help show this help message and exit
Camera¶
$ senza help camera
usage: senza camera [-h] avm_id file_id
Select a video file to provide as camera input
positional arguments:
avm_id AVM identifier
file_id Camera file id
optional arguments:
-h, --help show this help message and exit
GPS¶
$ senza help gps
usage: senza gps [-h] avm_id latitude longitude
Send a command to the gps emulator
positional arguments:
avm_id AVM identifier
latitude latitude (float)
longitude longitude (float)
optional arguments:
-h, --help show this help message and exit
Gravity¶
$ senza help gravity
usage: senza gravity [-h] avm_id x y z
Send a command to the gravity sensor emulator
positional arguments:
avm_id AVM identifier
x gravity vector: x (float)
y gravity vector: y (float)
z gravity vector: z (float)
optional arguments:
-h, --help show this help message and exit
GSM¶
Call¶
$ senza help gsm call
usage: senza gsm call [-h] avm_id action phone_number
Send a call command to the GSM emulator
positional arguments:
avm_id AVM identifier
action Action to perform (one of "receive", "accept", "cancel,
"hold")
phone_number Phone number to use
optional arguments:
-h, --help show this help message and exit
Network¶
$ senza help gsm network
usage: senza gsm network [-h] avm_id type
Send a command to the GSM emulator
positional arguments:
avm_id AVM identifier
type Network type (one of gsm, gprs, edge, edge, cdma, hspa, hsupa,
umts, hsdpa, evdo, lte
optional arguments:
-h, --help show this help message and exit
Signal¶
$ senza help gsm signal
usage: senza gsm signal [-h] avm_id strength
Send a gsm network command to the GSM emulator
positional arguments:
avm_id AVM identifier
strength Signal strength (between 0 and 4)
optional arguments:
-h, --help show this help message and exit
Sms¶
$ senza help gsm sms
usage: senza gsm sms [-h] avm_id phone_number text
Send a SMS to the GSM emulator
positional arguments:
avm_id AVM identifier
phone_number Phone number to use
text SMS text
optional arguments:
-h, --help show this help message and exit
Registration¶
$ senza help gsm registration
usage: senza gsm registration [-h] avm_id type
Send a gsm registration command to the GSM emulator
positional arguments:
avm_id AVM identifier
type Network registration, one of "home", "denied", "searching",
"roaming", "none"
optional arguments:
-h, --help show this help message and exit
Gyroscope¶
$ senza help gyroscope
usage: senza gyroscope [-h] avm_id azimuth pitch roll
Send a command to the gyroscope emulator
positional arguments:
avm_id AVM identifier
azimuth azimuth (float)
pitch pitch (float)
roll roll (float)
optional arguments:
-h, --help show this help message and exit
Light¶
$ senza help light
usage: senza light [-h] avm_id light
Send a command to the light sensor emulator
positional arguments:
avm_id AVM identifier
light light level (float)
optional arguments:
-h, --help show this help message and exit
Linear-acc¶
$ senza help linear-acc
usage: senza linear-acc [-h] avm_id x y z
Send a command to the linear_acc emulator
positional arguments:
avm_id AVM identifier
x linear_acc vector: x (float)
y linear_acc vector: y (float)
z linear_acc vector: z (float)
optional arguments:
-h, --help show this help message and exit
Magnetometer¶
$ senza help magnetometer
usage: senza magnetometer [-h] avm_id x y z
Send a command to the magnetometer emulator
positional arguments:
avm_id AVM identifier
x magnetometer vector: x (float)
y magnetometer vector: y (float)
z magnetometer vector: z (float)
optional arguments:
-h, --help show this help message and exit
Orientation¶
$ senza help orientation
usage: senza orientation [-h] avm_id azimuth pitch roll
Send a command to the orientation sensor emulator
positional arguments:
avm_id AVM identifier
azimuth azimuth (float)
pitch pitch (float)
roll roll (float)
optional arguments:
-h, --help show this help message and exit
Pressure¶
$ senza help pressure
usage: senza pressure [-h] avm_id pressure
Send a command to the pressure sensor emulator
positional arguments:
avm_id AVM identifier
pressure pressure (float)
optional arguments:
-h, --help show this help message and exit
Proximity¶
$ senza help proximity
usage: senza proximity [-h] avm_id distance
Send a command to the proximity sensor emulator
positional arguments:
avm_id AVM identifier
distance distance (float)
optional arguments:
-h, --help show this help message and exit
Relative Humidity¶
$ senza help relative-humidity
usage: senza relative-humidity [-h] avm_id relative_humidity
Send a command to the relative_humidity sensor emulator
positional arguments:
avm_id AVM identifier
relative_humidity relative_humidity (float)
optional arguments:
-h, --help show this help message and exit
Recorder¶
$ senza help recorder
usage: senza recorder [-h] avm_id filename start
Send a command to start or stop video recording
positional arguments:
avm_id AVM identifier
filename filename
start start
optional arguments:
-h, --help show this help message and exit
Rotation vector¶
$ senza help rotation-vector
usage: senza rotation-vector [-h] avm_id x y z angle accuracy
Send a command to the rotation vector sensor emulator
positional arguments:
avm_id AVM identifier
x rotation vector: x (float)
y rotation vector: y (float)
z rotation vector: z (float)
angle rotation vector: angle (float)
accuracy rotation vector: accuracy (float)
optional arguments:
-h, --help show this help message and exit
Temperature¶
$ senza help temperature
usage: senza temperature [-h] avm_id temperature
Send a command to the thermometer emulator
positional arguments:
avm_id AVM identifier
temperature temperature (float)
optional arguments:
-h, --help show this help message and exit