org.vishia.guiInspc

## Class InspcViewTargetComm

- java.lang.Object
- - org.vishia.guiInspc.InspcViewTargetComm

-     public class InspcViewTargetComm
      extends java.lang.Object

  This class contains some status and control widgets for the Inspector Gui to show the status of communication. The communication itself is organized in `InspcTargetAccessor` in the software component javaSrc_vishiaRun.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) GralUserAction` | `actionClearReq` Action for button log.
    `(package private) GralUserAction` | `actionEnableLog` Action for button log.
    `(package private) GralUserAction` | `actionOpenWindowTargetSettings` Action for button log.
    `(package private) GralUserAction` | `actionSetTargetSettings` Action for button log.
    `private GralColor` | `color2`
    `private GralColor` | `colorIdle`
    `private GralColor` | `colorInactive`
    `private GralColor` | `colorWait`
    `(package private) InspcGui` | `gui`
    `(package private) LogMessage` | `logTelg`
    `(package private) GralUserAction` | `setVisible`
    `protected static java.lang.String` | `sVersion` Version, history and license.
    `(package private) InspcTargetAccessor` | `targetForSettingsWindow`
    `(package private) java.lang.String` | `targetKeySettingwindow`
    `private GralTextField` | `wdgAccLevels`
    `private GralButton` | `wdgBtnClearReq`
    `private GralButton` | `wdgBtnLog`
    `private GralButton` | `wdgBtnPerHandle`
    `private GralButton` | `wdgBtnRetry`
    `private GralButton` | `wdgBtnTargetSettings`
    `private GralButton` | `wdgBtnTargetSettingsOk`
    `private GralTextField` | `wdgPwdAccess`
    `private GralTextField` | `wdgTargetIdent`
    `private GralTextField` | `wdgTimeCycle`
    `private GralTextField` | `wdgTimeout`
    `private GralTable<InspcTargetAccessor>` | `widgTable` Table of fields, type and value.
    `private GralWindow` | `windStateOfTarget` The window to present.
    `private GralWindow` | `windTargetSettings` The window to input passwords.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `InspcViewTargetComm(InspcGui gui)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addTarget(java.lang.String key, java.lang.String info, float cycle, float timeout)`
    `(package private) float` | `getTimeout(java.lang.String target)`
    `boolean` | `isLogOn()`
    `(package private) void` | `registerTarget(java.lang.String name, java.lang.String sAddr, InspcTargetAccessor targetAcc)`
    `void` | `setStateInfo(java.lang.String key, InspcPlugUser_ifc.TargetState state, int count, int accLevels, float[] cycle_timeout)`
    `void` | `setToPanel()` Invoked in the graphic thread.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### sVersion

          protected static final java.lang.String sVersion

      Version, history and license.
      - 2018-10-19 chg: The Log on/off button is related to the target direct, not to the gui. Therefore handler implemented here.
      - 2018-10-19 new `windTargetSettings` for target settings, better handling of timeout, password-setting. Better handling of clearReq: Now it works with timeout=0 and manual clearRequest on stepbystep-debugging of the target.
      - 2015-05-30 Created.
      Copyright/Copyleft: For this source the LGPL Lesser General Public License, published by the Free Software Foundation is valid. It means:
      1. You can use this source without any restriction for any desired purpose.
      2. You can redistribute copies of this source to everybody.
      3. Every user of this source, also the user of redistribute copies with or without payment, must accept this license for further using.
      4. But the LPGL is not appropriate for a whole software product, if this source is only a part of them. It means, the user must publish this part of source, but don't need to publish the whole source of the own product.
      5. You can study and modify (improve) this source for own using or for redistribution, but you have to license the modified sources likewise under this LGPL Lesser General Public License. You mustn't delete this Copyright/Copyleft inscription in this source file.
      If you are intent to use this sources without publishing its usage, you can get a second license subscribing a special contract with the author.
      See Also:
        Constant Field Values

    - #### windStateOfTarget

          private final GralWindow windStateOfTarget

      The window to present.

    - #### windTargetSettings

          private final GralWindow windTargetSettings

      The window to input passwords.

    - #### widgTable

          private final GralTable<InspcTargetAccessor> widgTable

      Table of fields, type and value.

    - #### wdgBtnLog

          private final GralButton wdgBtnLog

    - #### wdgBtnRetry

          private final GralButton wdgBtnRetry

    - #### wdgBtnClearReq

          private final GralButton wdgBtnClearReq

    - #### wdgBtnPerHandle

          private final GralButton wdgBtnPerHandle

    - #### wdgBtnTargetSettings

          private final GralButton wdgBtnTargetSettings

    - #### wdgPwdAccess

          private final GralTextField wdgPwdAccess

    - #### wdgAccLevels

          private final GralTextField wdgAccLevels

    - #### wdgTargetIdent

          private final GralTextField wdgTargetIdent

    - #### wdgTimeout

          private final GralTextField wdgTimeout

    - #### wdgTimeCycle

          private final GralTextField wdgTimeCycle

    - #### wdgBtnTargetSettingsOk

          private final GralButton wdgBtnTargetSettingsOk

    - #### colorInactive

          private GralColor colorInactive

    - #### colorIdle

          private GralColor colorIdle

    - #### colorWait

          private GralColor colorWait

    - #### color2

          private GralColor color2

    - #### targetKeySettingwindow

          java.lang.String targetKeySettingwindow

    - #### logTelg

          LogMessage logTelg

    - #### gui

          final InspcGui gui

    - #### targetForSettingsWindow

          InspcTargetAccessor targetForSettingsWindow

    - #### setVisible

          GralUserAction setVisible

    - #### actionOpenWindowTargetSettings

          GralUserAction actionOpenWindowTargetSettings

      Action for button log. It switches on or off the logging functionality to log the telegram traffic for debugging.

    - #### actionSetTargetSettings

          GralUserAction actionSetTargetSettings

      Action for button log. It switches on or off the logging functionality to log the telegram traffic for debugging.

    - #### actionClearReq

          GralUserAction actionClearReq

      Action for button log. It switches on or off the logging functionality to log the telegram traffic for debugging.

    - #### actionEnableLog

          GralUserAction actionEnableLog

      Action for button log. It switches on or off the logging functionality to log the telegram traffic for debugging.

  - ### Constructor Detail

    - #### InspcViewTargetComm

          public InspcViewTargetComm(InspcGui gui)

  - ### Method Detail

    - #### setToPanel

          public void setToPanel()

      Invoked in the graphic thread.

    - #### addTarget

          public void addTarget(java.lang.String key,
                                java.lang.String info,
                                float cycle,
                                float timeout)

    - #### registerTarget

          void registerTarget(java.lang.String name,
                              java.lang.String sAddr,
                              InspcTargetAccessor targetAcc)

    - #### setStateInfo

          public void setStateInfo(java.lang.String key,
                                   InspcPlugUser_ifc.TargetState state,
                                   int count,
                                   int accLevels,
                                   float[] cycle_timeout)

    - #### isLogOn

          public boolean isLogOn()

    - #### getTimeout

          float getTimeout(java.lang.String target)