1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 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 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320
|
#!/usr/bin/env python
# -*- coding:utf-8 -*-
##############################################################################
## license :
##============================================================================
##
## File : DataBase.py
##
## Project : TANGO
##
## $Author : controls$
##
## $Revision : $
##
## $Date : $
##
## $HeadUrl : $
##============================================================================
## This file is generated by POGO
## (Program Obviously used to Generate tango Object)
##
## (c) - Software Engineering Group - ESRF
##############################################################################
"""This class manage the TANGO database."""
__all__ = ("DataBase", "DataBaseClass", "main")
__docformat__ = "restructuredtext"
import PyTango
import sys
# Add additional import
# ----- PROTECTED REGION ID(DataBase.additionnal_import) ENABLED START -----#
try:
from __future__ import print_function
except ImportError:
pass
# ----- PROTECTED REGION END -----# // DataBase.additionnal_import
##############################################################################
## Device States Description
##
## No states for this device
##############################################################################
class DataBase(PyTango.Device_4Impl):
# --------- Add you global variables here --------------------------
# ----- PROTECTED REGION ID(DataBase.global_variables) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.global_variables
# ------------------------------------------------------------------
# Device constructor
# ------------------------------------------------------------------
def __init__(self, cl, name):
PyTango.Device_4Impl.__init__(self, cl, name)
self.debug_stream("In " + self.get_name() + ".__init__()")
DataBase.init_device(self)
# ------------------------------------------------------------------
# Device destructor
# ------------------------------------------------------------------
def delete_device(self):
self.debug_stream("In " + self.get_name() + ".delete_device()")
# ----- PROTECTED REGION ID(DataBase.delete_device) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.delete_device
# ------------------------------------------------------------------
# Device initialization
# ------------------------------------------------------------------
def init_device(self):
self.debug_stream("In " + self.get_name() + ".init_device()")
self.get_device_properties(self.get_device_class())
self.attr_StoredProcedureRelease_read = ""
self.attr_Timing_average_read = [0.0]
self.attr_Timing_minimum_read = [0.0]
self.attr_Timing_maximum_read = [0.0]
self.attr_Timing_calls_read = [0.0]
self.attr_Timing_index_read = [""]
self.attr_Timing_info_read = [""]
# ----- PROTECTED REGION ID(DataBase.init_device) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.init_device
# ------------------------------------------------------------------
# Always excuted hook method
# ------------------------------------------------------------------
def always_executed_hook(self):
self.debug_stream("In " + self.get_name() + ".always_excuted_hook()")
# ----- PROTECTED REGION ID(DataBase.always_executed_hook) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.always_executed_hook
# ==================================================================
#
# DataBase read/write attribute methods
#
# ==================================================================
# ------------------------------------------------------------------
# Read StoredProcedureRelease attribute
# ------------------------------------------------------------------
def read_StoredProcedureRelease(self, attr):
self.debug_stream("In " + self.get_name() + ".read_StoredProcedureRelease()")
# ----- PROTECTED REGION ID(DataBase.StoredProcedureRelease_read) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.StoredProcedureRelease_read
attr.set_value(self.attr_StoredProcedureRelease_read)
# ------------------------------------------------------------------
# Read Timing_average attribute
# ------------------------------------------------------------------
def read_Timing_average(self, attr):
self.debug_stream("In " + self.get_name() + ".read_Timing_average()")
# ----- PROTECTED REGION ID(DataBase.Timing_average_read) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.Timing_average_read
attr.set_value(self.attr_Timing_average_read)
# ------------------------------------------------------------------
# Read Timing_minimum attribute
# ------------------------------------------------------------------
def read_Timing_minimum(self, attr):
self.debug_stream("In " + self.get_name() + ".read_Timing_minimum()")
# ----- PROTECTED REGION ID(DataBase.Timing_minimum_read) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.Timing_minimum_read
attr.set_value(self.attr_Timing_minimum_read)
# ------------------------------------------------------------------
# Read Timing_maximum attribute
# ------------------------------------------------------------------
def read_Timing_maximum(self, attr):
self.debug_stream("In " + self.get_name() + ".read_Timing_maximum()")
# ----- PROTECTED REGION ID(DataBase.Timing_maximum_read) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.Timing_maximum_read
attr.set_value(self.attr_Timing_maximum_read)
# ------------------------------------------------------------------
# Read Timing_calls attribute
# ------------------------------------------------------------------
def read_Timing_calls(self, attr):
self.debug_stream("In " + self.get_name() + ".read_Timing_calls()")
# ----- PROTECTED REGION ID(DataBase.Timing_calls_read) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.Timing_calls_read
attr.set_value(self.attr_Timing_calls_read)
# ------------------------------------------------------------------
# Read Timing_index attribute
# ------------------------------------------------------------------
def read_Timing_index(self, attr):
self.debug_stream("In " + self.get_name() + ".read_Timing_index()")
# ----- PROTECTED REGION ID(DataBase.Timing_index_read) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.Timing_index_read
attr.set_value(self.attr_Timing_index_read)
# ------------------------------------------------------------------
# Read Timing_info attribute
# ------------------------------------------------------------------
def read_Timing_info(self, attr):
self.debug_stream("In " + self.get_name() + ".read_Timing_info()")
# ----- PROTECTED REGION ID(DataBase.Timing_info_read) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.Timing_info_read
attr.set_value(self.attr_Timing_info_read)
# ------------------------------------------------------------------
# Read Attribute Hardware
# ------------------------------------------------------------------
def read_attr_hardware(self, data):
self.debug_stream("In " + self.get_name() + ".read_attr_hardware()")
# ----- PROTECTED REGION ID(DataBase.read_attr_hardware) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.read_attr_hardware
# ==================================================================
#
# DataBase command methods
#
# ==================================================================
# ------------------------------------------------------------------
# DbAddDevice command:
# ------------------------------------------------------------------
def DbAddDevice(self, argin):
"""Add a Tango class device to a specific device server
:param argin: Str[0] = Full device server process name
Str[1] = Device name
Str[2] = Tango class name
:type: PyTango.DevVarStringArray
:return:
:rtype: PyTango.DevVoid"""
self.debug_stream("In " + self.get_name() + ".DbAddDevice()")
# ----- PROTECTED REGION ID(DataBase.DbAddDevice) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbAddDevice
# ------------------------------------------------------------------
# DbAddServer command:
# ------------------------------------------------------------------
def DbAddServer(self, argin):
"""Create a device server process entry in database
:param argin: Str[0] = Full device server name
Str[1] = Device(s) name
Str[2] = Tango class name
Str[n] = Device name
Str[n + 1] = Tango class name
:type: PyTango.DevVarStringArray
:return:
:rtype: PyTango.DevVoid"""
self.debug_stream("In " + self.get_name() + ".DbAddServer()")
# ----- PROTECTED REGION ID(DataBase.DbAddServer) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbAddServer
# ------------------------------------------------------------------
# DbDeleteAttributeAlias command:
# ------------------------------------------------------------------
def DbDeleteAttributeAlias(self, argin):
"""Delete an attribute alias.
:param argin: Attriibute alias name.
:type: PyTango.DevString
:return:
:rtype: PyTango.DevVoid"""
self.debug_stream("In " + self.get_name() + ".DbDeleteAttributeAlias()")
# ----- PROTECTED REGION ID(DataBase.DbDeleteAttributeAlias) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbDeleteAttributeAlias
# ------------------------------------------------------------------
# DbDeleteClassAttribute command:
# ------------------------------------------------------------------
def DbDeleteClassAttribute(self, argin):
"""delete a class attribute and all its properties from database
:param argin: Str[0] = Tango class name
Str[1] = Attribute name
:type: PyTango.DevVarStringArray
:return:
:rtype: PyTango.DevVoid"""
self.debug_stream("In " + self.get_name() + ".DbDeleteClassAttribute()")
# ----- PROTECTED REGION ID(DataBase.DbDeleteClassAttribute) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbDeleteClassAttribute
# ------------------------------------------------------------------
# DbDeleteClassAttributeProperty command:
# ------------------------------------------------------------------
def DbDeleteClassAttributeProperty(self, argin):
"""delete class attribute properties from database
:param argin: Str[0] = Tango class name
Str[1] = Attribute name
Str[2] = Property name
Str[n] = Property name
:type: PyTango.DevVarStringArray
:return:
:rtype: PyTango.DevVoid"""
self.debug_stream("In " + self.get_name() + ".DbDeleteClassAttributeProperty()")
# ----- PROTECTED REGION ID(DataBase.DbDeleteClassAttributeProperty) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbDeleteClassAttributeProperty
# ------------------------------------------------------------------
# DbDeleteClassProperty command:
# ------------------------------------------------------------------
def DbDeleteClassProperty(self, argin):
"""Delete class properties from database
:param argin: Str[0] = Tango class name
Str[1] = Property name
Str[n] = Property name
:type: PyTango.DevVarStringArray
:return:
:rtype: PyTango.DevVoid"""
self.debug_stream("In " + self.get_name() + ".DbDeleteClassProperty()")
# ----- PROTECTED REGION ID(DataBase.DbDeleteClassProperty) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbDeleteClassProperty
# ------------------------------------------------------------------
# DbDeleteDevice command:
# ------------------------------------------------------------------
def DbDeleteDevice(self, argin):
"""Delete a devcie from database
:param argin: device name
:type: PyTango.DevString
:return:
:rtype: PyTango.DevVoid"""
self.debug_stream("In " + self.get_name() + ".DbDeleteDevice()")
# ----- PROTECTED REGION ID(DataBase.DbDeleteDevice) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbDeleteDevice
# ------------------------------------------------------------------
# DbDeleteDeviceAlias command:
# ------------------------------------------------------------------
def DbDeleteDeviceAlias(self, argin):
"""Delete a device alias.
:param argin: device alias name
:type: PyTango.DevString
:return:
:rtype: PyTango.DevVoid"""
self.debug_stream("In " + self.get_name() + ".DbDeleteDeviceAlias()")
# ----- PROTECTED REGION ID(DataBase.DbDeleteDeviceAlias) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbDeleteDeviceAlias
# ------------------------------------------------------------------
# DbDeleteDeviceAttribute command:
# ------------------------------------------------------------------
def DbDeleteDeviceAttribute(self, argin):
"""Delete device attribute properties from database
:param argin: Str[0] = Device name
Str[1] = Attribute name
:type: PyTango.DevVarStringArray
:return:
:rtype: PyTango.DevVoid"""
self.debug_stream("In " + self.get_name() + ".DbDeleteDeviceAttribute()")
# ----- PROTECTED REGION ID(DataBase.DbDeleteDeviceAttribute) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbDeleteDeviceAttribute
# ------------------------------------------------------------------
# DbDeleteDeviceAttributeProperty command:
# ------------------------------------------------------------------
def DbDeleteDeviceAttributeProperty(self, argin):
"""delete a device attribute property from the database
:param argin: Str[0] = Device name
Str[1] = Attribute name
Str[2] = Property name
Str[n] = Property name
:type: PyTango.DevVarStringArray
:return:
:rtype: PyTango.DevVoid"""
self.debug_stream(
"In " + self.get_name() + ".DbDeleteDeviceAttributeProperty()"
)
# ----- PROTECTED REGION ID(DataBase.DbDeleteDeviceAttributeProperty) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbDeleteDeviceAttributeProperty
# ------------------------------------------------------------------
# DbDeleteDeviceProperty command:
# ------------------------------------------------------------------
def DbDeleteDeviceProperty(self, argin):
"""Delete device property(ies)
:param argin: Str[0] = Device name
Str[1] = Property name
Str[n] = Property name
:type: PyTango.DevVarStringArray
:return:
:rtype: PyTango.DevVoid"""
self.debug_stream("In " + self.get_name() + ".DbDeleteDeviceProperty()")
# ----- PROTECTED REGION ID(DataBase.DbDeleteDeviceProperty) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbDeleteDeviceProperty
# ------------------------------------------------------------------
# DbDeleteProperty command:
# ------------------------------------------------------------------
def DbDeleteProperty(self, argin):
"""Delete free property from database
:param argin: Str[0] = Object name
Str[1] = Property name
Str[n] = Property name
:type: PyTango.DevVarStringArray
:return:
:rtype: PyTango.DevVoid"""
self.debug_stream("In " + self.get_name() + ".DbDeleteProperty()")
# ----- PROTECTED REGION ID(DataBase.DbDeleteProperty) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbDeleteProperty
# ------------------------------------------------------------------
# DbDeleteServer command:
# ------------------------------------------------------------------
def DbDeleteServer(self, argin):
"""Delete server from the database but dont delete device properties
:param argin: Device server name
:type: PyTango.DevString
:return:
:rtype: PyTango.DevVoid"""
self.debug_stream("In " + self.get_name() + ".DbDeleteServer()")
# ----- PROTECTED REGION ID(DataBase.DbDeleteServer) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbDeleteServer
# ------------------------------------------------------------------
# DbDeleteServerInfo command:
# ------------------------------------------------------------------
def DbDeleteServerInfo(self, argin):
"""delete info related to a Tango devvice server process
:param argin: Device server name
:type: PyTango.DevString
:return:
:rtype: PyTango.DevVoid"""
self.debug_stream("In " + self.get_name() + ".DbDeleteServerInfo()")
# ----- PROTECTED REGION ID(DataBase.DbDeleteServerInfo) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbDeleteServerInfo
# ------------------------------------------------------------------
# DbExportDevice command:
# ------------------------------------------------------------------
def DbExportDevice(self, argin):
"""Export a device to the database
:param argin: Str[0] = Device name
Str[1] = CORBA IOR
Str[2] = Device server process host name
Str[3] = Device server process PID or string ``null``
Str[4] = Device server process version
:type: PyTango.DevVarStringArray
:return:
:rtype: PyTango.DevVoid"""
self.debug_stream("In " + self.get_name() + ".DbExportDevice()")
# ----- PROTECTED REGION ID(DataBase.DbExportDevice) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbExportDevice
# ------------------------------------------------------------------
# DbExportEvent command:
# ------------------------------------------------------------------
def DbExportEvent(self, argin):
"""Export Event channel to database
:param argin: Str[0] = event channel name (or factory name)
Str[1] = CORBA IOR
Str[2] = Notifd host name
Str[3] = Notifd pid
Str[4] = Notifd version
:type: PyTango.DevVarStringArray
:return:
:rtype: PyTango.DevVoid"""
self.debug_stream("In " + self.get_name() + ".DbExportEvent()")
# ----- PROTECTED REGION ID(DataBase.DbExportEvent) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbExportEvent
# ------------------------------------------------------------------
# DbGetAliasDevice command:
# ------------------------------------------------------------------
def DbGetAliasDevice(self, argin):
"""Get device name from its alias.
:param argin: Alias name
:type: PyTango.DevString
:return: Device name
:rtype: PyTango.DevString"""
self.debug_stream("In " + self.get_name() + ".DbGetAliasDevice()")
argout = ""
# ----- PROTECTED REGION ID(DataBase.DbGetAliasDevice) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetAliasDevice
return argout
# ------------------------------------------------------------------
# DbGetAttributeAlias command:
# ------------------------------------------------------------------
def DbGetAttributeAlias(self, argin):
"""Get the attribute name for the given alias.
If alias not found in database, returns an empty string.
:param argin: The attribute alias name
:type: PyTango.DevString
:return: The attribute name (device/attribute)
:rtype: PyTango.DevString"""
self.debug_stream("In " + self.get_name() + ".DbGetAttributeAlias()")
argout = ""
# ----- PROTECTED REGION ID(DataBase.DbGetAttributeAlias) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetAttributeAlias
return argout
# ------------------------------------------------------------------
# DbGetAttributeAliasList command:
# ------------------------------------------------------------------
def DbGetAttributeAliasList(self, argin):
"""Get attribute alias list for a specified filter
:param argin: attribute alias filter string (eg: att*)
:type: PyTango.DevString
:return: attribute aliases
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetAttributeAliasList()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetAttributeAliasList) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetAttributeAliasList
return argout
# ------------------------------------------------------------------
# DbGetClassAttributeList command:
# ------------------------------------------------------------------
def DbGetClassAttributeList(self, argin):
"""Get attrilute list for a given Tango class with a specified filter
:param argin: Str[0] = Tango class name
Str[1] = Attribute name filter (eg: att*)
:type: PyTango.DevVarStringArray
:return: Str[0] = Class attribute name
Str[n] = Class attribute name
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetClassAttributeList()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetClassAttributeList) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetClassAttributeList
return argout
# ------------------------------------------------------------------
# DbGetClassAttributeProperty command:
# ------------------------------------------------------------------
def DbGetClassAttributeProperty(self, argin):
"""Get Tango class property(ies) value
:param argin: Str[0] = Tango class name
Str[1] = Attribute name
Str[n] = Attribute name
:type: PyTango.DevVarStringArray
:return: Str[0] = Tango class name
Str[1] = Attribute property number
Str[2] = Attribute property 1 name
Str[3] = Attribute property 1 value
Str[n + 1] = Attribute property 2 name
Str[n + 2] = Attribute property 2 value
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetClassAttributeProperty()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetClassAttributeProperty) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetClassAttributeProperty
return argout
# ------------------------------------------------------------------
# DbGetClassAttributeProperty2 command:
# ------------------------------------------------------------------
def DbGetClassAttributeProperty2(self, argin):
"""This command supports array property compared to the old command called
DbGetClassAttributeProperty. The old command has not been deleted from the
server for compatibility reasons.
:param argin: Str[0] = Tango class name
Str[1] = Attribute name
Str[n] = Attribute name
:type: PyTango.DevVarStringArray
:return: Str[0] = Tango class name
Str[1] = Attribute property number
Str[2] = Attribute property 1 name
Str[3] = Attribute property 1 value number (array case)
Str[4] = Attribute property 1 value
Str[n] = Attribute property 1 value (array case)
Str[n + 1] = Attribute property 2 name
Str[n + 2] = Attribute property 2 value number (array case)
Str[n + 3] = Attribute property 2 value
Str[n + m] = Attribute property 2 value (array case)
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetClassAttributeProperty2()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetClassAttributeProperty2) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetClassAttributeProperty2
return argout
# ------------------------------------------------------------------
# DbGetClassAttributePropertyHist command:
# ------------------------------------------------------------------
def DbGetClassAttributePropertyHist(self, argin):
"""Retrieve Tango class attribute property history
:param argin: Str[0] = Tango class
Str[1] = Attribute name
Str[2] = Property name
:type: PyTango.DevVarStringArray
:return: Str[0] = Attribute name
Str[1] = Property name
Str[2] = date
Str[3] = Property value number (array case)
Str[4] = Property value 1
Str[n] = Property value n
:rtype: PyTango.DevVarStringArray"""
self.debug_stream(
"In " + self.get_name() + ".DbGetClassAttributePropertyHist()"
)
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetClassAttributePropertyHist) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetClassAttributePropertyHist
return argout
# ------------------------------------------------------------------
# DbGetClassForDevice command:
# ------------------------------------------------------------------
def DbGetClassForDevice(self, argin):
"""Get Tango class for the specified device.
:param argin: Device name
:type: PyTango.DevString
:return: Device Tango class
:rtype: PyTango.DevString"""
self.debug_stream("In " + self.get_name() + ".DbGetClassForDevice()")
argout = ""
# ----- PROTECTED REGION ID(DataBase.DbGetClassForDevice) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetClassForDevice
return argout
# ------------------------------------------------------------------
# DbGetClassInheritanceForDevice command:
# ------------------------------------------------------------------
def DbGetClassInheritanceForDevice(self, argin):
"""Get class inheritance for the specified device.
:param argin: Device name
:type: PyTango.DevString
:return: Classes off the specified device.
[0] - is the class of the device.
[1] - is the class from the device class is inherited.
........and so on
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetClassInheritanceForDevice()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetClassInheritanceForDevice) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetClassInheritanceForDevice
return argout
# ------------------------------------------------------------------
# DbGetClassList command:
# ------------------------------------------------------------------
def DbGetClassList(self, argin):
"""Get Tango class list with a specified filter
:param argin: Filter
:type: PyTango.DevString
:return: Class list
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetClassList()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetClassList) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetClassList
return argout
# ------------------------------------------------------------------
# DbGetClassProperty command:
# ------------------------------------------------------------------
def DbGetClassProperty(self, argin):
"""
:param argin: Str[0] = Tango class
Str[1] = Property name
Str[2] = Property name
:type: PyTango.DevVarStringArray
:return: Str[0] = Tango class
Str[1] = Property number
Str[2] = Property name
Str[3] = Property value number (array case)
Str[4] = Property value
Str[n] = Propery value (array case)
....
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetClassProperty()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetClassProperty) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetClassProperty
return argout
# ------------------------------------------------------------------
# DbGetClassPropertyHist command:
# ------------------------------------------------------------------
def DbGetClassPropertyHist(self, argin):
"""Retrieve Tango class property history
:param argin: Str[0] = Tango class
Str[1] = Property name
:type: PyTango.DevVarStringArray
:return: Str[0] = Property name
Str[1] = date
Str[2] = Property value number (array case)
Str[3] = Property value 1
Str[n] = Property value n
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetClassPropertyHist()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetClassPropertyHist) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetClassPropertyHist
return argout
# ------------------------------------------------------------------
# DbGetClassPropertyList command:
# ------------------------------------------------------------------
def DbGetClassPropertyList(self, argin):
"""Get property list for a given Tango class with a specified filter
:param argin: The filter
:type: PyTango.DevString
:return: Property name list
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetClassPropertyList()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetClassPropertyList) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetClassPropertyList
return argout
# ------------------------------------------------------------------
# DbGetDeviceAlias command:
# ------------------------------------------------------------------
def DbGetDeviceAlias(self, argin):
"""Return alias for device name if found.
:param argin: The device name
:type: PyTango.DevString
:return: The alias found
:rtype: PyTango.DevString"""
self.debug_stream("In " + self.get_name() + ".DbGetDeviceAlias()")
argout = ""
# ----- PROTECTED REGION ID(DataBase.DbGetDeviceAlias) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetDeviceAlias
return argout
# ------------------------------------------------------------------
# DbGetDeviceAliasList command:
# ------------------------------------------------------------------
def DbGetDeviceAliasList(self, argin):
"""Get device alias name with a specific filter
:param argin: The filter
:type: PyTango.DevString
:return: Device alias list
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetDeviceAliasList()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetDeviceAliasList) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetDeviceAliasList
return argout
# ------------------------------------------------------------------
# DbGetDeviceAttributeList command:
# ------------------------------------------------------------------
def DbGetDeviceAttributeList(self, argin):
"""Return list of attributes matching the wildcard
for the specified device
:param argin: Str[0] = Device name
Str[1] = Wildcard
:type: PyTango.DevVarStringArray
:return: attribute name list
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetDeviceAttributeList()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetDeviceAttributeList) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetDeviceAttributeList
return argout
# ------------------------------------------------------------------
# DbGetDeviceAttributeProperty command:
# ------------------------------------------------------------------
def DbGetDeviceAttributeProperty(self, argin):
"""Get device attribute property(ies) value
:param argin: Str[0] = Device name
Str[1] = Attribute name
Str[n] = Attribute name
:type: PyTango.DevVarStringArray
:return: Str[0] = Device name
Str[1] = Attribute property number
Str[2] = Attribute property 1 name
Str[3] = Attribute property 1 value
Str[n + 1] = Attribute property 2 name
Str[n + 2] = Attribute property 2 value
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetDeviceAttributeProperty()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetDeviceAttributeProperty) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetDeviceAttributeProperty
return argout
# ------------------------------------------------------------------
# DbGetDeviceAttributeProperty2 command:
# ------------------------------------------------------------------
def DbGetDeviceAttributeProperty2(self, argin):
"""Retrieve device attribute properties. This command has the possibility to retrieve
device attribute properties which are arrays. It is not possible with the old
DbGetDeviceAttributeProperty command. Nevertheless, the old command has not been
deleted for compatibility reason
:param argin: Str[0] = Device name
Str[1] = Attribute name
Str[n] = Attribute name
:type: PyTango.DevVarStringArray
:return: Str[0] = Device name
Str[1] = Attribute property number
Str[2] = Attribute property 1 name
Str[3] = Attribute property 1 value number (array case)
Str[4] = Attribute property 1 value
Str[n] = Attribute property 1 value (array case)
Str[n + 1] = Attribute property 2 name
Str[n + 2] = Attribute property 2 value number (array case)
Str[n + 3] = Attribute property 2 value
Str[n + m] = Attribute property 2 value (array case)
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetDeviceAttributeProperty2()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetDeviceAttributeProperty2) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetDeviceAttributeProperty2
return argout
# ------------------------------------------------------------------
# DbGetDeviceAttributePropertyHist command:
# ------------------------------------------------------------------
def DbGetDeviceAttributePropertyHist(self, argin):
"""Retrieve device attribute property history
:param argin: Str[0] = Device name
Str[1] = Attribute name
Str[2] = Property name
:type: PyTango.DevVarStringArray
:return: Str[0] = Attribute name
Str[1] = Property name
Str[2] = date
Str[3] = Property value number (array case)
Str[4] = Property value 1
Str[n] = Property value n
:rtype: PyTango.DevVarStringArray"""
self.debug_stream(
"In " + self.get_name() + ".DbGetDeviceAttributePropertyHist()"
)
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetDeviceAttributePropertyHist) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetDeviceAttributePropertyHist
return argout
# ------------------------------------------------------------------
# DbGetDeviceClassList command:
# ------------------------------------------------------------------
def DbGetDeviceClassList(self, argin):
"""Get Tango classes/device list embedded in a specific device server
:param argin: Device server process name
:type: PyTango.DevString
:return: Str[0] = Device name
Str[1] = Tango class
Str[n] = Device name
Str[n + 1] = Tango class
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetDeviceClassList()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetDeviceClassList) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetDeviceClassList
return argout
# ------------------------------------------------------------------
# DbGetDeviceDomainList command:
# ------------------------------------------------------------------
def DbGetDeviceDomainList(self, argin):
"""Get list of device domain name matching the specified
:param argin: The wildcard
:type: PyTango.DevString
:return: Device name domain list
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetDeviceDomainList()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetDeviceDomainList) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetDeviceDomainList
return argout
# ------------------------------------------------------------------
# DbGetDeviceExportedList command:
# ------------------------------------------------------------------
def DbGetDeviceExportedList(self, argin):
"""Get a list of exported devices whose names satisfy the filter (wildcard is
:param argin: filter
:type: PyTango.DevString
:return: list of exported devices
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetDeviceExportedList()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetDeviceExportedList) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetDeviceExportedList
return argout
# ------------------------------------------------------------------
# DbGetDeviceFamilyList command:
# ------------------------------------------------------------------
def DbGetDeviceFamilyList(self, argin):
"""Get a list of device name families for device name matching the
specified wildcard
:param argin: The wildcard
:type: PyTango.DevString
:return: Family list
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetDeviceFamilyList()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetDeviceFamilyList) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetDeviceFamilyList
return argout
# ------------------------------------------------------------------
# DbGetDeviceInfo command:
# ------------------------------------------------------------------
def DbGetDeviceInfo(self, argin):
"""Returns info from DbImportDevice and started/stopped dates.
:param argin: Device name
:type: PyTango.DevString
:return: Str[0] = Device name
Str[1] = CORBA IOR
Str[2] = Device version
Str[3] = Device Server name
Str[4] = Device Server process host name
Str[5] = Started date (or ? if not set)
Str[6] = Stopped date (or ? if not set)
Str[7] = Device class
Lg[0] = Device exported flag
Lg[1] = Device Server process PID (or -1 if not set)
:rtype: PyTango.DevVarLongStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetDeviceInfo()")
argout = [0], [""]
# ----- PROTECTED REGION ID(DataBase.DbGetDeviceInfo) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetDeviceInfo
return argout
# ------------------------------------------------------------------
# DbGetDeviceList command:
# ------------------------------------------------------------------
def DbGetDeviceList(self, argin):
"""Get a list of devices for specified server and class.
:param argin: argin[0] : server name
argin[1] : class name
:type: PyTango.DevVarStringArray
:return: The list of devices for specified server and class.
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetDeviceList()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetDeviceList) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetDeviceList
return argout
# ------------------------------------------------------------------
# DbGetDeviceWideList command:
# ------------------------------------------------------------------
def DbGetDeviceWideList(self, argin):
"""Get a list of devices whose names satisfy the filter.
:param argin: filter
:type: PyTango.DevString
:return: list of exported devices
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetDeviceWideList()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetDeviceWideList) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetDeviceWideList
return argout
# ------------------------------------------------------------------
# DbGetDeviceMemberList command:
# ------------------------------------------------------------------
def DbGetDeviceMemberList(self, argin):
"""Get a list of device name members for device name matching the
specified filter
:param argin: The filter
:type: PyTango.DevString
:return: Device names member list
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetDeviceMemberList()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetDeviceMemberList) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetDeviceMemberList
return argout
# ------------------------------------------------------------------
# DbGetDeviceProperty command:
# ------------------------------------------------------------------
def DbGetDeviceProperty(self, argin):
"""
:param argin: Str[0] = Device name
Str[1] = Property name
Str[n] = Property name
:type: PyTango.DevVarStringArray
:return: Str[0] = Device name
Str[1] = Property number
Str[2] = Property name
Str[3] = Property value number (array case)
Str[4] = Property value 1
Str[n] = Property value n (array case)
Str[n + 1] = Property name
Str[n + 2] = Property value number (array case)
Str[n + 3] = Property value 1
Str[n + m] = Property value m
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetDeviceProperty()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetDeviceProperty) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetDeviceProperty
return argout
# ------------------------------------------------------------------
# DbGetDevicePropertyHist command:
# ------------------------------------------------------------------
def DbGetDevicePropertyHist(self, argin):
"""Retrieve device property history
:param argin: Str[0] = Device name
Str[2] = Property name
:type: PyTango.DevVarStringArray
:return: Str[0] = Property name
Str[1] = date
Str[2] = Property value number (array case)
Str[3] = Property value 1
Str[n] = Property value n
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetDevicePropertyHist()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetDevicePropertyHist) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetDevicePropertyHist
return argout
# ------------------------------------------------------------------
# DbGetDevicePropertyList command:
# ------------------------------------------------------------------
def DbGetDevicePropertyList(self, argin):
"""Get property list belonging to the specified device and with
name matching the specified filter
:param argin: Str[0] = device name
Str[1] = Filter
:type: PyTango.DevVarStringArray
:return: Property name list
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetDevicePropertyList()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetDevicePropertyList) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetDevicePropertyList
return argout
# ------------------------------------------------------------------
# DbGetDeviceServerClassList command:
# ------------------------------------------------------------------
def DbGetDeviceServerClassList(self, argin):
"""Get list of Tango classes for a device server
:param argin: device server process name
:type: PyTango.DevString
:return: list of classes for this device server
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetDeviceServerClassList()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetDeviceServerClassList) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetDeviceServerClassList
return argout
# ------------------------------------------------------------------
# DbGetExportdDeviceListForClass command:
# ------------------------------------------------------------------
def DbGetExportdDeviceListForClass(self, argin):
"""Query the database for device exported for the specified class.
:param argin: Class name
:type: PyTango.DevString
:return: Device exported list
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetExportdDeviceListForClass()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetExportdDeviceListForClass) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetExportdDeviceListForClass
return argout
# ------------------------------------------------------------------
# DbGetHostList command:
# ------------------------------------------------------------------
def DbGetHostList(self, argin):
"""Get host list with name matching the specified filter
:param argin: The filter
:type: PyTango.DevString
:return: Host name list
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetHostList()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetHostList) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetHostList
return argout
# ------------------------------------------------------------------
# DbGetHostServerList command:
# ------------------------------------------------------------------
def DbGetHostServerList(self, argin):
"""Get list of device server process name running on host with name matching
the specified filter
:param argin: The filter
:type: PyTango.DevString
:return: Device server process name list
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetHostServerList()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetHostServerList) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetHostServerList
return argout
# ------------------------------------------------------------------
# DbGetHostServersInfo command:
# ------------------------------------------------------------------
def DbGetHostServersInfo(self, argin):
"""Get info about all servers running on specified host, name, mode and level
:param argin: Host name
:type: PyTango.DevString
:return: Server info for all servers running on specified host
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetHostServersInfo()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetHostServersInfo) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetHostServersInfo
return argout
# ------------------------------------------------------------------
# DbGetInstanceNameList command:
# ------------------------------------------------------------------
def DbGetInstanceNameList(self, argin):
"""Returns the instance names found for specified server.
:param argin: Server name
:type: PyTango.DevString
:return: The instance names found for specified server.
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetInstanceNameList()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetInstanceNameList) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetInstanceNameList
return argout
# ------------------------------------------------------------------
# DbGetObjectList command:
# ------------------------------------------------------------------
def DbGetObjectList(self, argin):
"""Get list of free object defined in database with name
matching the specified filter
:param argin: The filter
:type: PyTango.DevString
:return: Object name list
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetObjectList()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetObjectList) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetObjectList
return argout
# ------------------------------------------------------------------
# DbGetProperty command:
# ------------------------------------------------------------------
def DbGetProperty(self, argin):
"""Get free object property
:param argin: Str[0] = Object name
Str[1] = Property name
Str[n] = Property name
:type: PyTango.DevVarStringArray
:return: Str[0] = Object name
Str[1] = Property number
Str[2] = Property name
Str[3] = Property value number (array case)
Str[4] = Property value 1
Str[n] = Property value n (array case)
Str[n + 1] = Property name
Str[n + 2] = Property value number (array case)
Str[n + 3] = Property value 1
Str[n + m] = Property value m
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetProperty()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetProperty) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetProperty
return argout
# ------------------------------------------------------------------
# DbGetPropertyHist command:
# ------------------------------------------------------------------
def DbGetPropertyHist(self, argin):
"""Retrieve object property history
:param argin: Str[0] = Object name
Str[2] = Property name
:type: PyTango.DevVarStringArray
:return: Str[0] = Property name
Str[1] = date
Str[2] = Property value number (array case)
Str[3] = Property value 1
Str[n] = Property value n
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetPropertyHist()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetPropertyHist) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetPropertyHist
return argout
# ------------------------------------------------------------------
# DbGetPropertyList command:
# ------------------------------------------------------------------
def DbGetPropertyList(self, argin):
"""Get list of property defined for a free object and matching the
specified filter
:param argin: Str[0] = Object name
Str[1] = filter
:type: PyTango.DevVarStringArray
:return: Property name list
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetPropertyList()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetPropertyList) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetPropertyList
return argout
# ------------------------------------------------------------------
# DbGetServerInfo command:
# ------------------------------------------------------------------
def DbGetServerInfo(self, argin):
"""Get info about host, mode and level for specified server
:param argin: server name
:type: PyTango.DevString
:return: server info
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetServerInfo()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetServerInfo) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetServerInfo
return argout
# ------------------------------------------------------------------
# DbGetServerList command:
# ------------------------------------------------------------------
def DbGetServerList(self, argin):
"""Get list of device server process defined in database
with name matching the specified filter
:param argin: The filter
:type: PyTango.DevString
:return: Device server process name list
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetServerList()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetServerList) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetServerList
return argout
# ------------------------------------------------------------------
# DbGetServerNameList command:
# ------------------------------------------------------------------
def DbGetServerNameList(self, argin):
"""Returns the list of server names found for the wildcard specified.
It returns only the server executable name without instance name as DbGetServerList.
:param argin: wildcard for server names.
:type: PyTango.DevString
:return: server names found.
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetServerNameList()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetServerNameList) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetServerNameList
return argout
# ------------------------------------------------------------------
# DbImportDevice command:
# ------------------------------------------------------------------
def DbImportDevice(self, argin):
"""Import a device from the database
:param argin: Device name (or alias)
:type: PyTango.DevString
:return: Str[0] = device name
Str[1] = CORBA IOR
Str[2] = device version
Str[3] = device server process name
Str[4] = host name
Str[5] = Tango class name
Lg[0] = Exported flag
Lg[1] = Device server process PID
:rtype: PyTango.DevVarLongStringArray"""
self.debug_stream("In " + self.get_name() + ".DbImportDevice()")
argout = [0], [""]
# ----- PROTECTED REGION ID(DataBase.DbImportDevice) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbImportDevice
return argout
# ------------------------------------------------------------------
# DbImportEvent command:
# ------------------------------------------------------------------
def DbImportEvent(self, argin):
"""Get event channel info from database
:param argin: name of event channel or factory
:type: PyTango.DevString
:return: export information e.g. IOR
:rtype: PyTango.DevVarLongStringArray"""
self.debug_stream("In " + self.get_name() + ".DbImportEvent()")
argout = [0], [""]
# ----- PROTECTED REGION ID(DataBase.DbImportEvent) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbImportEvent
return argout
# ------------------------------------------------------------------
# DbInfo command:
# ------------------------------------------------------------------
def DbInfo(self):
"""Get miscellaneous numbers on information
stored in database
:param :
:type: PyTango.DevVoid
:return: Miscellaneous info like:
- Device defined in database
- Device marked as exported in database
- Device server process defined in database
- Device server process marked as exported in database
- Device properties defined in database
- Class properties defined in database
- Device attribute properties defined in database
- Class attribute properties defined in database
- Object properties defined in database
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbInfo()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbInfo) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbInfo
return argout
# ------------------------------------------------------------------
# DbPutAttributeAlias command:
# ------------------------------------------------------------------
def DbPutAttributeAlias(self, argin):
"""Define an alias for an attribute
:param argin: Str[0] = attribute name
Str[1] = attribute alias
:type: PyTango.DevVarStringArray
:return:
:rtype: PyTango.DevVoid"""
self.debug_stream("In " + self.get_name() + ".DbPutAttributeAlias()")
# ----- PROTECTED REGION ID(DataBase.DbPutAttributeAlias) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbPutAttributeAlias
# ------------------------------------------------------------------
# DbPutClassAttributeProperty command:
# ------------------------------------------------------------------
def DbPutClassAttributeProperty(self, argin):
"""Create/Update class attribute property(ies) in database
:param argin: Str[0] = Tango class name
Str[1] = Attribute number
Str[2] = Attribute name
Str[3] = Property number
Str[4] = Property name
Str[5] = Property value
.....
:type: PyTango.DevVarStringArray
:return:
:rtype: PyTango.DevVoid"""
self.debug_stream("In " + self.get_name() + ".DbPutClassAttributeProperty()")
# ----- PROTECTED REGION ID(DataBase.DbPutClassAttributeProperty) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbPutClassAttributeProperty
# ------------------------------------------------------------------
# DbPutClassAttributeProperty2 command:
# ------------------------------------------------------------------
def DbPutClassAttributeProperty2(self, argin):
"""This command adds support for array properties compared to the previous one
called DbPutClassAttributeProperty. The old comman is still there for compatibility reason
:param argin: Str[0] = Tango class name
Str[1] = Attribute number
Str[2] = Attribute name
Str[3] = Property number
Str[4] = Property name
Str[5] = Property value number (array case)
Str[5] = Property value 1
Str[n] = Property value n (array case)
.....
:type: PyTango.DevVarStringArray
:return:
:rtype: PyTango.DevVoid"""
self.debug_stream("In " + self.get_name() + ".DbPutClassAttributeProperty2()")
# ----- PROTECTED REGION ID(DataBase.DbPutClassAttributeProperty2) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbPutClassAttributeProperty2
# ------------------------------------------------------------------
# DbPutClassProperty command:
# ------------------------------------------------------------------
def DbPutClassProperty(self, argin):
"""Create / Update class property(ies)
:param argin: Str[0] = Tango class name
Str[1] = Property number
Str[2] = Property name
Str[3] = Property value number
Str[4] = Property value 1
Str[n] = Property value n
....
:type: PyTango.DevVarStringArray
:return:
:rtype: PyTango.DevVoid"""
self.debug_stream("In " + self.get_name() + ".DbPutClassProperty()")
# ----- PROTECTED REGION ID(DataBase.DbPutClassProperty) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbPutClassProperty
# ------------------------------------------------------------------
# DbPutDeviceAlias command:
# ------------------------------------------------------------------
def DbPutDeviceAlias(self, argin):
"""Define alias for a given device name
:param argin: Str[0] = device name
Str[1] = alias name
:type: PyTango.DevVarStringArray
:return:
:rtype: PyTango.DevVoid"""
self.debug_stream("In " + self.get_name() + ".DbPutDeviceAlias()")
# ----- PROTECTED REGION ID(DataBase.DbPutDeviceAlias) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbPutDeviceAlias
# ------------------------------------------------------------------
# DbPutDeviceAttributeProperty command:
# ------------------------------------------------------------------
def DbPutDeviceAttributeProperty(self, argin):
"""Create/Update device attribute property(ies) in database
:param argin: Str[0] = Device name
Str[1] = Attribute number
Str[2] = Attribute name
Str[3] = Property number
Str[4] = Property name
Str[5] = Property value
.....
:type: PyTango.DevVarStringArray
:return:
:rtype: PyTango.DevVoid"""
self.debug_stream("In " + self.get_name() + ".DbPutDeviceAttributeProperty()")
# ----- PROTECTED REGION ID(DataBase.DbPutDeviceAttributeProperty) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbPutDeviceAttributeProperty
# ------------------------------------------------------------------
# DbPutDeviceAttributeProperty2 command:
# ------------------------------------------------------------------
def DbPutDeviceAttributeProperty2(self, argin):
"""Put device attribute property. This command adds the possibility to have attribute property
which are arrays. Not possible with the old DbPutDeviceAttributeProperty command.
This old command is not deleted for compatibility reasons.
:param argin: Str[0] = Device name
Str[1] = Attribute number
Str[2] = Attribute name
Str[3] = Property number
Str[4] = Property name
Str[5] = Property value number (array case)
Str[5] = Property value 1
Str[n] = Property value n (array case)
.....
:type: PyTango.DevVarStringArray
:return:
:rtype: PyTango.DevVoid"""
self.debug_stream("In " + self.get_name() + ".DbPutDeviceAttributeProperty2()")
# ----- PROTECTED REGION ID(DataBase.DbPutDeviceAttributeProperty2) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbPutDeviceAttributeProperty2
# ------------------------------------------------------------------
# DbPutDeviceProperty command:
# ------------------------------------------------------------------
def DbPutDeviceProperty(self, argin):
"""Create / Update device property(ies)
:param argin: Str[0] = Tango device name
Str[1] = Property number
Str[2] = Property name
Str[3] = Property value number
Str[4] = Property value 1
Str[n] = Property value n
....
:type: PyTango.DevVarStringArray
:return:
:rtype: PyTango.DevVoid"""
self.debug_stream("In " + self.get_name() + ".DbPutDeviceProperty()")
# ----- PROTECTED REGION ID(DataBase.DbPutDeviceProperty) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbPutDeviceProperty
# ------------------------------------------------------------------
# DbPutProperty command:
# ------------------------------------------------------------------
def DbPutProperty(self, argin):
"""Create / Update free object property(ies)
:param argin: Str[0] = Object name
Str[1] = Property number
Str[2] = Property name
Str[3] = Property value number
Str[4] = Property value 1
Str[n] = Property value n
....
:type: PyTango.DevVarStringArray
:return:
:rtype: PyTango.DevVoid"""
self.debug_stream("In " + self.get_name() + ".DbPutProperty()")
# ----- PROTECTED REGION ID(DataBase.DbPutProperty) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbPutProperty
# ------------------------------------------------------------------
# DbPutServerInfo command:
# ------------------------------------------------------------------
def DbPutServerInfo(self, argin):
"""Update server info including host, mode and level
:param argin: server info
:type: PyTango.DevVarStringArray
:return:
:rtype: PyTango.DevVoid"""
self.debug_stream("In " + self.get_name() + ".DbPutServerInfo()")
# ----- PROTECTED REGION ID(DataBase.DbPutServerInfo) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbPutServerInfo
# ------------------------------------------------------------------
# DbUnExportDevice command:
# ------------------------------------------------------------------
def DbUnExportDevice(self, argin):
"""Mark a device as non exported in database
:param argin: Device name
:type: PyTango.DevString
:return:
:rtype: PyTango.DevVoid"""
self.debug_stream("In " + self.get_name() + ".DbUnExportDevice()")
# ----- PROTECTED REGION ID(DataBase.DbUnExportDevice) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbUnExportDevice
# ------------------------------------------------------------------
# DbUnExportEvent command:
# ------------------------------------------------------------------
def DbUnExportEvent(self, argin):
"""Mark one event channel as non exported in database
:param argin: name of event channel or factory to unexport
:type: PyTango.DevString
:return: none
:rtype: PyTango.DevVoid"""
self.debug_stream("In " + self.get_name() + ".DbUnExportEvent()")
# ----- PROTECTED REGION ID(DataBase.DbUnExportEvent) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbUnExportEvent
# ------------------------------------------------------------------
# DbUnExportServer command:
# ------------------------------------------------------------------
def DbUnExportServer(self, argin):
"""Mark all devices belonging to a specified device server
process as non exported
:param argin: Device server name (executable/instance)
:type: PyTango.DevString
:return:
:rtype: PyTango.DevVoid"""
self.debug_stream("In " + self.get_name() + ".DbUnExportServer()")
# ----- PROTECTED REGION ID(DataBase.DbUnExportServer) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbUnExportServer
# ------------------------------------------------------------------
# ResetTimingValues command:
# ------------------------------------------------------------------
def ResetTimingValues(self):
"""Reset the timing attribute values.
:param :
:type: PyTango.DevVoid
:return:
:rtype: PyTango.DevVoid"""
self.debug_stream("In " + self.get_name() + ".ResetTimingValues()")
# ----- PROTECTED REGION ID(DataBase.ResetTimingValues) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.ResetTimingValues
# ------------------------------------------------------------------
# DbGetDataForServerCache command:
# ------------------------------------------------------------------
def DbGetDataForServerCache(self, argin):
"""This command returns all the data needed by a device server process during its
startup sequence. The aim of this command is to minimize database access during
device server startup sequence.
:param argin: Elt[0] = DS name (exec_name/inst_name), Elt[1] = Host name
:type: PyTango.DevVarStringArray
:return: All the data needed by the device server during its startup sequence. Precise list depend on the device server
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetDataForServerCache()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetDataForServerCache) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetDataForServerCache
return argout
# ------------------------------------------------------------------
# DbDeleteAllDeviceAttributeProperty command:
# ------------------------------------------------------------------
def DbDeleteAllDeviceAttributeProperty(self, argin):
"""Delete all attribute properties for the specified device attribute(s)
:param argin: str[0] = device name
Str[1]...str[n] = attribute name(s)
:type: PyTango.DevVarStringArray
:return:
:rtype: PyTango.DevVoid"""
self.debug_stream(
"In " + self.get_name() + ".DbDeleteAllDeviceAttributeProperty()"
)
# ----- PROTECTED REGION ID(DataBase.DbDeleteAllDeviceAttributeProperty) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbDeleteAllDeviceAttributeProperty
# ------------------------------------------------------------------
# DbMySqlSelect command:
# ------------------------------------------------------------------
def DbMySqlSelect(self, argin):
"""This is a very low level command.
It executes the specified SELECT command on TANGO database and returns its result without filter.
:param argin: MySql Select command
:type: PyTango.DevString
:return: MySql Select command result
- svalues : select results
- lvalue[n] : =0 if svalue[n] is null else =1
(last lvalue -1) is number of rows, (last lvalue) is number of fields
:rtype: PyTango.DevVarLongStringArray"""
self.debug_stream("In " + self.get_name() + ".DbMySqlSelect()")
argout = [0], [""]
# ----- PROTECTED REGION ID(DataBase.DbMySqlSelect) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbMySqlSelect
return argout
# ------------------------------------------------------------------
# DbGetCSDbServerList command:
# ------------------------------------------------------------------
def DbGetCSDbServerList(self):
"""Get a list of host:port for all database server defined in the control system
:param :
:type: PyTango.DevVoid
:return: List of host:port with one element for each database server
:rtype: PyTango.DevVarStringArray"""
self.debug_stream("In " + self.get_name() + ".DbGetCSDbServerList()")
argout = [""]
# ----- PROTECTED REGION ID(DataBase.DbGetCSDbServerList) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetCSDbServerList
return argout
# ------------------------------------------------------------------
# DbGetAttributeAlias2 command:
# ------------------------------------------------------------------
def DbGetAttributeAlias2(self, argin):
"""Get the attribute alias from the attribute name.
Returns one empty string if nothing found in database
:param argin: The attribute name (dev_name/att_name)
:type: PyTango.DevString
:return: The attribute alias name (or empty string)
:rtype: PyTango.DevString"""
self.debug_stream("In " + self.get_name() + ".DbGetAttributeAlias2()")
argout = ""
# ----- PROTECTED REGION ID(DataBase.DbGetAttributeAlias2) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetAttributeAlias2
return argout
# ------------------------------------------------------------------
# DbGetAliasAttribute command:
# ------------------------------------------------------------------
def DbGetAliasAttribute(self, argin):
"""Get the attribute name from the given alias.
If the given alias is not found in database, returns an empty string
:param argin: The attribute alias
:type: PyTango.DevString
:return: The attribute name (dev_name/att_name)
:rtype: PyTango.DevString"""
self.debug_stream("In " + self.get_name() + ".DbGetAliasAttribute()")
argout = ""
# ----- PROTECTED REGION ID(DataBase.DbGetAliasAttribute) ENABLED START -----#
# ----- PROTECTED REGION END -----# // DataBase.DbGetAliasAttribute
return argout
# ==================================================================
#
# DataBaseClass class definition
#
# ==================================================================
class DataBaseClass(PyTango.DeviceClass):
# Class Properties
class_property_list = {}
# Device Properties
device_property_list = {}
# Command definitions
cmd_list = {
"DbAddDevice": [
[
PyTango.DevVarStringArray,
"Str[0] = Full device server process name\nStr[1] = Device name\nStr[2] = Tango class name",
],
[PyTango.DevVoid, "none"],
],
"DbAddServer": [
[
PyTango.DevVarStringArray,
"Str[0] = Full device server name\nStr[1] = Device(s) name\nStr[2] = Tango class name\nStr[n] = Device name\nStr[n + 1] = Tango class name",
],
[PyTango.DevVoid, "none"],
],
"DbDeleteAttributeAlias": [
[PyTango.DevString, "Attriibute alias name."],
[PyTango.DevVoid, "none"],
],
"DbDeleteClassAttribute": [
[
PyTango.DevVarStringArray,
"Str[0] = Tango class name\nStr[1] = Attribute name",
],
[PyTango.DevVoid, "none"],
],
"DbDeleteClassAttributeProperty": [
[
PyTango.DevVarStringArray,
"Str[0] = Tango class name\nStr[1] = Attribute name\nStr[2] = Property name\nStr[n] = Property name",
],
[PyTango.DevVoid, "none"],
],
"DbDeleteClassProperty": [
[
PyTango.DevVarStringArray,
"Str[0] = Tango class name\nStr[1] = Property name\nStr[n] = Property name",
],
[PyTango.DevVoid, "none"],
],
"DbDeleteDevice": [
[PyTango.DevString, "device name"],
[PyTango.DevVoid, "none"],
],
"DbDeleteDeviceAlias": [
[PyTango.DevString, "device alias name"],
[PyTango.DevVoid, "none"],
],
"DbDeleteDeviceAttribute": [
[
PyTango.DevVarStringArray,
"Str[0] = Device name\nStr[1] = Attribute name",
],
[PyTango.DevVoid, "none"],
],
"DbDeleteDeviceAttributeProperty": [
[
PyTango.DevVarStringArray,
"Str[0] = Device name\nStr[1] = Attribute name\nStr[2] = Property name\nStr[n] = Property name",
],
[PyTango.DevVoid, "none"],
],
"DbDeleteDeviceProperty": [
[
PyTango.DevVarStringArray,
"Str[0] = Device name\nStr[1] = Property name\nStr[n] = Property name",
],
[PyTango.DevVoid, "none"],
],
"DbDeleteProperty": [
[
PyTango.DevVarStringArray,
"Str[0] = Object name\nStr[1] = Property name\nStr[n] = Property name",
],
[PyTango.DevVoid, "none"],
],
"DbDeleteServer": [
[PyTango.DevString, "Device server name"],
[PyTango.DevVoid, "none"],
],
"DbDeleteServerInfo": [
[PyTango.DevString, "Device server name"],
[PyTango.DevVoid, "none"],
],
"DbExportDevice": [
[
PyTango.DevVarStringArray,
"Str[0] = Device name\nStr[1] = CORBA IOR\nStr[2] = Device server process host name\nStr[3] = Device server process PID or string ``null``\nStr[4] = Device server process version",
],
[PyTango.DevVoid, "none"],
],
"DbExportEvent": [
[
PyTango.DevVarStringArray,
"Str[0] = event channel name (or factory name)\nStr[1] = CORBA IOR\nStr[2] = Notifd host name\nStr[3] = Notifd pid\nStr[4] = Notifd version",
],
[PyTango.DevVoid, "none"],
],
"DbGetAliasDevice": [
[PyTango.DevString, "Alias name"],
[PyTango.DevString, "Device name"],
],
"DbGetAttributeAlias": [
[PyTango.DevString, "The attribute alias name"],
[PyTango.DevString, "The attribute name (device/attribute)"],
],
"DbGetAttributeAliasList": [
[PyTango.DevString, "attribute alias filter string (eg: att*)"],
[PyTango.DevVarStringArray, "attribute aliases"],
],
"DbGetClassAttributeList": [
[
PyTango.DevVarStringArray,
"Str[0] = Tango class name\nStr[1] = Attribute name filter (eg: att*)",
],
[
PyTango.DevVarStringArray,
"Str[0] = Class attribute name\nStr[n] = Class attribute name",
],
],
"DbGetClassAttributeProperty": [
[
PyTango.DevVarStringArray,
"Str[0] = Tango class name\nStr[1] = Attribute name\nStr[n] = Attribute name",
],
[
PyTango.DevVarStringArray,
"Str[0] = Tango class name\nStr[1] = Attribute property number\nStr[2] = Attribute property 1 name\nStr[3] = Attribute property 1 value\nStr[n + 1] = Attribute property 2 name\nStr[n + 2] = Attribute property 2 value",
],
],
"DbGetClassAttributeProperty2": [
[
PyTango.DevVarStringArray,
"Str[0] = Tango class name\nStr[1] = Attribute name\nStr[n] = Attribute name",
],
[
PyTango.DevVarStringArray,
"Str[0] = Tango class name\nStr[1] = Attribute property number\nStr[2] = Attribute property 1 name\nStr[3] = Attribute property 1 value number (array case)\nStr[4] = Attribute property 1 value\nStr[n] = Attribute property 1 value (array case)\nStr[n + 1] = Attribute property 2 name\nStr[n + 2] = Attribute property 2 value number (array case)\nStr[n + 3] = Attribute property 2 value\nStr[n + m] = Attribute property 2 value (array case)",
],
],
"DbGetClassAttributePropertyHist": [
[
PyTango.DevVarStringArray,
"Str[0] = Tango class\nStr[1] = Attribute name\nStr[2] = Property name",
],
[
PyTango.DevVarStringArray,
"Str[0] = Attribute name\nStr[1] = Property name\nStr[2] = date\nStr[3] = Property value number (array case)\nStr[4] = Property value 1\nStr[n] = Property value n",
],
],
"DbGetClassForDevice": [
[PyTango.DevString, "Device name"],
[PyTango.DevString, "Device Tango class"],
],
"DbGetClassInheritanceForDevice": [
[PyTango.DevString, "Device name"],
[
PyTango.DevVarStringArray,
"Classes off the specified device.\n[0] - is the class of the device.\n[1] - is the class from the device class is inherited.\n........and so on",
],
],
"DbGetClassList": [
[PyTango.DevString, "Filter"],
[PyTango.DevVarStringArray, "Class list"],
],
"DbGetClassProperty": [
[
PyTango.DevVarStringArray,
"Str[0] = Tango class\nStr[1] = Property name\nStr[2] = Property name",
],
[
PyTango.DevVarStringArray,
"Str[0] = Tango class\nStr[1] = Property number\nStr[2] = Property name\nStr[3] = Property value number (array case)\nStr[4] = Property value\nStr[n] = Propery value (array case)\n....",
],
],
"DbGetClassPropertyHist": [
[PyTango.DevVarStringArray, "Str[0] = Tango class\nStr[1] = Property name"],
[
PyTango.DevVarStringArray,
"Str[0] = Property name\nStr[1] = date\nStr[2] = Property value number (array case)\nStr[3] = Property value 1\nStr[n] = Property value n",
],
],
"DbGetClassPropertyList": [
[PyTango.DevString, "The filter"],
[PyTango.DevVarStringArray, "Property name list"],
],
"DbGetDeviceAlias": [
[PyTango.DevString, "The device name"],
[PyTango.DevString, "The alias found"],
],
"DbGetDeviceAliasList": [
[PyTango.DevString, "The filter"],
[PyTango.DevVarStringArray, "Device alias list"],
],
"DbGetDeviceAttributeList": [
[PyTango.DevVarStringArray, "Str[0] = Device name\nStr[1] = Wildcard"],
[PyTango.DevVarStringArray, "attribute name list"],
],
"DbGetDeviceAttributeProperty": [
[
PyTango.DevVarStringArray,
"Str[0] = Device name\nStr[1] = Attribute name\nStr[n] = Attribute name",
],
[
PyTango.DevVarStringArray,
"Str[0] = Device name\nStr[1] = Attribute property number\nStr[2] = Attribute property 1 name\nStr[3] = Attribute property 1 value\nStr[n + 1] = Attribute property 2 name\nStr[n + 2] = Attribute property 2 value",
],
],
"DbGetDeviceAttributeProperty2": [
[
PyTango.DevVarStringArray,
"Str[0] = Device name\nStr[1] = Attribute name\nStr[n] = Attribute name",
],
[
PyTango.DevVarStringArray,
"Str[0] = Device name\nStr[1] = Attribute property number\nStr[2] = Attribute property 1 name\nStr[3] = Attribute property 1 value number (array case)\nStr[4] = Attribute property 1 value\nStr[n] = Attribute property 1 value (array case)\nStr[n + 1] = Attribute property 2 name\nStr[n + 2] = Attribute property 2 value number (array case)\nStr[n + 3] = Attribute property 2 value\nStr[n + m] = Attribute property 2 value (array case)",
],
],
"DbGetDeviceAttributePropertyHist": [
[
PyTango.DevVarStringArray,
"Str[0] = Device name\nStr[1] = Attribute name\nStr[2] = Property name",
],
[
PyTango.DevVarStringArray,
"Str[0] = Attribute name\nStr[1] = Property name\nStr[2] = date\nStr[3] = Property value number (array case)\nStr[4] = Property value 1\nStr[n] = Property value n",
],
],
"DbGetDeviceClassList": [
[PyTango.DevString, "Device server process name"],
[
PyTango.DevVarStringArray,
"Str[0] = Device name\nStr[1] = Tango class\nStr[n] = Device name\nStr[n + 1] = Tango class",
],
],
"DbGetDeviceDomainList": [
[PyTango.DevString, "The wildcard"],
[PyTango.DevVarStringArray, "Device name domain list"],
],
"DbGetDeviceExportedList": [
[PyTango.DevString, "filter"],
[PyTango.DevVarStringArray, "list of exported devices"],
],
"DbGetDeviceFamilyList": [
[PyTango.DevString, "The wildcard"],
[PyTango.DevVarStringArray, "Family list"],
],
"DbGetDeviceInfo": [
[PyTango.DevString, "Device name"],
[
PyTango.DevVarLongStringArray,
"Str[0] = Device name\nStr[1] = CORBA IOR\nStr[2] = Device version\nStr[3] = Device Server name\nStr[4] = Device Server process host name\nStr[5] = Started date (or ? if not set)\nStr[6] = Stopped date (or ? if not set)\nStr[7] = Device class\n\nLg[0] = Device exported flag\nLg[1] = Device Server process PID (or -1 if not set)",
],
],
"DbGetDeviceList": [
[
PyTango.DevVarStringArray,
"argin[0] : server name\nargin[1] : class name",
],
[
PyTango.DevVarStringArray,
"The list of devices for specified server and class.",
],
],
"DbGetDeviceWideList": [
[PyTango.DevString, "filter"],
[PyTango.DevVarStringArray, "list of exported devices"],
],
"DbGetDeviceMemberList": [
[PyTango.DevString, "The filter"],
[PyTango.DevVarStringArray, "Device names member list"],
],
"DbGetDeviceProperty": [
[
PyTango.DevVarStringArray,
"Str[0] = Device name\nStr[1] = Property name\nStr[n] = Property name",
],
[
PyTango.DevVarStringArray,
"Str[0] = Device name\nStr[1] = Property number\nStr[2] = Property name\nStr[3] = Property value number (array case)\nStr[4] = Property value 1\nStr[n] = Property value n (array case)\nStr[n + 1] = Property name\nStr[n + 2] = Property value number (array case)\nStr[n + 3] = Property value 1\nStr[n + m] = Property value m",
],
],
"DbGetDevicePropertyHist": [
[PyTango.DevVarStringArray, "Str[0] = Device name\nStr[2] = Property name"],
[
PyTango.DevVarStringArray,
"Str[0] = Property name\nStr[1] = date\nStr[2] = Property value number (array case)\nStr[3] = Property value 1\nStr[n] = Property value n",
],
],
"DbGetDevicePropertyList": [
[PyTango.DevVarStringArray, "Str[0] = device name\nStr[1] = Filter"],
[PyTango.DevVarStringArray, "Property name list"],
],
"DbGetDeviceServerClassList": [
[PyTango.DevString, "device server process name"],
[PyTango.DevVarStringArray, "list of classes for this device server"],
],
"DbGetExportdDeviceListForClass": [
[PyTango.DevString, "Class name"],
[PyTango.DevVarStringArray, "Device exported list"],
],
"DbGetHostList": [
[PyTango.DevString, "The filter"],
[PyTango.DevVarStringArray, "Host name list"],
],
"DbGetHostServerList": [
[PyTango.DevString, "The filter"],
[PyTango.DevVarStringArray, "Device server process name list"],
],
"DbGetHostServersInfo": [
[PyTango.DevString, "Host name"],
[
PyTango.DevVarStringArray,
"Server info for all servers running on specified host",
],
],
"DbGetInstanceNameList": [
[PyTango.DevString, "Server name"],
[
PyTango.DevVarStringArray,
"The instance names found for specified server.",
],
],
"DbGetObjectList": [
[PyTango.DevString, "The filter"],
[PyTango.DevVarStringArray, "Object name list"],
],
"DbGetProperty": [
[
PyTango.DevVarStringArray,
"Str[0] = Object name\nStr[1] = Property name\nStr[n] = Property name",
],
[
PyTango.DevVarStringArray,
"Str[0] = Object name\nStr[1] = Property number\nStr[2] = Property name\nStr[3] = Property value number (array case)\nStr[4] = Property value 1\nStr[n] = Property value n (array case)\nStr[n + 1] = Property name\nStr[n + 2] = Property value number (array case)\nStr[n + 3] = Property value 1\nStr[n + m] = Property value m",
],
],
"DbGetPropertyHist": [
[PyTango.DevVarStringArray, "Str[0] = Object name\nStr[2] = Property name"],
[
PyTango.DevVarStringArray,
"Str[0] = Property name\nStr[1] = date\nStr[2] = Property value number (array case)\nStr[3] = Property value 1\nStr[n] = Property value n",
],
],
"DbGetPropertyList": [
[PyTango.DevVarStringArray, "Str[0] = Object name\nStr[1] = filter"],
[PyTango.DevVarStringArray, "Property name list"],
],
"DbGetServerInfo": [
[PyTango.DevString, "server name"],
[PyTango.DevVarStringArray, "server info"],
],
"DbGetServerList": [
[PyTango.DevString, "The filter"],
[PyTango.DevVarStringArray, "Device server process name list"],
],
"DbGetServerNameList": [
[PyTango.DevString, "wildcard for server names."],
[PyTango.DevVarStringArray, "server names found."],
],
"DbImportDevice": [
[PyTango.DevString, "Device name (or alias)"],
[
PyTango.DevVarLongStringArray,
"Str[0] = device name\nStr[1] = CORBA IOR\nStr[2] = device version\nStr[3] = device server process name\nStr[4] = host name\nStr[5] = Tango class name\n\nLg[0] = Exported flag\nLg[1] = Device server process PID",
],
],
"DbImportEvent": [
[PyTango.DevString, "name of event channel or factory"],
[PyTango.DevVarLongStringArray, "export information e.g. IOR"],
],
"DbInfo": [
[PyTango.DevVoid, "none"],
[
PyTango.DevVarStringArray,
"Miscellaneous info like:\n- Device defined in database\n- Device marked as exported in database\n- Device server process defined in database\n- Device server process marked as exported in database\n- Device properties defined in database\n- Class properties defined in database\n- Device attribute properties defined in database\n- Class attribute properties defined in database\n- Object properties defined in database",
],
],
"DbPutAttributeAlias": [
[
PyTango.DevVarStringArray,
"Str[0] = attribute name\nStr[1] = attribute alias",
],
[PyTango.DevVoid, "none"],
],
"DbPutClassAttributeProperty": [
[
PyTango.DevVarStringArray,
"Str[0] = Tango class name\nStr[1] = Attribute number\nStr[2] = Attribute name\nStr[3] = Property number\nStr[4] = Property name\nStr[5] = Property value\n.....",
],
[PyTango.DevVoid, "none"],
],
"DbPutClassAttributeProperty2": [
[
PyTango.DevVarStringArray,
"Str[0] = Tango class name\nStr[1] = Attribute number\nStr[2] = Attribute name\nStr[3] = Property number\nStr[4] = Property name\nStr[5] = Property value number (array case)\nStr[5] = Property value 1\nStr[n] = Property value n (array case)\n.....",
],
[PyTango.DevVoid, "none"],
],
"DbPutClassProperty": [
[
PyTango.DevVarStringArray,
"Str[0] = Tango class name\nStr[1] = Property number\nStr[2] = Property name\nStr[3] = Property value number\nStr[4] = Property value 1\nStr[n] = Property value n\n....",
],
[PyTango.DevVoid, "none"],
],
"DbPutDeviceAlias": [
[PyTango.DevVarStringArray, "Str[0] = device name\nStr[1] = alias name"],
[PyTango.DevVoid, "none"],
],
"DbPutDeviceAttributeProperty": [
[
PyTango.DevVarStringArray,
"Str[0] = Device name\nStr[1] = Attribute number\nStr[2] = Attribute name\nStr[3] = Property number\nStr[4] = Property name\nStr[5] = Property value\n.....",
],
[PyTango.DevVoid, "none"],
],
"DbPutDeviceAttributeProperty2": [
[
PyTango.DevVarStringArray,
"Str[0] = Device name\nStr[1] = Attribute number\nStr[2] = Attribute name\nStr[3] = Property number\nStr[4] = Property name\nStr[5] = Property value number (array case)\nStr[5] = Property value 1\nStr[n] = Property value n (array case)\n.....",
],
[PyTango.DevVoid, "none"],
],
"DbPutDeviceProperty": [
[
PyTango.DevVarStringArray,
"Str[0] = Tango device name\nStr[1] = Property number\nStr[2] = Property name\nStr[3] = Property value number\nStr[4] = Property value 1\nStr[n] = Property value n\n....",
],
[PyTango.DevVoid, "none"],
],
"DbPutProperty": [
[
PyTango.DevVarStringArray,
"Str[0] = Object name\nStr[1] = Property number\nStr[2] = Property name\nStr[3] = Property value number\nStr[4] = Property value 1\nStr[n] = Property value n\n....",
],
[PyTango.DevVoid, "none"],
],
"DbPutServerInfo": [
[PyTango.DevVarStringArray, "server info"],
[PyTango.DevVoid, "none"],
],
"DbUnExportDevice": [
[PyTango.DevString, "Device name"],
[PyTango.DevVoid, "none"],
],
"DbUnExportEvent": [
[PyTango.DevString, "name of event channel or factory to unexport"],
[PyTango.DevVoid, "none"],
],
"DbUnExportServer": [
[PyTango.DevString, "Device server name (executable/instance)"],
[PyTango.DevVoid, "none"],
],
"ResetTimingValues": [[PyTango.DevVoid, "none"], [PyTango.DevVoid, "none"]],
"DbGetDataForServerCache": [
[
PyTango.DevVarStringArray,
"Elt[0] = DS name (exec_name/inst_name), Elt[1] = Host name",
],
[
PyTango.DevVarStringArray,
"All the data needed by the device server during its startup sequence. Precise list depend on the device server",
],
],
"DbDeleteAllDeviceAttributeProperty": [
[
PyTango.DevVarStringArray,
"str[0] = device name\nStr[1]...str[n] = attribute name(s)",
],
[PyTango.DevVoid, "none"],
],
"DbMySqlSelect": [
[PyTango.DevString, "MySql Select command"],
[
PyTango.DevVarLongStringArray,
"MySql Select command result\n - svalues : select results\n - lvalue[n] : =0 if svalue[n] is null else =1\n (last lvalue -1) is number of rows, (last lvalue) is number of fields",
],
],
"DbGetCSDbServerList": [
[PyTango.DevVoid, "none"],
[
PyTango.DevVarStringArray,
"List of host:port with one element for each database server",
],
],
"DbGetAttributeAlias2": [
[PyTango.DevString, "The attribute name (dev_name/att_name)"],
[PyTango.DevString, "The attribute alias name (or empty string)"],
],
"DbGetAliasAttribute": [
[PyTango.DevString, "The attribute alias"],
[PyTango.DevString, "The attribute name (dev_name/att_name)"],
],
}
# Attribute definitions
attr_list = {
"StoredProcedureRelease": [[PyTango.DevString, PyTango.SCALAR, PyTango.READ]],
"Timing_average": [[PyTango.DevDouble, PyTango.SPECTRUM, PyTango.READ, 64]],
"Timing_minimum": [[PyTango.DevDouble, PyTango.SPECTRUM, PyTango.READ, 64]],
"Timing_maximum": [[PyTango.DevDouble, PyTango.SPECTRUM, PyTango.READ, 64]],
"Timing_calls": [[PyTango.DevDouble, PyTango.SPECTRUM, PyTango.READ, 64]],
"Timing_index": [[PyTango.DevString, PyTango.SPECTRUM, PyTango.READ, 64]],
"Timing_info": [[PyTango.DevString, PyTango.SPECTRUM, PyTango.READ, 64]],
}
# ------------------------------------------------------------------
# DataBaseClass Constructor
# ------------------------------------------------------------------
def __init__(self, name):
PyTango.DeviceClass.__init__(self, name)
self.set_type(name)
print("In DataBase Class constructor")
# ==================================================================
#
# DataBase class main method
#
# ==================================================================
def main():
try:
py = PyTango.Util(sys.argv)
py.add_class(DataBaseClass, DataBase, "DataBase")
U = PyTango.Util.instance()
U.server_init()
U.server_run()
except PyTango.DevFailed as e:
print("-------> Received a DevFailed exception:", e)
except Exception as e:
print("-------> An unforeseen exception occured....", e)
if __name__ == "__main__":
main()
|