Class CbusNodeEvent

    • Constructor Detail

      • CbusNodeEvent

        public CbusNodeEvent​(CanSystemConnectionMemo memo,
                             int nn,
                             int en,
                             int thisnode,
                             int index,
                             int maxEvVar)
        Set the value of the event variable array by index
        Parameters:
        memo - CAN System Connection
        nn - Event node Number
        en - Event event or device number
        thisnode - Host node number
        index - number assigned by node, -1 if unknown
        maxEvVar - Maximum event variables for the event
      • CbusNodeEvent

        protected CbusNodeEvent​(int nn,
                                int en,
                                int thisnode,
                                java.lang.String eventString)
    • Method Detail

      • setEvVar

        public void setEvVar​(int index,
                             int value)
        Set the value of the event variable array by index
        Parameters:
        index - event variable index, minimum 1
        value - min 0 max 255
      • setEvArr

        public final void setEvArr​(int[] newArray)
        Set the value of the event variable array by existing array
        Parameters:
        newArray - event variable array, 1st value index 0 should be 1st event value, NOT total
      • getEvVar

        public int getEvVar​(int index)
        Returns the value of an event variable
        Parameters:
        index - of the variable, no array offset needed, 1 is 1
        Returns:
        the decimal event indexed variable value
      • getEvVarString

        public java.lang.String getEvVarString()
        Returns all event variables as a single string

        eg. /"1, 13, 1, 0, 0/"

        Returns:
        the decimal string for of the array, unknown values are blanked
      • getHexEvVarString

        public java.lang.String getHexEvVarString()
        Returns all event variables as a single hex string

        eg. returns 0104D6A0

        Returns:
        the hex string for of the array
      • getOutstandingVars

        public int getOutstandingVars()
        Returns the number of unknown event variables
        Returns:
        the decimal outstanding total
      • getNextOutstanding

        public int getNextOutstanding()
        Returns the index of the next unknown event variable
        Returns:
        the decimal index value else 0 if all known
      • getNumEvVars

        public int getNumEvVars()
        Get the number of event variables by Array Length
        Returns:
        number of event variables
      • equals

        public boolean equals​(java.lang.Object o)

        Custom method to compare Node Number and Event Number.

        Custom method to compare Node Num, Ev Num, Parent Node Num, Event Variables

        Overrides:
        equals in class CbusBasicNodeEvent
      • compareTo

        public int compareTo​(CbusNodeEvent o)
        Compares to the Node / Event numbers of the Event
        Specified by:
        compareTo in interface java.lang.Comparable<CbusNodeEvent>