Package org.yamcs.commanding
Record Class ArgumentLocation
java.lang.Object
java.lang.Record
org.yamcs.commanding.ArgumentLocation
- Record Components:
path- the argument name, followed for members and elements by the path inside the value, for examplex,activities,activities[1]oractivities[1].tcbitPosition- position in bits of the start of the encoded value (including any leading size tag)bitSize- number of bits used to encode the value
Location of an argument value inside the binary of an encoded command.
The locations are recorded by the command encoder for each top level argument as well as for each member of an aggregate and each element of an array. They are relative to the start of the binary as produced by the encoder (i.e. before any change made by the command post-processor).
-
Constructor Summary
ConstructorsConstructorDescriptionArgumentLocation(String path, int bitPosition, int bitSize) Creates an instance of aArgumentLocationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thebitPositionrecord component.intbitSize()Returns the value of thebitSizerecord component.intintfinal booleanIndicates whether some other object is "equal to" this one.static ArgumentLocationfinal inthashCode()Returns a hash code value for this object.booleanpath()Returns the value of thepathrecord component.toProto()final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ArgumentLocation
Creates an instance of aArgumentLocationrecord class.- Parameters:
path- the value for thepathrecord componentbitPosition- the value for thebitPositionrecord componentbitSize- the value for thebitSizerecord component
-
-
Method Details
-
isByteAligned
public boolean isByteAligned() -
byteOffset
public int byteOffset()- Returns:
- the byte offset of the value; meaningful only if the value is byte aligned
-
byteLength
public int byteLength()- Returns:
- the size of the value in bytes; meaningful only if the value is byte aligned
-
toProto
-
fromProto
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
bitPosition
public int bitPosition()Returns the value of thebitPositionrecord component.- Returns:
- the value of the
bitPositionrecord component
-
bitSize
public int bitSize()Returns the value of thebitSizerecord component.- Returns:
- the value of the
bitSizerecord component
-