当前位置: 首页>>代码示例>>Java>>正文


Java InvalidObjectClassHandle类代码示例

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


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

示例1: publish

import hla.rti1516e.exceptions.InvalidObjectClassHandle; //导入依赖的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.InvalidObjectClassHandle; //导入依赖的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: initialize

import hla.rti1516e.exceptions.InvalidObjectClassHandle; //导入依赖的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

示例4: publishElement

import hla.rti1516e.exceptions.InvalidObjectClassHandle; //导入依赖的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

示例5: subscribe

import hla.rti1516e.exceptions.InvalidObjectClassHandle; //导入依赖的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

示例6: ObjectClassModel

import hla.rti1516e.exceptions.InvalidObjectClassHandle; //导入依赖的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

示例7: subscribeReferenceFrame

import hla.rti1516e.exceptions.InvalidObjectClassHandle; //导入依赖的package包/类
@Override
public void subscribeReferenceFrame(FrameType frame) throws AttributeNotDefined, ObjectClassNotDefined, 
SaveInProgress, RestoreInProgress, FederateNotExecutionMember, 
NotConnected, RTIinternalError, NameNotFound, InvalidObjectClassHandle {

	this.hlamodule.subscribeReferenceFrame(frame);

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

示例8: publishElement

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

	if(objectClassIsValid(element.getClass()))
		this.hlamodule.publishElement(element, name);
	else{
		logger.error("ObjectElement: '"+ element +"' is not valid!");
		throw new PublishException("ObjectElement: '"+ element +"' is not valid!");
	}

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

示例9: subscribeElement

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

	if(objectClassIsValid(objectClass))
		this.hlamodule.subscribeElementObject(objectClass);
	else{
		logger.error("ObjectClass: '"+ objectClass +"' is not valid!");
		throw new SubscribeException("ObjectClass: '"+ objectClass +"' is not valid!");
	}
}
 
开发者ID:SMASH-Lab,项目名称:SEE-HLA-Starter-Kit,代码行数:12,代码来源:SEEAbstractFederate.java

示例10: subscribeReferenceFrame

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

	logger.info("Subscribing the ' "+frameType+" ' ReferenceFrame");
	ReferenceFrameObject.initialize(rtiamb);
	fedamb.addReferenceFrameToSubcribedList(frameType);

	rtiamb.subscribeObjectClassAttributes(ReferenceFrameObject.getObjectClassHandle(), ReferenceFrameObject.getAttributeSet());

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

示例11: publishElement

import hla.rti1516e.exceptions.InvalidObjectClassHandle; //导入依赖的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,项目名称:SEE-HLA-Starter-Kit,代码行数:13,代码来源:SEEHLAModule.java

示例12: subscribeElementObject

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

	if(!fedamb.objectClassModelIsAlreadySubscribed(objectClass)){
		fedamb.subscribeObjectClassModel(objectClass);
		logger.info("The ObjectClass ' "+objectClass+" ' has been subscribed.");
	}
	else
		logger.warn("The ObjectClass ' "+objectClass+" ' is already subscribed.");
}
 
开发者ID:SMASH-Lab,项目名称:SEE-HLA-Starter-Kit,代码行数:14,代码来源:SEEHLAModule.java

示例13: ObjectClassModel

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

示例14: subscribeElementObject

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

	if(!fedamb.objectClassModelIsAlreadySubscribed(objectClass)){
		fedamb.subscribeObjectClassModel(objectClass);
		logger.info("The ObjectClass '"+objectClass+"' has been subscribed.");
	}
	else
		logger.warn("The ObjectClass '"+objectClass+"' is already subscribed.");
}
 
开发者ID:SMASH-Lab,项目名称:HLA-Development-Kit,代码行数:12,代码来源:DKFHLAModule.java

示例15: subscribeObjectClassModel

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

	objectManager.subscribe(objectClass);

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


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