46 |
46 |
47 /*****************************************************************************/ |
47 /*****************************************************************************/ |
48 |
48 |
49 void Command::setVerbosity(Verbosity v) |
49 void Command::setVerbosity(Verbosity v) |
50 { |
50 { |
51 verbosity = v; |
51 verbosity = v; |
52 }; |
52 }; |
53 |
53 |
54 /*****************************************************************************/ |
54 /*****************************************************************************/ |
55 |
55 |
56 void Command::setAlias(int a) |
56 void Command::setAlias(int a) |
57 { |
57 { |
58 alias = a; |
58 alias = a; |
59 }; |
59 }; |
60 |
60 |
61 /*****************************************************************************/ |
61 /*****************************************************************************/ |
62 |
62 |
63 void Command::setPosition(int p) |
63 void Command::setPosition(int p) |
64 { |
64 { |
65 position = p; |
65 position = p; |
66 }; |
66 }; |
67 |
67 |
68 /*****************************************************************************/ |
68 /*****************************************************************************/ |
69 |
69 |
70 void Command::setDomain(int d) |
70 void Command::setDomain(int d) |
71 { |
71 { |
72 domain = d; |
72 domain = d; |
73 }; |
73 }; |
74 |
74 |
75 /*****************************************************************************/ |
75 /*****************************************************************************/ |
76 |
76 |
77 void Command::setDataType(const string &t) |
77 void Command::setDataType(const string &t) |
78 { |
78 { |
79 dataType = t; |
79 dataType = t; |
80 }; |
80 }; |
81 |
81 |
82 /*****************************************************************************/ |
82 /*****************************************************************************/ |
83 |
83 |
84 void Command::setForce(bool f) |
84 void Command::setForce(bool f) |
85 { |
85 { |
86 force = f; |
86 force = f; |
87 }; |
87 }; |
88 |
88 |
89 /*****************************************************************************/ |
89 /*****************************************************************************/ |
90 |
90 |
91 void Command::setOutputFile(const string &f) |
91 void Command::setOutputFile(const string &f) |
92 { |
92 { |
93 outputFile = f; |
93 outputFile = f; |
94 }; |
94 }; |
95 |
95 |
96 /****************************************************************************/ |
96 /****************************************************************************/ |
97 |
97 |
98 bool Command::matchesSubstr(const string &cmd) const |
98 bool Command::matchesSubstr(const string &cmd) const |
277 |
277 |
278 /****************************************************************************/ |
278 /****************************************************************************/ |
279 |
279 |
280 Command::DomainList Command::selectedDomains(MasterDevice &m) |
280 Command::DomainList Command::selectedDomains(MasterDevice &m) |
281 { |
281 { |
282 ec_ioctl_domain_t d; |
282 ec_ioctl_domain_t d; |
283 DomainList list; |
283 DomainList list; |
284 |
284 |
285 if (domain == -1) { |
285 if (domain == -1) { |
286 ec_ioctl_master_t master; |
286 ec_ioctl_master_t master; |
287 unsigned int i; |
287 unsigned int i; |
288 |
288 |
289 m.getMaster(&master); |
289 m.getMaster(&master); |
290 |
290 |
291 for (i = 0; i < master.domain_count; i++) { |
291 for (i = 0; i < master.domain_count; i++) { |
292 m.getDomain(&d, i); |
292 m.getDomain(&d, i); |
293 list.push_back(d); |
293 list.push_back(d); |
294 } |
294 } |
295 } else { |
295 } else { |
296 m.getDomain(&d, domain); |
296 m.getDomain(&d, domain); |
297 list.push_back(d); |
297 list.push_back(d); |
298 } |
298 } |
299 |
299 |
300 return list; |
300 return list; |
301 } |
301 } |
302 |
302 |
303 /****************************************************************************/ |
303 /****************************************************************************/ |
304 |
304 |
305 string Command::alStateString(uint8_t state) |
305 string Command::alStateString(uint8_t state) |