Class BitSpec

java.lang.Object
org.harctoolbox.irp.IrpObject
org.harctoolbox.irp.BitSpec
All Implemented Interfaces:
Serializable, AggregateLister, XmlExport

public final class BitSpec extends IrpObject implements AggregateLister
This class implements BitSpecs, as described in Chapter 7.
See Also:
  • Constructor Details

  • Method Details

    • numberOfDurations

      public Integer numberOfDurations()
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in class IrpObject
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in class IrpObject
    • size

      public int size()
    • numberOfInfiniteRepeats

      public int numberOfInfiniteRepeats()
      Overrides:
      numberOfInfiniteRepeats in class IrpObject
    • get

      public BareIrStream get(int index)
    • toIrpString

      public String toIrpString(int radix)
      Description copied from class: IrpObject
      Returns a computed IRP (-segment) string representation of current IrpObject. Numerical parameters, but not durations etc, will be printed using the radix in the argument.
      Specified by:
      toIrpString in class IrpObject
      Parameters:
      radix - Radix for parameters.
      Returns:
      Formatted string.
    • getChunkSize

      public int getChunkSize()
    • isEmpty

      public boolean isEmpty()
    • numberOfBitspecDurations

      public Integer numberOfBitspecDurations()
    • isPWM

      public boolean isPWM()
    • isPWM

      public boolean isPWM(int length)
    • isStandardBiPhase

      public boolean isStandardBiPhase(GeneralSpec generalSpec, NameEngine nameEngine)
      Checks if the BitSpec is of type <a,-a|-a,a> (a != 0)
      Parameters:
      nameEngine -
      generalSpec -
      Returns:
    • isTrivial

      public boolean isTrivial(GeneralSpec generalSpec, NameEngine nameEngine, boolean inverted)
      Checks if the BitSpec is of type <a|-a> (a != 0)
      Parameters:
      nameEngine -
      generalSpec -
      inverted - If true then a > 0, i.e., starts with a flash.
      Returns:
    • isTrivial

      public boolean isTrivial(GeneralSpec generalSpec, NameEngine nameEngine)
      Checks if the BitSpec is of type <a|-a> (a != 0)
      Parameters:
      nameEngine -
      generalSpec -
      Returns:
    • toElement

      public Element toElement(Document document)
      Specified by:
      toElement in interface XmlExport
      Overrides:
      toElement in class IrpObject
      Returns:
    • weight

      public int weight()
      Description copied from class: IrpObject
      Returns a (somewhat arbitrary) measure of the complexity of the object. Can be used for determining if a decode is "simpler" than another decode.
      Specified by:
      weight in class IrpObject
      Returns:
      non-negative integer.
    • hasExtent

      public boolean hasExtent()
    • propertiesMap

      public Map<String,Object> propertiesMap(GeneralSpec generalSpec, NameEngine nameEngine)
      Specified by:
      propertiesMap in interface AggregateLister
    • allDurationsInMicros

      public TreeSet<Double> allDurationsInMicros(GeneralSpec generalSpec, NameEngine nameEngine)
    • constant

      public boolean constant(NameEngine nameEngine)
    • createParameterSpecs

      public void createParameterSpecs(ParameterSpecs parameterSpecs) throws InvalidNameException
      Overrides:
      createParameterSpecs in class IrpObject
      Throws:
      InvalidNameException