com.proatech.bioera.external
Interface ExternalSourceIf


public interface ExternalSourceIf

This interface is implemented by external class that produces data samples. The implemented class must have empty (no parameter) public constructor. If access to dynamic actions performed in BioEra (like start, stop etc) is needed, then the class should also implement ExternalInit interface.


Method Summary
 int getDigitalMax()
          Maximum integer value coming from external source.
 int getDigitalMin()
          Minimum integer value coming from external source.
 int getOutputChannelCount()
          Returns number of output channels
 java.lang.String getOutputChannelName(int channel)
          Define channel name.
 float getOutputDataRate()
          Returns output sample rate
 float getPhysicalMax()
          Physical representation for the maximum value coming from external source.
 float getPhysicalMin()
          Physical representation for the minimum value coming from external source.
 java.lang.String getPhysicalUnit()
          Physical unit (e.g.
 int processOutputData(int channel, double[] buffer)
          Data from this external element is moved to output pipe.
Channel parameter specifies channel number, buffer should be filled with samples formatted as double values.
 int processOutputData(int channel, float[] buffer)
          Data from this external element is moved to output pipe.
Channel parameter specifies channel number, buffer should be filled with samples formatted as float values.
 int processOutputData(int channel, int[] buffer)
          Data from this external element is moved (copied) to output pipe.
Channel parameter specifies channel number, buffer should be filled with samples formatted as signed integer values.
 

Method Detail

processOutputData

int processOutputData(int channel,
                      int[] buffer)
                      throws java.io.IOException
Data from this external element is moved (copied) to output pipe.
Channel parameter specifies channel number, buffer should be filled with samples formatted as signed integer values. Method returns number of samples written into output pipe.
This method is only invoked in ExternalElement.

Throws:
java.io.IOException

processOutputData

int processOutputData(int channel,
                      float[] buffer)
                      throws java.io.IOException
Data from this external element is moved to output pipe.
Channel parameter specifies channel number, buffer should be filled with samples formatted as float values. Method returns number of samples written into buffer.
This method is only invoked in F_ExternalElement.

Throws:
java.io.IOException

processOutputData

int processOutputData(int channel,
                      double[] buffer)
                      throws java.io.IOException
Data from this external element is moved to output pipe.
Channel parameter specifies channel number, buffer should be filled with samples formatted as double values. Method returns number of samples written into buffer.
This method is only invoked in D_ExternalElement.

Throws:
java.io.IOException

getOutputDataRate

float getOutputDataRate()
Returns output sample rate


getOutputChannelCount

int getOutputChannelCount()
Returns number of output channels


getDigitalMax

int getDigitalMax()
Maximum integer value coming from external source. Must be positive.


getDigitalMin

int getDigitalMin()
Minimum integer value coming from external source. Must be either 0 or -getDigitalMax()


getPhysicalMax

float getPhysicalMax()
Physical representation for the maximum value coming from external source. Must be positive.


getPhysicalMin

float getPhysicalMin()
Physical representation for the minimum value coming from external source. Must be either 0 or -getPhysicalMax()


getPhysicalUnit

java.lang.String getPhysicalUnit()
Physical unit (e.g. uV or microvolt or Kelvin).


getOutputChannelName

java.lang.String getOutputChannelName(int channel)
Define channel name. This name will be visible on the element's pipe.