Class PBTypeSystem

  • All Implemented Interfaces:
    TypeSystem

    public class PBTypeSystem
    extends Object
    implements TypeSystem
    TypeSystem for SLAC PB types.
    Author:
    mshankar
    • Constructor Detail

      • PBTypeSystem

        public PBTypeSystem()
    • Method Detail

      • getJCADBRConstructor

        public Constructor<? extends DBRTimeEvent> getJCADBRConstructor​(ArchDBRTypes archDBRType)
        Description copied from interface: TypeSystem
        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
        Specified by:
        getJCADBRConstructor in interface TypeSystem
        Parameters:
        archDBRType - the enumeration type
        Returns:
        a new DBRTimeEvent
        See Also:
        ArchDBRTypes
      • getUnmarshallingFromByteArrayConstructor

        public Constructor<? extends DBRTimeEvent> getUnmarshallingFromByteArrayConstructor​(ArchDBRTypes archDBRType)
        Description copied from interface: TypeSystem
        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)
        Specified by:
        getUnmarshallingFromByteArrayConstructor in interface TypeSystem
        Parameters:
        archDBRType - the enumeration type
        Returns:
        a new DBRTimeEvent
        See Also:
        ArchDBRTypes
      • getSerializingConstructor

        public Constructor<? extends DBRTimeEvent> getSerializingConstructor​(ArchDBRTypes archDBRType)
        Description copied from interface: TypeSystem
        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()
        Specified by:
        getSerializingConstructor in interface TypeSystem
        Parameters:
        archDBRType - the enumeration type
        Returns:
        a new DBRTimeEvent
        See Also:
        HashMapEvent, ArchDBRTypes
      • getV4Constructor

        public Constructor<? extends DBRTimeEvent> getV4Constructor​(ArchDBRTypes archDBRType)
        Description copied from interface: TypeSystem
        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
        Specified by:
        getV4Constructor in interface TypeSystem
        Parameters:
        archDBRType - the enumeration type
        Returns:
        a new DBRTimeEvent
        See Also:
        ArchDBRTypes