Annotation of /mcore-src/trunk/mcore-tools/src/modules/basic-video/graphic.control.class.in
Parent Directory | Revision Log
Revision 2636 -
(hide annotations)
(download)
Tue Sep 29 11:57:49 2015 UTC (8 years, 7 months ago) by niro
File size: 2635 byte(s)
Tue Sep 29 11:57:49 2015 UTC (8 years, 7 months ago) by niro
File size: 2635 byte(s)
-enhanced graphic control class
1 | niro | 2510 | # $Id$ |
2 | niro | 2051 | |
3 | niro | 2579 | push_config 10_graphic_resolution |
4 | niro | 2636 | push_config 10_graphic_depth |
5 | push_config 10_graphic_module | ||
6 | niro | 2561 | |
7 | niro | 2510 | help_graphic_resolution() |
8 | { | ||
9 | local serial="${CLASS_ARGV[0]}" | ||
10 | control_client "${serial}" help graphic.resolution | ||
11 | } | ||
12 | |||
13 | help_graphic_refresh() | ||
14 | { | ||
15 | local serial="${CLASS_ARGV[0]}" | ||
16 | control_client "${serial}" help graphic.refresh | ||
17 | } | ||
18 | |||
19 | help_graphic_depth() | ||
20 | { | ||
21 | local serial="${CLASS_ARGV[0]}" | ||
22 | control_client "${serial}" help graphic.depth | ||
23 | } | ||
24 | |||
25 | help_graphic_driver() | ||
26 | { | ||
27 | local serial="${CLASS_ARGV[0]}" | ||
28 | control_client "${serial}" help graphic.driver | ||
29 | } | ||
30 | |||
31 | niro | 2636 | # set_graphic_driver $serial $value |
32 | set_graphic_driver() | ||
33 | niro | 2051 | { |
34 | niro | 2305 | local serial="${CLASS_ARGV[0]}" |
35 | local value="${CLASS_ARGV[1]}" | ||
36 | niro | 2051 | |
37 | import_resource cfg_graphic "${serial}" module "${value}" | ||
38 | } | ||
39 | |||
40 | niro | 2636 | control_graphic_driver() |
41 | { | ||
42 | local serial="${CLASS_ARGV[0]}" | ||
43 | push_config_10_graphic_driver "${serial}" | ||
44 | } | ||
45 | |||
46 | push_config_10_graphic_driver() | ||
47 | { | ||
48 | local serial="$1" | ||
49 | local value | ||
50 | |||
51 | value=$(mysqldo "select module from cfg_graphic where serial='${serial}'") | ||
52 | control_client "${serial}" set graphic.driver "${value}" | ||
53 | } | ||
54 | |||
55 | niro | 2051 | # set_graphic_resolution $serial $value |
56 | set_graphic_resolution() | ||
57 | { | ||
58 | niro | 2305 | local serial="${CLASS_ARGV[0]}" |
59 | local value="${CLASS_ARGV[1]}" | ||
60 | niro | 2051 | |
61 | import_resource cfg_graphic "${serial}" resolution "${value}" | ||
62 | } | ||
63 | |||
64 | # control_graphic_resolution $serial | ||
65 | control_graphic_resolution() | ||
66 | { | ||
67 | niro | 2305 | local serial="${CLASS_ARGV[0]}" |
68 | niro | 2579 | push_config_10_graphic_resolution "${serial}" |
69 | niro | 2561 | } |
70 | |||
71 | niro | 2579 | push_config_10_graphic_resolution() |
72 | niro | 2561 | { |
73 | local serial="$1" | ||
74 | niro | 2051 | local value |
75 | |||
76 | value=$(mysqldo "select resolution from cfg_graphic where serial='${serial}'") | ||
77 | control_client "${serial}" set graphic.resolution "${value}" | ||
78 | } | ||
79 | |||
80 | # set_graphic_depth $serial $value | ||
81 | set_graphic_depth() | ||
82 | { | ||
83 | niro | 2305 | local serial="${CLASS_ARGV[0]}" |
84 | local value="${CLASS_ARGV[1]}" | ||
85 | niro | 2051 | |
86 | import_resource cfg_graphic "${serial}" depth "${value}" | ||
87 | } | ||
88 | |||
89 | niro | 2636 | control_graphic_depth |
90 | { | ||
91 | local serial="${CLASS_ARGV[0]}" | ||
92 | push_config_10_graphic_depth "${serial}" | ||
93 | } | ||
94 | |||
95 | push_config_10_graphic_depth() | ||
96 | { | ||
97 | local serial="$1" | ||
98 | local value | ||
99 | |||
100 | value=$(mysqldo "select depth from cfg_graphic where serial='${serial}'") | ||
101 | control_client "${serial}" set graphic.depth "${value}" | ||
102 | } | ||
103 | |||
104 | niro | 2051 | # set_graphic_refesh $serial $value |
105 | set_graphic_refresh() | ||
106 | { | ||
107 | niro | 2305 | local serial="${CLASS_ARGV[0]}" |
108 | local value="${CLASS_ARGV[1]}" | ||
109 | niro | 2051 | |
110 | niro | 2560 | import_resource cfg_graphic "${serial}" refresh_rate "${value}" |
111 | niro | 2051 | } |
112 | |||
113 | # control_graphic_resolution $serial | ||
114 | control_graphic_refresh() | ||
115 | { | ||
116 | niro | 2305 | local serial="${CLASS_ARGV[0]}" |
117 | niro | 2636 | push_config_10_graphic_refresh "${serial}" |
118 | } | ||
119 | |||
120 | push_config_10_graphic_refresh() | ||
121 | { | ||
122 | local serial="$1" | ||
123 | niro | 2051 | local value |
124 | |||
125 | value=$(mysqldo "select hz from cfg_graphic where serial='${serial}'") | ||
126 | control_client "${serial}" set graphic.resolution "${value}" | ||
127 | } |