Class PollingRate
- java.lang.Object
-
- com.inductiveautomation.ignition.common.PollingRate
-
- All Implemented Interfaces:
java.io.Serializable
public class PollingRate extends java.lang.Object implements java.io.Serializable
Represents a polling rate, either off, relative, or absolute, with a time value in milliseconds- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
POLLING_ABSOLUTE_RATE
static int
POLLING_OFF
static int
POLLING_RELATIVE_RATE
-
Constructor Summary
Constructors Constructor Description PollingRate()
PollingRate(int mode, int rate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PollingRate
fromCSVString(java.lang.String s)
Parses a CSV-style rate string.int
getMode()
int
getRate()
void
setMode(int mode)
void
setRate(int rate)
java.lang.String
toCSVString()
Returns the polling rate in the format:mode + ":" + rate
where both mode and rate are integers.
-
-
-
Field Detail
-
POLLING_RELATIVE_RATE
public static final int POLLING_RELATIVE_RATE
- See Also:
- Constant Field Values
-
POLLING_ABSOLUTE_RATE
public static final int POLLING_ABSOLUTE_RATE
- See Also:
- Constant Field Values
-
POLLING_OFF
public static final int POLLING_OFF
- See Also:
- Constant Field Values
-
-
Method Detail
-
getMode
public int getMode()
-
setMode
public void setMode(int mode)
-
getRate
public int getRate()
-
setRate
public void setRate(int rate)
-
toCSVString
public java.lang.String toCSVString()
Returns the polling rate in the format:mode + ":" + rate
where both mode and rate are integers.
-
fromCSVString
public static PollingRate fromCSVString(java.lang.String s)
Parses a CSV-style rate string. SeetoCSVString()
. Swallows errors, printing them out to syserr, returning a default polling rate object.
-
-