public static class ISamples.SignalDescriptor extends Object implements Cloneable
Modifier and Type | Field and Description |
---|---|
static String |
BINARY_CONTENT_IMAGE
Deprecated.
|
static String |
CONTENT_DEFAULT
Deprecated.
|
static ISamples.SignalDescriptor |
DEFAULT |
static String |
EVENT_CONTENT_GANTT
Deprecated.
|
static ISamples.SignalDescriptor |
EventGannt
Deprecated.
|
static ISamples.SignalDescriptor |
EventGantt |
static ISamples.SignalDescriptor |
Float32 |
static ISamples.SignalDescriptor |
Float64 |
static String |
STRUCT_CONTENT_CHART
Deprecated.
|
static String |
STRUCT_CONTENT_GANTT
Deprecated.
|
static String |
STRUCT_CONTENT_LOG
Deprecated.
|
static String |
STRUCT_CONTENT_TRANSACTION
Deprecated.
|
static ISamples.SignalDescriptor |
StructGannt
Deprecated.
|
static ISamples.SignalDescriptor |
StructGantt |
static ISamples.SignalDescriptor |
StructLog |
static ISamples.SignalDescriptor |
StructTransaction |
Constructor and Description |
---|
SignalDescriptor()
Default Constructor.
|
SignalDescriptor(String content,
int format)
Constructor.
|
SignalDescriptor(String content,
int scale0,
int accuracy,
int format)
Constructor.
|
SignalDescriptor(String content,
int scale0,
int scale1,
int flags,
int accuracy,
int format)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
checkUser(ISamples.SignalType signalType,
String signalDescriptor)
Checks a signal descriptor from string representation given by user.
|
ISamples.SignalDescriptor |
clone()
Creates and returns a copy of this object.
|
static boolean |
equals(ISamples.SignalDescriptor descr,
Signal signal)
Returns true if signals signal descriptor equals to descr.
|
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
boolean |
equals(Signal signal)
Returns true if signals signal descriptor equals to this.
|
static ISamples.SignalDescriptor |
fromStruct(MemberDescriptor member)
Return the corresponding signal descriptor of a struct member.
|
int |
getAccuracy()
Returns the accuracy descriptor.
|
String |
getContent()
Returns the content description.
|
int |
getFlags()
Returns the scale descriptor of 3rd dim.
|
int |
getFormat()
Returns the default format.
|
int |
getScale()
Returns the scale descriptor of 1st dim.
|
boolean |
isGantt() |
boolean |
isImage()
Returns true if it signal contains images (for bin signal only)
|
boolean |
isLog()
Returns true if it signal contains logs (for struct signal only)
|
boolean |
isTransaction()
Returns true if it signal contains transactions (for struct signal only)
|
static ISamples.SignalDescriptor |
LogicWidth(int scale) |
static ISamples.SignalDescriptor |
parse(String signalDescriptor)
Parses a signal descriptor from string representation.
|
static ISamples.SignalDescriptor |
parseUser(ISamples.SignalType signalType,
String signalDescriptor)
Parses a signal descriptor from string representation given by user.
|
void |
setAccuracy(int accuracy)
Sets the accuracy descriptor.
|
void |
setContent(String content)
Sets the content descriptor.
|
void |
setFlags(int flags)
Sets the scale descriptor of 3rd dim.
|
void |
setFormat(int format)
Sets the default format.
|
void |
setScale(int scale)
Sets the scale descriptor of 1st dim.
|
String |
toString()
Returns a string representation of the object.
|
static String |
toString(ISamples.SignalDescriptor descr)
Returns string representation of descriptor descr;
|
String |
toUserString(ISamples.SignalType signalType)
Creates string representation presented to user.
|
static ISamples.SignalDescriptor |
valueOf(Signal signal)
Extracts the signal descriptor from a signal.
|
@Deprecated public static final String CONTENT_DEFAULT
@Deprecated public static final String EVENT_CONTENT_GANTT
@Deprecated public static final String STRUCT_CONTENT_TRANSACTION
@Deprecated public static final String STRUCT_CONTENT_LOG
@Deprecated public static final String STRUCT_CONTENT_GANTT
@Deprecated public static final String STRUCT_CONTENT_CHART
@Deprecated public static final String BINARY_CONTENT_IMAGE
public static final ISamples.SignalDescriptor DEFAULT
@Deprecated public static final ISamples.SignalDescriptor EventGannt
public static final ISamples.SignalDescriptor EventGantt
public static final ISamples.SignalDescriptor Float32
public static final ISamples.SignalDescriptor Float64
public static final ISamples.SignalDescriptor StructTransaction
public static final ISamples.SignalDescriptor StructLog
@Deprecated public static final ISamples.SignalDescriptor StructGannt
public static final ISamples.SignalDescriptor StructGantt
public SignalDescriptor()
public SignalDescriptor(String content, int format)
content
- String describing the content (meaning/definition) of a signals (e.g. image (binary), transaction (struct),..).format
- Defines the value rendering format (ISample.FORMAT_...).public SignalDescriptor(String content, int scale0, int accuracy, int format)
content
- String describing the content (meaning/definition) of a signals (e.g. image (binary), transaction (struct),..).scale0
- May define a type specific scale value (e.g. no of logic bits, dimension of float array).accuracy
- May define a type specific accuracy definition.format
- Defines the value rendering format (ISample.FORMAT_...).public SignalDescriptor(String content, int scale0, int scale1, int flags, int accuracy, int format)
content
- String describing the content (meaning/definition) of a signals (e.g. image (binary), transaction (struct),..).scale0
- May define a type specific scale value (e.g. no of logic bits, dimension of float array).scale1
- scale2
- accuracy
- May define a type specific accuracy definition.format
- Defines the value rendering format (ISample.FORMAT_...).public static final ISamples.SignalDescriptor LogicWidth(int scale)
public static ISamples.SignalDescriptor valueOf(Signal signal)
signal
- Signal to extract descriptor.public static ISamples.SignalDescriptor fromStruct(MemberDescriptor member)
member
- A member descriptor object.public static ISamples.SignalDescriptor parse(String signalDescriptor)
signalDescriptor
- String representation of a descriptor.public String toString()
Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
public static ISamples.SignalDescriptor parseUser(ISamples.SignalType signalType, String signalDescriptor)
signalType
- A signal type.signalDescriptor
- A signal descriptor.public ISamples.SignalDescriptor clone() throws CloneNotSupportedException
Object
x
, the expression:
will be true, and that the expression:x.clone() != x
will bex.clone().getClass() == x.getClass()
true
, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x)
true
, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
super.clone
. If a class and all of its superclasses (except
Object
) obey this convention, it will be the case that
x.clone().getClass() == x.getClass()
.
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by super.clone
before returning it. Typically, this means
copying any mutable objects that comprise the internal "deep structure"
of the object being cloned and replacing the references to these
objects with references to the copies. If a class contains only
primitive fields or references to immutable objects, then it is usually
the case that no fields in the object returned by super.clone
need to be modified.
The method clone
for class Object
performs a
specific cloning operation. First, if the class of this object does
not implement the interface Cloneable
, then a
CloneNotSupportedException
is thrown. Note that all arrays
are considered to implement the interface Cloneable
and that
the return type of the clone
method of an array type T[]
is T[]
where T is any reference or primitive type.
Otherwise, this method creates a new instance of the class of this
object and initializes all its fields with exactly the contents of
the corresponding fields of this object, as if by assignment; the
contents of the fields are not themselves cloned. Thus, this method
performs a "shallow copy" of this object, not a "deep copy" operation.
The class Object
does not itself implement the interface
Cloneable
, so calling the clone
method on an object
whose class is Object
will result in throwing an
exception at run time.
CloneNotSupportedException
- if the object's class does not
support the Cloneable
interface. Subclasses
that override the clone
method can also
throw this exception to indicate that an instance cannot
be cloned.Cloneable
public static boolean checkUser(ISamples.SignalType signalType, String signalDescriptor)
signalType
- A signal type.signalDescriptor
- A signal descriptor.public String toUserString(ISamples.SignalType signalType)
signalType
- A signal type.public boolean equals(Signal signal)
signal
- Signal to compare.public static boolean equals(ISamples.SignalDescriptor descr, Signal signal)
descr
- Descriptor to compare.signal
- Signal to compare.public boolean equals(Object obj)
Object
The equals
method implements an equivalence relation
on non-null object references:
x
, x.equals(x)
should return
true
.
x
and y
, x.equals(y)
should return true
if and only if
y.equals(x)
returns true
.
x
, y
, and z
, if
x.equals(y)
returns true
and
y.equals(z)
returns true
, then
x.equals(z)
should return true
.
x
and y
, multiple invocations of
x.equals(y)
consistently return true
or consistently return false
, provided no
information used in equals
comparisons on the
objects is modified.
x
,
x.equals(null)
should return false
.
The equals
method for class Object
implements
the most discriminating possible equivalence relation on objects;
that is, for any non-null reference values x
and
y
, this method returns true
if and only
if x
and y
refer to the same object
(x == y
has the value true
).
Note that it is generally necessary to override the hashCode
method whenever this method is overridden, so as to maintain the
general contract for the hashCode
method, which states
that equal objects must have equal hash codes.
equals
in class Object
obj
- the reference object with which to compare.true
if this object is the same as the obj
argument; false
otherwise.Object.hashCode()
,
HashMap
public static String toString(ISamples.SignalDescriptor descr)
descr
- A signal descriptor.public String getContent()
public void setContent(String content)
content
- String describing the content (meaning/definition) of a signals (e.g. image (binary), transaction (struct),..).public int getScale()
public void setScale(int scale)
scale
- Defines a type specific scale value (e.g. no of logic bits, dimension of float array).public int getFlags()
public void setFlags(int flags)
scale
- Defines a type specific scale value (e.g. no of logic bits, dimension of float array).public int getAccuracy()
public void setAccuracy(int accuracy)
accuracy
- May define a type specific accuracy definition.public int getFormat()
public void setFormat(int format)
format
- Defines the value rendering format (ISample.FORMAT_...).public boolean isLog()
public boolean isTransaction()
public boolean isGantt()
public boolean isImage()