org.mbari.siam.foce.devices.controlLoop
Class InputStateParser

java.lang.Object
  extended by org.mbari.siam.distributed.PacketParser
      extended by org.mbari.siam.utils.DelimitedStringParser
          extended by org.mbari.siam.foce.devices.controlLoop.InputStateParser
All Implemented Interfaces:
java.io.Serializable

public class InputStateParser
extends DelimitedStringParser

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.mbari.siam.distributed.PacketParser
PacketParser.Field, PacketParser.Record
 
Field Summary
protected  java.lang.String _namingPrefix
           
static int BASE_INDEX
           
protected  java.util.Vector fieldNames
           
protected  java.util.Vector fieldUnits
           
static int HEADER_INDEX
           
static int NAME_INDEX
           
static int SAMPLE_COUNT_INDEX
           
static int STATE_INDEX
           
static int STATUS_INDEX
           
static int TOEX_INDEX
           
static int TSLU_INDEX
           
static int UTMO_INDEX
           
static int VALID_RATIO_INDEX
           
 
Fields inherited from class org.mbari.siam.utils.DelimitedStringParser
_delimiters, _fieldVector
 
Fields inherited from class org.mbari.siam.distributed.PacketParser
_registryName
 
Constructor Summary
InputStateParser()
          No-arg constructor needed to instantiate via class loader (e.g.
InputStateParser(java.lang.String registryName, java.lang.String delimiters)
           
 
Method Summary
protected  void initialize()
           
protected  PacketParser.Field processToken(int nToken, java.lang.String token)
          Process the token, whose position in string is nToken.
 void setNamingPrefix(java.lang.String prefix)
          setNamimgPrefix allows callers to set a naming prefix to prevent naming collisions in DataTurbine.
 
Methods inherited from class org.mbari.siam.utils.DelimitedStringParser
decimalValue, parseFields
 
Methods inherited from class org.mbari.siam.distributed.PacketParser
getField
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BASE_INDEX

public static final int BASE_INDEX
See Also:
Constant Field Values

HEADER_INDEX

public static final int HEADER_INDEX
See Also:
Constant Field Values

NAME_INDEX

public static final int NAME_INDEX
See Also:
Constant Field Values

STATE_INDEX

public static final int STATE_INDEX
See Also:
Constant Field Values

STATUS_INDEX

public static final int STATUS_INDEX
See Also:
Constant Field Values

UTMO_INDEX

public static final int UTMO_INDEX
See Also:
Constant Field Values

TSLU_INDEX

public static final int TSLU_INDEX
See Also:
Constant Field Values

TOEX_INDEX

public static final int TOEX_INDEX
See Also:
Constant Field Values

SAMPLE_COUNT_INDEX

public static final int SAMPLE_COUNT_INDEX
See Also:
Constant Field Values

VALID_RATIO_INDEX

public static final int VALID_RATIO_INDEX
See Also:
Constant Field Values

fieldNames

protected java.util.Vector fieldNames

fieldUnits

protected java.util.Vector fieldUnits

_namingPrefix

protected java.lang.String _namingPrefix
Constructor Detail

InputStateParser

public InputStateParser()
No-arg constructor needed to instantiate via class loader (e.g. by logView)


InputStateParser

public InputStateParser(java.lang.String registryName,
                        java.lang.String delimiters)
Method Detail

setNamingPrefix

public void setNamingPrefix(java.lang.String prefix)
                     throws java.lang.Exception
setNamimgPrefix allows callers to set a naming prefix to prevent naming collisions in DataTurbine. Since all InputState packets parse the same way, different inputs can set the prefix equal to the input name+"_", giving each data field a unique (and easily identifiable) OSDT channel name. This method is invoked by the main control loop packet parser

Throws:
java.lang.Exception

initialize

protected void initialize()

processToken

protected PacketParser.Field processToken(int nToken,
                                          java.lang.String token)
                                   throws java.text.ParseException
Process the token, whose position in string is nToken. If token corresponds to a Field, create and return the field. Otherwise return null.

Specified by:
processToken in class DelimitedStringParser
Throws:
java.text.ParseException


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.