jvconnected.interfaces.paramspec
¶
This module contains specifications to assist with interface implementations.
The Property
values associated with
jvconnected.device.ParameterGroup
subclasses are defined here with
any information necessary for getting/setting values as well as the types and
ranges of values.
ParameterGroupSpec¶
-
class
jvconnected.interfaces.paramspec.
ParameterGroupSpec
(*args, **kwargs)[source]¶ Bases:
pydispatch.dispatch.Dispatcher
A group of
ParameterSpec
definitions for ajvconnected.device.ParameterGroup
that can be attached to an existingDevice
instance.- Parameters
device (jvconnected.device.Device) – A
Device
instance to attach to- Attributes
name (str) – The name of the
jvconnected.device.ParameterGroup
within its parentdevice
device – Instance of
jvconnected.device.Device
device_param_group – The
jvconnected.device.ParameterGroup
associated with this instance
- Events
-
on_device_value_changed
(group: ParameterGroupSpec, param: ParameterSpec, value)¶ Fired when the value of a parameter has changed on the device
-
-
classmethod
all_parameter_group_cls
() → Iterator[jvconnected.interfaces.paramspec.ParameterGroupSpec][source]¶ Iterate through all ParameterGroupSpec subclasses
-
classmethod
find_parameter_group_cls
(name: str) → jvconnected.interfaces.paramspec.ParameterGroupSpec[source]¶ Search for a ParameterGroupSpec class by its
name
-
get_param_value
(name: str) → Any[source]¶ Get the current device value for the given parameter
- Parameters
name (str) – The
ParameterSpec
name
-
async
set_param_value
(name: str, value: Any)[source]¶ Set the device value for the given parameter
- Parameters
name (str) – The
ParameterSpec
namevalue – The value to set
- Raises
ValueError – If there is no setter method for the
ParameterSpec
-
async
increment_param_value
(name: str)[source]¶ Increment the device value for the given parameter
- Parameters
name (str) – The
ParameterSpec
name
-
async
decrement_param_value
(name: str)[source]¶ Decrement the device value for the given parameter
- Parameters
name (str) – The
ParameterSpec
name
-
async
adjust_param_value
(name: str, direction: bool)[source]¶ Increment or decrement the device value for the given parameter
- Parameters
name (str) – The
ParameterSpec
namedirection (bool) – If True, increment, otherwise decrement
- Raises
ValueError – If there is no
adjust_method
defined
-
class
jvconnected.interfaces.paramspec.
ExposureParams
(*args, **kwargs)[source]¶ Bases:
jvconnected.interfaces.paramspec.ParameterGroupSpec
ParameterGroupSpec
definition forjvconnected.device.ExposureParams
- Parameter Definitions
- mode
full_name:
"exposure.mode"
prop_name:
"mode"
value_type:
ChoiceValue
:choices=['Auto', 'Manual', 'IrisPriority', 'ShutterPriority']
- iris_mode
full_name:
"exposure.iris_mode"
prop_name:
"iris_mode"
value_type:
ChoiceValue
:choices=['Manual', 'Auto', 'AutoAELock']
- iris_pos
full_name:
"exposure.iris_pos"
prop_name:
"iris_pos"
value_type:
IntValue
:value_min=0, value_max=255
setter_method:
"set_iris_pos"
- gain_mode
full_name:
"exposure.gain_mode"
prop_name:
"gain_mode"
value_type:
ChoiceValue
:choices=['ManualL', 'ManualM', 'ManualH', 'AGC', 'AlcAELock', 'LoLux', 'Variable']
- gain_pos
full_name:
"exposure.gain_pos"
prop_name:
"gain_pos"
value_type:
IntValue
:value_min=-6, value_max=24
adjust_method:
"adjust_gain"
- shutter_mode
full_name:
"exposure.shutter_mode"
prop_name:
"shutter_mode"
value_type:
ChoiceValue
:choices=['Off', 'Manual', 'Step', 'Variable', 'Eei']
- master_black_pos
full_name:
"exposure.master_black_pos"
prop_name:
"master_black_pos"
value_type:
IntValue
:value_min=-50, value_max=50
adjust_method:
"adjust_master_black"
-
class
jvconnected.interfaces.paramspec.
PaintParams
(*args, **kwargs)[source]¶ Bases:
jvconnected.interfaces.paramspec.ParameterGroupSpec
ParameterGroupSpec
definition forjvconnected.device.PaintParams
- Parameter Definitions
- white_balance_mode
full_name:
"paint.white_balance_mode"
prop_name:
"white_balance_mode"
value_type:
ChoiceValue
:choices=['Preset', 'A', 'B', 'Faw', 'FawAELock', 'Faw', 'Awb', 'OnePush', '3200K', '5600K', 'Manual']
- red_normalized
full_name:
"paint.red_normalized"
prop_name:
"red_normalized"
value_type:
IntValue
:value_min=-32, value_max=32
setter_method:
"set_red_pos"
- blue_normalized
full_name:
"paint.blue_normalized"
prop_name:
"blue_normalized"
value_type:
IntValue
:value_min=-32, value_max=32
setter_method:
"set_blue_pos"
- detail_pos
full_name:
"paint.detail_pos"
prop_name:
"detail_pos"
value_type:
IntValue
:value_min=-10, value_max=10
adjust_method:
"adjust_detail"
-
class
jvconnected.interfaces.paramspec.
TallyParams
(*args, **kwargs)[source]¶ Bases:
jvconnected.interfaces.paramspec.ParameterGroupSpec
ParameterGroupSpec
definition forjvconnected.device.TallyParams
- Parameter Definitions
- program
full_name:
"tally.program"
prop_name:
"program"
value_type:
BoolValue
setter_method:
"set_program"
- preview
full_name:
"tally.preview"
prop_name:
"preview"
value_type:
BoolValue
setter_method:
"set_preview"
- tally_status
full_name:
"tally.tally_status"
prop_name:
"tally_status"
value_type:
ChoiceValue
:choices=['Off', 'Program', 'Preview']
ParameterSpec¶
-
class
jvconnected.interfaces.paramspec.
BaseParameterSpec
(*args, **kwargs)[source]¶ Bases:
pydispatch.dispatch.Dispatcher
- Events
-
on_device_value_changed
(param: ParameterSpec, value)¶ Fired when the parameter value has changed on the device
-
-
group_name
: str = ''¶ The name of the
ParameterGroup
as accessed by theparameter_groups
attribute ofDevice
-
full_name
: str = ''¶ Combination of
group_name
andname
-
setter_method
: str = ''¶ Method name on the
ParameterGroup
used to set the parameter value (if available)
-
adjust_method
: str = ''¶ Method name on the
ParameterGroup
used to increment/decrement the parameter value such asjvconnected.device.ExposureParams.adjust_iris()
-
property
param_group_spec
→ typing.Union[ForwardRef(‘ParameterGroupSpec’), NoneType]¶ The parent
ParameterGroupSpec
instance
-
property
device_param_group
→ typing.Union[ForwardRef(‘jvconnected.device.ParameterGroup’), NoneType]¶ The
jvconnected.device.ParameterGroup
bound to this instance
-
async
adjust_value
(direction: bool)[source]¶ Increment or decrement the device value
- Parameters
direction (bool) – If True, increment, otherwise decrement
- Raises
ValueError – If there is no
adjust_method
defined
-
class
jvconnected.interfaces.paramspec.
ParameterSpec
(*args, **kwargs)[source]¶ Bases:
jvconnected.interfaces.paramspec.BaseParameterSpec
Specifications for a single parameter within a
jvconnected.device.ParameterGroup
- Properties
value: The current device value
-
value_type
: jvconnected.interfaces.paramspec.Value = Field(name=None,type=None,default=<dataclasses._MISSING_TYPE object>,default_factory=<class 'jvconnected.interfaces.paramspec.Value'>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),_field_type=None)¶ Specifications for the expected value of the attribute in
ParameterGroup
One of
BoolValue
,IntValue
, orChoiceValue
-
prop_name
: str = ''¶ The Property/attribute name within the
jvconnected.device.ParameterGroup
containing the parameter value
-
async
set_param_value
(value: Any)[source]¶ Set the device value
- Raises
ValueError – If no
setter_method
is defined
-
class
jvconnected.interfaces.paramspec.
MultiParameterSpec
(*args, **kwargs)[source]¶ Bases:
jvconnected.interfaces.paramspec.BaseParameterSpec
Combines multiple
ParameterSpec
definitions- Properties
value(list): The current device value
-
prop_names
: List[str]¶ The Property/attribute names within the
jvconnected.device.ParameterGroup
containing the parameter values
-
value_types
: List[jvconnected.interfaces.paramspec.Value]¶ Specifications for the expected values of the attribute in
ParameterGroup
-
async
set_param_value
(value: List[Any])[source]¶ Set the device value
- Raises
ValueError – If no
setter_method
is defined
Value Types¶
-
class
jvconnected.interfaces.paramspec.
Value
[source]¶ Bases:
object
Base class for value definitions
-
class
jvconnected.interfaces.paramspec.
BoolValue
[source]¶ Bases:
jvconnected.interfaces.paramspec.Value
A boolean value definition