Interface TypeSystem

  • All Known Implementing Classes:
    PBTypeSystem

    public interface TypeSystem
    Interface for translating from JCA to Event (actually DBRTimeEvents). For SLAC, these are the various PB types in the edu.slac packages... This is mostly configurable at the configservice.
    Author:
    mshankar
    • Method Detail

      • getJCADBRConstructor

        Constructor<? extends DBRTimeEvent> getJCADBRConstructor​(ArchDBRTypes archDBRType)
        Use this to create a new Event (actually DBRTimeEvent) from a JCA DBR class. For example, getJCADBRConstructor().newInstance(dbr) should return you an appropriate Event
        Parameters:
        archDBRType - the enumeration type
        Returns:
        a new DBRTimeEvent
        See Also:
        ArchDBRTypes
      • getUnmarshallingFromByteArrayConstructor

        Constructor<? extends DBRTimeEvent> getUnmarshallingFromByteArrayConstructor​(ArchDBRTypes archDBRType)
        Use this when reading serialized data from EventStreams; for example, FileEventStreams The constructor takes a short for the year that the data is applicable to and a byte array and gives you a DBRTimeEvent. For example, getUnmarshallingConstructor().newInstance(yts.getYear(), rawFormAsByteArray)
        Parameters:
        archDBRType - the enumeration type
        Returns:
        a new DBRTimeEvent
        See Also:
        ArchDBRTypes
      • getSerializingConstructor

        Constructor<? extends DBRTimeEvent> getSerializingConstructor​(ArchDBRTypes archDBRType)
        Use this to convert a DBRTimeEvent that does not support a rawform into one that supports raw form Used for integration with external datasources where we contruct a nonJCA class that implements DBRTimeEvent and then want to send it across the wire in raw form. For example, HashMapEvent is a name-value pair that implements most of DBRTimeEvent expect the serializing form. So, serializingConstructor.newInstance(new HashMapEvent(dbrType, workingCopyOfEvent)) gives you a DBRTimeEvent that supports byte[] getRawForm()
        Parameters:
        archDBRType - the enumeration type
        Returns:
        a new DBRTimeEvent
        See Also:
        HashMapEvent, ArchDBRTypes
      • getV4Constructor

        Constructor<? extends DBRTimeEvent> getV4Constructor​(ArchDBRTypes archDBRType)
        Use this to create a new Event (actually DBRTimeEvent) from a EPICS v4 class. For example, getV4Constructor().newInstance(Data_EPICSV4 v4Data) should return you an appropriate Event
        Parameters:
        archDBRType - the enumeration type
        Returns:
        a new DBRTimeEvent
        See Also:
        ArchDBRTypes