MAPI service UserApplicationControl
To get UserApplicationControl service use:
Bases: UserApplicationMonitoringProxy
UserApplicationControl MAPI service allows to control a running MORPHEE application. For example, get MORPHEE status, get or set channel value, start component method... Call init_signalr if you intend to use the signalr hub events and with keyword on the UserApplicationControl object to be sure that the communication is closed at the end.
Source code in restmapi\restmapi\services.py
1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 | |
__init__(url)
DO NOT create UserApplicationControlProxy by yourself. Always use MAPIServices.get_service("UserApplicationControl") method to create it.
Parameters:
-
url(string) –Base URL to create of the REST service.
Source code in restmapi\restmapi\services.py
set_channel_value(channel_name, value, duration_in_seconds)
Set the value of a channel.
Parameters:
-
channel_name(string) –Id of a numerical quantity channel -
value(double) –new value. -
duration_in_seconds(double) –Duration of the slope. Put 0 to set the channel immediatly.
Source code in restmapi\restmapi\services.py
set_channels_values(set_point_array)
Set multiple channel value
Parameters:
-
set_point_array(Array of SetPoint) –List of set points to be applied in one request. A setpoint contains a channel identifier, the target value and the duration in second.
Source code in restmapi\restmapi\services.py
set_quantity_table(quantity_name, values)
Set quantity table/LUT content values
Parameters:
-
quantity_name(string) –Quantity table/lut id. -
values(double array array) –Matrix values
Source code in restmapi\restmapi\services.py
start_method(component_name, method_name, loop=False, exit_proc=True)
Start a method in a MORPHEE service. To start a method from the current test description use "TEST" keywords and for campaign description use "CAMPAIGN" keyword and for bench mode use "BENCH" keyword.
Parameters:
-
component_name(string) –The component name that owns the method (only the father name is sufficient). -
method_name(string) –Method name to be started. -
loop(bool, default:False) –true to use an autorepeat service, by default False -
exit_proc(bool, default:True) –true to use a service "Hold with procedure", by default True
Source code in restmapi\restmapi\services.py
stop_method(component_name, method_name)
Stop a method that runs in a MORPHEE service
Parameters:
-
component_name(string) –The component name that owns the method (only the father name is sufficient). -
method_name(string) –Method name to be stopped.
Source code in restmapi\restmapi\services.py
storage_key_add_point(name, index)
Add new point in current file.
Parameters:
-
name(string) –Name of the storageKey (you can get available storage keys by calling get_storage_keys()) -
index(string) –name of the mode (bench, campaign, test, current)
Source code in restmapi\restmapi\services.py
storage_key_create_new_file(name, index)
Initialize a brand new file.
Parameters:
-
name(string) –Name of the storageKey (you can get available storage keys by calling get_storage_keys()). -
index(string) –name of the mode (bench, campaign, test, current).
Source code in restmapi\restmapi\services.py
storage_key_start_acquisition(name, index, period_ms, duration_ms)
Start periodic acquisition into current file
Parameters:
-
name(string) –Name of the storageKey (you can get available storage keys by calling get_storage_keys()). -
index(string) –name of the mode (bench, campaign, test, current). -
period_ms(double) –acquisition period in milliseconde -
duration_ms(double) –duration in millisecondes. -1 for infinite
Source code in restmapi\restmapi\services.py
storage_key_stop_acquisition(name, index)
Stop pending acquisition.
Parameters:
-
name(string) –Name of the storageKey (you can get available storage keys by calling get_storage_keys()). -
index(string) –name of the mode (bench, campaign, test, current).
Source code in restmapi\restmapi\services.py
storage_key_undo_last_point(name, index)
Remove last point (Note that some file format such as MDF do not support that method)
Parameters:
-
name(string) –Name of the storageKey (you can get available storage keys by calling get_storage_keys()). -
index(string) –name of the mode (bench, campaign, test, current).