docs.unity3d.com
    Show / Hide Table of Contents

    Class PhotosensorEncoder

    The PhotosensorEncoder is a specialized transcoded used when doing data processing on the output of the photosensor. Most of the photosensor encoders will pack or format samples measured by the photosensor in a way that correspond to what a device api/firmware would do.

    Every time it receives an encodedPeriod signal, which is the time elapsed since the last encoding, it reads the output buffer of the photosensor and fills its output buffer according to the format selected by the developer.

    Inheritance
    Object
    NodeRuntime
    Transcoder
    PhotosensorEncoder
    PhotosensorToDepth
    PhotosensorToIntensity
    PhotosensorToIntensityBuffer
    PhotosensorToPointCloud
    Inherited Members
    Transcoder.inTranscode
    Transcoder.outTranscode
    Transcoder._computeShader
    Transcoder._computeKernelIdx
    Transcoder.Transcode(CustomPassContext)
    Transcoder.EnableInterfaceOnChangeEvent()
    Transcoder.DisableInterfaceOnChangeEvent()
    Transcoder.InitializeComputeShader(String, String)
    Transcoder.Release()
    NodeRuntime._parent
    NodeRuntime._portList
    NodeRuntime._queryPath
    NodeRuntime._tickCPUTimeNs
    NodeRuntime.Initialize(SystemGraphComponent)
    NodeRuntime.InternalInitialize()
    NodeRuntime.Start()
    NodeRuntime.Enable(Scheduler.ClockState)
    NodeRuntime.Disable()
    NodeRuntime.OnTick(Double, Double, Scheduler.ClockState, Scheduler.Signal)
    NodeRuntime.Update()
    NodeRuntime.FixedUpdate()
    NodeRuntime.OnPortAdded(String, Type, String, PortDirection, FieldExtra, IPortType)
    NodeRuntime.OnPortRemoved(String)
    NodeRuntime.InitializeDynamicPorts(SystemGraphComponent)
    NodeRuntime.QueryPath
    NodeRuntime.TickCPUTimeNs
    NodeRuntime.PortDataList
    Namespace: Mechatronics.SensorSDK
    Syntax
    public abstract class PhotosensorEncoder : Transcoder

    Fields

    _currentIndex

    RawData reading start index

    Declaration
    protected int _currentIndex
    Field Value
    Type Description
    Int32

    _lastIndex

    RawData reading last index

    Declaration
    protected int _lastIndex
    Field Value
    Type Description
    Int32

    framePeriod

    Declaration
    [Tooltip("Time elapsed since the last encode request.")]
    [Field("FramePeriod", PortDirection.Left, FieldExtra.Read)]
    [SerializeField]
    protected PortType<float> framePeriod
    Field Value
    Type Description
    PortType<Single>

    photosensorData

    Declaration
    [Tooltip("A circular buffer containing the photosensor samples.")]
    [Field("RawData", PortDirection.Left, FieldExtra.Read)]
    [SerializeField]
    protected PortType<PhotosensorOutputBuffer> photosensorData
    Field Value
    Type Description
    PortType<PhotosensorOutputBuffer>

    samplingRate

    Declaration
    [Tooltip("The sampling rate used to fill the incoming raw data.")]
    [Field("SamplingRate", PortDirection.Left, FieldExtra.Read)]
    [SerializeField]
    protected PortType<uint> samplingRate
    Field Value
    Type Description
    PortType<UInt32>

    Methods

    InitializeComputeShader(String)

    Load and find the kernel in a compute buffer.

    Declaration
    protected void InitializeComputeShader(string kernelName)
    Parameters
    Type Name Description
    String kernelName

    Kernel name to find.

    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023