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:
DispatcherA group of
ParameterSpecdefinitions for ajvconnected.device.ParameterGroupthat can be attached to an existingDeviceinstance.- Parameters
device (jvconnected.device.Device) – A
Deviceinstance to attach to
- name
The name of the
jvconnected.device.ParameterGroupwithin its parentdevice- Type
- device
Instance of
jvconnected.device.Device
- device_param_group
The
jvconnected.device.ParameterGroupassociated with this instance
- Event on_device_value_changed(group: ParameterGroupSpec, param: ParameterSpec, value: Any)[source]
Fired when the value of a parameter has changed on the device
on_device_value_changedis apydispatch.Eventobject.
- classmethod all_parameter_group_cls() Iterator[ParameterGroupSpec][source]
Iterate through all ParameterGroupSpec subclasses
- classmethod find_parameter_group_cls(name: str) 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
ParameterSpecname
- async set_param_value(name: str, value: Any)[source]
Set the device value for the given parameter
- Parameters
name (str) – The
ParameterSpecnamevalue (Any) – 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
ParameterSpecname
- async decrement_param_value(name: str)[source]
Decrement the device value for the given parameter
- Parameters
name (str) – The
ParameterSpecname
- async adjust_param_value(name: str, direction: bool)[source]
Increment or decrement the device value for the given parameter
- Parameters
name (str) – The
ParameterSpecnamedirection (bool) – If True, increment, otherwise decrement
- Raises
ValueError – If there is no
adjust_methoddefined
- class jvconnected.interfaces.paramspec.ExposureParams(*args, **kwargs)[source]
Bases:
ParameterGroupSpecParameterGroupSpecdefinition 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=255setter_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=24adjust_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=50adjust_method:
"adjust_master_black"
- class jvconnected.interfaces.paramspec.PaintParams(*args, **kwargs)[source]
Bases:
ParameterGroupSpecParameterGroupSpecdefinition 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=32setter_method:
"set_red_pos"
- blue_normalized
full_name:
"paint.blue_normalized"prop_name:
"blue_normalized"value_type:
IntValue:value_min=-32, value_max=32setter_method:
"set_blue_pos"
- detail_pos
full_name:
"paint.detail_pos"prop_name:
"detail_pos"value_type:
IntValue:value_min=-10, value_max=10adjust_method:
"adjust_detail"
- class jvconnected.interfaces.paramspec.TallyParams(*args, **kwargs)[source]
Bases:
ParameterGroupSpecParameterGroupSpecdefinition forjvconnected.device.TallyParams- Parameter Definitions
- program
full_name:
"tally.program"prop_name:
"program"value_type:
BoolValuesetter_method:
"set_program"
- preview
full_name:
"tally.preview"prop_name:
"preview"value_type:
BoolValuesetter_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:
DispatcherBase Parameter Spec
- Event on_device_value_changed(param: ParameterSpec, value: Any)[source]
Fired when the parameter value has changed on the device
on_device_value_changedis apydispatch.Eventobject.
- group_name: str = ''
The name of the
ParameterGroupas accessed by theparameter_groupsattribute ofDevice
- full_name: str = ''
Combination of
group_nameandname
- setter_method: str = ''
Method name on the
ParameterGroupused to set the parameter value (if available)
- adjust_method: str = ''
Method name on the
ParameterGroupused to increment/decrement the parameter value such asjvconnected.device.ExposureParams.adjust_iris()
- property param_group_spec: Optional[ParameterGroupSpec]
The parent
ParameterGroupSpecinstance
- property device_param_group: Optional[jvconnected.device.ParameterGroup]
The
jvconnected.device.ParameterGroupbound 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_methoddefined
- class jvconnected.interfaces.paramspec.ParameterSpec(*args, **kwargs)[source]
Bases:
BaseParameterSpecSpecifications for a single parameter within a
jvconnected.device.ParameterGroup- Property value: Any = None
The current device value
valueis apydispatch.Propertyobject.
- value_type: 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
ParameterGroupOne of
BoolValue,IntValue, orChoiceValue
- prop_name: str = ''
The Property/attribute name within the
jvconnected.device.ParameterGroupcontaining the parameter value
- async set_param_value(value: Any)[source]
Set the device value
- Raises
ValueError – If no
setter_methodis defined
- class jvconnected.interfaces.paramspec.MultiParameterSpec(*args, **kwargs)[source]
Bases:
BaseParameterSpecCombines multiple
ParameterSpecdefinitions- prop_names: List[str]
The Property/attribute names within the
jvconnected.device.ParameterGroupcontaining the parameter values
- value_types: List[Value]
Specifications for the expected values of the attribute in
ParameterGroup
- ListProperty value: List[Any]
The current device value
valueis apydispatch.ListPropertyobject.
- async set_param_value(value: List[Any])[source]
Set the device value
- Raises
ValueError – If no
setter_methodis defined
Value Types
- class jvconnected.interfaces.paramspec.Value[source]
Bases:
objectBase class for value definitions