public class CommUtil
extends java.lang.Object
| Constructor and Description |
|---|
CommUtil() |
| Modifier and Type | Method and Description |
|---|---|
static int |
computeCrc16(byte[] data,
int startPos,
int curCrc) |
static int |
computeCrc16(byte[] data,
int startPos,
long length,
int curCrc) |
static java.util.Vector<gnu.io.CommPortIdentifier> |
enumerateComPorts() |
static CommMean |
getActiveCommMean(VehicleType vehicle) |
static CommMean |
getActiveCommMeanForProtocol(VehicleType vehicle,
java.lang.String protocol) |
static java.util.LinkedList<CommMean> |
getActiveCommMeanList(VehicleType vehicle) |
static boolean |
isProtocolSupported(java.lang.String vehicleID,
java.lang.String protocol)
Verifies if a specific protocol is supported by a vehicle
|
static void |
main(java.lang.String[] args) |
static int[] |
parsePortRangeFromString(java.lang.String rangeString,
int[] defaultValue)
To parse a list of ports from a range or list. e.g. "52000,52001" or "52000-52003"
|
static boolean |
testCommMeanForActivity(CommMean cm) |
static boolean |
testCommMeanForProtocol(CommMean cm,
java.lang.String protocol) |
public static CommMean getActiveCommMeanForProtocol(VehicleType vehicle, java.lang.String protocol)
vehicle - protocol - public static CommMean getActiveCommMean(VehicleType vehicle)
vehicle - public static boolean isProtocolSupported(java.lang.String vehicleID,
java.lang.String protocol)
vehicleID - The vehicle's identifierprotocol - The protocol to search forpublic static java.util.LinkedList<CommMean> getActiveCommMeanList(VehicleType vehicle)
vehicle - public static boolean testCommMeanForActivity(CommMean cm)
cm - public static boolean testCommMeanForProtocol(CommMean cm, java.lang.String protocol)
cm - protocol - public static int computeCrc16(byte[] data,
int startPos,
long length,
int curCrc)
public static int computeCrc16(byte[] data,
int startPos,
int curCrc)
public static java.util.Vector<gnu.io.CommPortIdentifier> enumerateComPorts()
public static int[] parsePortRangeFromString(java.lang.String rangeString,
int[] defaultValue)
rangeString - public static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.ExceptionCopyright © 2004-2014 FEUP-LSTS and Neptus developers. All Rights Reserved.