org.npsnet.xrti.proxies
Class HLAvariantRecordDataTypeProxy

java.lang.Object
  extended byorg.npsnet.xrti.utilities.ObjectInstanceProxy
      extended byorg.npsnet.xrti.proxies.HLAobjectRootProxy
          extended byorg.npsnet.xrti.proxies.HLAreflectionProxy
              extended byorg.npsnet.xrti.proxies.HLAdataTypeProxy
                  extended byorg.npsnet.xrti.proxies.HLAvariantRecordDataTypeProxy
All Implemented Interfaces:
HLAdataType, HLAobjectRoot, HLAreflection, HLAvariantRecordDataType

public class HLAvariantRecordDataTypeProxy
extends HLAdataTypeProxy
implements HLAvariantRecordDataType

Represents an HLA variant record data type.

Author:
org.npsnet.xrti.utilities.ProxyCompiler

Field Summary
private  HLAalternative[] alternatives
          The alternatives of the variant record type.
private  AttributeHandle alternativesHandle
          The handle of the alternatives attribute.
private  boolean alternativesIsDirty
          Whether or not the alternatives attribute has changed.
private  boolean alternativesIsValid
          Whether or not the alternatives attribute has been set.
private  java.lang.String dataType
          The data type of the variant record type.
private  AttributeHandle dataTypeHandle
          The handle of the dataType attribute.
private  boolean dataTypeIsDirty
          Whether or not the dataType attribute has changed.
private  boolean dataTypeIsValid
          Whether or not the dataType attribute has been set.
private  java.lang.String discriminant
          The discriminant of the variant record type.
private  AttributeHandle discriminantHandle
          The handle of the discriminant attribute.
private  boolean discriminantIsDirty
          Whether or not the discriminant attribute has changed.
private  boolean discriminantIsValid
          Whether or not the discriminant attribute has been set.
private  java.lang.String encoding
          The encoding of the variant record type.
private  AttributeHandle encodingHandle
          The handle of the encoding attribute.
private  boolean encodingIsDirty
          Whether or not the encoding attribute has changed.
private  boolean encodingIsValid
          Whether or not the encoding attribute has been set.
private  java.util.Vector HLAvariantRecordDataTypeListeners
          Listeners for attributes associated with the HLAvariantRecordDataType class.
private  java.lang.String semantics
          The semantics of the variant record type.
private  AttributeHandle semanticsHandle
          The handle of the semantics attribute.
private  boolean semanticsIsDirty
          Whether or not the semantics attribute has changed.
private  boolean semanticsIsValid
          Whether or not the semantics attribute has been set.
 
Fields inherited from class org.npsnet.xrti.proxies.HLAdataTypeProxy
 
Fields inherited from class org.npsnet.xrti.proxies.HLAreflectionProxy
 
Fields inherited from class org.npsnet.xrti.proxies.HLAobjectRootProxy
 
Fields inherited from class org.npsnet.xrti.utilities.ObjectInstanceProxy
autoFlushDisabled, classHandle, deleted, instanceHandle, rtiAmbassador
 
Constructor Summary
protected HLAvariantRecordDataTypeProxy(RTIambassador pRTIAmbassador, ObjectClassHandle pClassHandle)
          Constructor for object instance proxies created to represent new locally owned objects.
protected HLAvariantRecordDataTypeProxy(RTIambassador pRTIAmbassador, ObjectClassHandle pClassHandle, java.lang.String pName)
          Constructor for object instance proxies created to represent new locally owned objects.
protected HLAvariantRecordDataTypeProxy(RTIambassador pRTIAmbassador, ObjectInstanceHandle pInstanceHandle, ObjectClassHandle pClassHandle, java.lang.String pName)
          Constructor for object instance proxies created in response to discovered objects.
 
Method Summary
 void addHLAvariantRecordDataTypeListener(HLAvariantRecordDataTypeListener l)
          Adds a listener for attributes associated with the HLAvariantRecordDataType class.
 HLAalternative[] getAlternatives()
          Returns the value of the alternatives attribute.
protected  void getAttributeValuesToFlush(AttributeHandleValueMap ahvm, boolean superFlush)
          Places the attribute values to flush into the specified map.
 java.lang.String getDataType()
          Returns the value of the dataType attribute.
 java.lang.String getDiscriminant()
          Returns the value of the discriminant attribute.
 java.lang.String getEncoding()
          Returns the value of the encoding attribute.
 java.lang.String getSemantics()
          Returns the value of the semantics attribute.
