Class OmronProbeContext

  • All Implemented Interfaces:
    DataContext

    public class OmronProbeContext
    extends java.lang.Object
    implements DataContext
    Wrap an OmronProbeReport to serve as the data context for enclosed type definitions. Includes the transformation of probed data types into Structure definitions and the associated DataDefinitionSeg elements.

    Provides fast maps of tags, types, and type members by name, instance number, and for types, CRC handle.

    • Constructor Detail

    • Method Detail

      • getParentDataCtx

        public DataContext getParentDataCtx()
        Description copied from interface: DataContext
        Get the next outer DataContext from the current context.
        Specified by:
        getParentDataCtx in interface DataContext
        Returns:
        The containing DataContext, or null if the current context is the root context.
      • getNamedDef

        public AnonStructSeg getNamedDef​(java.lang.String typeName)
        Description copied from interface: DataContext
        Look up a named type for use expanding a stub definition or to apply to a different context.
        Specified by:
        getNamedDef in interface DataContext
      • getTypeByName

        public StructDef getTypeByName​(java.lang.String typeName)
        Description copied from interface: DataContext
        Look up a named type for use constructing nested elements of a structure.
        Specified by:
        getTypeByName in interface DataContext
        Parameters:
        typeName - The type name to look up in the predefined names.
        Returns:
        The type suitable for use with CipStruct and/or StructMember.
      • getTypeByCRC

        public java.lang.String getTypeByCRC​(int crc)
        Description copied from interface: DataContext
        Look up a named type by CRC for use directly by a StructureDefSeg or indirectly by an AnonTypeSeg.
        Specified by:
        getTypeByCRC in interface DataContext
        Returns:
        The type suitable for use with CipStruct and/or StructMember.
      • getCtxDataImpl

        public BaseDataType<?> getCtxDataImpl​(java.util.List<PathSegment> reference)
        Description copied from interface: DataContext
        Look up reference data within this current context for use in indirection of various kinds, as described for getCtxData(), which uses this implementation and handles delegation to outer contexts.
        Specified by:
        getCtxDataImpl in interface DataContext
        Parameters:
        reference - The path to a data item.
        Returns:
        A data object
      • replaceTypes

        public void replaceTypes​(DataContext substitutes)
        When multiple data types need substitution, it is important that the replacements occur in order by depth of nested referenced types. This helper routine accepts a map associating names with substitute structure definitions, and applies them to the type cache shallowest-first.
        Parameters:
        substitutes - A data context to be checked for same-named types to be injected into this context.