Package org.km3net.clb.remote.pv
Class VarInfo
- java.lang.Object
-
- org.km3net.clb.remote.pv.VarInfo
-
-
Field Summary
Fields Modifier and Type Field Description int
arraySize
array size of this variable, 1 if its not an arraystatic int
ARRSIZE_MASK
static int
ARRSIZE_SHIFT
static int
BASETYP_MASK
static int
BASETYP_SHIFT
java.lang.String
desc
description of this variableint
id
id for this variablejava.lang.String
name
name for this variablestatic int
READABLE
VarType
scalarType
base type of this variablestatic int
SCLSIZE_MASK
static int
SCLSIZE_SHIFT
static int
SCLTYP_BOOL
static int
SCLTYP_F32
static int
SCLTYP_F64
static int
SCLTYP_I16
static int
SCLTYP_I32
static int
SCLTYP_I64
static int
SCLTYP_I8
static int
SCLTYP_MASK
static int
SCLTYP_SHIFT
static int
SCLTYP_U16
static int
SCLTYP_U32
static int
SCLTYP_U64
static int
SCLTYP_U8
static int
SUBSYS_MASK
static int
SUBSYS_SHIFT
static int
VARIDX_MASK
static int
VARIDX_SHIFT
static int
VIRTUAL
static int
WRITABLE
-
Constructor Summary
Constructors Constructor Description VarInfo(int id, java.lang.String name, java.lang.String desc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(VarInfo o)
boolean
equals(java.lang.Object obj)
java.lang.String
format(java.lang.Object data, boolean asHex)
int
hashCode()
int
index()
Returns the index of the variable within the subsystem.boolean
isArray()
Returns whether or not this variable is an array.boolean
isReadable()
boolean
isVirtual()
boolean
isWritable()
java.lang.Class<?>
javaType()
Var
read(MessageReader mr)
int
subsys()
Returns the subsystem ID.java.lang.String
typeString()
Returns the type as readable string.int
varSize()
Returns the total size of the variable.void
write(MessageWriter mw, java.lang.Object value)
-
-
-
Field Detail
-
SUBSYS_MASK
public static final int SUBSYS_MASK
- See Also:
- Constant Field Values
-
SUBSYS_SHIFT
public static final int SUBSYS_SHIFT
- See Also:
- Constant Field Values
-
VARIDX_MASK
public static final int VARIDX_MASK
- See Also:
- Constant Field Values
-
VARIDX_SHIFT
public static final int VARIDX_SHIFT
- See Also:
- Constant Field Values
-
BASETYP_MASK
public static final int BASETYP_MASK
- See Also:
- Constant Field Values
-
BASETYP_SHIFT
public static final int BASETYP_SHIFT
- See Also:
- Constant Field Values
-
SCLSIZE_MASK
public static final int SCLSIZE_MASK
- See Also:
- Constant Field Values
-
SCLSIZE_SHIFT
public static final int SCLSIZE_SHIFT
- See Also:
- Constant Field Values
-
SCLTYP_MASK
public static final int SCLTYP_MASK
- See Also:
- Constant Field Values
-
SCLTYP_SHIFT
public static final int SCLTYP_SHIFT
- See Also:
- Constant Field Values
-
SCLTYP_U8
public static final int SCLTYP_U8
- See Also:
- Constant Field Values
-
SCLTYP_U16
public static final int SCLTYP_U16
- See Also:
- Constant Field Values
-
SCLTYP_U32
public static final int SCLTYP_U32
- See Also:
- Constant Field Values
-
SCLTYP_U64
public static final int SCLTYP_U64
- See Also:
- Constant Field Values
-
SCLTYP_I8
public static final int SCLTYP_I8
- See Also:
- Constant Field Values
-
SCLTYP_I16
public static final int SCLTYP_I16
- See Also:
- Constant Field Values
-
SCLTYP_I32
public static final int SCLTYP_I32
- See Also:
- Constant Field Values
-
SCLTYP_I64
public static final int SCLTYP_I64
- See Also:
- Constant Field Values
-
SCLTYP_BOOL
public static final int SCLTYP_BOOL
- See Also:
- Constant Field Values
-
SCLTYP_F32
public static final int SCLTYP_F32
- See Also:
- Constant Field Values
-
SCLTYP_F64
public static final int SCLTYP_F64
- See Also:
- Constant Field Values
-
VIRTUAL
public static final int VIRTUAL
-
READABLE
public static final int READABLE
-
WRITABLE
public static final int WRITABLE
-
ARRSIZE_MASK
public static final int ARRSIZE_MASK
- See Also:
- Constant Field Values
-
ARRSIZE_SHIFT
public static final int ARRSIZE_SHIFT
- See Also:
- Constant Field Values
-
id
public final int id
id for this variable
-
name
public final java.lang.String name
name for this variable
-
desc
public final java.lang.String desc
description of this variable
-
scalarType
public final VarType scalarType
base type of this variable
-
arraySize
public final int arraySize
array size of this variable, 1 if its not an array
-
-
Method Detail
-
isArray
public boolean isArray()
Returns whether or not this variable is an array.- Returns:
- True, yes, False, no.
-
typeString
public java.lang.String typeString()
Returns the type as readable string.
-
varSize
public int varSize()
Returns the total size of the variable. So if its an array its the size of the scalar times the size of the array.- Returns:
- Size of the complete variable in bytes
-
subsys
public int subsys()
Returns the subsystem ID.
-
index
public int index()
Returns the index of the variable within the subsystem.
-
isReadable
public boolean isReadable()
-
isWritable
public boolean isWritable()
-
isVirtual
public boolean isVirtual()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
read
public Var read(MessageReader mr)
-
compareTo
public int compareTo(VarInfo o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<VarInfo>
-
write
public void write(MessageWriter mw, java.lang.Object value)
- Parameters:
mw
-value
-
-
javaType
public java.lang.Class<?> javaType()
- Returns:
-
format
public java.lang.String format(java.lang.Object data, boolean asHex)
-
-