private  void initializeAttributes()
          Initializes the attributes and their handles.
 void provideAttributeValueUpdate(AttributeHandleSet theAttributes, byte[] userSuppliedTag)
          Notifies the proxy that it should provide an update regarding a set of object attributes.
 void reflectAttributeValues(AttributeHandleValueMap theAttributes, byte[] userSuppliedTag, OrderType sentOrdering, TransportationType theTransport)
          Notifies the proxy of changes to the state of an object instance.
 void removeHLAvariantRecordDataTypeListener(HLAvariantRecordDataTypeListener l)
          Removes a listener for attributes associated with the HLAvariantRecordDataType class.
 void setAlternatives(HLAalternative[] pAlternatives, byte[] userSuppliedTag)
          Sets the value of the alternatives attribute.
 void setDataType(java.lang.String pDataType, byte[] userSuppliedTag)
          Sets the value of the dataType attribute.
 void setDiscriminant(java.lang.String pDiscriminant, byte[] userSuppliedTag)
          Sets the value of the discriminant attribute.
 void setEncoding(java.lang.String pEncoding, byte[] userSuppliedTag)
          Sets the value of the encoding attribute.
 void setSemantics(java.lang.String pSemantics, byte[] userSuppliedTag)
          Sets the value of the semantics attribute.
 
Methods inherited from class org.npsnet.xrti.proxies.HLAdataTypeProxy
addHLAdataTypeListener, removeHLAdataTypeListener
 
Methods inherited from class org.npsnet.xrti.proxies.HLAreflectionProxy
addHLAreflectionListener, getName, removeHLAreflectionListener, setName
 
Methods inherited from class org.npsnet.xrti.proxies.HLAobjectRootProxy
addHLAobjectRootListener, removeHLAobjectRootListener
 
Methods inherited from class org.npsnet.xrti.utilities.ObjectInstanceProxy
delete, equals, flushAttributeValues, flushAttributeValues, getAutoFlushDisabled, getClassHandle, getInstanceHandle, hashCode, isDeleted, reflectAttributeValues, reflectAttributeValues, reflectAttributeValues, reflectAttributeValues, reflectAttributeValues, setAutoFlushDisabled, setDeleted, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.npsnet.xrti.proxies.HLAdataType
addHLAdataTypeListener, removeHLAdataTypeListener
 
Methods inherited from interface org.npsnet.xrti.proxies.HLAreflection
addHLAreflectionListener, getName, removeHLAreflectionListener, setName
 
Methods inherited from interface org.npsnet.xrti.proxies.HLAobjectRoot
addHLAobjectRootListener, removeHLAobjectRootListener
 

Field Detail

HLAvariantRecordDataTypeListeners

private java.util.Vector HLAvariantRecordDataTypeListeners
Listeners for attributes associated with the HLAvariantRecordDataType class.


discriminantHandle

private AttributeHandle discriminantHandle
The handle of the discriminant attribute.


discriminantIsValid

private boolean discriminantIsValid
Whether or not the discriminant attribute has been set.


discriminantIsDirty

private boolean discriminantIsDirty
Whether or not the discriminant attribute has changed.


discriminant

private java.lang.String discriminant
The discriminant of the variant record type.


dataTypeHandle

private AttributeHandle dataTypeHandle
The handle of the dataType attribute.


dataTypeIsValid

private boolean dataTypeIsValid
Whether or not the dataType attribute has been set.


dataTypeIsDirty

private boolean dataTypeIsDirty
Whether or not the dataType attribute has changed.


dataType

private java.lang.String dataType
The data type of the variant record type.


alternativesHandle

private AttributeHandle alternativesHandle
The handle of the alternatives attribute.


alternativesIsValid

private boolean alternativesIsValid
Whether or not the alternatives attribute has been set.


alternativesIsDirty

private boolean alternativesIsDirty
Whether or not the alternatives attribute has changed.


alternatives

private HLAalternative[] alternatives
The alternatives of the variant record type.


encodingHandle

private AttributeHandle encodingHandle
The handle of the encoding attribute.


encodingIsValid

private boolean encodingIsValid
Whether or not the encoding attribute has been set.


encodingIsDirty

private boolean encodingIsDirty
Whether or not the encoding attribute has changed.


encoding

private java.lang.String encoding
The encoding of the variant record type.


semanticsHandle

private AttributeHandle semanticsHandle
The handle of the semantics attribute.


semanticsIsValid

private boolean semanticsIsValid
Whether or not the semantics attribute has been set.


semanticsIsDirty

private boolean semanticsIsDirty
Whether or not the semantics attribute has changed.


semantics

private java.lang.String semantics
The semantics of the variant record type.

Constructor Detail

HLAvariantRecordDataTypeProxy

protected HLAvariantRecordDataTypeProxy(RTIambassador pRTIAmbassador,
                                        ObjectInstanceHandle pInstanceHandle,
                                        ObjectClassHandle pClassHandle,
                                        java.lang.String pName)
                                 throws RTIinternalError
Constructor for object instance proxies created in response to discovered objects.

Parameters:
pRTIAmbassador - the run-time infrastructure ambassador
pInstanceHandle - the object instance handle
pClassHandle - the object class handle
pName - the object name
Throws:
RTIinternalError - if an internal error occurred in the run-time infrastructure

HLAvariantRecordDataTypeProxy

protected HLAvariantRecordDataTypeProxy(RTIambassador pRTIAmbassador,
                                        ObjectClassHandle pClassHandle)
                                 throws ObjectClassNotDefined,
                                        ObjectClassNotPublished,
                                        FederateNotExecutionMember,
                                        SaveInProgress,
                                        RestoreInProgress,
                                        RTIinternalError
Constructor for object instance proxies created to represent new locally owned objects. Automatically notifies the run-time infrastructure.

Parameters:
pRTIAmbassador - the run-time infrastructure ambassador
pClassHandle - the object class handle
Throws:
ObjectClassNotDefined - if the specified object class is not defined
ObjectClassNotPublished - if the specified object class is not published
FederateNotExecutionMember - if the federate is not a member of an execution
SaveInProgress - if a save operation is in progress
RestoreInProgress - if a restore operation is in progress
RTIinternalError - if an internal error occurred in the run-time infrastructure

HLAvariantRecordDataTypeProxy

protected HLAvariantRecordDataTypeProxy(RTIambassador pRTIAmbassador,
                                        ObjectClassHandle pClassHandle,
                                        java.lang.String pName)
                                 throws ObjectClassNotDefined,
                                        ObjectClassNotPublished,
                                        IllegalName,
                                        ObjectInstanceNameInUse,
                                        FederateNotExecutionMember,
                                        SaveInProgress,
                                        RestoreInProgress,
                                        RTIinternalError
Constructor for object instance proxies created to represent new locally owned objects. Automatically notifies the run-time infrastructure.

Parameters:
pRTIAmbassador - the run-time infrastructure ambassador
pClassHandle - the object class handle
pName - the object name
Throws:
ObjectClassNotDefined - if the specified object class is not defined
ObjectClassNotPublished - if the specified object class is not published
IllegalName - if the instance name has is illegal
ObjectInstanceNameInUse - if the instance name is already in use
FederateNotExecutionMember - if the federate is not a member of an execution
SaveInProgress - if a save operation is in progress
RestoreInProgress - if a restore operation is in progress
RTIinternalError - if an internal error occurred in the run-time infrastructure
Method Detail

initializeAttributes

private void initializeAttributes()
                           throws InvalidObjectClassHandle,
                                  NameNotFound,
                                  ObjectClassNotDefined,
                                  AttributeNotDefined,
                                  FederateNotExecutionMember,
                                  SaveInProgress,
                                  RestoreInProgress,
                                  RTIinternalError
Initializes the attributes and their handles.

Throws:
InvalidObjectClassHandle - if an object class handle is invalid
NameNotFound - if a name is not found
ObjectClassNotDefined - if an object class is not defined
AttributeNotDefined - if an attribute is not defined
FederateNotExecutionMember - if the federate is not an execution member
SaveInProgress - if a save operation is in progress
RestoreInProgress - if a restore operation is in progress
RTIinternalError - if an internal error occurred in the run-time infrastructure

reflectAttributeValues

public void reflectAttributeValues(AttributeHandleValueMap theAttributes,
                                   byte[] userSuppliedTag,
                                   OrderType sentOrdering,
                                   TransportationType theTransport)
                            throws AttributeNotRecognized,
                                   AttributeNotSubscribed,
                                   FederateInternalError
Notifies the proxy of changes to the state of an object instance.

Overrides:
reflectAttributeValues in class HLAdataTypeProxy
Parameters:
theAttributes - the map between attribute handles and the new values of the identified attributes
userSuppliedTag - a user-supplied tag associated with the state change
sentOrdering - the type of ordering with which the update was sent
theTransport - the type of transport associated with the update
Throws:
AttributeNotRecognized - if the attribute was not recognized
AttributeNotSubscribed - if the federate had not subscribed to the attribute
FederateInternalError - if an error occurs in the federate

provideAttributeValueUpdate

public void provideAttributeValueUpdate(AttributeHandleSet theAttributes,
                                        byte[] userSuppliedTag)
                                 throws AttributeNotRecognized,
                                        AttributeNotOwned,
                                        FederateInternalError
Notifies the proxy that it should provide an update regarding a set of object attributes.

Overrides:
provideAttributeValueUpdate in class HLAdataTypeProxy
Parameters:
theAttributes - the set of attribute handles identifying the attributes that should be sent
userSuppliedTag - the user-supplied tag associated with the request
Throws:
AttributeNotRecognized - if an identified attribute was not recognized
AttributeNotOwned - if the federate did not own a specified attribute
FederateInternalError - if an error occurs in the federate

getAttributeValuesToFlush

protected void getAttributeValuesToFlush(AttributeHandleValueMap ahvm,
                                         boolean superFlush)
                                  throws RTIinternalError
Places the attribute values to flush into the specified map.

Overrides:
getAttributeValuesToFlush in class HLAdataTypeProxy
Parameters:
ahvm - the attribute handle value map to populate
superFlush - if true provide updates for all attributes; if false, only provide updates for the modified ones
Throws:
RTIinternalError - if an internal error occurs in the run-time infrastructure

addHLAvariantRecordDataTypeListener

public void addHLAvariantRecordDataTypeListener(HLAvariantRecordDataTypeListener l)
Adds a listener for attributes associated with the HLAvariantRecordDataType class.

Specified by:
addHLAvariantRecordDataTypeListener in interface HLAvariantRecordDataType
Parameters:
l - the listener to remove

removeHLAvariantRecordDataTypeListener

public void removeHLAvariantRecordDataTypeListener(HLAvariantRecordDataTypeListener l)
Removes a listener for attributes associated with the HLAvariantRecordDataType class.

Specified by:
removeHLAvariantRecordDataTypeListener in interface HLAvariantRecordDataType
Parameters:
l - the listener to remove

setDiscriminant

public void setDiscriminant(java.lang.String pDiscriminant,
                            byte[] userSuppliedTag)
                     throws ObjectInstanceNotKnown,
                            AttributeNotDefined,
                            AttributeNotOwned,
                            FederateNotExecutionMember,
                            SaveInProgress,
                            RestoreInProgress,
                            RTIinternalError
Sets the value of the discriminant attribute.

Specified by:
setDiscriminant in interface HLAvariantRecordDataType
Parameters:
pDiscriminant - the new attribute value
userSuppliedTag - a user-supplied tag to associate with the action
Throws:
ObjectInstanceNotKnown - if the object instance is unknown
AttributeNotDefined - if one of the attributes is undefined
AttributeNotOwned - if one of the attributes is not owned
FederateNotExecutionMember - if the federate is not a member of an execution
SaveInProgress - if a save operation is in progress
RestoreInProgress - if a restore operation is in progress
RTIinternalError - if an internal error occurred in the run-time infrastructure

getDiscriminant

public java.lang.String getDiscriminant()
Returns the value of the discriminant attribute.

Specified by:
getDiscriminant in interface HLAvariantRecordDataType
Returns:
the current attribute value

setDataType

public void setDataType(java.lang.String pDataType,
                        byte[] userSuppliedTag)
                 throws ObjectInstanceNotKnown,
                        AttributeNotDefined,
                        AttributeNotOwned,
                        FederateNotExecutionMember,
                        SaveInProgress,
                        RestoreInProgress,
                        RTIinternalError
Sets the value of the dataType attribute.

Specified by:
setDataType in interface HLAvariantRecordDataType
Parameters:
pDataType - the new attribute value
userSuppliedTag - a user-supplied tag to associate with the action
Throws:
ObjectInstanceNotKnown - if the object instance is unknown
AttributeNotDefined - if one of the attributes is undefined
AttributeNotOwned - if one of the attributes is not owned
FederateNotExecutionMember - if the federate is not a member of an execution
SaveInProgress - if a save operation is in progress
RestoreInProgress - if a restore operation is in progress
RTIinternalError - if an internal error occurred in the run-time infrastructure

getDataType

public java.lang.String getDataType()
Returns the value of the dataType attribute.

Specified by:
getDataType in interface HLAvariantRecordDataType
Returns:
the current attribute value

setAlternatives

public void setAlternatives(HLAalternative[] pAlternatives,
                            byte[] userSuppliedTag)
                     throws ObjectInstanceNotKnown,
                            AttributeNotDefined,
                            AttributeNotOwned,
                            FederateNotExecutionMember,
                            SaveInProgress,
                            RestoreInProgress,
                            RTIinternalError
Sets the value of the alternatives attribute.

Specified by:
setAlternatives in interface HLAvariantRecordDataType
Parameters:
pAlternatives - the new attribute value
userSuppliedTag - a user-supplied tag to associate with the action
Throws:
ObjectInstanceNotKnown - if the object instance is unknown
AttributeNotDefined - if one of the attributes is undefined
AttributeNotOwned - if one of the attributes is not owned
FederateNotExecutionMember - if the federate is not a member of an execution
SaveInProgress - if a save operation is in progress
RestoreInProgress - if a restore operation is in progress
RTIinternalError - if an internal error occurred in the run-time infrastructure

getAlternatives

public HLAalternative[] getAlternatives()
Returns the value of the alternatives attribute.

Specified by:
getAlternatives in interface HLAvariantRecordDataType
Returns:
the current attribute value

setEncoding

public void setEncoding(java.lang.String pEncoding,
                        byte[] userSuppliedTag)
                 throws ObjectInstanceNotKnown,
                        AttributeNotDefined,
                        AttributeNotOwned,
                        FederateNotExecutionMember,
                        SaveInProgress,
                        RestoreInProgress,
                        RTIinternalError
Sets the value of the encoding attribute.

Specified by:
setEncoding in interface HLAvariantRecordDataType
Parameters:
pEncoding - the new attribute value
userSuppliedTag - a user-supplied tag to associate with the action
Throws:
ObjectInstanceNotKnown - if the object instance is unknown
AttributeNotDefined - if one of the attributes is undefined
AttributeNotOwned - if one of the attributes is not owned
FederateNotExecutionMember - if the federate is not a member of an execution
SaveInProgress - if a save operation is in progress
RestoreInProgress - if a restore operation is in progress
RTIinternalError - if an internal error occurred in the run-time infrastructure

getEncoding

public java.lang.String getEncoding()
Returns the value of the encoding attribute.

Specified by:
getEncoding in interface HLAvariantRecordDataType
Returns:
the current attribute value

setSemantics

public void setSemantics(java.lang.String pSemantics,
                         byte[] userSuppliedTag)
                  throws ObjectInstanceNotKnown,
                         AttributeNotDefined,
                         AttributeNotOwned,
                         FederateNotExecutionMember,
                         SaveInProgress,
                         RestoreInProgress,
                         RTIinternalError
Sets the value of the semantics attribute.

Specified by:
setSemantics in interface HLAvariantRecordDataType
Parameters:
pSemantics - the new attribute value
userSuppliedTag - a user-supplied tag to associate with the action
Throws:
ObjectInstanceNotKnown - if the object instance is unknown
AttributeNotDefined - if one of the attributes is undefined
AttributeNotOwned - if one of the attributes is not owned
FederateNotExecutionMember - if the federate is not a member of an execution
SaveInProgress - if a save operation is in progress
RestoreInProgress - if a restore operation is in progress
RTIinternalError - if an internal error occurred in the run-time infrastructure

getSemantics

public java.lang.String getSemantics()
Returns the value of the semantics attribute.

Specified by:
getSemantics in interface HLAvariantRecordDataType
Returns:
the current attribute value