source: MML/trunk/mml/doc_html/mml/links/tango/tango_set_attribute_property.html @ 4

Last change on this file since 4 was 4, checked in by zhangj, 10 years ago

Initial import--MML version from SOLEIL@2013

File size: 5.8 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2                "http://www.w3.org/TR/REC-html40/loose.dtd">
3<html>
4<head>
5  <title>Description of tango_set_attribute_property</title>
6  <meta name="keywords" content="tango_set_attribute_property">
7  <meta name="description" content="TANGO_SET_ATTRIBUTE_PROPERTY - Set an attribute property to a given value">
8  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
9  <meta name="generator" content="m2html &copy; 2003 Guillaume Flandin">
10  <meta name="robots" content="index, follow">
11  <link type="text/css" rel="stylesheet" href="../../../m2html.css">
12</head>
13<body>
14<a name="_top"></a>
15<div><a href="../../../index.html">Home</a> &gt;  <a href="../../index.html">mml</a> &gt; <a href="#">links</a> &gt; <a href="index.html">tango</a> &gt; tango_set_attribute_property.m</div>
16
17<!--<table width="100%"><tr><td align="left"><a href="../../../index.html"><img alt="<" border="0" src="../../../left.png">&nbsp;Master index</a></td>
18<td align="right"><a href="index.html">Index for mml/links/tango&nbsp;<img alt=">" border="0" src="../../../right.png"></a></td></tr></table>-->
19
20<h1>tango_set_attribute_property
21</h1>
22
23<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2>
24<div class="box"><strong>TANGO_SET_ATTRIBUTE_PROPERTY - Set an attribute property to a given value</strong></div>
25
26<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2>
27<div class="box"><strong>function tango_set_attribute_property(FamilyName, property, strvalue) </strong></div>
28
29<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2>
30<div class="fragment"><pre class="comment">TANGO_SET_ATTRIBUTE_PROPERTY - Set an attribute property to a given value
31 tango_set_attribute_property(FamilyName, value)
32
33 INPUTS
34 1. FamilyName
35 2. property to set
36 3. strvalue - values to set
37
38 EXAMPLES
39 1. tango_set_attribute_property('BEND','max_value','600')
40
41 See also <a href="tango_get_attribute_property.html" class="code" title="function attr_prop = tango_get_attribute_property(varargin)">tango_get_attribute_property</a></pre></div>
42
43<!-- crossreference -->
44<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2>
45This function calls:
46<ul style="list-style-image:url(../../../matlabicon.gif)">
47<li><a href="family2tango.html" class="code" title="function [TangoNames, ErrorFlag] = family2tango(varargin)">family2tango</a> FAMILY2TANGO - Converts a familly to TANGO names</li><li><a href="getattribute.html" class="code" title="function [AttributeNames, DeviceNames] =  getattribute(varargin)">getattribute</a>     GETATTRIBUTE - Decomposes a full attributename into device and attribute names</li></ul>
48This function is called by:
49<ul style="list-style-image:url(../../../matlabicon.gif)">
50</ul>
51<!-- crossreference -->
52
53
54<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2>
55<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function tango_set_attribute_property(FamilyName, property, strvalue)</a>
560002 <span class="comment">%TANGO_SET_ATTRIBUTE_PROPERTY - Set an attribute property to a given value</span>
570003 <span class="comment">% tango_set_attribute_property(FamilyName, value)</span>
580004 <span class="comment">%</span>
590005 <span class="comment">% INPUTS</span>
600006 <span class="comment">% 1. FamilyName</span>
610007 <span class="comment">% 2. property to set</span>
620008 <span class="comment">% 3. strvalue - values to set</span>
630009 <span class="comment">%</span>
640010 <span class="comment">% EXAMPLES</span>
650011 <span class="comment">% 1. tango_set_attribute_property('BEND','max_value','600')</span>
660012 <span class="comment">%</span>
670013 <span class="comment">% See also tango_get_attribute_property</span>
680014
690015 <span class="comment">%</span>
700016 <span class="comment">% Written by Laurent S. Nadolski</span>
710017
720018 <span class="keyword">if</span> nargin &lt; 3
730019     error(<span class="string">'Not enough arguments'</span>)
740020 <span class="keyword">end</span>
750021
760022 <span class="keyword">if</span> isfamily(FamilyName)
770023     name = <a href="family2tango.html" class="code" title="function [TangoNames, ErrorFlag] = family2tango(varargin)">family2tango</a>(FamilyName);
780024 <span class="keyword">else</span> <span class="comment">%not a family name</span>
790025     name = FamilyName;
800026 <span class="keyword">end</span>
810027
820028 [attrlist devlist] = <a href="getattribute.html" class="code" title="function [AttributeNames, DeviceNames] =  getattribute(varargin)">getattribute</a>(name);
830029
840030 nb = length(devlist);
850031
860032 <span class="keyword">if</span> size(strvalue,1) == 1
870033     strlist = cellstr(repmat(strvalue,nb,1));
880034 <span class="keyword">else</span>
890035     strlist = strvalue;
900036 <span class="keyword">end</span>
910037
920038 <span class="comment">%%%</span>
930039 <span class="keyword">for</span> k = 1:nb
940040     dev = devlist{k,:};
950041     attr = attrlist{k,:};
960042     attr_config = tango_get_attribute_config(dev,attr);
970043     attr_config.(property) = strlist{k};
980044     tango_set_attribute_config(dev,attr_config);
990045     <span class="keyword">if</span> (tango_error == -1)
1000046         <span class="comment">%- handle error</span>
1010047         tango_print_error_stack;
1020048         fprintf(1,<span class="string">'TracyServer Error %s\n'</span>,dev)
1030049         <span class="keyword">return</span>;
1040050     <span class="keyword">end</span>
1050051 <span class="keyword">end</span></pre></div>
106<hr><address>Generated on Mon 21-May-2007 15:29:18 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> &copy; 2003</address>
107</body>
108</html>
Note: See TracBrowser for help on using the repository browser.