Struct cameleon::genapi::IntegerNode
source · pub struct IntegerNode(_);
Expand description
A node that has IInteger
interface
Implementations§
source§impl IntegerNode
impl IntegerNode
sourcepub fn value<Ctrl, Ctxt>(
self,
ctxt: &mut ParamsCtxt<Ctrl, Ctxt>
) -> GenApiResult<i64>where
Ctrl: DeviceControl,
Ctxt: GenApiCtxt,
pub fn value<Ctrl, Ctxt>( self, ctxt: &mut ParamsCtxt<Ctrl, Ctxt> ) -> GenApiResult<i64>where Ctrl: DeviceControl, Ctxt: GenApiCtxt,
Returns the value of the node.
sourcepub fn set_value<Ctrl, Ctxt>(
self,
ctxt: &mut ParamsCtxt<Ctrl, Ctxt>,
value: i64
) -> GenApiResult<()>where
Ctrl: DeviceControl,
Ctxt: GenApiCtxt,
pub fn set_value<Ctrl, Ctxt>( self, ctxt: &mut ParamsCtxt<Ctrl, Ctxt>, value: i64 ) -> GenApiResult<()>where Ctrl: DeviceControl, Ctxt: GenApiCtxt,
Sets the value of the node.
sourcepub fn min<Ctrl, Ctxt>(
self,
ctxt: &mut ParamsCtxt<Ctrl, Ctxt>
) -> GenApiResult<i64>where
Ctrl: DeviceControl,
Ctxt: GenApiCtxt,
pub fn min<Ctrl, Ctxt>( self, ctxt: &mut ParamsCtxt<Ctrl, Ctxt> ) -> GenApiResult<i64>where Ctrl: DeviceControl, Ctxt: GenApiCtxt,
Returns the minimum value which the node can take.
sourcepub fn set_min<Ctrl, Ctxt>(
self,
ctxt: &mut ParamsCtxt<Ctrl, Ctxt>,
value: i64
) -> GenApiResult<()>where
Ctrl: DeviceControl,
Ctxt: GenApiCtxt,
pub fn set_min<Ctrl, Ctxt>( self, ctxt: &mut ParamsCtxt<Ctrl, Ctxt>, value: i64 ) -> GenApiResult<()>where Ctrl: DeviceControl, Ctxt: GenApiCtxt,
Restricts minimum value of the node.
sourcepub fn max<Ctrl, Ctxt>(
self,
ctxt: &mut ParamsCtxt<Ctrl, Ctxt>
) -> GenApiResult<i64>where
Ctrl: DeviceControl,
Ctxt: GenApiCtxt,
pub fn max<Ctrl, Ctxt>( self, ctxt: &mut ParamsCtxt<Ctrl, Ctxt> ) -> GenApiResult<i64>where Ctrl: DeviceControl, Ctxt: GenApiCtxt,
Returns the maximum value which the node can take.
sourcepub fn set_max<Ctrl, Ctxt>(
self,
ctxt: &mut ParamsCtxt<Ctrl, Ctxt>,
value: i64
) -> GenApiResult<()>where
Ctrl: DeviceControl,
Ctxt: GenApiCtxt,
pub fn set_max<Ctrl, Ctxt>( self, ctxt: &mut ParamsCtxt<Ctrl, Ctxt>, value: i64 ) -> GenApiResult<()>where Ctrl: DeviceControl, Ctxt: GenApiCtxt,
Restricts maximum value of the node.
sourcepub fn inc<Ctrl, Ctxt>(
self,
ctxt: &mut ParamsCtxt<Ctrl, Ctxt>
) -> GenApiResult<Option<i64>>where
Ctrl: DeviceControl,
Ctxt: GenApiCtxt,
pub fn inc<Ctrl, Ctxt>( self, ctxt: &mut ParamsCtxt<Ctrl, Ctxt> ) -> GenApiResult<Option<i64>>where Ctrl: DeviceControl, Ctxt: GenApiCtxt,
Returns the increment value if inc_mode
returns IncrementMode::FixedIncrement. The value
to set must be min + i * Increment
.
NOTE: Some nodes like MaskedIntReg
doesn’t have this element, though IInteger
defines getter of the value.
sourcepub fn is_readable<Ctrl, Ctxt>(
self,
ctxt: &mut ParamsCtxt<Ctrl, Ctxt>
) -> GenApiResult<bool>where
Ctrl: DeviceControl,
Ctxt: GenApiCtxt,
pub fn is_readable<Ctrl, Ctxt>( self, ctxt: &mut ParamsCtxt<Ctrl, Ctxt> ) -> GenApiResult<bool>where Ctrl: DeviceControl, Ctxt: GenApiCtxt,
Returns true
if the node is readable.
sourcepub fn is_writable<Ctrl, Ctxt>(
self,
ctxt: &mut ParamsCtxt<Ctrl, Ctxt>
) -> GenApiResult<bool>where
Ctrl: DeviceControl,
Ctxt: GenApiCtxt,
pub fn is_writable<Ctrl, Ctxt>( self, ctxt: &mut ParamsCtxt<Ctrl, Ctxt> ) -> GenApiResult<bool>where Ctrl: DeviceControl, Ctxt: GenApiCtxt,
Returns true
if the node is writable.
sourcepub fn inc_mode<Ctrl, Ctxt>(
self,
ctxt: &ParamsCtxt<Ctrl, Ctxt>
) -> Option<IncrementMode>where
Ctxt: GenApiCtxt,
pub fn inc_mode<Ctrl, Ctxt>( self, ctxt: &ParamsCtxt<Ctrl, Ctxt> ) -> Option<IncrementMode>where Ctxt: GenApiCtxt,
Returns IncrementMode
of the node.
sourcepub fn representation<Ctrl, Ctxt>(
self,
ctxt: &ParamsCtxt<Ctrl, Ctxt>
) -> IntegerRepresentationwhere
Ctxt: GenApiCtxt,
pub fn representation<Ctrl, Ctxt>( self, ctxt: &ParamsCtxt<Ctrl, Ctxt> ) -> IntegerRepresentationwhere Ctxt: GenApiCtxt,
Returns IntegerRepresentation
of the node. This feature is mainly for GUI.
sourcepub fn unit<Ctrl, Ctxt>(self, ctxt: &ParamsCtxt<Ctrl, Ctxt>) -> Option<String>where
Ctxt: GenApiCtxt,
pub fn unit<Ctrl, Ctxt>(self, ctxt: &ParamsCtxt<Ctrl, Ctxt>) -> Option<String>where Ctxt: GenApiCtxt,
Returns unit that describes phisical meaning of the value. e.g. “Hz” or “ms”.
Trait Implementations§
source§impl Clone for IntegerNode
impl Clone for IntegerNode
source§fn clone(&self) -> IntegerNode
fn clone(&self) -> IntegerNode
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for IntegerNode
impl Debug for IntegerNode
source§impl Hash for IntegerNode
impl Hash for IntegerNode
source§impl PartialEq<IntegerNode> for IntegerNode
impl PartialEq<IntegerNode> for IntegerNode
source§fn eq(&self, other: &IntegerNode) -> bool
fn eq(&self, other: &IntegerNode) -> bool
self
and other
values to be equal, and is used
by ==
.