Class ObisCode


  • public class ObisCode
    extends java.lang.Object
    Represents the address of a remote object according to IEC 62056-6-1. An instance of ObisCode is immutable.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  ObisCode.Medium  
    • Constructor Summary

      Constructors 
      Constructor Description
      ObisCode​(byte[] bytes)  
      ObisCode​(int byteA, int byteB, int byteC, int byteD, int byteE, int byteF)
      Constructor
      ObisCode​(java.lang.String address)
      The reference-id can be written as OBIS number (e.g. 1-b:8.29.0*2) or as a series of six decimal numbers separated by periods (1.1.1.8.0.255).
    • Constructor Detail

      • ObisCode

        public ObisCode​(int byteA,
                        int byteB,
                        int byteC,
                        int byteD,
                        int byteE,
                        int byteF)
        Constructor
        Parameters:
        byteA - First byte of the address
        byteB - Second byte of the address
        byteC - Third byte of the address
        byteD - Fourth byte of the address
        byteE - Fifth byte of the address
        byteF - Sixth byte of the address
        Throws:
        java.lang.IllegalArgumentException - If one of the bytes is out of range [0, 255]
      • ObisCode

        public ObisCode​(java.lang.String address)
        The reference-id can be written as OBIS number (e.g. 1-b:8.29.0*2) or as a series of six decimal numbers separated by periods (1.1.1.8.0.255).
        Parameters:
        address - Reference-ID
      • ObisCode

        public ObisCode​(byte[] bytes)
    • Method Detail

      • channel

        public int channel()
      • asShortObisCodeString

        public java.lang.String asShortObisCodeString()
      • asHexCodeString

        public java.lang.String asHexCodeString()
      • bytes

        public byte[] bytes()
      • asDecimalString

        public java.lang.String asDecimalString()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object