de.pxlab.pxl.display
Class SerialCommunicationDeviceControl

java.lang.Object
  extended by de.pxlab.pxl.DisplaySupport
      extended by de.pxlab.pxl.Display
          extended by de.pxlab.pxl.display.SerialCommunicationDeviceControl
All Implemented Interfaces:
ExParTypeCodes, SerialCommunicationDeviceControlCodes, TimerBitCodes, Topics

public class SerialCommunicationDeviceControl
extends Display
implements SerialCommunicationDeviceControlCodes

Controls a serial communication device connected to a serial port communication line.

Version:
0.1.3
Author:
H. Irtel

Field Summary
 ExPar Command
          Command string for the device.
 ExPar CommandCode
          Command code for the device.
 ExPar CommPort
          Communication port name for the device.
 
Fields inherited from class de.pxlab.pxl.Display
activeTimingGroup, activeTimingGroupIndex, backgroundFieldIndex, boundingBox, displayDevice, displayElementList, Duration, Execute, frameIncrement, framesPerCycle, graphics, graphics2D, height, JustInTime, next, Overlay, pointerActivationButton, pointerActivationX, pointerActivationY, pointerActive, pointerCurrentButton, pointerCurrentX, pointerCurrentY, pointerEventTime, pointerReleaseButton, pointerReleaseX, pointerReleaseY, presentationManager, ResponseCode, ResponsePosition, ResponseSet, ResponseTime, Screen, startAdjustable, STEREO_LEFT, STEREO_NONE, STEREO_RIGHT, TimeControl, TimeError, Timer, transparentOverlayFollows, width
 
Fields inherited from class de.pxlab.pxl.DisplaySupport
exParFields, group, instanceName, node, timingGroupLimit
 
Fields inherited from interface de.pxlab.pxl.SerialCommunicationDeviceControlCodes
CLOSE_SERIAL_LINE, CLOSE_XBOX, OPEN_SERIAL_LINE, OPEN_XBOX, SEND_TO_SERIAL_LINE
 
Fields inherited from interface de.pxlab.pxl.ExParTypeCodes
ANGLE, COLOR, COLOR_EDITOR, DEPCOLOR, DOUBLE, DURATION, editor, EXPARNAME, EXPFACTOR, FLAG, FONTNAME, GEOMETRY_EDITOR, HORSCREENPOS, HORSCREENSIZE, INTEGER, KEYCODE, PROPORT, RTDATA, SCREENPOS, SCREENSIZE, SMALL_DOUBLE, SMALL_INT, SMALL_SCREENSIZE, SMALL_VISUAL_ANGLE, SPECTRUM, STRING, TIMING_EDITOR, UNKNOWN, VERSCREENPOS, VERSCREENSIZE, VISUAL_ANGLE
 
Fields inherited from interface de.pxlab.pxl.Topics
ADAPTATION_DSP, APPARENT_MOTION_DSP, ASSIMILATION_DSP, ATTEND_DSP, AUDIO_DSP, CLEAR_DSP, COLOR_CONTRAST_DSP, COLOR_DISCRIMINATION_DSP, COLOR_SPACES_DSP, COMPLEX_COLOR_MATCHING_DSP, COMPLEX_GEOMETRY_DSP, CONTROL_DSP, DATA, DEMO, DISPLAY_TEST_DSP, EXP, EXTERNAL_DSP, FEEDBACK_DSP, GRATING_DSP, GUI_COMPONENT_DSP, INTRO_DSP, LATERAL_INHIBITION_DSP, LETTER_MATRIX_DSP, MEDIA_DSP, PATTERN_IMAGE_DSP, PHOTOMETRY_DSP, PICTURE_DSP, PROBLEM_SOLVING_DSP, PROC_MESSAGE_DSP, QUESTIONNAIRE_DSP, RANDOM_DOT_DSP, SEARCH_DSP, SERIAL_TEXT_DSP, SIMPLE_COLOR_MATCHING_DSP, SIMPLE_GEOMETRY_DSP, SPECTRAL_COLOR_DSP, TEXT_PAR_DSP, topicDescription, VISUAL_GAMMA_DSP
 
Fields inherited from interface de.pxlab.pxl.TimerBitCodes
CLOCK_TIMER_BIT, DOWN_TIMER_BIT, END_OF_MEDIA_TIMER_BIT, KEY_TIMER_BIT, MOUSE_BUTTON_TIMER_BIT, MOUSE_TRACKING_TIMER_BIT, NO_TIMER_BIT, SERIAL_LINE_TIMER_BIT, START_RESPONSE_TIMER_BIT, STOP_KEY_TIMER_BIT, STOP_RESPONSE_TIMER_BIT, STORE_TIMER_BIT, SYNC_TO_MEDIA_TIMER_BIT, UP_TIMER_BIT, VIDEO_SYNCHRONIZATION_BIT, VOICE_KEY_TIMER_BIT, WATCH_SPURIOUS_RESPONSES_BIT, XBUTTON_TIMER_BIT
 
Constructor Summary
SerialCommunicationDeviceControl()
           
 
Method Summary
protected  void computeGeometry()
          A Display's computeGeometry() method is called whenever the size of the receiving display panel is initialized or has been changed, or a geometry parameter of the display has been adjusted.
protected  int create()
          Create the display element list and the timing element list for this display.
 boolean isGraphic()
          Return true if this display object requires graphic screen resources for being shown.
 void show()
          Draws all objects in the list of DisplayElements but the background.
 void show(java.awt.Graphics g)
          Draws the background if it has been defined and then draws all objects in the list of DisplayElements.
 void showGroup()
          Shows the currently active timing group as it is defined by the current value of activeTimingGroup.
 
