Class Rf433tx

java.lang.Object
jpigpio.packet.Rf433tx

public class Rf433tx
extends java.lang.Object
Class implementing 433 MHz transmitter (e.g. FS1000A) using pigpiod daemon. Specific protocol (high/low signal duration, datagram/message length etc. can be cofigured by passing different Protocol object to the constructor of this class.

Work is based on Robert Tidey LightwaveRF code https://github.com/roberttidey/LightwaveRF Example usage: see Test_Rf433Tx
  • Constructor Summary

    Constructors 
    Constructor Description
    Rf433tx​(JPigpio pi, int txGpio, Protocol protocol)  
  • Method Summary

    Modifier and Type Method Description
    java.util.ArrayList<Pulse> constructMessagePulses​(byte[] data)
    Construct array of pulses from datagram data
    int put​(byte[] data)
    Converts provided data to waveforms using properties of Protocol and transmits waveforms repeatedly (if required by Protocol).
    boolean ready()
    Returns TRUE if available for another transmission.
    void terminate()
    Terminates transmission of all waveforms.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • constructMessagePulses

      public java.util.ArrayList<Pulse> constructMessagePulses​(byte[] data)
      Construct array of pulses from datagram data
      Parameters:
      data - Data (4bit nibbles) to be transmitted
      Returns:
      ArrayList of Pulses
    • put

      public int put​(byte[] data) throws PigpioException
      Converts provided data to waveforms using properties of Protocol and transmits waveforms repeatedly (if required by Protocol).
      Parameters:
      data - data to be transmitted
      Returns:
      0 - everything is OK -1 - data
      Throws:
      PigpioException - on pigpiod error
    • ready

      public boolean ready() throws PigpioException
      Returns TRUE if available for another transmission.
      Returns:
      TRUE/FALSE
      Throws:
      PigpioException - on pigpiod error
    • terminate

      public void terminate() throws PigpioException
      Terminates transmission of all waveforms.
      Throws:
      PigpioException - on pigpiod error