DPx Device
- class
dpxDevice.
DpxDevice
(device_type) Bases:
object
Implements the features common for all Devices.
identification
Number which identifies the type of device.
part_number
Part number of the device.
firmware_revision
Firmware revision of the device.
ram_size
The size of the Ram found on the device.
close
()Closes a VPixx device.
This method is used to release a handle on a VPixx device.
get12vCurrent
()Gets the current for the 12 volt Power supply.
Returns: Temperature in Celsius.
Return type: float
get12vPower
()Gets the power for the 12 volt Power supply.
Returns: Power in watts.
Return type: float
get12vVoltage
()Gets the current for the 12 volt Power supply.
Returns: Temperature in Celsius.
Return type: float
get5vCurrent
()Gets the current for the 5 volt Power supply.
Returns: Temperature in Celsius.
Return type: float
get5vPower
()Gets the current for the 5 volt Power supply.
Returns: power in watts.
Return type: float
get5vVoltage
()Gets the voltage for the 5 volt Power supply.
Returns: Temperature in Celsius.
Return type: float
getAssemblyRevision
()Gets the device revision.
Returns: The assembly revision of the device.
Return type: string
getAvailableSubSystem
()Gets the available subsystems for the device.
Returns: Name of subsystems found on the device.
Return type: List
getCoreTemperature
()Gets the core temperature from the device.
Returns: Temperature in Celsius.
Return type: float
getDisplayResolution
()Gets the resolution of the device.
Returns: Horizontal resolution followed by vertical resolution.
Return type: string
getFirmwareRevision
()Gets the firmware revision.
Returns: The firmware revision of the device.
Return type: string
getFrameTemperature
()Gets the temperature from the device chassis.
Returns: Temperature in Celsius.
Return type: float
getFrameTemperature2
()Gets the temperature from the device chassis.
Returns: Temperature in Celsius.
Return type: float
getInfo
()Gets the device production information.
This method can be used to get information about the current device. Some of these information are different from one device to another. It can be useful when contacting VPixx Technologies.
Returns: Any of the predefined constants.
-
Part Number: The part number of the device.
-
Shipping Date: The date at which the device was shipped.
-
Assembly REV: The device assembly revision.
-
Expiration Date: Date when the warranty expires.
-
S/N: Serial number of the device.
Return type: info (dict)
-
getMarker
()Gets the current marker from the register.
This function allows the user to get the marker value previously latched.
getMonitorCableLink
()Gets the monitor cable link.
This method allows the user to know what kind of cable link is detected by the VPixx device.
Returns: Any of the following predefined constants.
-
Single Link DVI.
-
Dual Link DV.
Return type: string
-
getName
()Gets the device type.
Returns: Device type.
Return type: string
getRamSize
()Gets the RAM size.
Returns: The amount of RAM found on the device.
Return type: string
getSerialNumber
()Gets the serial number.
Returns: The serial number of the device.
Return type: string
getTime
()Gets the device time since power up.
Returns: Time in seconds.
Return type: float
getVideoLine
()Reads pixels from the VPixx device line buffer, and returns a list containing the data. For each pixel, the buffer contains 16 bit R/G/B/U (where U is thrown away). The returned data is a list containing three lists for the respective R/G/B colors.
Returns: A list which has [[RED], [GREEN], [BLUE]]
Return type: lists of list
getVideoSource
()Get source of video pattern being displayed.
Returns: Source of video pattern.
Return type: int
isReady
()Verifies if s device has been properly opened.
open
()Opens a VPixx device.
This method is used to get a handle on a VPixx device.
readRam
(address, int_list)Reads a block of VPixx RAM into a local buffer.
Parameters: -
address (int) – Any even value equal or greater to 0.
-
length (int) – Any of value from 0 to RAM size.
-
setCustomStartupConfig
()Save the current registers to be used on start up.
This can be useful if you set your projector to Ceiling mode or Rear projection and you want to keep it as such on reboot.
setMarker
()Latches the current time value into the marker register.
setVideoSource
(vidSource)Set source of video to be displayed
Parameters: vidSource (str) –
The source we want to display.
-
DVI: Monitor displays DVI signal.
-
SWTP: Software test pattern showing image from RAM.
-
SWTP 3D: 3D Software test pattern flipping between left/right eye images from RAM.
-
RGB SQUARES: RGB ramps.
-
GRAY: Uniform gray display having 12-bit intensity.
-
BAR: Drifting bar.
-
BAR2: Drifting bar.
-
DOTS: Drifting dots.
-
RAMP: Drifting ramp, with dots advancing x*2 pixels per video frame, where x is a 4-bit signed.
-
RGB: Uniform display with 8-bit intensity nn, send to RGBA channels enabled by mask m.
-
PROJ: Projector Hardware test pattern.
-
updateRegCacheAfterPixelSync
(pixelData, timeout)Writes local register cache to VPixx device over USB, using Pixel Sync timing.
This function is like DPxUpdateRegCache, but waits for a pixel sync sequence before executing.
Parameters: -
pixelData (list, tuple, or numpy array) – The requested pattern for PSync. Formatted such that the array is shape (3*N,) or (N,3) where ‘N’ is the number of RGB pixel triplets.
-
timeout (int) – Maximum time to wait before a PSync in video frames.
- Exceptions:
-
-
- pixelData is 1D and its length is not divisible by 3 or pixelData is
-
2D but does not have 3 columns or has more than 8 rows
-
pixelData contains values outside of the range [0,255]
-
timeout is not an integer or is outside of the range [0,65535]
-
-
updateRegCacheAfterVideoSync
()Updates the registers and local register cache on the next Video Sync (eg: Screen flip)
This will not work with a device which does not have video input such as a TRACKPixx3.
This is a blocking call until the devices recieves a Vsync and returns its registers.
updateRegisterCache
()Updates the registers and local register cache. This is a blocking call until the device returns its registers.
writeRam
(address, int_list)Writes a local buffer into VPixx RAM.
Parameters: -
address (int) – Any even value equal or greater to 0.
-
int_list (int) – int_list is a list which will fill with RAM data. The length of RAM used is based on the length of int_list. It can’t be bigger than RAM size.
-
writeRegCacheAfterPixelSync
(pixelData, timeout=255)Write local register cache to VPixx device over USB.
This function is like DPxWriteRegCache, but it waits for a pixel sync sequence.
Parameters: -
pixelData (list, tuple, or numpy array) – The requested pattern for PSync. Formatted such that the array is shape (3*N,) or (N,3) where ‘N’ is the number of RGB pixel triplets.
-
timeout (int) – Maximum time to wait before a PSync in video frames.
- Exceptions:
-
-
- pixelData is 1D and its length is not divisible by 3 or pixelData is
-
2D but does not have 3 columns or has more than 8 rows
-
pixelData contains values outside of the range [0,255]
-
timeout is not an integer or is outside of the range [0,65535]
-
-
writeRegCacheAfterVideoSync
()Write the registers and local register cache on the next Video Sync (eg: Screen flip)
This will not work with a device which does not have video input such as a TRACKPixx3
writeRegisterCache
()Writes the registers with local register cache.
dpxDevice.
DpxExceptionDecorate
(function)A decorator that wraps the passed in function and raise exceptions if occur