Class Config.RadioConfig

java.lang.Object
com.inertia.promove.Config.RadioConfig
All Implemented Interfaces:
Config.AbstractConfig, Config.LegacyConfig
Enclosing class:
Config

public static class Config.RadioConfig
extends java.lang.Object
implements Config.LegacyConfig
super-class for each sampling configuration
  • Field Summary

    Fields 
    Modifier and Type Field Description
    int channel  
    boolean forNode  
    boolean highGain  
    boolean listenAllSlots  
    int nSlots  
    Config.RadioChip radioChip  
    Config.RadioConfigVersion radioConfigVersion  
    boolean radioEnabled  
    int slotFrequency  
    int transmissionRate  
    int transmitPower  
  • Constructor Summary

    Constructors 
    Constructor Description
    RadioConfig()  
  • Method Summary

    Modifier and Type Method Description
    int getBytes​(byte[] out)
    encode current configuration in a byte array
    Config.Mask getMask()
    get mask
    int parse​(byte[] in)
    pare input byte array to relevant configuration and return length of encoded config
    void set​(boolean _forNode, boolean _highGain, int _transmitPower, int _channel, int _slotFrequency, int _nSlots, boolean _radioEnabled, int _transmissionRate)
    set all parameters of fastMAC protocol
    java.lang.String toString()
    create a string representation of the configuration

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • set

      public void set​(boolean _forNode, boolean _highGain, int _transmitPower, int _channel, int _slotFrequency, int _nSlots, boolean _radioEnabled, int _transmissionRate)
      set all parameters of fastMAC protocol
      Parameters:
      _forNode - true for sending to node, false for sending to gateway
      _highGain - true for enabling high gain
      _transmitPower - 0-255 for V0, -18dBm to +12dBm for V1
      _channel - 11-26
      _slotFrequency - frequency of fastMAC protocol
      _nSlots - number of slots in fastMAC protocol
      _radioEnabled - true for enabling the radio (only radio V1)
      _transmissionRate - radio transmission rate (only radio V1)
    • parse

      public int parse​(byte[] in) throws InertiaException
      Description copied from interface: Config.AbstractConfig
      pare input byte array to relevant configuration and return length of encoded config
      Specified by:
      parse in interface Config.AbstractConfig
      Parameters:
      in - input byte array
      Returns:
      length of encoded config
      Throws:
      InertiaException - upon error such as when length is insufficient
    • getBytes

      public int getBytes​(byte[] out)
      Description copied from interface: Config.AbstractConfig
      encode current configuration in a byte array
      Specified by:
      getBytes in interface Config.AbstractConfig
      Parameters:
      out - byte array for encoded configuration
      Returns:
      length of encoded configuration
    • toString

      public java.lang.String toString()
      Description copied from interface: Config.AbstractConfig
      create a string representation of the configuration
      Specified by:
      toString in interface Config.AbstractConfig
      Overrides:
      toString in class java.lang.Object
      Returns:
      string representation of configuration
    • getMask

      public Config.Mask getMask()
      Description copied from interface: Config.AbstractConfig
      get mask
      Specified by:
      getMask in interface Config.AbstractConfig
      Returns:
      mask for this config