org.ka2ddo.yaac.io
Class PortConfig.Cfg

java.lang.Object
  extended by org.ka2ddo.yaac.io.PortConfig.Cfg
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<PortConfig.Cfg>
Enclosing class:
PortConfig

public static class PortConfig.Cfg
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable<PortConfig.Cfg>

Port-type-specific configuration parameters for a PortConnector.

See Also:
Serialized Form

Field Summary
 int acceptableProtocolsMask
          Bit mask or enum number of protocols that can be transmitted through this port.
 int baudRate
          The baud rate used for the port, if needed, or port number for TCP and UDP socket connections.
 java.lang.String callsign
          The amateur radio station callsign associated with this port, if needed.
 java.lang.String deviceName
          The device name or network host name/address associated with this port.
 java.lang.String[] digiAliases
          Array of digipeat alias Strings for which this port will digipeat (if transmitAllowed is true).
 java.lang.String filter
          Any filter expression associated with this port, if needed.
 int flags
          A collection of flag bits indicating other attributes of the port configuration.
 boolean flowControlled
          Indicates whether flow control is enabled on this port.
 java.lang.String passcode
          The authentication passcode associated with this port, if needed.
 int timeslotCycleLength
          Number of seconds in a timeslot cycle, which will be aligned to UTC and the Unix epoch time (if some weird prime number is used).
 int timeslotOffset
          Number of seconds since the start of a cycle when this port is allowed to transmit,
 boolean transmitAllowed
          Indicates whether messages can be transmitted from YAAC via this port.
 
Constructor Summary
PortConfig.Cfg()
           
 
Method Summary
 int compareTo(PortConfig.Cfg o)
          Compares this object with the specified object for order.
 PortConfig.Cfg dup()
          Make a deep copy of this Cfg object.
 boolean equals(java.lang.Object obj)
          Indicates whether some other object is "equal to" this one.
 int hashCode()
          Returns a hash code value for the object.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

deviceName

public java.lang.String deviceName
The device name or network host name/address associated with this port.


baudRate

public int baudRate
The baud rate used for the port, if needed, or port number for TCP and UDP socket connections.


callsign

public java.lang.String callsign
The amateur radio station callsign associated with this port, if needed. Also used for weather station model name.


passcode

public java.lang.String passcode
The authentication passcode associated with this port, if needed.


filter

public java.lang.String filter
Any filter expression associated with this port, if needed.


transmitAllowed

public boolean transmitAllowed
Indicates whether messages can be transmitted from YAAC via this port.


flowControlled

public boolean flowControlled
Indicates whether flow control is enabled on this port.


flags

public int flags
A collection of flag bits indicating other attributes of the port configuration.

See Also:
PortConfig.FLAGS_HF, PortConfig.FLAGS_UDP, PortConfig.FLAGS_LOCAL

digiAliases

public java.lang.String[] digiAliases
Array of digipeat alias Strings for which this port will digipeat (if transmitAllowed is true).

See Also:
transmitAllowed

acceptableProtocolsMask

public int acceptableProtocolsMask
Bit mask or enum number of protocols that can be transmitted through this port. Only meaningful for ports with CAP_XMT_PACKET_DATA set (for protocol bitmask) or CAP_WAYPOINT_SENDER (for enum).

See Also:
Connector.CAP_XMT_PACKET_DATA, Connector.CAP_WAYPOINT_SENDER, PortConfig.PROTOCOL_APRS, PortConfig.PROTOCOL_OPENTRAC, PortConfig.PROTOCOL_AX25, PortConfig.SENTENCE_NONE, PortConfig.SENTENCE_GPWPL, PortConfig.SENTENCE_PKWDWPL

timeslotCycleLength

public int timeslotCycleLength
Number of seconds in a timeslot cycle, which will be aligned to UTC and the Unix epoch time (if some weird prime number is used). Negative values means timeslotting is disabled, but is preserving the last-used cycle length in case it gets re-enabled.


timeslotOffset

public int timeslotOffset
Number of seconds since the start of a cycle when this port is allowed to transmit,

Constructor Detail

PortConfig.Cfg

public PortConfig.Cfg()
Method Detail

dup

public PortConfig.Cfg dup()
Make a deep copy of this Cfg object.

Returns:
duplicate Cfg

compareTo

public int compareTo(PortConfig.Cfg o)
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Specified by:
compareTo in interface java.lang.Comparable<PortConfig.Cfg>
Parameters:
o - the object to be compared.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
Throws:
java.lang.ClassCastException - if the specified object's type prevents it from being compared to this object.

equals

public boolean equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.

hashCode

public int hashCode()
Returns a hash code value for the object.

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code value for this object.
See Also:
equals(Object)

toString

public java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object.