Package cern.dip

Interface DipData

  • All Superinterfaces:
    java.io.Serializable
    All Known Implementing Classes:
    DipDataImp, MockDipData

    public interface DipData
    extends java.io.Serializable
    Interface for DIP data. DipData object are used by publishers to publish complex data types. These object are are created by the DIP factory.

    DipData objects are also delivered to subscription listeners as result of subscription.

    DipData objects can contain one or more named entries, each holding a scalar, a string or a single-dimensional array of these. The table below shows the supported data types and the correspondence to Java and C++ types when DipData objects are passed between C++ and Java applications.

    type name C++ type Java type
    Boolean bool boolean
    Byte signed char byte
    Short short short
    Int long int
    Long long long long
    Float float float
    Double double double
    String null-terminated string String
    For a given type X, the insertion and extraction methods are:
    • void insert(X x)
      This method allows the insertion of a value of type X as a default entry.
    • void insert(String tag, X x)
      This method allows the insertion of a value of type X as the entry named by tag.
    • X extractX()
      This method allows the extraction of a value of type X from the default entry.
    • X extractX(String tag)
      This method allows the extraction of a value of type X from the entry named by tag.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean contains​(java.lang.String tag)
      Returns true if this object contains an entry with the specified tag.
      boolean extractBoolean()
      Returns the boolean stored in the default data entry.
      boolean extractBoolean​(java.lang.String tag)
      Returns the boolean stored in the specified data entry.
      boolean[] extractBooleanArray()
      Returns the boolean array stored in the default data entry.
      boolean[] extractBooleanArray​(java.lang.String tag)
      Returns the boolean array stored in the specified data entry.
      byte extractByte()
      Returns the byte stored in the default data entry.
      byte extractByte​(java.lang.String tag)
      Returns the byte stored in the specified data entry.
      byte[] extractByteArray()
      Returns the byte array stored in the default data entry.
      byte[] extractByteArray​(java.lang.String tag)
      Returns the byte array stored in the specified data entry.
      int extractDataQuality()
      Returns the data quality value of this DipData object as an int.
      DipQualityEnum extractDataQualityEnum()  
      DipTimestamp extractDipTime()
      Returns the DipTimestamp of this DipData object.
      double extractDouble()
      Returns the float array stored in the default data entry.
      double extractDouble​(java.lang.String tag)
      Returns the float array stored in the default data entry.
      double[] extractDoubleArray()
      Returns the double array stored in the default data entry.
      double[] extractDoubleArray​(java.lang.String tag)
      Returns the double array stored in the specified data entry.
      float extractFloat()
      Extracts the default value from the DipData object as a float.
      float extractFloat​(java.lang.String tag)
      Returns the float stored in the specified data entry.
      float[] extractFloatArray()
      Returns the double stored in the default data entry.
      float[] extractFloatArray​(java.lang.String tag)
      Returns the float array stored in the specified data entry.
      int extractInt()
      Returns the int stored in the default data entry.
      int extractInt​(java.lang.String tag)
      Returns the int stored in the specified data entry.
      int[] extractIntArray()
      Returns the int array stored in the default data entry.
      int[] extractIntArray​(java.lang.String tag)
      Returns the int array stored in the specified data entry.
      long extractLong()
      Returns the long stored in the default data entry.
      long extractLong​(java.lang.String tag)
      Returns the long stored in the specified data entry.
      long[] extractLongArray()
      Returns the long array stored in the default data entry.
      long[] extractLongArray​(java.lang.String tag)
      Returns the long array stored in the specified data entry.
      java.lang.String extractQualityString()
      Extracts the string that describes the reason for the quality.
      short extractShort()
      Returns the short stored in the default data entry.
      short extractShort​(java.lang.String tag)
      Returns the short stored in the specified data entry.
      short[] extractShortArray()
      Returns the short array stored in the default data entry.
      short[] extractShortArray​(java.lang.String tag)
      Returns the short array stored in the specified data entry.
      java.lang.String extractString()
      Returns the String stored in the default data entry.
      java.lang.String extractString​(java.lang.String tag)
      Returns the String stored in the specified data entry.
      java.lang.String[] extractStringArray()
      Returns the String array stored in the default data entry.
      java.lang.String[] extractStringArray​(java.lang.String tag)
      Returns the String array stored in the specified data entry.
      java.util.Optional<java.lang.Object> getPrimitiveValueAsObject()
      Returns the primitive DipData value as a Java Object.
      java.lang.String[] getTags()
      Returns an unordered String array that contains tags of all entries.
      java.util.Map<java.lang.String,​java.lang.Object> getValueAsMap()
      Returns the contents of the DipData as a field name / value map.
      int getValueType()
      Returns type code for the value contained in the default entry.
      int getValueType​(java.lang.String tag)
      Returns type code for the value contained in the specified entry.
      void insert​(boolean value)
      Inserts a boolean as default value into the DipData object.
      void insert​(boolean[] value)
      Inserts a boolean array as default value into the DipData object.
      void insert​(byte value)
      Inserts a byte as default value into the DipData object.
      void insert​(byte[] value)
      Inserts a byte array as default value into the DipData object.
      void insert​(double value)
      Inserts a double as default value into the DipData object.
      void insert​(double[] value)
      Inserts a double array as default value into the DipData object.
      void insert​(float value)
      Inserts a float as default value into the DipData object.
      void insert​(float[] value)
      Inserts a float array as default value into the DipData object.
      void insert​(int value)
      Inserts an int as default value into the DipData object.
      void insert​(int[] value)
      Inserts an int array as default value into the DipData object.
      void insert​(long value)
      Inserts a long as default value into the DipData object.
      void insert​(long[] value)
      Inserts a long array as default value into the DipData object.
      void insert​(short value)
      Inserts a short as default value into the DipData object.
      void insert​(short[] value)
      Inserts an short array as default value into the DipData object.
      void insert​(java.lang.String value)
      Inserts a String as default value into the DipData object.
      void insert​(java.lang.String[] value)
      Inserts a String array as default value into the DipData object.
      void insert​(java.lang.String tag, boolean value)
      Inserts a named boolean entry into the DipData object.
      void insert​(java.lang.String tag, boolean[] value)
      Inserts a named boolean array entry into the DipData object.
      void insert​(java.lang.String tag, byte value)
      Inserts a named byte entry into the DipData object.
      void insert​(java.lang.String tag, byte[] value)
      Inserts a named byte array entry into the DipData object.
      void insert​(java.lang.String tag, double value)
      Inserts a named double entry into the DipData object.
      void insert​(java.lang.String tag, double[] value)
      Inserts a named double array entry into the DipData object.
      void insert​(java.lang.String tag, float value)
      Inserts a named float entry into the DipData object.
      void insert​(java.lang.String tag, float[] value)
      Inserts a named float array entry into the DipData object.
      void insert​(java.lang.String tag, int value)
      Inserts a named int entry into the DipData object.
      void insert​(java.lang.String tag, int[] value)
      Inserts a named int array entry into the DipData object.
      void insert​(java.lang.String tag, long value)
      Inserts a named long entry into the DipData object.
      void insert​(java.lang.String tag, long[] value)
      Inserts a named long array entry into the DipData object.
      void insert​(java.lang.String tag, short value)
      Inserts a named short entry into the DipData object.
      void insert​(java.lang.String tag, short[] value)
      Inserts a named short array entry into the DipData object.
      void insert​(java.lang.String tag, java.lang.String value)
      Inserts a named String entry into the DipData object.
      void insert​(java.lang.String tag, java.lang.String[] value)
      Inserts a named String array entry into the DipData object.
      boolean isEmpty()
      Returns true if this DipData contains no entries; false otherwise.
      boolean isPrimitive()
      Indicates whether the DipData package only carries a single value (as opposed to one or more fields, a.k.a.
      int size()
      Returns the number of entries in this object.
    • Method Detail

      • isEmpty

        boolean isEmpty()
        Returns true if this DipData contains no entries; false otherwise.
      • size

        int size()
        Returns the number of entries in this object.
      • getTags

        java.lang.String[] getTags()
        Returns an unordered String array that contains tags of all entries. Returns a zero length array if this object is empty.
      • contains

        boolean contains​(java.lang.String tag)
        Returns true if this object contains an entry with the specified tag.
      • insert

        void insert​(float value)
             throws TypeMismatch
        Inserts a float as default value into the DipData object. If the default value already exists, it will be overwritten.
        Parameters:
        value - - the value to be written
        Throws:
        TypeMismatch - if entry is complex or contains a default value which is not of the same type as value.
      • insert

        void insert​(java.lang.String tag,
                    float value)
             throws TypeMismatch
        Inserts a named float entry into the DipData object. If the entry already exists, it will be overwritten.
        Parameters:
        tag - - name of the 'field' the value belongs to.
        value - - the value to be written
        Throws:
        TypeMismatch - if entry is simple or contains a tag already exists and its corresponding data is not of the same type as value.
      • insert

        void insert​(double value)
             throws TypeMismatch
        Inserts a double as default value into the DipData object. If the default value already exists, it will be overwritten.
        Parameters:
        value - - the value to be written
        Throws:
        TypeMismatch - if entry is complex or contains a default value which is not of the same type as value.
      • insert

        void insert​(java.lang.String tag,
                    double value)
             throws TypeMismatch
        Inserts a named double entry into the DipData object. If the entry already exists, it will be overwritten.
        Parameters:
        tag - - name of the 'field' the value belongs to.
        value - - the value to be written
        Throws:
        TypeMismatch - if entry is simple or contains a tag already exists and its corresponding data is not of the same type as value.
      • insert

        void insert​(float[] value)
             throws TypeMismatch
        Inserts a float array as default value into the DipData object. If the default value already exists, it will be overwritten.
        Parameters:
        value - - the value to be written
        Throws:
        TypeMismatch - if entry is complex or contains a default value which is not of the same type as value.
      • insert

        void insert​(java.lang.String tag,
                    float[] value)
             throws TypeMismatch
        Inserts a named float array entry into the DipData object. If the entry already exists, it will be overwritten.
        Parameters:
        tag - - name of the 'field' the value belongs to.
        value - - the value to be written
        Throws:
        TypeMismatch - if entry is simple or contains a tag already exists and its corresponding data is not of the same type as value.
      • insert

        void insert​(double[] value)
             throws TypeMismatch
        Inserts a double array as default value into the DipData object. If the default value already exists, it will be overwritten.
        Parameters:
        value - - the value to be written
        Throws:
        TypeMismatch - if entry is complex or contains a default value which is not of the same type as value.
      • insert

        void insert​(java.lang.String tag,
                    double[] value)
             throws TypeMismatch
        Inserts a named double array entry into the DipData object. If the entry already exists, it will be overwritten.
        Parameters:
        tag - - name of the 'field' the value belongs to.
        value - - the value to be written
        Throws:
        TypeMismatch - if entry is simple or contains a tag already exists and its corresponding data is not of the same type as value.
      • insert

        void insert​(short value)
             throws TypeMismatch
        Inserts a short as default value into the DipData object. If the default value already exists, it will be overwritten.
        Parameters:
        value - - the value to be written
        Throws:
        TypeMismatch - if entry is complex or contains a default value which is not of the same type as value.
      • insert

        void insert​(java.lang.String tag,
                    short value)
             throws TypeMismatch
        Inserts a named short entry into the DipData object. If the entry already exists, it will be overwritten.
        Parameters:
        tag - - name of the 'field' the value belongs to.
        value - - the value to be written
        Throws:
        TypeMismatch - if entry is simple or contains a tag already exists and its corresponding data is not of the same type as value.
      • insert

        void insert​(short[] value)
             throws TypeMismatch
        Inserts an short array as default value into the DipData object. If the default value already exists, it will be overwritten.
        Parameters:
        value - - the value to be written
        Throws:
        TypeMismatch - if entry is complex or contains a default value which is not of the same type as value.
      • insert

        void insert​(java.lang.String tag,
                    short[] value)
             throws TypeMismatch
        Inserts a named short array entry into the DipData object. If the entry already exists, it will be overwritten.
        Parameters:
        tag - - name of the 'field' the value belongs to.
        value - - the value to be written
        Throws:
        TypeMismatch - if entry is simple or contains a tag already exists and its corresponding data is not of the same type as value.
      • insert

        void insert​(int value)
             throws TypeMismatch
        Inserts an int as default value into the DipData object. If the default value already exists, it will be overwritten.
        Parameters:
        value - - the value to be written
        Throws:
        TypeMismatch - if entry is complex or contains a default value which is not of the same type as value.
      • insert

        void insert​(java.lang.String tag,
                    int value)
             throws TypeMismatch
        Inserts a named int entry into the DipData object. If the entry already exists, it will be overwritten.
        Parameters:
        tag - - name of the 'field' the value belongs to.
        value - - the value to be written
        Throws:
        TypeMismatch - if entry is simple or contains a tag already exists and its corresponding data is not of the same type as value.
      • insert

        void insert​(int[] value)
             throws TypeMismatch
        Inserts an int array as default value into the DipData object. If the default value already exists, it will be overwritten.
        Parameters:
        value - - the value to be written
        Throws:
        TypeMismatch - if entry is complex or contains a default value which is not of the same type as value.
      • insert

        void insert​(java.lang.String tag,
                    int[] value)
             throws TypeMismatch
        Inserts a named int array entry into the DipData object. If the entry already exists, it will be overwritten.
        Parameters:
        tag - - name of the 'field' the value belongs to.
        value - - the value to be written
        Throws:
        TypeMismatch - if entry is simple or contains a tag already exists and its corresponding data is not of the same type as value.
      • insert

        void insert​(long value)
             throws TypeMismatch
        Inserts a long as default value into the DipData object. If the default value already exists, it will be overwritten.
        Parameters:
        value - - the value to be written
        Throws:
        TypeMismatch - if entry is complex or contains a default value which is not of the same type as value.
      • insert

        void insert​(java.lang.String tag,
                    long value)
             throws TypeMismatch
        Inserts a named long entry into the DipData object. If the entry already exists, it will be overwritten.
        Parameters:
        tag - - name of the 'field' the value belongs to.
        value - - the value to be written
        Throws:
        TypeMismatch - if entry is simple or contains a tag already exists and its corresponding data is not of the same type as value.
      • insert

        void insert​(long[] value)
             throws TypeMismatch
        Inserts a long array as default value into the DipData object. If the default value already exists, it will be overwritten.
        Parameters:
        value - - the value to be written
        Throws:
        TypeMismatch - if entry is complex or contains a default value which is not of the same type as value.
      • insert

        void insert​(java.lang.String tag,
                    long[] value)
             throws TypeMismatch
        Inserts a named long array entry into the DipData object. If the entry already exists, it will be overwritten.
        Parameters:
        tag - - name of the 'field' the value belongs to.
        value - - the value to be written
        Throws:
        TypeMismatch - if entry is simple or contains a tag already exists and its corresponding data is not of the same type as value.
      • insert

        void insert​(byte value)
             throws TypeMismatch
        Inserts a byte as default value into the DipData object. If the default value already exists, it will be overwritten.
        Parameters:
        value - - the value to be written
        Throws:
        TypeMismatch - if entry is complex or contains a default value which is not of the same type as value.
      • insert

        void insert​(java.lang.String tag,
                    byte value)
             throws TypeMismatch
        Inserts a named byte entry into the DipData object. If the entry already exists, it will be overwritten.
        Parameters:
        tag - - name of the 'field' the value belongs to.
        value - - the value to be written
        Throws:
        TypeMismatch - if entry is simple or contains a tag already exists and its corresponding data is not of the same type as value.
      • insert

        void insert​(byte[] value)
             throws TypeMismatch
        Inserts a byte array as default value into the DipData object. If the default value already exists, it will be overwritten.
        Parameters:
        value - - the value to be written
        Throws:
        TypeMismatch - if entry is complex or contains a default value which is not of the same type as value.
      • insert

        void insert​(java.lang.String tag,
                    byte[] value)
             throws TypeMismatch
        Inserts a named byte array entry into the DipData object. If the entry already exists, it will be overwritten.
        Parameters:
        tag - - name of the 'field' the value belongs to.
        value - - the value to be written
        Throws:
        TypeMismatch - if entry is simple or contains a tag already exists and its corresponding data is not of the same type as value.
      • insert

        void insert​(boolean value)
             throws TypeMismatch
        Inserts a boolean as default value into the DipData object. If the default value already exists, it will be overwritten.
        Parameters:
        value - - the value to be written
        Throws:
        TypeMismatch - if entry is complex or contains a default value which is not of the same type as value.
      • insert

        void insert​(java.lang.String tag,
                    boolean value)
             throws TypeMismatch
        Inserts a named boolean entry into the DipData object. If the entry already exists, it will be overwritten.
        Parameters:
        tag - - name of the 'field' the value belongs to.
        value - - the value to be written
        Throws:
        TypeMismatch - if entry is simple or contains a tag already exists and its corresponding data is not of the same type as value.
      • insert

        void insert​(boolean[] value)
             throws TypeMismatch
        Inserts a boolean array as default value into the DipData object. If the default value already exists, it will be overwritten.
        Parameters:
        value - - the value to be written
        Throws:
        TypeMismatch - if entry is complex or contains a default value which is not of the same type as value.
      • insert

        void insert​(java.lang.String tag,
                    boolean[] value)
             throws TypeMismatch
        Inserts a named boolean array entry into the DipData object. If the entry already exists, it will be overwritten.
        Parameters:
        tag - - name of the 'field' the value belongs to.
        value - - the value to be written
        Throws:
        TypeMismatch - if entry is simple or contains a tag already exists and its corresponding data is not of the same type as value.
      • insert

        void insert​(java.lang.String value)
             throws TypeMismatch
        Inserts a String as default value into the DipData object. If the default value already exists, it will be overwritten.
        Parameters:
        value - - the value to be written
        Throws:
        TypeMismatch - if entry is complex or contains a default value which is not of the same type as value.
      • insert

        void insert​(java.lang.String tag,
                    java.lang.String value)
             throws TypeMismatch
        Inserts a named String entry into the DipData object. If the entry already exists, it will be overwritten.
        Parameters:
        tag - - name of the 'field' the value belongs to.
        value - - the value to be written
        Throws:
        TypeMismatch - if entry is simple or contains a tag already exists and its corresponding data is not of the same type as value.
      • insert

        void insert​(java.lang.String[] value)
             throws TypeMismatch
        Inserts a String array as default value into the DipData object. If the default value already exists, it will be overwritten.
        Parameters:
        value - - the value to be written
        Throws:
        TypeMismatch - if entry is complex or contains a default value which is not of the same type as value.
      • insert

        void insert​(java.lang.String tag,
                    java.lang.String[] value)
             throws TypeMismatch
        Inserts a named String array entry into the DipData object. If the entry already exists, it will be overwritten.
        Parameters:
        tag - - name of the 'field' the value belongs to.
        value - - the value to be written
        Throws:
        TypeMismatch - if entry is simple or contains a tag already exists and its corresponding data is not of the same type as value.
      • extractFloat

        float extractFloat()
                    throws TypeMismatch
        Extracts the default value from the DipData object as a float.
        Throws:
        TypeMismatch
      • extractFloat

        float extractFloat​(java.lang.String tag)
                    throws BadParameter,
                           TypeMismatch
        Returns the float stored in the specified data entry.
        Throws:
        BadParameter - if this DipData does not contain the specified entry
        TypeMismatch - if the entry contains something other than a float, or nothing.
      • extractFloatArray

        float[] extractFloatArray​(java.lang.String tag)
                           throws BadParameter,
                                  TypeMismatch
        Returns the float array stored in the specified data entry.
        Throws:
        BadParameter - if this DipData does not contain the specified entry
        TypeMismatch - if the entry contains something other than a float array, or nothing.
      • extractFloatArray

        float[] extractFloatArray()
                           throws TypeMismatch
        Returns the double stored in the default data entry.
        Throws:
        TypeMismatch - if 1) the object is holding complex data or 2) the value held is not of the required type.
      • extractDouble

        double extractDouble()
                      throws TypeMismatch
        Returns the float array stored in the default data entry.
        Throws:
        TypeMismatch - if 1) the object is holding complex data or 2) the value held is not of the required type.
      • extractDouble

        double extractDouble​(java.lang.String tag)
                      throws BadParameter,
                             TypeMismatch
        Returns the float array stored in the default data entry.
        Throws:
        BadParameter - if this DipData does not contain the specified entry
        TypeMismatch - if the entry contains something other than a double array, or nothing.
      • extractDoubleArray

        double[] extractDoubleArray()
                             throws TypeMismatch
        Returns the double array stored in the default data entry.
        Throws:
        TypeMismatch - if 1) the object is holding complex data or 2) the value held is not of the required type.
      • extractDoubleArray

        double[] extractDoubleArray​(java.lang.String tag)
                             throws BadParameter,
                                    TypeMismatch
        Returns the double array stored in the specified data entry.
        Throws:
        BadParameter - if this DipData does not contain the specified entry
        TypeMismatch - if the entry contains something other than a double array, or nothing.
      • extractShort

        short extractShort()
                    throws TypeMismatch
        Returns the short stored in the default data entry.
        Throws:
        TypeMismatch - if 1) the object is holding complex data or 2) the value held is not of the required type.
      • extractShort

        short extractShort​(java.lang.String tag)
                    throws BadParameter,
                           TypeMismatch
        Returns the short stored in the specified data entry.
        Throws:
        BadParameter - if this DipData does not contain the specified entry
        TypeMismatch - if the entry contains something other than a short, or nothing.
      • extractShortArray

        short[] extractShortArray()
                           throws TypeMismatch
        Returns the short array stored in the default data entry.
        Throws:
        TypeMismatch - if 1) the object is holding complex data or 2) the value held is not of the required type.
      • extractShortArray

        short[] extractShortArray​(java.lang.String tag)
                           throws BadParameter,
                                  TypeMismatch
        Returns the short array stored in the specified data entry.
        Throws:
        BadParameter - if this DipData does not contain the specified entry
        TypeMismatch - if the entry contains something other than a short array, or nothing.
      • extractInt

        int extractInt()
                throws TypeMismatch
        Returns the int stored in the default data entry.
        Throws:
        TypeMismatch - if 1) the object is holding complex data or 2) the value held is not of the required type.
      • extractInt

        int extractInt​(java.lang.String tag)
                throws BadParameter,
                       TypeMismatch
        Returns the int stored in the specified data entry.
        Throws:
        BadParameter - if this DipData does not contain the specified entry
        TypeMismatch - if the entry contains something other than a int, or nothing.
      • extractIntArray

        int[] extractIntArray()
                       throws TypeMismatch
        Returns the int array stored in the default data entry.
        Throws:
        TypeMismatch - if 1) the object is holding complex data or 2) the value held is not of the required type.
      • extractIntArray

        int[] extractIntArray​(java.lang.String tag)
                       throws BadParameter,
                              TypeMismatch
        Returns the int array stored in the specified data entry.
        Throws:
        BadParameter - if this DipData does not contain the specified entry
        TypeMismatch - if the entry contains something other than a int array, or nothing.
      • extractLong

        long extractLong()
                  throws TypeMismatch
        Returns the long stored in the default data entry.
        Throws:
        TypeMismatch - if 1) the object is holding complex data or 2) the value held is not of the required type.
      • extractLong

        long extractLong​(java.lang.String tag)
                  throws BadParameter,
                         TypeMismatch
        Returns the long stored in the specified data entry.
        Throws:
        BadParameter - if this DipData does not contain the specified entry
        TypeMismatch - if the entry contains something other than a long, or nothing.
      • extractLongArray

        long[] extractLongArray()
                         throws TypeMismatch
        Returns the long array stored in the default data entry.
        Throws:
        TypeMismatch - if 1) the object is holding complex data or 2) the value held is not of the required type.
      • extractLongArray

        long[] extractLongArray​(java.lang.String tag)
                         throws BadParameter,
                                TypeMismatch
        Returns the long array stored in the specified data entry.
        Throws:
        BadParameter - if this DipData does not contain the specified entry
        TypeMismatch - if the entry contains something other than a long array, or nothing.
      • extractByte

        byte extractByte()
                  throws TypeMismatch
        Returns the byte stored in the default data entry.
        Throws:
        TypeMismatch - if 1) the object is holding complex data or 2) the value held is not of the required type.
      • extractByte

        byte extractByte​(java.lang.String tag)
                  throws BadParameter,
                         TypeMismatch
        Returns the byte stored in the specified data entry.
        Throws:
        BadParameter - if this DipData does not contain the specified entry
        TypeMismatch - if the entry contains something other than a byte, or nothing.
      • extractByteArray

        byte[] extractByteArray()
                         throws TypeMismatch
        Returns the byte array stored in the default data entry.
        Throws:
        TypeMismatch - if 1) the object is holding complex data or 2) the value held is not of the required type.
      • extractByteArray

        byte[] extractByteArray​(java.lang.String tag)
                         throws BadParameter,
                                TypeMismatch
        Returns the byte array stored in the specified data entry.
        Throws:
        BadParameter - if this DipData does not contain the specified entry
        TypeMismatch - if the entry contains something other than a byte array, or nothing.
      • extractBoolean

        boolean extractBoolean()
                        throws TypeMismatch
        Returns the boolean stored in the default data entry.
        Throws:
        TypeMismatch - if 1) the object is holding complex data or 2) the value held is not of the required type.
      • extractBoolean

        boolean extractBoolean​(java.lang.String tag)
                        throws BadParameter,
                               TypeMismatch
        Returns the boolean stored in the specified data entry.
        Throws:
        BadParameter - if this DipData does not contain the specified entry
        TypeMismatch - if the entry contains something other than a boolean, or nothing.
      • extractBooleanArray

        boolean[] extractBooleanArray()
                               throws TypeMismatch
        Returns the boolean array stored in the default data entry.
        Throws:
        TypeMismatch - if 1) the object is holding complex data or 2) the value held is not of the required type.
      • extractBooleanArray

        boolean[] extractBooleanArray​(java.lang.String tag)
                               throws BadParameter,
                                      TypeMismatch
        Returns the boolean array stored in the specified data entry.
        Throws:
        BadParameter - if this DipData does not contain the specified entry
        TypeMismatch - if the entry contains something other than a boolean array, or nothing.
      • extractString

        java.lang.String extractString()
                                throws TypeMismatch
        Returns the String stored in the default data entry.
        Throws:
        TypeMismatch - if 1) the object is holding complex data or 2) the value held is not of the required type.
      • extractString

        java.lang.String extractString​(java.lang.String tag)
                                throws BadParameter,
                                       TypeMismatch
        Returns the String stored in the specified data entry.
        Throws:
        BadParameter - if this DipData does not contain the specified entry
        TypeMismatch - if the entry contains something other than a String, or nothing.
      • extractStringArray

        java.lang.String[] extractStringArray()
                                       throws TypeMismatch
        Returns the String array stored in the default data entry.
        Throws:
        TypeMismatch - if 1) the object is holding complex data or 2) the value held is not of the required type.
      • extractStringArray

        java.lang.String[] extractStringArray​(java.lang.String tag)
                                       throws BadParameter,
                                              TypeMismatch
        Returns the String array stored in the specified data entry.
        Throws:
        BadParameter - if this DipData does not contain the specified entry
        TypeMismatch - if the entry contains something other than a String array, or nothing.
      • extractDipTime

        DipTimestamp extractDipTime()
        Returns the DipTimestamp of this DipData object. This should represent the time at which the value(s) contained in this object were obtained.
      • extractQualityString

        java.lang.String extractQualityString()
        Extracts the string that describes the reason for the quality.
      • getValueType

        int getValueType​(java.lang.String tag)
        Returns type code for the value contained in the specified entry. The return value can be one of the TYPE_X constants defined in this interface. Will return TYPE_NULL if the tag name passed does not exist.
        Parameters:
        tag - - the name of the field this method is to find the type of.
        See Also:
        getValueType()
      • getValueAsMap

        java.util.Map<java.lang.String,​java.lang.Object> getValueAsMap()
                                                                      throws java.lang.Exception
        Returns the contents of the DipData as a field name / value map.
        Returns:
        A map associating the field name to its value.
        Throws:
        java.lang.Exception
      • isPrimitive

        boolean isPrimitive()
        Indicates whether the DipData package only carries a single value (as opposed to one or more fields, a.k.a. key/value pairs)
        Returns:
        true if the DipData package carries a single value with a default field name.
      • getPrimitiveValueAsObject

        java.util.Optional<java.lang.Object> getPrimitiveValueAsObject()
        Returns the primitive DipData value as a Java Object.
        Returns:
        the primitive value or an empty Optional if the data payload is not a carrying a single value.