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


Java ECTimeUnit类代码示例

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


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

示例1: getDurationValue

import org.fosstrak.ale.util.ECTimeUnit; //导入依赖的package包/类
/**
 * This method returns the duration value extracted from the event cycle 
 * specification. 
 * @return duration value in milliseconds
 * @throws ImplementationException if an implementation exception occurs
 */
private long getDurationValue() throws ImplementationException {
	if (spec.getBoundarySpec() != null) {
		ECTime duration = spec.getBoundarySpec().getDuration();
		if (duration != null) {
			if (duration.getUnit().compareToIgnoreCase(ECTimeUnit.MS) == 0) {
				return duration.getValue();
			} else {
				throw new ImplementationException(
						"The only ECTimeUnit allowed is milliseconds (MS).");
			}
		}
	}
	return -1;		
}
 
开发者ID:Auto-ID-Lab-Japan,项目名称:fosstrak-fc,代码行数:21,代码来源:EventCycleImpl.java

示例2: getRepeatPeriodValue

import org.fosstrak.ale.util.ECTimeUnit; //导入依赖的package包/类
/**	
 * This method returns the repeat period value on the basis of the event 
 * cycle specification.
 * @return repeat period value
 * @throws ImplementationException if the time unit in use is unknown
 */
private long getRepeatPeriodValue() throws ImplementationException {
	if (spec.getBoundarySpec() != null) {		
		ECTime repeatPeriod = spec.getBoundarySpec().getRepeatPeriod();
		if (repeatPeriod != null) {
			if (repeatPeriod.getUnit().compareToIgnoreCase(ECTimeUnit.MS) != 0) {
				throw new ImplementationException(
						"The only ECTimeUnit allowed is milliseconds (MS).");
			} else {
				return repeatPeriod.getValue();
			}
		}
	}
	return -1;
}
 
开发者ID:Auto-ID-Lab-Japan,项目名称:fosstrak-fc,代码行数:21,代码来源:EventCycleImpl.java

示例3: getRepeatPeriodValue

import org.fosstrak.ale.util.ECTimeUnit; //导入依赖的package包/类
/**
 * This method returns the repeat period value on the basis of the event 
 * cycle specification.
 * @return repeat period value or NO_REPEAT_PERIOD if none set.
 * @throws ImplementationException if the time unit in use is unknown
 */
private long getRepeatPeriodValue() throws ImplementationException {
	
	ECTime repeatPeriod = spec.getBoundarySpec().getRepeatPeriod();
	if (repeatPeriod != null) {
		if (repeatPeriod.getUnit().compareToIgnoreCase(ECTimeUnit.MS) != 0) {
			throw new ImplementationException("The only ECTimeUnit allowed is milliseconds (MS).");
		} else {
			return repeatPeriod.getValue();
		}
	}
	return INTERVAL_NOT_SET;		
}
 
开发者ID:Auto-ID-Lab-Japan,项目名称:fosstrak-fc,代码行数:19,代码来源:ReportsGeneratorImpl.java

示例4: getDurationValue

import org.fosstrak.ale.util.ECTimeUnit; //导入依赖的package包/类
/**
 * This method returns the duration value extracted from the command cycle 
 * specification. 
 * @return duration value in milliseconds
 * @throws ImplementationException if an implementation exception occurs
 */
private long getDurationValue() throws ImplementationException {
	if (ccspec.getBoundarySpec() != null) {
		ECTime duration = ccspec.getBoundarySpec().getDuration();
		if (duration != null) {
			if (duration.getUnit().compareToIgnoreCase(ECTimeUnit.MS) == 0) {
				return duration.getValue();
			} else {
				throw new ImplementationException(
						"The only ECTimeUnit allowed is milliseconds (MS).");
			}
		}
	}
	return -1;		
}
 
开发者ID:gs1oliot,项目名称:oliot-fc,代码行数:21,代码来源:CommandCycleImpl.java

示例5: getRepeatPeriodValue

import org.fosstrak.ale.util.ECTimeUnit; //导入依赖的package包/类
/**	
 * This method returns the repeat period value on the basis of the command 
 * cycle specification.
 * @return repeat period value
 * @throws ImplementationException if the time unit in use is unknown
 */
private long getRepeatPeriodValue() throws ImplementationException {
	if (ccspec.getBoundarySpec() != null) {		
		ECTime repeatPeriod = ccspec.getBoundarySpec().getRepeatPeriod();
		if (repeatPeriod != null) {
			if (repeatPeriod.getUnit().compareToIgnoreCase(ECTimeUnit.MS) != 0) {
				throw new ImplementationException(
						"The only ECTimeUnit allowed is milliseconds (MS).");
			} else {
				return repeatPeriod.getValue();
			}
		}
	}
	return -1;
}
 
开发者ID:gs1oliot,项目名称:oliot-fc,代码行数:21,代码来源:CommandCycleImpl.java

示例6: getRepeatPeriodValue

import org.fosstrak.ale.util.ECTimeUnit; //导入依赖的package包/类
/**
 * This method returns the repeat period value on the basis of the command 
 * cycle specification.
 * @return repeat period value or NO_REPEAT_PERIOD if none set.
 * @throws ImplementationException if the time unit in use is unknown
 */
private long getRepeatPeriodValue() throws ImplementationException {
	
	ECTime repeatPeriod = ccspec.getBoundarySpec().getRepeatPeriod();
	if (repeatPeriod != null) {
		if (repeatPeriod.getUnit().compareToIgnoreCase(ECTimeUnit.MS) != 0) {
			throw new ImplementationException("The only ECTimeUnit allowed is milliseconds (MS).");
		} else {
			return repeatPeriod.getValue();
		}
	}
	return INTERVAL_NOT_SET;		
}
 
开发者ID:gs1oliot,项目名称:oliot-fc,代码行数:19,代码来源:ReportsGeneratorImpl.java

示例7: createDummyECTime

import org.fosstrak.ale.util.ECTimeUnit; //导入依赖的package包/类
public ECTime createDummyECTime(long t) {
	ECTime time = new ECTime();
	time.setUnit(ECTimeUnit.MS);
	time.setValue(t);
	return time;
}
 
开发者ID:Auto-ID-Lab-Japan,项目名称:fosstrak-fc,代码行数:7,代码来源:SerializerAndDeserializerUtilsTest.java

示例8: getECTimeInMS

import org.fosstrak.ale.util.ECTimeUnit; //导入依赖的package包/类
public static ECTime getECTimeInMS(long value) {
	
	ECTime time = new ECTime();
	time.setUnit(ECTimeUnit.MS);
	time.setValue(value);
	
	return time;
	
}
 
开发者ID:Auto-ID-Lab-Japan,项目名称:fosstrak-fc,代码行数:10,代码来源:ECElementsUtils.java


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