Package org.yamcs.parameter
Class AggregateValue
- java.lang.Object
-
- org.yamcs.parameter.Value
-
- org.yamcs.parameter.AggregateValue
-
public class AggregateValue extends Value
-
-
Constructor Summary
Constructors Constructor Description AggregateValue(AggregateMemberNames memberNames)Create a new aggregate value with the member names.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetMemberIndex(String name)Get the index of the member with the given name or -1 if there is no such memberStringgetMemberName(int idx)AggregateMemberNamesgetMemberNames()ValuegetMemberValue(int i)ValuegetMemberValue(String name)Returns the value of the member with the given nameorg.yamcs.protobuf.Yamcs.Value.TypegetType()intnumMembers()voidsetMemberValue(int idx, Value value)voidsetMemberValue(String name, Value value)StringtoString()-
Methods inherited from class org.yamcs.parameter.Value
getBinaryValue, getBooleanValue, getDoubleValue, getFloatValue, getSint32Value, getSint64Value, getStringValue, getTimestampValue, getUint32Value, getUint64Value
-
-
-
-
Constructor Detail
-
AggregateValue
public AggregateValue(AggregateMemberNames memberNames)
Create a new aggregate value with the member names. Make sure that the memberNames are interned string (seeString.intern(), for example as returned byAggregateDataType.getMemberNames()- Parameters:
memberNames-
-
-
Method Detail
-
getMemberValue
public Value getMemberValue(String name)
Returns the value of the member with the given name- Parameters:
name- the name of the aggregate member whos value has to be returned- Returns:
- the value of the member with the given name
- Throws:
IllegalArgumentException- if there is no member with that name
-
setMemberValue
public void setMemberValue(int idx, Value value)
-
getMemberIndex
public int getMemberIndex(String name)
Get the index of the member with the given name or -1 if there is no such member- Parameters:
name-- Returns:
-
numMembers
public int numMembers()
-
getMemberName
public String getMemberName(int idx)
-
getMemberValue
public Value getMemberValue(int i)
-
getMemberNames
public AggregateMemberNames getMemberNames()
-
-