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.
Inherited Members
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. |