📄 ampparam_8cpp-source.html
字号:
<a name="l00476"></a>00476 }<a name="l00477"></a>00477 <a name="l00478"></a>00478 <span class="comment">/***************************************************************************/</span><span class="comment"></span><a name="l00479"></a>00479 <span class="comment">/**</span><a name="l00480"></a>00480 <span class="comment"> Set the phasing mode configuration for the amplifier.</span><a name="l00481"></a>00481 <span class="comment"> @param mode The phasing mode to set</span><a name="l00482"></a>00482 <span class="comment"> @return A pointer to an error object, or NULL on success</span><a name="l00483"></a>00483 <span class="comment"> */</span><a name="l00484"></a>00484 <span class="comment">/***************************************************************************/</span><a name="l00485"></a><a class="code" href="classAmp.html#z1_17">00485</a> <span class="keyword">const</span> <a class="code" href="classError.html">Error</a> *<a class="code" href="classAmp.html#z1_17">Amp::SetPhaseMode</a>( <a class="code" href="CML__AmpDef_8h.html#a405">AMP_PHASE_MODE</a> mode )<a name="l00486"></a>00486 {<a name="l00487"></a>00487 <span class="keywordflow">return</span> <a class="code" href="classNode.html#o0">sdo</a>.<a class="code" href="classSDO.html#a10">Dnld16</a>( OBJID_PHASE_MODE, 0, (<a class="code" href="CML__Utils_8h.html#a8">uint16</a>)mode );<a name="l00488"></a>00488 }<a name="l00489"></a>00489 <a name="l00490"></a>00490 <span class="comment">/***************************************************************************/</span><span class="comment"></span><a name="l00491"></a>00491 <span class="comment">/**</span><a name="l00492"></a>00492 <span class="comment"> Get the current phasing mode configuration from the amplifier.</span><a name="l00493"></a>00493 <span class="comment"> @param mode The mode information will be returned here.</span><a name="l00494"></a>00494 <span class="comment"> @return A pointer to an error object, or NULL on success</span><a name="l00495"></a>00495 <span class="comment"> */</span><a name="l00496"></a>00496 <span class="comment">/***************************************************************************/</span><a name="l00497"></a><a class="code" href="classAmp.html#z1_18">00497</a> <span class="keyword">const</span> <a class="code" href="classError.html">Error</a> *<a class="code" href="classAmp.html#z1_18">Amp::GetPhaseMode</a>( <a class="code" href="CML__AmpDef_8h.html#a405">AMP_PHASE_MODE</a> &mode )<a name="l00498"></a>00498 {<a name="l00499"></a>00499 <a class="code" href="CML__Utils_8h.html#a8">uint16</a> m;<a name="l00500"></a>00500 <span class="keyword">const</span> <a class="code" href="classError.html">Error</a> *err = <a class="code" href="classNode.html#o0">sdo</a>.<a class="code" href="classSDO.html#a11">Upld16</a>( OBJID_PHASE_MODE, 0, m );<a name="l00501"></a>00501 mode = (<a class="code" href="CML__AmpDef_8h.html#a405">AMP_PHASE_MODE</a>)m;<a name="l00502"></a>00502 <span class="keywordflow">return</span> err;<a name="l00503"></a>00503 }<a name="l00504"></a>00504 <a name="l00505"></a>00505 <span class="comment">/***************************************************************************/</span><a name="l00506"></a>00506 <span class="comment">/***************************************************************************/</span><a name="l00507"></a>00507 <span class="comment">/***************************************************************************/</span><a name="l00508"></a>00508 <span class="comment">/***************************************************************************/</span><a name="l00509"></a>00509 <span class="comment">/*</span><a name="l00510"></a>00510 <span class="comment"> I/O pins and status registers</span><a name="l00511"></a>00511 <span class="comment"> */</span><a name="l00512"></a>00512 <span class="comment">/***************************************************************************/</span><a name="l00513"></a>00513 <span class="comment">/***************************************************************************/</span><a name="l00514"></a>00514 <span class="comment">/***************************************************************************/</span><a name="l00515"></a>00515 <span class="comment">/***************************************************************************/</span><a name="l00516"></a>00516 <a name="l00517"></a>00517 <a name="l00518"></a>00518 <span class="comment">/***************************************************************************/</span><span class="comment"></span><a name="l00519"></a>00519 <span class="comment">/**</span><a name="l00520"></a>00520 <span class="comment"> Get the present value of the general purpose input pins.</span><a name="l00521"></a>00521 <span class="comment"></span><a name="l00522"></a>00522 <span class="comment"> The input pin values are returned one per bit. The value of input pin</span><a name="l00523"></a>00523 <span class="comment"> 1 will be returned in bit 0 (1 if high, 0 if low), pin 2 will be in bit 1, </span><a name="l00524"></a>00524 <span class="comment"> etc.</span><a name="l00525"></a>00525 <span class="comment"></span><a name="l00526"></a>00526 <span class="comment"> @param value variable that will store the returned value</span><a name="l00527"></a>00527 <span class="comment"> @param viaSDO If true, an SDO will be used to read the input pins.</span><a name="l00528"></a>00528 <span class="comment"> If false (default), the most recent input value received from</span><a name="l00529"></a>00529 <span class="comment"> the amplifier via PDO will be returned.</span><a name="l00530"></a>00530 <span class="comment"> @return A pointer to an error object, or NULL on success</span><a name="l00531"></a>00531 <span class="comment"> */</span><a name="l00532"></a>00532 <span class="comment">/***************************************************************************/</span><a name="l00533"></a><a class="code" href="classAmp.html#z3_2">00533</a> <span class="keyword">const</span> <a class="code" href="classError.html">Error</a> *<a class="code" href="classAmp.html#z3_2">Amp::GetInputs</a>( <a class="code" href="CML__Utils_8h.html#a8">uint16</a> &value, <span class="keywordtype">bool</span> viaSDO )<a name="l00534"></a>00534 {<a name="l00535"></a>00535 <span class="keywordflow">if</span>( viaSDO )<a name="l00536"></a>00536 <span class="keywordflow">return</span> <a class="code" href="classNode.html#o0">sdo</a>.<a class="code" href="classSDO.html#a11">Upld16</a>( OBJID_INPUTS, 0, value ); <a name="l00537"></a>00537 <a name="l00538"></a>00538 <span class="keywordflow">else</span><a name="l00539"></a>00539 {<a name="l00540"></a>00540 value = (<a class="code" href="CML__Utils_8h.html#a8">uint16</a>)inputStateMap.<a class="code" href="classEventMap.html#a4">getMask</a>();<a name="l00541"></a>00541 <span class="keywordflow">return</span> 0;<a name="l00542"></a>00542 }<a name="l00543"></a>00543 }<a name="l00544"></a>00544 <a name="l00545"></a>00545 <span class="comment">/***************************************************************************/</span><span class="comment"></span><a name="l00546"></a>00546 <span class="comment">/**</span><a name="l00547"></a>00547 <span class="comment"> Set the current state of the input pin pull up/down resisters.</span><a name="l00548"></a>00548 <span class="comment"></span><a name="l00549"></a>00549 <span class="comment"> Pull up/down resisters control how an undriven input pin will be interpreted</span><a name="l00550"></a>00550 <span class="comment"> by the amplifier. Depending on the model of amplifier being controlled, there</span><a name="l00551"></a>00551 <span class="comment"> may be zero or more groups of pull up/down resisters attached to some the input</span><a name="l00552"></a>00552 <span class="comment"> pins.</span><a name="l00553"></a>00553 <span class="comment"></span><a name="l00554"></a>00554 <span class="comment"> Each bit of this register is used to control one group of pull up/down resisters.</span><a name="l00555"></a>00555 <span class="comment"> Bit 0 controls group 0, etc. </span><a name="l00556"></a>00556 <span class="comment"></span><a name="l00557"></a>00557 <span class="comment"> Please refer to the amplifier data sheet for details on the number of groups</span><a name="l00558"></a>00558 <span class="comment"> of pull up/down resisters, and which input pins are included in each group.</span><a name="l00559"></a>00559 <span class="comment"></span><a name="l00560"></a>00560 <span class="comment"> @param value The new value to write to the pull up/down control register.</span><a name="l00561"></a>00561 <span class="comment"> @return A pointer to an error object, or NULL on success</span><a name="l00562"></a>00562 <span class="comment"> */</span><a name="l00563"></a>00563 <span class="comment">/***************************************************************************/</span><a name="l00564"></a><a class="code" href="classAmp.html#z3_6">00564</a> <span class="keyword">const</span> <a class="code" href="classError.html">Error</a> *<a class="code" href="classAmp.html#z3_6">Amp::SetIoPullup</a>( <a class="code" href="CML__Utils_8h.html#a8">uint16</a> value )<a name="l00565"></a>00565 {<a name="l00566"></a>00566 <span class="keywordflow">return</span> <a class="code" href="classNode.html#o0">sdo</a>.<a class="code" href="classSDO.html#a10">Dnld16</a>( OBJID_PULLUPS, 0, value );<a name="l00567"></a>00567 }<a name="l00568"></a>00568 <a name="l00569"></a>00569 <span class="comment">/***************************************************************************/</span><span class="comment"></span><a name="l00570"></a>00570 <span class="comment">/**</span><a name="l00571"></a>00571 <span class="comment"> Get the current state of the input pin pull up/down resisters.</span><a name="l00572"></a>00572 <span class="comment"></span><a name="l00573"></a>00573 <span class="comment"> Pull up/down resisters control how an undriven input pin will be interpreted</span><a name="l00574"></a>00574 <span class="comment"> by the amplifier. Depending on the model of amplifier being controlled, there</span><a name="l00575"></a>00575 <span class="comment"> may be zero or more groups of pull up/down resisters attached to some the input</span><a name="l00576"></a>00576 <span class="comment"> pins.</span><a name="l00577"></a>00577 <span class="comment"></span><a name="l00578"></a>00578 <span class="comment"> Each bit of this register is used to control one group of pull up/down resisters.</span><a name="l00579"></a>00579 <span class="comment"> Bit 0 controls group 0, etc. </span><a name="l00580"></a>00580 <span class="comment"></span><a name="l00581"></a>00581 <span class="comment"> Please refer to the amplifier data sheet for details on the number of groups</span><a name="l00582"></a>00582 <span class="comment"> of pull up/down resisters, and which input pins are included in each group.</span><a name="l00583"></a>00583 <span class="comment"></span><a name="l00584"></a>00584 <span class="comment"> @param value variable that will store the returned value</span><a name="l00585"></a>00585 <span class="comment"> @return A pointer to an error object, or NULL on success</span><a name="l00586"></a>00586 <span class="comment"> */</span><a name="l00587"></a>00587 <span class="comment">/***************************************************************************/</span><a name="l00588"></a><a class="code" href="classAmp.html#z3_7">00588</a> <span class="keyword">const</span> <a class="code" href="classError.html">Error</a> *<a class="code" href="classAmp.html#z3_7">Amp::GetIoPullup</a>( <a class="code" href="CML__Utils_8h.html#a8">uint16</a> &value )<a name="l00589"></a>00589 {<a name="l00590"></a>00590 <span class="keywordflow">return</span> <a class="code" href="classNode.html#o0">sdo</a>.<a class="code" href="classSDO.html#a11">Upld16</a>( OBJID_PULLUPS, 0, value );<a name="l00591"></a>00591 }<a name="l00592"></a>00592 <a name="l00593"></a>00593 <span class="comment">/***************************************************************************/</span><span class="comment"></span><a name="l00594"></a>00594 <span class="comment">/**</span><a name="l00595"></a>00595 <span class="comment"> Set the input pin configuration for the specified input pin.</span><a name="l00596"></a>00596 <span class="commen
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -