• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java FederateNotExecutionMember类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中hla.rti1516e.exceptions.FederateNotExecutionMember的典型用法代码示例。如果您正苦于以下问题:Java FederateNotExecutionMember类的具体用法?Java FederateNotExecutionMember怎么用?Java FederateNotExecutionMember使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



FederateNotExecutionMember类属于hla.rti1516e.exceptions包,在下文中一共展示了FederateNotExecutionMember类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: publish

import hla.rti1516e.exceptions.FederateNotExecutionMember; //导入依赖的package包/类
public void publish(Object element, String name) throws RTIinternalError, NameNotFound, FederateNotExecutionMember, NotConnected, InvalidObjectClassHandle, InstantiationException, IllegalAccessException, AttributeNotDefined, ObjectClassNotDefined, SaveInProgress, RestoreInProgress, IllegalName, ObjectInstanceNameInUse, ObjectInstanceNameNotReserved, ObjectClassNotPublished, AttributeNotOwned, ObjectInstanceNotKnown, UpdateException {

		ObjectClassModel ocm = published.get(element.getClass().getAnnotation(ObjectClass.class).name());

		if(ocm == null){
			ocm = new ObjectClassModel(element.getClass());
			ocm.publish();
			this.published.put(element.getClass().getAnnotation(ObjectClass.class).name(), ocm);
		}
		
		ObjectClassEntity entity = null;
		if(name != null)
			entity = new ObjectClassEntity(name, element);
		else
			entity = new ObjectClassEntity(element.getClass().getName()+element.hashCode(), element);
		
		ocm.addEntity(entity);
		this.mapInstanceNameObjectClassEntity.put(entity.getInstanceName(), entity);

	}
 
开发者ID:SMASH-Lab,项目名称:SEE-HLA-Starter-Kit,代码行数:21,代码来源:ObjectClassModelManager.java


示例2: initialize

import hla.rti1516e.exceptions.FederateNotExecutionMember; //导入依赖的package包/类
private void initialize() throws NameNotFound, FederateNotExecutionMember, NotConnected, RTIinternalError, InvalidObjectClassHandle, 
InstantiationException, IllegalAccessException  {

	if(status == ObjectModelStatus.UNKNOWN){
		
		// Get a handle to the class.
		this.objectClassHandle = rti_ambassador.getObjectClassHandle(parser.getClassHandleName());
		this.mapFieldNameAttributeHandle = new HashMap<String, AttributeHandle>();

		// Get handles to all the attributes.
		AttributeHandle tmp = null;
		for(String str : parser.getMapFieldCoder().keySet()){
			tmp = rti_ambassador.getAttributeHandle(objectClassHandle, str);
			mapFieldNameAttributeHandle.put(str, tmp);
		}

		this.attribute_values  = rti_ambassador.getAttributeHandleValueMapFactory().create(mapFieldNameAttributeHandle.size());

		status = ObjectModelStatus.INITIALIZED;
	}

}
 
开发者ID:SMASH-Lab,项目名称:SEE-HLA-Starter-Kit,代码行数:23,代码来源:ObjectClassModel.java


示例3: subscribe

import hla.rti1516e.exceptions.FederateNotExecutionMember; //导入依赖的package包/类
public void subscribe() throws AttributeNotDefined, ObjectClassNotDefined, SaveInProgress, RestoreInProgress, FederateNotExecutionMember, NotConnected, RTIinternalError {

		if(status == ObjectModelStatus.INITIALIZED){

			AttributeHandleSet attributeSet = rti_ambassador.getAttributeHandleSetFactory().create();
			for( AttributeHandle val: mapFieldNameAttributeHandle.values())
				attributeSet.add(val);

			rti_ambassador.subscribeObjectClassAttributes(objectClassHandle, attributeSet);
			mapObjectClassHandleAttributeHandleSet.put(objectClassHandle, attributeSet);
			status = ObjectModelStatus.SUBSCRIBED;
			
		}
		else{
			logger.error("You can't subscribe an uninitialized element!");
			throw new IllegalStateException("You can't subscribe an uninitialized element!");
		}

	}
 
开发者ID:SMASH-Lab,项目名称:SEE-HLA-Starter-Kit,代码行数:20,代码来源:ObjectClassModel.java


示例4: publish

import hla.rti1516e.exceptions.FederateNotExecutionMember; //导入依赖的package包/类
public void publish() throws FederateNotExecutionMember, NotConnected, AttributeNotDefined, ObjectClassNotDefined, SaveInProgress, 
RestoreInProgress, RTIinternalError{

	if(status == ObjectModelStatus.INITIALIZED){

		AttributeHandleSet attributeSet = rti_ambassador.getAttributeHandleSetFactory().create();
		
		for(AttributeHandle element: mapFieldNameAttributeHandle.values())
			attributeSet.add(element);
		
		rti_ambassador.publishObjectClassAttributes(objectClassHandle, attributeSet);
		mapObjectClassHandleAttributeHandleSet.put(objectClassHandle, attributeSet);
					
		status = ObjectModelStatus.PUBLISHED;
	}
	else{
		logger.error("You can't publish an uninitialized or an already published ObjectClassModel!");
		throw new IllegalStateException("You can't publish an uninitialized or an already published ObjectClassModel!");
	}

}
 
开发者ID:SMASH-Lab,项目名称:SEE-HLA-Starter-Kit,代码行数:22,代码来源:ObjectClassModel.java


示例5: unpublish

import hla.rti1516e.exceptions.FederateNotExecutionMember; //导入依赖的package包/类
public void unpublish() throws FederateNotExecutionMember, NotConnected, OwnershipAcquisitionPending, AttributeNotDefined, 
ObjectClassNotDefined, SaveInProgress, RestoreInProgress, RTIinternalError {

	if(status == ObjectModelStatus.PUBLISHED){

		AttributeHandleSet attributeSet = rti_ambassador.getAttributeHandleSetFactory().create();
		attributeSet.addAll(mapFieldNameAttributeHandle.values());
		rti_ambassador.unpublishObjectClassAttributes(objectClassHandle, attributeSet);
		mapObjectClassHandleAttributeHandleSet.remove(objectClassHandle);

		status = ObjectModelStatus.UNKNOWN;
	}
	else{
		logger.error("You can't unpublish an uninitialized or an unpublished ObjectClassModel!");
		throw new IllegalStateException("You can't unpublish an uninitialized or an unpublished ObjectClassModel!");
	}

}
 
开发者ID:SMASH-Lab,项目名称:SEE-HLA-Starter-Kit,代码行数:19,代码来源:ObjectClassModel.java


示例6: reserveObjectInstanceName

import hla.rti1516e.exceptions.FederateNotExecutionMember; //导入依赖的package包/类
private ObjectInstanceHandle reserveObjectInstanceName(ObjectClassEntity entity) throws IllegalName, SaveInProgress, RestoreInProgress, 
FederateNotExecutionMember, NotConnected, RTIinternalError, 
ObjectInstanceNameInUse, ObjectInstanceNameNotReserved, 
ObjectClassNotPublished, ObjectClassNotDefined {

	// Reserve the name.
	rti_ambassador.reserveObjectInstanceName(entity.getInstanceName());

	// Need to wait here until name reservation callback is recieved.
	while (entity.getStatus() == NameReservationStatus.UNKNOWN)
		Thread.yield();

	if (entity.getStatus() == NameReservationStatus.FAILED) {
		logger.error("Name Resevation Failed [name= "+entity+" ]");
		throw new IllegalName("Name Resevation Failed [name= "+entity+" ]");
	}

	// If name is reserved then register the instance.
	if (entity.getStatus() == NameReservationStatus.SUCCEDED)
		return  rti_ambassador.registerObjectInstance(objectClassHandle,entity.getInstanceName());

	return null;
}
 
开发者ID:SMASH-Lab,项目名称:SEE-HLA-Starter-Kit,代码行数:24,代码来源:ObjectClassModel.java


示例7: initialize

import hla.rti1516e.exceptions.FederateNotExecutionMember; //导入依赖的package包/类
private void initialize() throws NameNotFound, FederateNotExecutionMember, NotConnected, RTIinternalError, InvalidInteractionClassHandle {

		if(status == ObjectModelStatus.UNKNOWN){

			// Get a handle to the class.
			this.interactionClassHandle = rti_ambassador.getInteractionClassHandle(parser.getClassHandleName());
			this.mapFieldNameParameterHandle = new HashMap<String, ParameterHandle>();

			// Get handles to all the attributes.
			ParameterHandle tmp = null;
			for(String str : parser.getMapFieldCoder().keySet()){
				tmp = rti_ambassador.getParameterHandle(interactionClassHandle, str);
				mapFieldNameParameterHandle.put(str, tmp);
			}

			this.parameter_values = rti_ambassador.getParameterHandleValueMapFactory().create(mapFieldNameParameterHandle.size());
			status = ObjectModelStatus.INITIALIZED;

		}
	}
 
开发者ID:SMASH-Lab,项目名称:SEE-HLA-Starter-Kit,代码行数:21,代码来源:InteractionClassModel.java


示例8: updatePublishedInteraction

import hla.rti1516e.exceptions.FederateNotExecutionMember; //导入依赖的package包/类
public void updatePublishedInteraction() throws InteractionClassNotPublished, InteractionParameterNotDefined, InteractionClassNotDefined, SaveInProgress, RestoreInProgress, FederateNotExecutionMember, NotConnected, RTIinternalError {

		
		if(status == ObjectModelStatus.PUBLISHED) {
			Map<String, byte[]> ris = parser.encode(interactionEntity.getElement());
			for(Entry<String, ParameterHandle> entry : mapFieldNameParameterHandle.entrySet())
				parameter_values.put(entry.getValue(), ris.get(entry.getKey()));

			rti_ambassador.sendInteraction(interactionClassHandle, parameter_values, null);
		}
		else{
			logger.error("Can't update the ' "+interactionEntity+" ', because it is not published!");
			throw new IllegalStateException("Can't update the ' "+interactionEntity+" ', because it is not published!");
		}

	}
 
开发者ID:SMASH-Lab,项目名称:SEE-HLA-Starter-Kit,代码行数:17,代码来源:InteractionClassModel.java


示例9: diconnectFromRTI

import hla.rti1516e.exceptions.FederateNotExecutionMember; //导入依赖的package包/类
@Override
public void diconnectFromRTI() throws InvalidResignAction, OwnershipAcquisitionPending, 
FederateOwnsAttributes, FederateNotExecutionMember, NotConnected, 
RTIinternalError, FederateIsExecutionMember, CallNotAllowedFromWithinCallback, 
SaveInProgress, RestoreInProgress {

	 try {
		this.executionTask.shutdown();
		this.runningThread.join(3000);
	} catch (InterruptedException e) {
		e.printStackTrace();
	}finally{
		this.hlamodule.disconnect();
	}

}
 
开发者ID:SMASH-Lab,项目名称:SEE-HLA-Starter-Kit,代码行数:17,代码来源:SEEAbstractFederate.java


示例10: requestAttributeValueUpdate

import hla.rti1516e.exceptions.FederateNotExecutionMember; //导入依赖的package包/类
@SuppressWarnings({ "unchecked", "rawtypes" })
public void requestAttributeValueUpdate(Class objectClass) throws AttributeNotDefined, ObjectClassNotDefined, SaveInProgress, RestoreInProgress, FederateNotExecutionMember, NotConnected, RTIinternalError, UnsubscribeException {

	if(fedamb.objectClassModelIsAlreadySubscribed(objectClass)){
		
		String classHandleName = ((Class<ObjectClass>)objectClass).getAnnotation(ObjectClass.class).name();
		ObjectClassModel model = fedamb.getObjectManager().getSubscribedMap().get(classHandleName);
		ObjectClassHandle objectClassHandle = model.getObjectClassHandle();
		AttributeHandleSet attributeSet = model.getAttributeHandleSet(objectClassHandle);
		rtiamb.requestAttributeValueUpdate(objectClassHandle, attributeSet, null);
	}
	else{	
		logger.error("Error: "+objectClass+" is not subscribed!");
		throw new UnsubscribeException("Error: "+objectClass+" is not subscribed!");
	}
		

}
 
开发者ID:SMASH-Lab,项目名称:SEE-HLA-Starter-Kit,代码行数:19,代码来源:SEEHLAModule.java


示例11: initialize

import hla.rti1516e.exceptions.FederateNotExecutionMember; //导入依赖的package包/类
public static void initialize(RTIambassador rti_ambassador) throws NameNotFound, FederateNotExecutionMember, NotConnected, 
RTIinternalError, InvalidObjectClassHandle, AttributeNotDefined, 
ObjectClassNotDefined, SaveInProgress, RestoreInProgress {

	if(initialized)
		return;

	createReferenceFrameEncoders();

	// Get a handle to the ReferenceFrame class.
	obj_class_handle = rti_ambassador.getObjectClassHandle("ReferenceFrame");

	// Get handles to all the ReferenceFrame attributes.
	name_handle = rti_ambassador.getAttributeHandle(obj_class_handle, "name");
	parent_frame_handle = rti_ambassador.getAttributeHandle(obj_class_handle, "parent_name");
	state_handle = rti_ambassador.getAttributeHandle(obj_class_handle,  "state");

	// Generate an attribute handle set.
	attributeSet = rti_ambassador.getAttributeHandleSetFactory().create();
	attributeSet.add(name_handle);
	attributeSet.add(parent_frame_handle);
	attributeSet.add(state_handle);

	initialized = true;

}
 
开发者ID:SMASH-Lab,项目名称:SEE-HLA-Starter-Kit,代码行数:27,代码来源:ReferenceFrameObject.java


示例12: subscribe

import hla.rti1516e.exceptions.FederateNotExecutionMember; //导入依赖的package包/类
public void subscribe() throws AttributeNotDefined, ObjectClassNotDefined, SaveInProgress, RestoreInProgress, FederateNotExecutionMember, NotConnected, RTIinternalError {

		if(status == ObjectModelStatus.INITIALIZED){

			AttributeHandleSet attributeSet = rti_ambassador.getAttributeHandleSetFactory().create();
			for(AttributeHandle val : mapFieldNameAttributeHandle.values())
				attributeSet.add(val);

			rti_ambassador.subscribeObjectClassAttributes(objectClassHandle, attributeSet);
			status = ObjectModelStatus.SUBSCRIBED;
			
		}
		else{
			logger.error("You can't subscribe an uninitialized element!");
			throw new IllegalStateException("You can't subscribe an uninitialized element!");
		}

	}
 
开发者ID:SMASH-Lab,项目名称:HLA-Development-Kit,代码行数:19,代码来源:ObjectClassModel.java


示例13: makeTARequest

import hla.rti1516e.exceptions.FederateNotExecutionMember; //导入依赖的package包/类
protected void makeTARequest() throws LogicalTimeAlreadyPassed, InvalidLogicalTime, 
InTimeAdvancingState, RequestForTimeRegulationPending, 
RequestForTimeConstrainedPending, SaveInProgress, RestoreInProgress, 
FederateNotExecutionMember, NotConnected, RTIinternalError, IllegalTimeArithmetic {

	fedamb.setAdvancing(false);

	if(rtiamb != null){
		try {
			rtiamb.timeAdvanceRequest(time.nextTimeStep());
		} catch (InvalidLogicalTimeInterval e) {
			logger.error("Invalid LogicalTimeInterval.");
			e.printStackTrace();
		}
	}
}
 
开发者ID:SMASH-Lab,项目名称:HLA-Development-Kit,代码行数:17,代码来源:DKFHLAModule.java


示例14: publishElement

import hla.rti1516e.exceptions.FederateNotExecutionMember; //导入依赖的package包/类
public void publishElement(Object element, String name) throws NameNotFound, FederateNotExecutionMember, NotConnected, 
RTIinternalError, InvalidObjectClassHandle, PublishException, InstantiationException, 
IllegalAccessException, AttributeNotDefined, ObjectClassNotDefined, SaveInProgress, 
RestoreInProgress, IllegalName, ObjectInstanceNameInUse, ObjectInstanceNameNotReserved, 
ObjectClassNotPublished, AttributeNotOwned, ObjectInstanceNotKnown, UpdateException  {

	if(!fedamb.objectClassEntityIsAlreadyPublished(element)){
		fedamb.publishObjectClassEntity(element, name);
		logger.info("The Object '"+element+"' has been published.");
	}
	else{
		logger.warn("Object: "+element+", is already published");
		throw new PublishException("Object: "+element+", is already published.");
	}

}
 
开发者ID:SMASH-Lab,项目名称:HLA-Development-Kit,代码行数:17,代码来源:DKFHLAModule.java


示例15: subscribe

import hla.rti1516e.exceptions.FederateNotExecutionMember; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public void subscribe(Class objectClass) throws RTIinternalError, InstantiationException, IllegalAccessException, NameNotFound, 
FederateNotExecutionMember, NotConnected, InvalidObjectClassHandle, AttributeNotDefined,
ObjectClassNotDefined, SaveInProgress, RestoreInProgress {


	ObjectClassModel ocm = new ObjectClassModel(objectClass);
	ocm.subscribe();

	this.subscribed.put(((Class<ObjectClass>)objectClass).getAnnotation(ObjectClass.class).name(), ocm);
	this.mapHandleClassObjectClass.put(ocm.getObjectClassHandle(), objectClass);
}
 
开发者ID:SMASH-Lab,项目名称:SEE-HLA-Starter-Kit,代码行数:13,代码来源:ObjectClassModelManager.java


示例16: ObjectClassModel

import hla.rti1516e.exceptions.FederateNotExecutionMember; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public ObjectClassModel(Class objectClass) throws RTIinternalError, NameNotFound, FederateNotExecutionMember, NotConnected, InvalidObjectClassHandle, InstantiationException, IllegalAccessException {
	this.rti_ambassador = SEERTIAmbassador.getInstance();
	this.parser = new ObjectClassModelParser(objectClass);
	
	this.entityMap = new HashMap<Object, ObjectClassEntity>();
	this.mapObjectInstanceHandleObjectClassEntity = new HashMap<ObjectInstanceHandle, ObjectClassEntity>();
	this.mapObjectClassHandleAttributeHandleSet = new HashMap<ObjectClassHandle, AttributeHandleSet>();
	initialize();
}
 
开发者ID:SMASH-Lab,项目名称:SEE-HLA-Starter-Kit,代码行数:11,代码来源:ObjectClassModel.java


示例17: unsubscribe

import hla.rti1516e.exceptions.FederateNotExecutionMember; //导入依赖的package包/类
public void unsubscribe() throws ObjectClassNotDefined, SaveInProgress, RestoreInProgress, FederateNotExecutionMember, NotConnected, RTIinternalError {

		if(status == ObjectModelStatus.SUBSCRIBED){

			rti_ambassador.unsubscribeObjectClass(this.objectClassHandle);
			mapObjectClassHandleAttributeHandleSet.remove(objectClassHandle);
			status = ObjectModelStatus.UNKNOWN;
		}
		else{
			logger.error("You can't unsubscribe "+this.objectClassHandle+" because it is not subscribed");
			throw new IllegalStateException("You can't unsubscribe "+this.objectClassHandle+" because it is not subscribed");
		}

	}
 
开发者ID:SMASH-Lab,项目名称:SEE-HLA-Starter-Kit,代码行数:15,代码来源:ObjectClassModel.java


示例18: updatePublishedObject

import hla.rti1516e.exceptions.FederateNotExecutionMember; //导入依赖的package包/类
public void updatePublishedObject(ObjectClassEntity element) throws UpdateException, IllegalName, SaveInProgress, RestoreInProgress, FederateNotExecutionMember, 
NotConnected, RTIinternalError, ObjectInstanceNameInUse, ObjectInstanceNameNotReserved, ObjectClassNotPublished, 
ObjectClassNotDefined, AttributeNotOwned, AttributeNotDefined, ObjectInstanceNotKnown {

	ObjectClassEntity entity = entityMap.get(element.getElement());

	if(entity == null){
		logger.error("Can't find the ' "+element+" ' !");
		throw new IllegalStateException("Can't find the ' "+element+" ' !");
	}

	if(status == ObjectModelStatus.PUBLISHED) {
		if(entity.getObjectInstanceHandle() == null)
			entity.setObjectInstanceHandle(reserveObjectInstanceName(entity));
		
		Map<String, byte[]> ris = parser.encode(element.getElement());
		for(Entry<String, AttributeHandle> entry : mapFieldNameAttributeHandle.entrySet())
			attribute_values.put(entry.getValue(), ris.get(entry.getKey()));
		
		rti_ambassador.updateAttributeValues(entity.getObjectInstanceHandle(), attribute_values , null);
	}
	else{
		logger.error("Can't update the Object ' "+element+" ', because it is not published!");
		throw new IllegalStateException("Can't update the Object ' "+element+" ', because it is not published!");
	}

}
 
开发者ID:SMASH-Lab,项目名称:SEE-HLA-Starter-Kit,代码行数:28,代码来源:ObjectClassModel.java


示例19: publish

import hla.rti1516e.exceptions.FederateNotExecutionMember; //导入依赖的package包/类
public void publish(Object interaction) throws RTIinternalError, NameNotFound, FederateNotExecutionMember, NotConnected, InvalidInteractionClassHandle, InteractionClassNotDefined, SaveInProgress, RestoreInProgress, InteractionClassNotPublished, InteractionParameterNotDefined {

		InteractionClassModel icm = published.get(interaction.getClass().getAnnotation(InteractionClass.class).name());

		if(icm == null){
			icm = new InteractionClassModel(interaction.getClass());
			icm.addEntity(interaction);
			icm.publish();
			this.published.put(interaction.getClass().getAnnotation(InteractionClass.class).name(), icm);
			this.mapInstanceNameInteractionClassEntity.put(icm.getEntity().getInstanceName(), icm.getEntity());
		}
	}
 
开发者ID:SMASH-Lab,项目名称:SEE-HLA-Starter-Kit,代码行数:13,代码来源:InteractionClassModelManager.java


示例20: subscribe

import hla.rti1516e.exceptions.FederateNotExecutionMember; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public void subscribe(Class interactionClass) throws RTIinternalError, NameNotFound, FederateNotExecutionMember, NotConnected, InvalidInteractionClassHandle, FederateServiceInvocationsAreBeingReportedViaMOM, InteractionClassNotDefined, SaveInProgress, RestoreInProgress, InstantiationException, IllegalAccessException {
	
	InteractionClassModel icm = new InteractionClassModel(interactionClass);
	icm.addEntity(interactionClass.newInstance());
	icm.subscribe();
	this.subscribed.put(((Class<? extends InteractionClass>)interactionClass).getAnnotation(InteractionClass.class).name(), icm);
	this.mapInteractionClassHandleClass.put(icm.getInteractionClassHandle(), interactionClass);
}
 
开发者ID:SMASH-Lab,项目名称:SEE-HLA-Starter-Kit,代码行数:10,代码来源:InteractionClassModelManager.java



注:本文中的hla.rti1516e.exceptions.FederateNotExecutionMember类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ChromePreferenceManager类代码示例发布时间:2022-05-15
下一篇:
Java TermPositionVector类代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap