|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.npsnet.xrti.tests.HelloWorldEx
A simple test of the XRTI's extension mechanism.
| Field Summary | |
private static byte[] |
emptyTag
An empty user-supplied tag. |
private static java.lang.String |
HELLO_WORLD_OBJECT_MODEL_EX
The extended Hello World object model, stored as a resource. |
private HelloWorldExProxyAmbassador |
helloWorldExProxyAmbassador
The extended Hello World proxy ambassador. |
private EconomicCountryProxy |
ownCountry
The proxy for our own country. |
private ProxyAmbassador |
proxyAmbassador
The root proxy ambassador. |
private RTIambassadorEx |
rtiAmbassador
The RTI ambassador. |
| Constructor Summary | |
HelloWorldEx(java.util.Properties configuration,
java.lang.String name,
double initialPopulation,
double initialGDP,
int numberOfTicks)
Constructor. |
|
| Method Summary | |
static void |
main(java.lang.String[] args)
Program entry point. |
void |
receiveCommunication(java.lang.String message,
byte[] userSuppliedTag,
OrderType sentOrdering,
TransportationType theTransport)
A generic message. |
void |
receivePrioritizedCommunication(java.lang.String message,
double priority,
byte[] userSuppliedTag,
OrderType sentOrdering,
TransportationType theTransport)
A prioritized message. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final java.lang.String HELLO_WORLD_OBJECT_MODEL_EX
private static final byte[] emptyTag
private RTIambassadorEx rtiAmbassador
private ProxyAmbassador proxyAmbassador
private HelloWorldExProxyAmbassador helloWorldExProxyAmbassador
private EconomicCountryProxy ownCountry
| Constructor Detail |
public HelloWorldEx(java.util.Properties configuration,
java.lang.String name,
double initialPopulation,
double initialGDP,
int numberOfTicks)
configuration - the list of configuration propertiesname - the name of the country to simulateinitialPopulation - the country's initial populationinitialGDP - the country's initial GDPnumberOfTicks - the number of ticks to execute| Method Detail |
public static void main(java.lang.String[] args)
args - the command line arguments
public void receiveCommunication(java.lang.String message,
byte[] userSuppliedTag,
OrderType sentOrdering,
TransportationType theTransport)
throws InteractionClassNotRecognized,
InteractionParameterNotRecognized,
InteractionClassNotSubscribed,
FederateInternalError
receiveCommunication in interface HelloWorldExInteractionListenermessage - The contents of the message.userSuppliedTag - a user-supplied tag associated with the interactionsentOrdering - the type of ordering with which the interaction was senttheTransport - the type of transport associated with the interaction
InteractionClassNotRecognized - if the interaction class was not recognized
InteractionParameterNotRecognized - if a parameter of the interaction was not
recognized
InteractionClassNotSubscribed - if the federate had not subscribed to the
interaction class
FederateInternalError - if an error occurs in the federate
public void receivePrioritizedCommunication(java.lang.String message,
double priority,
byte[] userSuppliedTag,
OrderType sentOrdering,
TransportationType theTransport)
throws InteractionClassNotRecognized,
InteractionParameterNotRecognized,
InteractionClassNotSubscribed,
FederateInternalError
receivePrioritizedCommunication in interface HelloWorldExInteractionListenermessage - The contents of the message.priority - The priority level of the message.userSuppliedTag - a user-supplied tag associated with the interactionsentOrdering - the type of ordering with which the interaction was senttheTransport - the type of transport associated with the interaction
InteractionClassNotRecognized - if the interaction class was not recognized
InteractionParameterNotRecognized - if a parameter of the interaction was not
recognized
InteractionClassNotSubscribed - if the federate had not subscribed to the
interaction class
FederateInternalError - if an error occurs in the federate
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||