Methods inherited from class de.pxlab.pxl.Display
canShowSpectralDistributions, canStep, check4MediaTimer, clearBoundingBox, clearCurrentTimingGroup, clearNextTimingGroupImagePreload, clearTimingGroup, computeAnimationFrame, computeBackgroundField, computeColors, computeStereographicGeometry, computeTiming, createInstance, defaultTiming, defaultTiming, destroy, destroyInstance, displayElementCount, displayListControlState, disposeGraphicsContext, enterBackgroundField, enterDisplayElement, enterDisplayElement, enterTiming, enterTiming, enterTiming, enterTiming, enterTiming, finished, getActiveTimingElement, getAdjustable, getAllowTimerStop, getBoundingBox, getCanPreload, getColorParOfDisplayElement, getDisplayElement, getDisplayElementAt, getDisplayElementList, getDisplayListControl, getDisplayTiming, getDynExPar, getFrameIncrement, getFramesPerCycle, getFullRecompute, getIndexOf, getInitialDisplayElement, getLastTimingGroup, getLastTimingGroupIndex, getTiming, getTimingElement, getTimingGroupCount, getTimingGroupPattern, getTransparentOverlayFollows, getVisible, hasSpectralDistributions, isAnimated, isClearListOverlay, isJoinOverlay, isListOverlay, isNoOverlay, isStereo, isTransparentOverlay, keyResponse, nextDisplayElementIndex, nextTimingElementIndex, nextTimingGroup, pointerActivated, pointerDragged, pointerMoved, pointerReleased, preloadTimingGroupImage, printTiming, recompute, recompute, recomputeColors, recomputeGeometry, recomputeGeometry, recomputeTiming, removeDisplayElements, removeDisplayElements, removeTimingElements, removeTimingElements, setAdjustable, setBackgroundColorPar, setCanPreload, setDisplayListControl, setDynExPar, setFrameIncrement, setFramesPerCycle, setFullRecompute, setGraphicsContext, setKeyResponse, setListOverlay, setPointerActivationState, setPointerDraggedState, setPointerMovedState, setPointerReleaseState, setTimeControl, setTimingGroup, setTransparentOverlayFollows, setVisible, showAnimationFrame, showAnimationFrame, showBackgroundElement, showCurrentTimingGroup, showGroup, showGroupStereo, showStereo, timingGroupFinished, toString, updateBoundingBox
 
Methods inherited from class de.pxlab.pxl.DisplaySupport
centeredRect, centeredSquare, createExParFields, firstSquareOfTwo, getClassName, getColorPars, getExDesignNode, getExParFields, getExParName, getGeometryPars, getGroup, getInstanceName, getTimingPars, getTitle, getTopic, getXPars, hugeSquare, hugeSquareSize, inner3rdRect, innerRect, largeSquare, largeSquareSize, load, mediumSquare, mediumSquareSize, rectPattern, rectPattern, rectPattern, relSquareSize, reportPars, secondSquareOfTwo, setExDesignNode, setExParFields, setExParFields, setInstanceName, setTitleAndTopic, smallSquare, smallSquareSize, squareSizeOfTwo, tinySquare, tinySquareSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CommPort

public ExPar CommPort
Communication port name for the device. Possible names are 'COMn' under Windows with 'n' replaced by the serial port number (default: 'COM1' or 'COM2') or 'Serial A' or 'Serial B' on Sun unix machines.


CommandCode

public ExPar CommandCode
Command code for the device. Possible command codes are defined in the interface de.pxlab.pxl.SerialCommunicationDeviceControlCodes.


Command

public ExPar Command
Command string for the device. The SEND_TO_SERIAL_LINE command code sends this string to the device.

Constructor Detail

SerialCommunicationDeviceControl

public SerialCommunicationDeviceControl()
Method Detail

isGraphic

public boolean isGraphic()
Description copied from class: Display
Return true if this display object requires graphic screen resources for being shown. This is not the case for acoustic and other non-graphic Display objects.

Overrides:
isGraphic in class Display

create

protected int create()
Description copied from class: Display
Create the display element list and the timing element list for this display. This method is called only once per instance. Its task is to create the list of display and timing elements. Colors and timing properties are associated with their respective experimental parameter names here but are not yet initialized from the experimental parameter table. This is done later.

Specified by:
create in class Display

computeGeometry

protected void computeGeometry()
Description copied from class: Display
A Display's computeGeometry() method is called whenever the size of the receiving display panel is initialized or has been changed, or a geometry parameter of the display has been adjusted. This method does not recompute the background.

Specified by:
computeGeometry in class Display

showGroup

public void showGroup()
Description copied from class: Display
Shows the currently active timing group as it is defined by the current value of activeTimingGroup. Subclasses which want to modify the timing group display method should override this method. This method assumes that the graphics context has already been set and the background has been drawn.

Overrides:
showGroup in class Display

show

public void show(java.awt.Graphics g)
Description copied from class: Display
Draws the background if it has been defined and then draws all objects in the list of DisplayElements. This method ignores the timing group patterns. Drawing is delegated to the DisplayElement objects.

Overrides:
show in class Display
Parameters:
g - a currently valid Graphics context for painting.

show

public void show()
Description copied from class: Display
Draws all objects in the list of DisplayElements but the background. Drawing is delegated to the DisplayElement objects.

Overrides:
show in class Display