1547 {
1548 PMXML_NODE
pn, pr, pt, pe;
1549 char odbpath[256],
data[256],
str[1024],
name[32], op[32];
1552 int i,
j, l,
n,
status, size, index1, index2,
state,
run_number, cont;
1557
1560 return;
1561 }
1562
1563 if (
c->pnseq == NULL) {
1565 mstrlcpy(seq.
error,
"No script loaded",
sizeof(seq.
error));
1568 return;
1569 }
1570
1572 if (!hKeySeq)
1573 return;
1574
1575
1579
1580 pr = mxml_find_node(
c->pnseq,
"RunSequence");
1581 if (!pr) {
1582 seq_error(seq,
c,
"Cannot find <RunSequence> tag in XML file");
1583 return;
1584 }
1585
1586 int last_line = mxml_get_line_number_end(pr);
1587
1588
1592
1594
1596 cm_msg(
MTALK,
"sequencer",
"Sequencer is finished.");
1597
1599 return;
1600 }
1601
1608 return;
1609 }
1610
1611
1613
1616 cm_msg(
MTALK,
"sequencer",
"Sequencer is finished.");
1617
1619 }
1620 return;
1621 }
1622
1623
1626 break;
1629 size = sizeof(seq);
1631
1640 } else {
1642 if (mxml_get_attribute(
pn,
"var")) {
1643 mstrlcpy(
name, mxml_get_attribute(
pn,
"var"),
sizeof(
name));
1644 if (mxml_get_attribute(
pn,
"values")) {
1645 mstrlcpy(
data, mxml_get_attribute(
pn,
"values"),
sizeof(
data));
1648 }
else if (mxml_get_attribute(
pn,
"n")) {
1650 }
1651 sprintf(
str,
"Variables/%s",
name);
1652 size =
value.length() + 1;
1653 if (size < 32)
1654 size = 32;
1656 }
1659 }
1661 return;
1662 }
1663 }
1664
1665
1667 size = sizeof(seq);
1675 return;
1676 }
1677
1678
1680 size = sizeof(seq);
1686 return;
1687 }
1688
1689
1692 size = sizeof(seq);
1696 return;
1697 }
1698
1699
1703 if (mxml_get_attribute(
pn,
"l"))
1705 if (mxml_get_attribute(
pn,
"fn")) {
1706 std::string filename = mxml_get_attribute(
pn,
"fn");
1707
1708
1709 if (filename != std::string(seq.
sfilename)) {
1712 }
1713 }
1714 } else {
1715 if (mxml_get_attribute(
pn,
"l") && (!mxml_get_attribute(
pn,
"lvl") || atoi(mxml_get_attribute(
pn,
"lvl")) == 0))
1717 }
1718 }
1719
1720
1721
1722#if 0
1724 midas::odb o(
"/" +
c->odb_path +
"/Script/Lines");
1727 }
1728#endif
1729
1732
1735 }
1736
1737
1739 if (!mxml_get_attribute(
pn,
"path")) {
1740 seq_error(seq,
c,
"Missing attribute \"path\"");
1741 } else {
1742
1743 std::string s = mxml_get_attribute(
pn,
"path");
1744 if (s.find('$') != std::string::npos)
1746
1748 if (mxml_get_attribute(
pn,
"notify"))
1752 }
1753 }
1754
1755
1757 if (!mxml_get_attribute(
pn,
"path")) {
1758 seq_error(seq,
c,
"Missing attribute \"path\"");
1759 } else {
1760 mstrlcpy(odbpath, seq.
subdir,
sizeof(odbpath));
1761 if (strlen(odbpath) > 0 && odbpath[strlen(odbpath) - 1] != '/')
1762 mstrlcat(odbpath, "/", sizeof(odbpath));
1763 mstrlcat(odbpath, mxml_get_attribute(
pn,
"path"),
sizeof(odbpath));
1764
1765 if (strchr(odbpath, '$')) {
1766 if (strchr(odbpath, '[')) {
1767
1768 std::string s(odbpath);
1769 std::string s1 = s.substr(0, s.find('['));
1770 std::string s2 = s.substr(s.find('['));
1772 s1 += s2;
1773 mstrlcpy(odbpath, s1.c_str(), sizeof(odbpath));
1774 } else {
1775
1776 std::string s(odbpath);
1778 mstrlcpy(odbpath, s.c_str(), sizeof(odbpath));
1779 }
1780 }
1781
1785 if (mxml_get_attribute(
pn,
"notify"))
1786 notify = atoi(mxml_get_attribute(
pn,
"notify"));
1787
1788 index1 = index2 = 0;
1790
1791 if (index1 < -1 || index2 < 0) {
1792 seq_error(seq,
c,
"Negative index not allowed");
1793 return;
1794 }
1795
1796 if (index1 > 1E6 || index2 > 1E6) {
1797 seq_error(seq,
c,
"Index too large for ODB");
1798 return;
1799 }
1800
1802
1804
1806 size = sizeof(seq);
1810 sprintf(
str,
"ODB key \"%s\" not found", odbpath);
1813 sprintf(
str,
"Invalid index %d for ODB key \"%s\"", index1, odbpath);
1815 } else {
1816
1817 sprintf(
str,
"Internal error %d",
status);
1819 return;
1820 }
1821 }
1822 }
1823
1824
1826 if (mxml_get_value(
pn)[0] ==
'/') {
1827
1828
1830 path += "userfiles/sequencer/";
1832 value += std::string(mxml_get_value(
pn)+1);
1833 } else {
1834
1836 path += "userfiles/sequencer/";
1839 if (
value.back() !=
'/')
1842 }
1843
1844 if (
value.find(
'$') != std::string::npos)
1846
1847
1848 if (mxml_get_attribute(
pn,
"path")) {
1849 mstrlcpy(odbpath, seq.
subdir,
sizeof(odbpath));
1850 if (strlen(odbpath) > 0 && odbpath[strlen(odbpath) - 1] != '/')
1851 mstrlcat(odbpath, "/", sizeof(odbpath));
1852 mstrlcat(odbpath, mxml_get_attribute(
pn,
"path"),
sizeof(odbpath));
1853
1854 if (strchr(odbpath, '$')) {
1855 std::string s(odbpath);
1857 mstrlcpy(odbpath, s.c_str(), sizeof(odbpath));
1858 }
1859
1860
1864 return;
1865 } else {
1867 }
1868 } else {
1869
1871 }
1872
1874 size = sizeof(seq);
1879 } else {
1880
1881 seq_error(seq,
c,
"Internal error loading ODB file!");
1882 return;
1883 }
1884 }
1885
1886
1888 if (mxml_get_value(
pn)[0] ==
'/') {
1889
1890
1892 path += "userfiles/sequencer/";
1894 value += std::string(mxml_get_value(
pn)+1);
1895 } else {
1896
1898 path += "userfiles/sequencer/";
1902 size_t pos =
value.find_last_of(
'/');
1903 if (pos != std::string::npos)
1906 }
1907
1908 if (
value.find(
'$') != std::string::npos)
1910
1911
1912 if (mxml_get_attribute(
pn,
"path") && *mxml_get_attribute(
pn,
"path")) {
1913 mstrlcpy(odbpath, seq.
subdir,
sizeof(odbpath));
1914 if (strlen(odbpath) > 0 && odbpath[strlen(odbpath) - 1] != '/')
1915 mstrlcat(odbpath, "/", sizeof(odbpath));
1916 mstrlcat(odbpath, mxml_get_attribute(
pn,
"path"),
sizeof(odbpath));
1917
1918 if (strchr(odbpath, '$')) {
1919 std::string s(odbpath);
1921 mstrlcpy(odbpath, s.c_str(), sizeof(odbpath));
1922 }
1923
1924
1928 return;
1929 } else {
1930 if (strstr(
value.c_str(),
".json") || strstr(
value.c_str(),
".JSON") || strstr(
value.c_str(),
".js") || strstr(
value.c_str(),
".JS"))
1932 else if (strstr(
value.c_str(),
".xml") || strstr(
value.c_str(),
".XML"))
1934 else
1938 return;
1939 }
1940 }
1941 } else {
1942 seq_error(seq,
c,
"No ODB path specified in ODBSAVE command");
1943 return;
1944 }
1945
1947 size = sizeof(seq);
1952 } else {
1953
1954 seq_error(seq,
c,
"Internal error loading ODB file!");
1955 return;
1956 }
1957 }
1958
1959
1961 if (!mxml_get_attribute(
pn,
"path")) {
1962 seq_error(seq,
c,
"Missing attribute \"path\"");
1963 } else {
1964 mstrlcpy(odbpath, seq.
subdir,
sizeof(odbpath));
1965 if (strlen(odbpath) > 0 && odbpath[strlen(odbpath) - 1] != '/')
1966 mstrlcat(odbpath, "/", sizeof(odbpath));
1967 mstrlcat(odbpath, mxml_get_attribute(
pn,
"path"),
sizeof(odbpath));
1968
1969 if (strchr(odbpath, '$')) {
1970 if (strchr(odbpath, '[')) {
1971
1972 std::string s(odbpath);
1973 std::string s1 = s.substr(0, s.find('['));
1974 std::string s2 = s.substr(s.find('['));
1976 s1 += s2;
1977 mstrlcpy(odbpath, s1.c_str(), sizeof(odbpath));
1978 } else {
1979
1980 std::string s(odbpath);
1982 mstrlcpy(odbpath, s.c_str(), sizeof(odbpath));
1983 }
1984 }
1985
1986
1987 index1 = index2 = 0;
1989
1990 mstrlcpy(
name, mxml_get_value(
pn),
sizeof(
name));
1994 return;
1995 } else {
1997 size =
sizeof(
data);
1998
2001 value = *((
int *)
data) > 0 ?
"1" :
"0";
2002 else
2004
2005 sprintf(
str,
"Variables/%s",
name);
2006 size =
value.length() + 1;
2007 if (size < 32)
2008 size = 32;
2010
2011 size = sizeof(seq);
2014 }
2015 }
2016 }
2017
2018
2020 if (!mxml_get_attribute(
pn,
"path")) {
2021 seq_error(seq,
c,
"Missing attribute \"path\"");
2022 }
else if (!mxml_get_attribute(
pn,
"string")) {
2023 seq_error(seq,
c,
"Missing attribute \"string\"");
2024 } else {
2025 mstrlcpy(odbpath, seq.
subdir,
sizeof(odbpath));
2026 if (strlen(odbpath) > 0 && odbpath[strlen(odbpath) - 1] != '/')
2027 mstrlcat(odbpath, "/", sizeof(odbpath));
2028 mstrlcat(odbpath, mxml_get_attribute(
pn,
"path"),
sizeof(odbpath));
2029
2030 if (strchr(odbpath, '$')) {
2031 if (strchr(odbpath, '[')) {
2032
2033 std::string s(odbpath);
2034 std::string s1 = s.substr(0, s.find('['));
2035 std::string s2 = s.substr(s.find('['));
2037 s1 += s2;
2038 mstrlcpy(odbpath, s1.c_str(), sizeof(odbpath));
2039 } else {
2040
2041 std::string s(odbpath);
2043 mstrlcpy(odbpath, s.c_str(), sizeof(odbpath));
2044 }
2045 }
2046
2047 mstrlcpy(
name, mxml_get_value(
pn),
sizeof(
name));
2048
2049 auto s =
eval_var(seq,
c, mxml_get_attribute(
pn,
"string"));
2050 mstrlcpy(
str, s.c_str(),
sizeof(
str));
2051
2055 return;
2056 } else {
2058
2059
2061 size =
sizeof(
data);
2063 if (strcmp((
const char *)
data,
str) == 0)
2064 break;
2065 }
2066
2070 else {
2071 snprintf(
str,
sizeof(
str),
"\"ODBLOOKUP %s\" did not find string \"%s\"", odbpath, s.c_str());
2073 return;
2074 }
2075
2076 snprintf(
str,
sizeof(
str),
"Variables/%s",
name);
2077 size =
value.length() + 1;
2078 if (size < 32)
2079 size = 32;
2081
2082 size = sizeof(seq);
2085 }
2086 }
2087 }
2088
2089
2091 if (!mxml_get_attribute(
pn,
"path")) {
2092 seq_error(seq,
c,
"Missing attribute \"path\"");
2093 } else {
2094 mstrlcpy(odbpath, seq.
subdir,
sizeof(odbpath));
2095 if (strlen(odbpath) > 0 && odbpath[strlen(odbpath) - 1] != '/')
2096 mstrlcat(odbpath, "/", sizeof(odbpath));
2097 mstrlcat(odbpath, mxml_get_attribute(
pn,
"path"),
sizeof(odbpath));
2098
2099 if (strchr(odbpath, '$')) {
2100 if (strchr(odbpath, '[')) {
2101
2102 std::string s(odbpath);
2103 std::string s1 = s.substr(0, s.find('['));
2104 std::string s2 = s.substr(s.find('['));
2106 s1 += s2;
2107 mstrlcpy(odbpath, s1.c_str(), sizeof(odbpath));
2108 } else {
2109
2110 std::string s(odbpath);
2112 mstrlcpy(odbpath, s.c_str(), sizeof(odbpath));
2113 }
2114 }
2115
2116 index1 = index2 = 0;
2118
2120
2124 } else {
2126 size =
sizeof(
data);
2131 sprintf(
str,
"%lg",
d);
2132 size =
sizeof(
data);
2134
2138 if (mxml_get_attribute(
pn,
"notify"))
2139 notify = atoi(mxml_get_attribute(
pn,
"notify"));
2140
2143 }
2144 }
2145 }
2146
2147
2149 mstrlcpy(odbpath, seq.
subdir,
sizeof(odbpath));
2150 if (strlen(odbpath) > 0 && odbpath[strlen(odbpath) - 1] != '/')
2151 mstrlcat(odbpath, "/", sizeof(odbpath));
2152 mstrlcat(odbpath, mxml_get_value(
pn),
sizeof(odbpath));
2153
2154 if (strchr(odbpath, '$')) {
2155 std::string s(odbpath);
2157 mstrlcpy(odbpath, s.c_str(), sizeof(odbpath));
2158 }
2159
2163 } else {
2165 }
2166 }
2167
2168
2170 if (!mxml_get_attribute(
pn,
"path")) {
2171 seq_error(seq,
c,
"Missing attribute \"path\"");
2172 }
else if (!mxml_get_attribute(
pn,
"type")) {
2173 seq_error(seq,
c,
"Missing attribute \"type\"");
2174 } else {
2175 mstrlcpy(odbpath, seq.
subdir,
sizeof(odbpath));
2176 if (strlen(odbpath) > 0 && odbpath[strlen(odbpath) - 1] != '/')
2177 mstrlcat(odbpath, "/", sizeof(odbpath));
2178 mstrlcat(odbpath, mxml_get_attribute(
pn,
"path"),
sizeof(odbpath));
2179
2180 if (strchr(odbpath, '$')) {
2181 std::string s(odbpath);
2183 mstrlcpy(odbpath, s.c_str(), sizeof(odbpath));
2184 }
2185
2186
2187 unsigned int tid;
2188 for (tid = 0; tid <
TID_LAST; tid++) {
2190 break;
2191 }
2192
2194 seq_error(seq,
c,
"Type must be one of UINT8,INT8,UINT16,INT16,UINT32,INT32,BOOL,FLOAT,DOUBLE,STRING");
2195 else {
2196
2203 }
2204 } else {
2206 char dummy[32];
2207 memset(dummy, 0, sizeof(dummy));
2210 }
2211
2214 } else {
2216 if (mxml_get_attribute(
pn,
"size")) {
2217 i = atoi(
eval_var(seq,
c, mxml_get_attribute(
pn,
"size")).c_str());
2220 }
2222 }
2223 }
2224 }
2225 }
2226
2227
2231 }
2232
2233
2235 sprintf(
str,
"%s", mxml_get_value(
pn));
2236
2237 if (mxml_get_attribute(
pn,
"params")) {
2238 mstrlcpy(
data, mxml_get_attribute(
pn,
"params"),
sizeof(
data));
2240 for (
i = 0;
i <
n;
i++) {
2241
2243
2244 mstrlcat(
str,
" ",
sizeof(
str));
2246 }
2247 }
2248
2251 std::string r =
ss_execs(s.c_str());
2252
2253
2255
2257 }
2258
2259
2264 size =
sizeof(
state);
2272 }
2273 }
2274 } else {
2275
2276 size =
sizeof(
state);
2281 }
2282 }
2286 size =
sizeof(
state);
2291
2294 }
2295 }
2296 } else {
2297
2298 size =
sizeof(
state);
2301 size = sizeof(seq);
2303
2305
2308
2313 cm_msg(
MTALK,
"sequencer",
"Sequencer is finished by \"stop after current run\".");
2314 } else {
2315 cm_msg(
MTALK,
"sequencer",
"Sequencer is going to finish by \"stop after current run\". Executing ATEXIT.");
2316 }
2317 } else {
2319 }
2320
2322 }
2323 }
2324 } else {
2326 return;
2327 }
2328 }
2329
2330
2333 n = atoi(
eval_var(seq,
c, mxml_get_value(
pn)).c_str());
2345 }
2347 }
else if (
equal_ustring(mxml_get_attribute(
pn,
"for"),
"ODBValue")) {
2350 if (!mxml_get_attribute(
pn,
"path")) {
2351 seq_error(seq,
c,
"\"path\" must be given for ODB values");
2352 return;
2353 } else {
2354 mstrlcpy(odbpath, mxml_get_attribute(
pn,
"path"),
sizeof(odbpath));
2356
2357 if (strchr(odbpath, '$')) {
2358 if (strchr(odbpath, '[')) {
2359
2360 std::string s(odbpath);
2361 std::string s1 = s.substr(0, s.find('['));
2362 std::string s2 = s.substr(s.find('['));
2364 s1 += s2;
2365 mstrlcpy(odbpath, s1.c_str(), sizeof(odbpath));
2366 } else {
2367
2368 std::string s(odbpath);
2370 mstrlcpy(odbpath, s.c_str(), sizeof(odbpath));
2371 }
2372 }
2373
2374 index1 = index2 = 0;
2379 return;
2380 } else {
2381 if (mxml_get_attribute(
pn,
"op"))
2382 mstrlcpy(op, mxml_get_attribute(
pn,
"op"),
sizeof(op));
2383 else
2384 strcpy(op, "!=");
2386
2388 size =
sizeof(
data);
2391 value = *((
int *)
data) > 0 ?
"1" :
"0";
2392 else
2408 } else {
2410 return;
2411 }
2412
2413 if (cont) {
2419 }
2420 }
2421 }
2428 } else {
2432 }
2440 }
2441 } else {
2442 seq_error(seq,
c,
msprintf(
"Invalid wait attribute \"%s\"", mxml_get_attribute(
pn,
"for")).c_str());
2443 }
2444
2445
2447 }
2448
2449
2453 break;
2455 seq_error(seq,
c,
"Maximum loop nesting exceeded");
2456 return;
2457 }
2460 if (mxml_get_attribute(
pn,
"l"))
2462 if (mxml_get_attribute(
pn,
"le"))
2465
2466 if (mxml_get_attribute(
pn,
"n")) {
2469 else {
2471 }
2473 }
else if (mxml_get_attribute(
pn,
"values")) {
2474 mstrlcpy(
data, mxml_get_attribute(
pn,
"values"),
sizeof(
data));
2477 } else {
2478 seq_error(seq,
c,
"Missing \"var\" or \"n\" attribute");
2479 return;
2480 }
2481
2482 if (mxml_get_attribute(
pn,
"var")) {
2483 mstrlcpy(
name, mxml_get_attribute(
pn,
"var"),
sizeof(
name));
2484 sprintf(
str,
"Variables/%s",
name);
2485 size =
value.length() + 1;
2486 if (size < 32)
2487 size = 32;
2489 }
2490
2492 }
2493
2494
2496
2497
2501 size = sizeof(seq);
2509 }
2510
2511
2514 break;
2516 seq_error(seq,
c,
"\"Break\" outside any loop");
2517 return;
2518 }
2519
2520
2523 }
2524
2525
2527
2529 seq_error(seq,
c,
"Maximum number of nested if..endif exceeded");
2530 return;
2531 }
2532
2533
2536
2537
2540 pe = mxml_get_node_at_line(
c->pnseq,
j);
2541
2542
2544 j = mxml_get_line_number_end(pe);
2545 continue;
2546 }
2547
2548
2551 break;
2552 }
2553 }
2554
2555 mstrlcpy(
str, mxml_get_attribute(
pn,
"condition"),
sizeof(
str));
2558 seq_error(seq,
c,
"Invalid number in comparison");
2559 return;
2560 }
2561
2566 else
2568
2570 }
2571
2572
2574
2577 return;
2578 }
2580 }
2581
2582
2585 cm_msg(
MTALK,
"sequencer",
"Sequencer is finished.");
2586 return;
2587 }
2588
2589
2591 if (!mxml_get_attribute(
pn,
"line") && !mxml_get_attribute(
pn,
"sline")) {
2593 return;
2594 }
2595 if (mxml_get_attribute(
pn,
"line")) {
2597 }
2598 if (mxml_get_attribute(
pn,
"sline")) {
2599 mstrlcpy(
str,
eval_var(seq,
c, mxml_get_attribute(
pn,
"sline")).c_str(),
sizeof(
str));
2600 for (
i = 0;
i < last_line;
i++) {
2601 pt = mxml_get_node_at_line(
c->pnseq,
i);
2602 if (pt && mxml_get_attribute(pt, "l")) {
2603 l = atoi(mxml_get_attribute(pt, "l"));
2604 if (atoi(
str) == l) {
2606 break;
2607 }
2608 }
2609 }
2610 }
2611 }
2612
2613
2615
2617 }
2618
2619
2621
2623 }
2624
2625
2627
2629 }
2630
2631
2633 if (!mxml_get_attribute(
pn,
"name")) {
2635 return;
2636 }
2637 mstrlcpy(
name, mxml_get_attribute(
pn,
"name"),
sizeof(
name));
2639
2640 if (strchr(
name,
'[')) {
2641
2642 mstrlcpy(
str, strchr(
name,
'[')+1,
sizeof(
str));
2643 if (strchr(
str,
']'))
2644 *strchr(
str,
']') = 0;
2646 *strchr(
name,
'[') = 0;
2647 sprintf(
str,
"Variables/%s",
name);
2652 }
2653 size =
value.length() + 1;
2654 if (size < 32)
2655 size = 32;
2657 } else {
2658 sprintf(
str,
"Variables/%s",
name);
2659 size =
value.length() + 1;
2660 if (size < 32)
2661 size = 32;
2663 }
2664
2665
2669 if (mxml_get_attribute(pr, "var")) {
2672 }
2673 }
2674
2676 }
2677
2678
2680 if (strchr(mxml_get_value(
pn),
'$'))
2682 else
2684 const char *wait_attr = mxml_get_attribute(
pn,
"wait");
2685 bool wait = false;
2686 if (wait_attr)
2687 wait = (atoi(wait_attr) == 1);
2688
2689 if (!wait) {
2690
2694 } else {
2695
2696
2697
2702
2703 return;
2704 } else {
2705
2706
2707
2709
2710 return;
2711 }
2712
2713
2715 }
2716 }
2717
2719 }
2720
2721
2723 if (strchr(mxml_get_value(
pn),
'$'))
2725 else
2727 std::string
type =
"INFO";
2728 if (mxml_get_attribute(
pn,
"type"))
2729 type = std::string(mxml_get_attribute(
pn,
"type"));
2730
2731 if (
type ==
"ERROR")
2733 else if (
type ==
"DEBUG")
2735 else if (
type ==
"LOG")
2737 else if (
type ==
"TALK")
2739 else
2741
2743 }
2744
2745
2747 if (!mxml_get_attribute(
pn,
"name")) {
2749 return;
2750 }
2751 mstrlcpy(
name, mxml_get_attribute(
pn,
"name"),
sizeof(
name));
2753 return;
2754 sprintf(
str,
"Variables/%s",
name);
2755 size = strlen(
data) + 1;
2756 if (size < 32)
2757 size = 32;
2759
2761 }
2762
2763
2766 seq_error(seq,
c,
"Maximum subroutine level exceeded");
2767 return;
2768 } else {
2769
2773
2774
2775 for (
i = 1;
i < mxml_get_line_number_end(mxml_find_node(
c->pnseq,
"RunSequence"));
i++) {
2776 pt = mxml_get_node_at_line(
c->pnseq,
i);
2777 if (pt) {
2779 if (
equal_ustring(mxml_get_attribute(pt,
"name"), mxml_get_attribute(
pn,
"name"))) {
2780
2782
2784
2785 if (mxml_get_value(
pn)) {
2786 char p[256];
2787 if (strchr(mxml_get_value(
pn),
'$'))
2788 mstrlcpy(p,
eval_var(seq,
c, mxml_get_value(
pn)).c_str(),
sizeof(p));
2789 else
2790 mstrlcpy(p, mxml_get_value(
pn),
sizeof(p));
2791
2793 }
2794
2796 break;
2797 }
2798 }
2799 }
2800 }
2801 if (
i == mxml_get_line_number_end(mxml_find_node(
c->pnseq,
"RunSequence"))) {
2802 seq_error(seq,
c,
msprintf(
"Subroutine '%s' not found", mxml_get_attribute(
pn,
"name")).c_str());
2803 }
2804 }
2805 }
2806
2807
2808 else {
2810 }
2811
2812
2814 size = sizeof(seq1);
2823
2824
2825 if (seq.
debug && !skip_step)
2827
2828
2830}
INT cm_transition(INT transition, INT run_number, char *errstr, INT errstr_size, INT async_flag, INT debug_flag)
#define CM_DEFERRED_TRANSITION
std::string ss_execs(const char *cmd)
std::string ss_replace_env_variables(const std::string &inputPath)
INT ss_sleep(INT millisec)
INT cm_msg_retrieve(INT n_message, char *message, INT buf_size)
INT db_get_data_index(HNDLE hDB, HNDLE hKey, void *data, INT *buf_size, INT idx, DWORD type)
INT db_delete_key(HNDLE hDB, HNDLE hKey, BOOL follow_links)
INT db_get_value(HNDLE hDB, HNDLE hKeyRoot, const char *key_name, void *data, INT *buf_size, DWORD type, BOOL create)
INT db_save_json(HNDLE hDB, HNDLE hKey, const char *filename, int flags)
INT db_save_xml(HNDLE hDB, HNDLE hKey, const char *filename)
INT db_create_key(HNDLE hDB, HNDLE hKey, const char *key_name, DWORD type)
INT db_get_record(HNDLE hDB, HNDLE hKey, void *data, INT *buf_size, INT align)
INT db_save(HNDLE hDB, HNDLE hKey, const char *filename, BOOL bRemote)
INT db_get_key(HNDLE hDB, HNDLE hKey, KEY *key)
INT db_load(HNDLE hDB, HNDLE hKeyRoot, const char *filename, BOOL bRemote)
INT db_set_data_index(HNDLE hDB, HNDLE hKey, const void *data, INT data_size, INT idx, DWORD type)
INT db_delete(HNDLE hDB, HNDLE hKeyRoot, const char *odb_path)
INT db_sprintf(char *string, const void *data, INT data_size, INT idx, DWORD type)
INT db_set_value(HNDLE hDB, HNDLE hKeyRoot, const char *key_name, const void *data, INT data_size, INT num_values, DWORD type)
INT db_set_data_index1(HNDLE hDB, HNDLE hKey, const void *data, INT data_size, INT idx, DWORD type, BOOL bNotify)
INT db_sscanf(const char *data_str, void *data, INT *data_size, INT i, DWORD tid)
INT db_set_num_values(HNDLE hDB, HNDLE hKey, INT num_values)
const char * rpc_tid_name(INT id)
void seq_array_index(SEQUENCER &seq, SeqCon *c, char *odbpath, int *index1, int *index2)
int concatenate(SEQUENCER &seq, SeqCon *c, char *result, int size, char *value)
static void seq_start_next(SEQUENCER &seq, SeqCon *c)
int set_all_matching(HNDLE hDB, HNDLE hBaseKey, const char *odbpath, char *value, int index1, int index2, int notify)
int eval_condition(SEQUENCER &seq, SeqCon *c, const char *condition)
std::string msprintf(const char *format,...)
#define JSFLAG_FOLLOW_LINKS
#define JSFLAG_OMIT_LAST_WRITTEN
int if_line[SEQ_NEST_LEVEL_IF]
static void pn(const te_expr *n, int depth)