CPD Results

The following document contains the results of PMD's CPD 5.6.1.

Duplications

File Project Line
org/universAAL/lddi/smarthome/exporter/devices/BlindControllerWrapper.java universAAL LDDI Eclipse Smarthome Exporter 84
org/universAAL/lddi/smarthome/exporter/devices/CurtainControllerWrapper.java universAAL LDDI Eclipse Smarthome Exporter 84
				.getFixedValueRestriction(ContextEvent.PROP_RDF_PREDICATE, BlindController.PROP_HAS_VALUE);
		// TODO Object restr
		cep.addRestriction(subjectRestriction);
		cep.addRestriction(predicateRestriction);
		info.setProvidedEvents(new ContextEventPattern[] { cep });
		cp = new DefaultContextPublisher(context, info);
	}

	@Override
	public Integer executeGet() {
		PercentType value = (PercentType) Activator.getOpenhab().get(shDeviceName)
				.getStateAs((Class<? extends State>) PercentType.class);
		Activator.logD("getStatus", "The service called was 'get the status'");
		if (value == null)
			return null;
		return Integer.valueOf(value.intValue());
	}

	@Override
	public boolean executeSet(Integer value) {
		Activator.logD("setStatus", "The service called was 'set the status' " + value);
		try {
			ItemCommandEvent itemCommandEvent;
			if (value.intValue() == 0) {
				itemCommandEvent = ItemEventFactory.createCommandEvent(shDeviceName, UpDownType.DOWN);
			} else if (value.intValue() == 100) {
				itemCommandEvent = ItemEventFactory.createCommandEvent(shDeviceName, UpDownType.UP);
			} else {
				itemCommandEvent = ItemEventFactory.createCommandEvent(shDeviceName,
						PercentType.valueOf(value.toString()));
			}
			Activator.getPub().post(itemCommandEvent);
		} catch (Exception e) {
			return false;
		}
		return true;
	}

	public void publish(Event event) {
		Integer theValue = null;
		Activator.logD("changedCurrentLevel", "Changed-Event received");
		if (event instanceof ItemStateEvent) {
			ItemStateEvent stateEvent = (ItemStateEvent) event;
			State s = stateEvent.getItemState();
			if (s instanceof PercentType) {
				theValue = Integer.valueOf(((PercentType) s).intValue());
			} else if (s instanceof UpDownType) {
				// TODO Anything?
			}
		}
		if (theValue != null) {
File Project Line
org/universAAL/lddi/smarthome/exporter/devices/DimmerControllerWrapper.java universAAL LDDI Eclipse Smarthome Exporter 84
org/universAAL/lddi/smarthome/exporter/devices/LightdimmerControllerWrapper.java universAAL LDDI Eclipse Smarthome Exporter 84
				.getFixedValueRestriction(ContextEvent.PROP_RDF_PREDICATE, DimmerController.PROP_HAS_VALUE);
		// TODO Object restr
		cep.addRestriction(subjectRestriction);
		cep.addRestriction(predicateRestriction);
		info.setProvidedEvents(new ContextEventPattern[] { cep });
		cp = new DefaultContextPublisher(context, info);
	}

	@Override
	public Integer executeGet() {
		PercentType value = (PercentType) Activator.getOpenhab().get(shDeviceName)
				.getStateAs((Class<? extends State>) PercentType.class);
		Activator.logD("getStatus", "The service called was 'get the status'");
		if (value == null)
			return null;
		return Integer.valueOf(value.intValue());
	}

	@Override
	public boolean executeSet(Integer value) {
		Activator.logD("setStatus", "The service called was 'set the status' " + value);

		try {
			ItemCommandEvent itemCommandEvent = ItemEventFactory.createCommandEvent(shDeviceName,
					PercentType.valueOf(value.toString()));
			Activator.getPub().post(itemCommandEvent);
		} catch (Exception e) {
			return false;
		}
		return true;
	}

	public void publish(Event event) {
		Integer theValue = null;
		Activator.logD("changedCurrentLevel", "Changed-Event received");
		if (event instanceof ItemStateEvent) {
			ItemStateEvent stateEvent = (ItemStateEvent) event;
			State s = stateEvent.getItemState();
			if (s instanceof PercentType) {
				theValue = Integer.valueOf(((PercentType) s).intValue());
			} else if (s instanceof OnOffType) {
				if (((OnOffType) s).compareTo(OnOffType.OFF) == 0) {
					theValue = Integer.valueOf(0);
				} else {
					theValue = Integer.valueOf(100);
				}
			}
		}
		if (theValue != null) {
File Project Line
org/universAAL/lddi/smarthome/exporter/devices/DimmerSensorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 83
org/universAAL/lddi/smarthome/exporter/devices/LightdimmerSensorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 81
				.getFixedValueRestriction(ContextEvent.PROP_RDF_PREDICATE, DimmerSensor.PROP_HAS_VALUE);
		// TODO Object restr
		cep.addRestriction(subjectRestriction);
		cep.addRestriction(predicateRestriction);
		info.setProvidedEvents(new ContextEventPattern[] { cep });
		cp = new DefaultContextPublisher(context, info);
	}

	@Override
	public Integer executeGet() {
		PercentType value = (PercentType) Activator.getOpenhab().get(shDeviceName)
				.getStateAs((Class<? extends State>) PercentType.class);
		Activator.logD("getStatus", "The service called was 'get the status'");
		if (value == null)
			return null;
		return Integer.valueOf(value.intValue());
	}

	@Override
	public boolean executeSet(Integer value) {
		return false;
	}

	public void publish(Event event) {
		Integer theValue = null;
		Activator.logD("changedCurrentLevel", "Changed-Event received");
		if (event instanceof ItemStateEvent) {
			ItemStateEvent stateEvent = (ItemStateEvent) event;
			State s = stateEvent.getItemState();
			if (s instanceof PercentType) {
				theValue = Integer.valueOf(((PercentType) s).intValue());
			} else if (s instanceof OnOffType) {
				if (((OnOffType) s).compareTo(OnOffType.OFF) == 0) {
					theValue = Integer.valueOf(0);
				} else {
					theValue = Integer.valueOf(100);
				}
			}
		}
		if (theValue != null) {
File Project Line
org/universAAL/lddi/smarthome/exporter/devices/BlindActuatorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 78
org/universAAL/lddi/smarthome/exporter/devices/CurtainActuatorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 80
				.getFixedValueRestriction(ContextEvent.PROP_RDF_PREDICATE, BlindActuator.PROP_HAS_VALUE);
		// TODO Object restr
		cep.addRestriction(subjectRestriction);
		cep.addRestriction(predicateRestriction);
		info.setProvidedEvents(new ContextEventPattern[] { cep });
	}

	@Override
	public Integer executeGet() {
		PercentType value = (PercentType) Activator.getOpenhab().get(shDeviceName)
				.getStateAs((Class<? extends State>) PercentType.class);
		Activator.logD("getStatus", "The service called was 'get the status'");
		if (value == null)
			return null;
		return Integer.valueOf(value.intValue());
	}

	@Override
	public boolean executeSet(Integer value) {
		Activator.logD("setStatus", "The service called was 'set the status' " + value);
		try {
			ItemCommandEvent itemCommandEvent;
			if (value.intValue() == 0) {
				itemCommandEvent = ItemEventFactory.createCommandEvent(shDeviceName, UpDownType.DOWN);
			} else if (value.intValue() == 100) {
				itemCommandEvent = ItemEventFactory.createCommandEvent(shDeviceName, UpDownType.UP);
			} else {
				itemCommandEvent = ItemEventFactory.createCommandEvent(shDeviceName,
						PercentType.valueOf(value.toString()));
			}
			Activator.getPub().post(itemCommandEvent);
		} catch (Exception e) {
			return false;
		}
		return true;
	}

	public void publish(Event event) {
		// In theory this is not gonna happen - just keep it to satisfy
		// interface
	}

	public void unregister() {
		super.unregister();
	}

}
File Project Line
org/universAAL/lddi/exporter/activityhub/util/LogTracker.java universAAL LDDI Exporter of ActivityHub devices (ISO 11073-10471) 32
org/universAAL/lddi/exporter/x73/util/LogTracker.java universAAL LDDI Exporter of ISO11073 devices (blood pressure, scale) 29
org/universAAL/lddi/lib/activityhub/util/LogTracker.java universAAL LDDI Library for ISO/IEEE 11073 standard - ActivityHub Specification 32
org/universAAL/lddi/fs20/util/LogTracker.java universAAL LDDI FS20 Connector 35
org/universAAL/lddi/fs20/exporter/util/LogTracker.java universAAL LDDI FS20 Exporter 32
org/universAAL/lddi/knx/exporter/util/LogTracker.java universAAL LDDI KNX Exporter 32
org/universAAL/lddi/knx/networkdriver/util/LogTracker.java universAAL LDDI KNX network driver 32
org/universAAL/lddi/knx/refinementdriver/dpt1/activityhub/util/LogTracker.java universAAL LDDI KNX Refinement driver for Datapoint Type 1.* to ISO 11073-10471 device 32
public class LogTracker extends ServiceTracker implements LogService {

	@Override
	public Object addingService(ServiceReference reference) {
		Object ret = super.addingService(reference);
		log(LOG_DEBUG, "LogService added!");
		return ret;
	}

	@Override
	public void modifiedService(ServiceReference reference, Object service) {
		super.modifiedService(reference, service);
		log(LOG_DEBUG, "LogService modified!");
	}

	@Override
	public void removedService(ServiceReference reference, Object service) {
		super.removedService(reference, service);
		log(LOG_DEBUG, "LogService removed!");
	}

	public LogTracker(BundleContext context) {
		super(context, LogService.class.getName(), null);
	}

	public void log(int level, String message) {
		log(null, level, message, null);
	}

	public void log(int level, String message, Throwable exception) {
		log(null, level, message, exception);
	}

	public void log(ServiceReference sr, int level, String message) {
		log(sr, level, message, null);
	}

	public void log(ServiceReference sr, int level, String message, Throwable exception) {
		LogService log = (LogService) getService(); // obtain optional, unary
													// LogService
		if (log != null) {
			log.log(sr, level, message, exception);
		}
	}

}
File Project Line
org/universAAL/lddi/lib/ieeex73std/testchannel20601/Aarq10407APDUtest.java universAAL LDDI Library IEEE x073 standard implementation 26
org/universAAL/lddi/lib/ieeex73std/testchannel20601/UnknownCfg.java universAAL LDDI Library IEEE x073 standard implementation 26
	public Aarq10407APDUtest() {

		apdu = new byte[] { (byte) 0xE2, (byte) 0x00, // choice APDU
				(byte) 0x00, (byte) 0x32, // length
				(byte) 0x80, (byte) 0x00, (byte) 0x00, (byte) 0x00, // association
																	// version
				(byte) 0x00, (byte) 0x01, (byte) 0x00, (byte) 0x2A, // data
																	// protocol
																	// list = 1,
																	// length 42
				(byte) 0x50, (byte) 0x79, // data protocol id 20601
				(byte) 0x00, (byte) 0x26, // data proto info length
				(byte) 0x80, (byte) 0x00, (byte) 0x00, (byte) 0x00, // protocol
																	// version
				(byte) 0xA0, (byte) 0x00, // encoding rules (MDER)
				(byte) 0x80, (byte) 0x00, (byte) 0x00, (byte) 0x00, // nomenclature
																	// version
				(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, // functional
																	// units
				(byte) 0x00, (byte) 0x80, (byte) 0x00, (byte) 0x00, // sysType
																	// (agent)
				(byte) 0x00, (byte) 0x08, // sys-id length (8)
				(byte) 0x11, (byte) 0x22, (byte) 0x33, (byte) 0x44, // sys-id
				(byte) 0x55, (byte) 0x66, (byte) 0x77, (byte) 0x88, (byte) 0x02, (byte) 0xBC, // dev
File Project Line
org/universAAL/lddi/lib/ieeex73std/testchannel20601/Aarq10415APDUtest.java universAAL LDDI Library IEEE x073 standard implementation 26
org/universAAL/lddi/lib/ieeex73std/testchannel20601/Aarq10417APDUtest.java universAAL LDDI Library IEEE x073 standard implementation 26
	public Aarq10415APDUtest() {

		apdu = new byte[] { (byte) 0xE2, (byte) 0x00, // choice APDU
				(byte) 0x00, (byte) 0x32, // length
				(byte) 0x80, (byte) 0x00, (byte) 0x00, (byte) 0x00, // association
																	// version
				(byte) 0x00, (byte) 0x01, (byte) 0x00, (byte) 0x2A, // data
																	// protocol
																	// list = 1,
																	// length 42
				(byte) 0x50, (byte) 0x79, // data protocol id 20601
				(byte) 0x00, (byte) 0x26, // data proto info length
				(byte) 0x80, (byte) 0x00, (byte) 0x00, (byte) 0x00, // protocol
																	// version
				(byte) 0x80, (byte) 0x00, // encoding rules (MDER)
				(byte) 0x80, (byte) 0x00, (byte) 0x00, (byte) 0x00, // nomenclature
																	// version
				(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, // functional
																	// units
				(byte) 0x00, (byte) 0x80, (byte) 0x00, (byte) 0x00, // sysType
																	// (agent)
				(byte) 0x00, (byte) 0x08, // sys-id length (8)
				(byte) 0x11, (byte) 0x22, (byte) 0x33, (byte) 0x44, // sys-id
				(byte) 0x55, (byte) 0x66, (byte) 0x77, (byte) 0x88, (byte) 0x05, (byte) 0xDC, // dev
File Project Line
org/universAAL/lddi/exporter/activityhub/util/LogTracker.java universAAL LDDI Exporter of ActivityHub devices (ISO 11073-10471) 32
org/universAAL/lddi/exporter/x73/util/LogTracker.java universAAL LDDI Exporter of ISO11073 devices (blood pressure, scale) 29
org/universAAL/lddi/lib/activityhub/util/LogTracker.java universAAL LDDI Library for ISO/IEEE 11073 standard - ActivityHub Specification 32
org/universAAL/lddi/fs20/util/LogTracker.java universAAL LDDI FS20 Connector 35
org/universAAL/lddi/fs20/exporter/util/LogTracker.java universAAL LDDI FS20 Exporter 32
org/universAAL/lddi/knx/devicemanager/util/LogTracker.java universAAL LDDI KNX device manager 32
org/universAAL/lddi/knx/exporter/util/LogTracker.java universAAL LDDI KNX Exporter 32
org/universAAL/lddi/knx/networkdriver/util/LogTracker.java universAAL LDDI KNX network driver 32
org/universAAL/lddi/knx/refinementdriver/dpt1/activityhub/util/LogTracker.java universAAL LDDI KNX Refinement driver for Datapoint Type 1.* to ISO 11073-10471 device 32
public class LogTracker extends ServiceTracker implements LogService {

	@Override
	public Object addingService(ServiceReference reference) {
		Object ret = super.addingService(reference);
		log(LOG_DEBUG, "LogService added!");
		return ret;
	}

	@Override
	public void modifiedService(ServiceReference reference, Object service) {
		super.modifiedService(reference, service);
		log(LOG_DEBUG, "LogService modified!");
	}

	@Override
	public void removedService(ServiceReference reference, Object service) {
		super.removedService(reference, service);
		log(LOG_DEBUG, "LogService removed!");
	}

	public LogTracker(BundleContext context) {
		super(context, LogService.class.getName(), null);
	}

	public void log(int level, String message) {
		log(null, level, message, null);
	}

	public void log(int level, String message, Throwable exception) {
		log(null, level, message, exception);
	}

	public void log(ServiceReference sr, int level, String message) {
		log(sr, level, message, null);
	}

	public void log(ServiceReference sr, int level, String message, Throwable exception) {
		LogService log = (LogService) getService(); // obtain optional, unary
													// LogService
		if (log != null) {
			log.log(sr, level, message, exception);
		}
File Project Line
org/universAAL/lddi/smarthome/exporter/devices/ContactSensorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 66
org/universAAL/lddi/smarthome/exporter/devices/PresenceSensorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 66
org/universAAL/lddi/smarthome/exporter/devices/WaterflowSensorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 66
org/universAAL/lddi/smarthome/exporter/devices/WindowSensorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 66
				.getFixedValueRestriction(ContextEvent.PROP_RDF_PREDICATE, ContactSensor.PROP_HAS_VALUE);
		// TODO Object restr
		cep.addRestriction(subjectRestriction);
		cep.addRestriction(predicateRestriction);
		info.setProvidedEvents(new ContextEventPattern[] { cep });
		cp = new DefaultContextPublisher(context, info);
	}

	@Override
	public StatusValue executeGet() {
		OpenClosedType value = (OpenClosedType) Activator.getOpenhab().get(shDeviceName)
				.getStateAs((Class<? extends State>) OpenClosedType.class);
		Activator.logD("getStatus", "The service called was 'get the status'");
		if (value == null)
			return null;
		return (value.compareTo(OpenClosedType.CLOSED) == 0) ? StatusValue.Activated : StatusValue.NotActivated;
	}

	@Override
	public boolean executeSet(StatusValue value) {
		return false;// Sensor, cannot set
	}

	public void publish(Event event) {
		Boolean theValue = null;
		Activator.logD("changedCurrentLevel", "Changed-Event received");
		if (event instanceof ItemStateEvent) {
			ItemStateEvent stateEvent = (ItemStateEvent) event;
			State s = stateEvent.getItemState();
			if (s instanceof OpenClosedType) {
				theValue = Boolean.valueOf(((OpenClosedType) s).compareTo(OpenClosedType.CLOSED) == 0);
			}
		}
		if (theValue != null) {
File Project Line
org/universAAL/lddi/smarthome/exporter/devices/BlindSensorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 81
org/universAAL/lddi/smarthome/exporter/devices/CurtainSensorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 83
				.getFixedValueRestriction(ContextEvent.PROP_RDF_PREDICATE, BlindSensor.PROP_HAS_VALUE);
		// TODO Object restr
		cep.addRestriction(subjectRestriction);
		cep.addRestriction(predicateRestriction);
		info.setProvidedEvents(new ContextEventPattern[] { cep });
		cp = new DefaultContextPublisher(context, info);
	}

	@Override
	public Integer executeGet() {
		PercentType value = (PercentType) Activator.getOpenhab().get(shDeviceName)
				.getStateAs((Class<? extends State>) PercentType.class);
		Activator.logD("getStatus", "The service called was 'get the status'");
		if (value == null)
			return null;
		return Integer.valueOf(value.intValue());
	}

	@Override
	public boolean executeSet(Integer value) {
		return false;
	}

	public void publish(Event event) {
		Integer theValue = null;
		Activator.logD("changedCurrentLevel", "Changed-Event received");
		if (event instanceof ItemStateEvent) {
			ItemStateEvent stateEvent = (ItemStateEvent) event;
			State s = stateEvent.getItemState();
			if (s instanceof PercentType) {
				theValue = Integer.valueOf(((PercentType) s).intValue());
			} else if (s instanceof UpDownType) {
				// TODO Anything?
			}
		}
		if (theValue != null) {
File Project Line
org/universAAL/lddi/smarthome/exporter/devices/LightdimmerControllerWrapper.java universAAL LDDI Eclipse Smarthome Exporter 108
org/universAAL/lddi/smarthome/exporter/devices/LightswitchControllerWrapper.java universAAL LDDI Eclipse Smarthome Exporter 108
					PercentType.valueOf(value.toString()));
			Activator.getPub().post(itemCommandEvent);
		} catch (Exception e) {
			return false;
		}
		return true;
	}

	public void publish(Event event) {
		Integer theValue = null;
		Activator.logD("changedCurrentLevel", "Changed-Event received");
		if (event instanceof ItemStateEvent) {
			ItemStateEvent stateEvent = (ItemStateEvent) event;
			State s = stateEvent.getItemState();
			if (s instanceof PercentType) {
				theValue = Integer.valueOf(((PercentType) s).intValue());
			} else if (s instanceof OnOffType) {
				if (((OnOffType) s).compareTo(OnOffType.OFF) == 0) {
					theValue = Integer.valueOf(0);
				} else {
					theValue = Integer.valueOf(100);
				}
			}
		}
		if (theValue != null) {
			LightController d = (LightController) ontDevice;
			d.setValue(theValue.intValue());
			cp.publish(new ContextEvent(d, LightController.PROP_HAS_VALUE));
		} // else dont bother TODO log
	}

	public void unregister() {
		super.unregister();
		cp.close();
	}

}
File Project Line
org/universAAL/lddi/smarthome/exporter/devices/BlindActuatorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 82
org/universAAL/lddi/smarthome/exporter/devices/BlindControllerWrapper.java universAAL LDDI Eclipse Smarthome Exporter 89
org/universAAL/lddi/smarthome/exporter/devices/CurtainActuatorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 84
org/universAAL/lddi/smarthome/exporter/devices/CurtainControllerWrapper.java universAAL LDDI Eclipse Smarthome Exporter 89
		info.setProvidedEvents(new ContextEventPattern[] { cep });
	}

	@Override
	public Integer executeGet() {
		PercentType value = (PercentType) Activator.getOpenhab().get(shDeviceName)
				.getStateAs((Class<? extends State>) PercentType.class);
		Activator.logD("getStatus", "The service called was 'get the status'");
		if (value == null)
			return null;
		return Integer.valueOf(value.intValue());
	}

	@Override
	public boolean executeSet(Integer value) {
		Activator.logD("setStatus", "The service called was 'set the status' " + value);
		try {
			ItemCommandEvent itemCommandEvent;
			if (value.intValue() == 0) {
				itemCommandEvent = ItemEventFactory.createCommandEvent(shDeviceName, UpDownType.DOWN);
			} else if (value.intValue() == 100) {
				itemCommandEvent = ItemEventFactory.createCommandEvent(shDeviceName, UpDownType.UP);
			} else {
				itemCommandEvent = ItemEventFactory.createCommandEvent(shDeviceName,
						PercentType.valueOf(value.toString()));
			}
			Activator.getPub().post(itemCommandEvent);
		} catch (Exception e) {
			return false;
		}
		return true;
	}

	public void publish(Event event) {
File Project Line
org/universAAL/lddi/smarthome/exporter/devices/BlindSensorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 81
org/universAAL/lddi/smarthome/exporter/devices/CurtainSensorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 83
org/universAAL/lddi/smarthome/exporter/devices/DimmerSensorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 83
org/universAAL/lddi/smarthome/exporter/devices/LightdimmerSensorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 81
				.getFixedValueRestriction(ContextEvent.PROP_RDF_PREDICATE, BlindSensor.PROP_HAS_VALUE);
		// TODO Object restr
		cep.addRestriction(subjectRestriction);
		cep.addRestriction(predicateRestriction);
		info.setProvidedEvents(new ContextEventPattern[] { cep });
		cp = new DefaultContextPublisher(context, info);
	}

	@Override
	public Integer executeGet() {
		PercentType value = (PercentType) Activator.getOpenhab().get(shDeviceName)
				.getStateAs((Class<? extends State>) PercentType.class);
		Activator.logD("getStatus", "The service called was 'get the status'");
		if (value == null)
			return null;
		return Integer.valueOf(value.intValue());
	}

	@Override
	public boolean executeSet(Integer value) {
		return false;
	}

	public void publish(Event event) {
		Integer theValue = null;
		Activator.logD("changedCurrentLevel", "Changed-Event received");
		if (event instanceof ItemStateEvent) {
			ItemStateEvent stateEvent = (ItemStateEvent) event;
			State s = stateEvent.getItemState();
			if (s instanceof PercentType) {
				theValue = Integer.valueOf(((PercentType) s).intValue());
			} else if (s instanceof UpDownType) {
File Project Line
org/universAAL/lddi/lib/ieeex73std/x73/p20601/ActionArgumentSimple.java universAAL LDDI Library IEEE x073 standard implementation 36
org/universAAL/lddi/lib/ieeex73std/x73/p20601/ActionResultSimple.java universAAL LDDI Library IEEE x073 standard implementation 36
public class ActionArgumentSimple implements IASN1PreparedElement {

	@ASN1Element(name = "obj-handle", isOptional = false, hasTag = false, hasDefaultValue = false)

	private HANDLE obj_handle = null;

	@ASN1Element(name = "action-type", isOptional = false, hasTag = false, hasDefaultValue = false)

	private OID_Type action_type = null;

	@ASN1Any(name = "")

	@ASN1Element(name = "action-info-args", isOptional = false, hasTag = false, hasDefaultValue = false)

	private byte[] action_info_args = null;

	public HANDLE getObj_handle() {
		return this.obj_handle;
	}

	public void setObj_handle(HANDLE value) {
		this.obj_handle = value;
	}

	public OID_Type getAction_type() {
		return this.action_type;
	}

	public void setAction_type(OID_Type value) {
		this.action_type = value;
	}

	public byte[] getAction_info_args() {
		return this.action_info_args;
	}

	public void setAction_info_args(byte[] value) {
		this.action_info_args = value;
	}

	public void initWithDefaults() {

	}

	private static IASN1PreparedElementData preparedData = CoderFactory.getInstance()
			.newPreparedElementData(ActionArgumentSimple.class);
File Project Line
org/universAAL/lddi/smarthome/exporter/devices/DimmerActuatorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 79
org/universAAL/lddi/smarthome/exporter/devices/LightdimmerActuatorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 77
				.getFixedValueRestriction(ContextEvent.PROP_RDF_PREDICATE, DimmerActuator.PROP_HAS_VALUE);
		// TODO Object restr
		cep.addRestriction(subjectRestriction);
		cep.addRestriction(predicateRestriction);
		info.setProvidedEvents(new ContextEventPattern[] { cep });
	}

	@Override
	public Integer executeGet() {
		PercentType value = (PercentType) Activator.getOpenhab().get(shDeviceName)
				.getStateAs((Class<? extends State>) PercentType.class);
		Activator.logD("getStatus", "The service called was 'get the status'");
		if (value == null)
			return null;
		return Integer.valueOf(value.intValue());
	}

	@Override
	public boolean executeSet(Integer value) {
		Activator.logD("setStatus", "The service called was 'set the status' " + value);

		try {
			ItemCommandEvent itemCommandEvent = ItemEventFactory.createCommandEvent(shDeviceName,
					PercentType.valueOf(value.toString()));
			Activator.getPub().post(itemCommandEvent);
		} catch (Exception e) {
			return false;
		}
		return true;
	}

	public void publish(Event event) {
		// Kept for the interface, but it will not be called
	}

	public void unregister() {
		super.unregister();
	}

}
File Project Line
org/universAAL/lddi/knx/driver/KnxDpt1Driver.java universAAL LDDI KNX Exporter 90
org/universAAL/lddi/knx/refinementdriver/dpt1/activityhub/KnxDpt1RefinementDriver.java universAAL LDDI KNX Refinement driver for Datapoint Type 1.* to ISO 11073-10471 device 134
			this.logger.log(LogService.LOG_INFO, "Driver for KNX-DPT 1.001 registered!");
	}

	/*
	 * (non-Javadoc)
	 *
	 * @see
	 * org.osgi.service.device.Driver#match(org.osgi.framework.ServiceReference)
	 */
	public int match(ServiceReference reference) throws Exception {
		// reference = groupDevice service
		int matchValue = Device.MATCH_NONE;
		KnxGroupDeviceCategory groupDeviceCategory = null;

		try {
			groupDeviceCategory = KnxGroupDeviceCategoryUtil
					.getCategory((String) reference.getProperty(Constants.DEVICE_CATEGORY));
		} catch (ClassCastException e) {
			this.logger.log(LogService.LOG_DEBUG, "Could not cast DEVICE_CATEGORY of requesting" + " device service "
					+ reference.getProperty(org.osgi.framework.Constants.SERVICE_ID) + " to String. No match!");
			return matchValue;
		}

		// match check
		// more possible properties to match: description, serial, id
		if (groupDeviceCategory == MY_KNX_DEVICE_CATEGORY) {
			matchValue = IKnxDpt1.MATCH_CLASS;
		} else {
			this.logger.log(LogService.LOG_DEBUG,
					"Requesting device service " + groupDeviceCategory + " doesn't match with driver. No match!");
		}

		return matchValue; // must be > 0 to match
	}

	/*
	 * (non-Javadoc)
	 *
	 * @see org.osgi.service.device.Driver#attach(org.osgi.framework.
	 * ServiceReference)
	 */
	public String attach(ServiceReference reference) throws Exception {
		// get groupAddress
		KnxDpt1GroupDevice knxDev = (KnxDpt1GroupDevice) this.context.getService(reference);

		if (this.connectedDriverInstanceMap.containsKey(knxDev.getGroupAddress())) {
			this.logger.log(LogService.LOG_WARNING, "There is already a driver instance available for "
					+ " the groupDevice " + knxDev.getGroupAddress());
			return "driver already exists for this groupDevice!";
		}
File Project Line
org/universAAL/lddi/smarthome/exporter/devices/LightdimmerControllerWrapper.java universAAL LDDI Eclipse Smarthome Exporter 114
org/universAAL/lddi/smarthome/exporter/devices/LightswitchControllerWrapper.java universAAL LDDI Eclipse Smarthome Exporter 114
org/universAAL/lddi/smarthome/exporter/devices/LightswitchSensorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 103
	}

	public void publish(Event event) {
		Integer theValue = null;
		Activator.logD("changedCurrentLevel", "Changed-Event received");
		if (event instanceof ItemStateEvent) {
			ItemStateEvent stateEvent = (ItemStateEvent) event;
			State s = stateEvent.getItemState();
			if (s instanceof PercentType) {
				theValue = Integer.valueOf(((PercentType) s).intValue());
			} else if (s instanceof OnOffType) {
				if (((OnOffType) s).compareTo(OnOffType.OFF) == 0) {
					theValue = Integer.valueOf(0);
				} else {
					theValue = Integer.valueOf(100);
				}
			}
		}
		if (theValue != null) {
			LightController d = (LightController) ontDevice;
			d.setValue(theValue.intValue());
			cp.publish(new ContextEvent(d, LightController.PROP_HAS_VALUE));
		} // else dont bother TODO log
	}

	public void unregister() {
		super.unregister();
		cp.close();
	}

}
File Project Line
org/universAAL/hw/exporter/zigbee/ha/devices/DimmerLightCallee.java universAAL LDDI ZigBee exporter - Home Automation 72
org/universAAL/hw/exporter/zigbee/ha/devices/OnOffLightCallee.java universAAL LDDI ZigBee exporter - Home Automation 77
		LogUtils.logDebug(Activator.moduleContext, DimmerLightCallee.class, "DimmerLightCallee",
				new String[] { "Ready to subscribe" }, null);
		zbDevice = serv;

		// Info
		String deviceSuffix = zbDevice.getZBDevice().getUniqueIdenfier().replace("\"", "");
		String deviceURI = NAMESPACE + "actuator" + deviceSuffix;
		ontologyDevice = new LightActuator(deviceURI);
		// Commissioning
		String locationSuffix = Activator.getProperties().getProperty(deviceSuffix);
		if (locationSuffix != null && !locationSuffix.equals(Activator.UNINITIALIZED_SUFFIX)) {
			ontologyDevice.setLocation(new Room(Constants.MIDDLEWARE_LOCAL_ID_PREFIX + locationSuffix));
		} else {
			Properties prop = Activator.getProperties();
			prop.setProperty(deviceSuffix, Activator.UNINITIALIZED_SUFFIX);
			Activator.setProperties(prop);
		}
		// Serv reg
		newProfiles = getServiceProfiles(NAMESPACE, DeviceService.MY_URI, ontologyDevice);
		this.addNewServiceProfiles(newProfiles);
		// Context reg
		ContextProvider info = new ContextProvider(NAMESPACE + "zbLightingContextProvider");
		info.setType(ContextProviderType.controller);
		cp = new DefaultContextPublisher(context, info);
		// ZB reg
		if (zbDevice.getLevelControl().subscribe(this)) {
File Project Line
org/universAAL/lddi/smarthome/exporter/devices/LightswitchActuatorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 81
org/universAAL/lddi/smarthome/exporter/devices/LightswitchControllerWrapper.java universAAL LDDI Eclipse Smarthome Exporter 89
		info.setProvidedEvents(new ContextEventPattern[] { cep });
	}

	@Override
	public Integer executeGet() {
		OnOffType value = (OnOffType) Activator.getOpenhab().get(shDeviceName)
				.getStateAs((Class<? extends State>) OnOffType.class);
		Activator.logD("getStatus", "The service called was 'get the status'");
		if (value == null)
			return null;
		return (value.compareTo(OnOffType.ON) == 0) ? Integer.valueOf(100) : Integer.valueOf(0);
	}

	@Override
	public boolean executeSet(Integer value) {
		Activator.logD("setStatus", "The service called was 'set the status' " + value);

		try {
			ItemCommandEvent itemCommandEvent = ItemEventFactory.createCommandEvent(shDeviceName,
					value.intValue() == 0 ? OnOffType.OFF : OnOffType.ON);
			Activator.getPub().post(itemCommandEvent);
		} catch (Exception e) {
			return false;
		}
		return true;
	}

	public void publish(Event event) {
File Project Line
org/universAAL/lddi/smarthome/exporter/devices/SwitchActuatorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 68
org/universAAL/lddi/smarthome/exporter/devices/SwitchControllerWrapper.java universAAL LDDI Eclipse Smarthome Exporter 72
		info.setProvidedEvents(new ContextEventPattern[] { cep });
	}

	@Override
	public StatusValue executeGet() {
		OnOffType value = (OnOffType) Activator.getOpenhab().get(shDeviceName)
				.getStateAs((Class<? extends State>) OnOffType.class);
		Activator.logD("getStatus", "The service called was 'get the status'");
		if (value == null)
			return null;
		return (value.compareTo(OnOffType.ON) == 0) ? StatusValue.Activated : StatusValue.NotActivated;
	}

	@Override
	public boolean executeSet(StatusValue value) {
		Activator.logD("setStatus", "The service called was 'set the status' " + value);

		try {
			ItemCommandEvent itemCommandEvent = ItemEventFactory.createCommandEvent(shDeviceName,
					value.equals(StatusValue.Activated) ? OnOffType.ON : OnOffType.OFF);
			Activator.getPub().post(itemCommandEvent);
		} catch (Exception e) {
			return false;
		}
		return true;
	}

	public void publish(Event event) {
File Project Line
org/universAAL/lddi/lib/ieeex73std/testchannel20601/RealMeasure10415PrstAPDUtest.java universAAL LDDI Library IEEE x073 standard implementation 54
org/universAAL/lddi/lib/ieeex73std/testchannel20601/RealMeasure10415PrstAPDUtest.java universAAL LDDI Library IEEE x073 standard implementation 71
				(byte) 0x15, (byte) 0x02, (byte) 0x16, (byte) 0x00, (byte) 0x09, (byte) 0x96, // Object
																								// 3:
																								// Type:
																								// Unit
				(byte) 0x00, (byte) 0x02, // Length
				(byte) 0x06, (byte) 0xC3, // Kg.

				// Measure 2
				(byte) 0x00, (byte) 0x01, (byte) 0x00, (byte) 0x03, (byte) 0x00, (byte) 0x1A, (byte) 0x0A, (byte) 0x56,
				(byte) 0x00, (byte) 0x04, (byte) 0xFE, (byte) 0x00, (byte) 0x1C, (byte) 0x66, (byte) 0x09, (byte) 0x90,
				(byte) 0x00, (byte) 0x08, (byte) 0x20, (byte) 0x12, (byte) 0x05, (byte) 0x08, (byte) 0x15, (byte) 0x04,
File Project Line
org/universAAL/lddi/lib/ieeex73std/testchannel20601/RealMeasure10415PrstAPDUtest.java universAAL LDDI Library IEEE x073 standard implementation 65
org/universAAL/lddi/lib/ieeex73std/testchannel20601/RealMeasure10415PrstAPDUtest.java universAAL LDDI Library IEEE x073 standard implementation 77
				(byte) 0x12, (byte) 0x00, (byte) 0x09, (byte) 0x96, (byte) 0x00, (byte) 0x02, (byte) 0x06, (byte) 0xC3,

				// Measure 3
				(byte) 0x00, (byte) 0x01, (byte) 0x00, (byte) 0x03, (byte) 0x00, (byte) 0x1A, (byte) 0x0A, (byte) 0x56,
				(byte) 0x00, (byte) 0x04, (byte) 0xFE, (byte) 0x00, (byte) 0x1C, (byte) 0x5C, (byte) 0x09, (byte) 0x90,
				(byte) 0x00, (byte) 0x08, (byte) 0x20, (byte) 0x12, (byte) 0x05, (byte) 0x08, (byte) 0x15, (byte) 0x17,
File Project Line
org/universAAL/lddi/exporter/activityhub/util/LogTracker.java universAAL LDDI Exporter of ActivityHub devices (ISO 11073-10471) 49
org/universAAL/lddi/exporter/x73/util/LogTracker.java universAAL LDDI Exporter of ISO11073 devices (blood pressure, scale) 46
org/universAAL/lddi/lib/activityhub/util/LogTracker.java universAAL LDDI Library for ISO/IEEE 11073 standard - ActivityHub Specification 49
org/universAAL/lddi/fs20/util/LogTracker.java universAAL LDDI FS20 Connector 52
org/universAAL/lddi/fs20/exporter/util/LogTracker.java universAAL LDDI FS20 Exporter 49
org/universAAL/lddi/knx/exporter/util/LogTracker.java universAAL LDDI KNX Exporter 49
org/universAAL/lddi/knx/library/utils/LogTracker.java universAAL LDDI KNX Datapoint Type Library 52
org/universAAL/lddi/knx/networkdriver/util/LogTracker.java universAAL LDDI KNX network driver 52
org/universAAL/lddi/knx/refinementdriver/dpt1/activityhub/util/LogTracker.java universAAL LDDI KNX Refinement driver for Datapoint Type 1.* to ISO 11073-10471 device 53
		super.removedService(reference, service);
		log(LOG_DEBUG, "LogService removed!");
	}

	public LogTracker(BundleContext context) {
		super(context, LogService.class.getName(), null);
	}

	public void log(int level, String message) {
		log(null, level, message, null);
	}

	public void log(int level, String message, Throwable exception) {
		log(null, level, message, exception);
	}

	public void log(ServiceReference sr, int level, String message) {
		log(sr, level, message, null);
	}

	public void log(ServiceReference sr, int level, String message, Throwable exception) {
		LogService log = (LogService) getService(); // obtain optional, unary
													// LogService
		if (log != null) {
			log.log(sr, level, message, exception);
		}
	}

}
File Project Line
org/universAAL/lddi/lib/ieeex73std/mder/EncoderMDER.java universAAL LDDI Library IEEE x073 standard implementation 208
org/universAAL/lddi/lib/ieeex73std/org/bn/coders/ber/BEREncoder.java universAAL LDDI Library IEEE x073 standard implementation 226
	public int encodeSequenceOf(Object object, OutputStream stream, ElementInfo elementInfo) throws Exception {

		int resultSize = 0;
		Object[] collection = ((java.util.Collection<Object>) object).toArray();
		int sizeOfCollection = 0;

		for (int i = 0; i < collection.length; i++) {
			// process each element of the array
			// we have to know which class is it, and encode it separately.
			Object obj = collection[collection.length - 1 - i];
			ElementInfo info = new ElementInfo();
			info.setAnnotatedClass(obj.getClass());
			info.setParentAnnotated(elementInfo.getAnnotatedClass());
			if (elementInfo.hasPreparedInfo()) {
				ASN1SequenceOfMetadata seqOfMeta = (ASN1SequenceOfMetadata) elementInfo.getPreparedInfo()
						.getTypeMetadata();
				info.setPreparedInfo(seqOfMeta.getItemClassMetadata());
			}
			sizeOfCollection += encodeClassType(obj, stream, info);
		}
		resultSize += sizeOfCollection;
File Project Line
org/universAAL/lddi/knx/devicemanager/util/LogTracker.java universAAL LDDI KNX device manager 52
org/universAAL/lddi/knx/library/utils/LogTracker.java universAAL LDDI KNX Datapoint Type Library 52
		super.removedService(reference, service);
		// System.out.println("stdout: [KNX.DEVICEMANAGER] LogService
		// removed!");
		log(LOG_DEBUG, "LogService removed!");
	}

	public LogTracker(BundleContext context) {
		super(context, LogService.class.getName(), null);
	}

	public void log(int level, String message) {
		log(null, level, message, null);
	}

	public void log(int level, String message, Throwable exception) {
		log(null, level, message, exception);
	}

	public void log(ServiceReference sr, int level, String message) {
		log(sr, level, message, null);
	}

	public void log(ServiceReference sr, int level, String message, Throwable exception) {
		LogService log = (LogService) getService(); // obtain optional, unary
													// LogService
		if (log != null) {
			log.log(sr, level, message, exception);
		} else {
File Project Line
org/universAAL/lddi/smarthome/exporter/devices/DimmerControllerWrapper.java universAAL LDDI Eclipse Smarthome Exporter 108
org/universAAL/lddi/smarthome/exporter/devices/LightswitchControllerWrapper.java universAAL LDDI Eclipse Smarthome Exporter 108
					PercentType.valueOf(value.toString()));
			Activator.getPub().post(itemCommandEvent);
		} catch (Exception e) {
			return false;
		}
		return true;
	}

	public void publish(Event event) {
		Integer theValue = null;
		Activator.logD("changedCurrentLevel", "Changed-Event received");
		if (event instanceof ItemStateEvent) {
			ItemStateEvent stateEvent = (ItemStateEvent) event;
			State s = stateEvent.getItemState();
			if (s instanceof PercentType) {
				theValue = Integer.valueOf(((PercentType) s).intValue());
			} else if (s instanceof OnOffType) {
				if (((OnOffType) s).compareTo(OnOffType.OFF) == 0) {
					theValue = Integer.valueOf(0);
				} else {
					theValue = Integer.valueOf(100);
				}
			}
		}
		if (theValue != null) {
File Project Line
org/universAAL/lddi/smarthome/exporter/devices/AbstractFloatCallee.java universAAL LDDI Eclipse Smarthome Exporter 62
org/universAAL/lddi/smarthome/exporter/devices/AbstractIntegerCallee.java universAAL LDDI Eclipse Smarthome Exporter 62
org/universAAL/lddi/smarthome/exporter/devices/AbstractStatusValueCallee.java universAAL LDDI Eclipse Smarthome Exporter 62
	protected AbstractFloatCallee(ModuleContext context, ServiceProfile[] realizedServices, String namespace) {
		super(context, realizedServices);
		this.namespace = namespace;
	}

	public void unregister() {
		this.removeMatchingProfiles(newProfiles);
		this.close();
	}

	public void communicationChannelBroken() {
		unregister();
	}

	public ServiceResponse handleCall(ServiceCall call) {
		ServiceResponse response;
		if (call == null) {
			return null;
		}
		String operation = call.getProcessURI();
		if (operation == null) {
			return null;
		}
		if (!((Device) call.getInputValue(namespace + IN_DEVICE)).getURI().equals(ontDevice.getURI())) {
			return new ServiceResponse(CallStatus.denied);
		}
		if (operation.startsWith(namespace + SERVICE_GET_VALUE)) {
File Project Line
org/universAAL/lddi/smarthome/exporter/devices/DimmerActuatorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 83
org/universAAL/lddi/smarthome/exporter/devices/DimmerControllerWrapper.java universAAL LDDI Eclipse Smarthome Exporter 89
org/universAAL/lddi/smarthome/exporter/devices/LightdimmerActuatorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 81
org/universAAL/lddi/smarthome/exporter/devices/LightdimmerControllerWrapper.java universAAL LDDI Eclipse Smarthome Exporter 89
		info.setProvidedEvents(new ContextEventPattern[] { cep });
	}

	@Override
	public Integer executeGet() {
		PercentType value = (PercentType) Activator.getOpenhab().get(shDeviceName)
				.getStateAs((Class<? extends State>) PercentType.class);
		Activator.logD("getStatus", "The service called was 'get the status'");
		if (value == null)
			return null;
		return Integer.valueOf(value.intValue());
	}

	@Override
	public boolean executeSet(Integer value) {
		Activator.logD("setStatus", "The service called was 'set the status' " + value);

		try {
			ItemCommandEvent itemCommandEvent = ItemEventFactory.createCommandEvent(shDeviceName,
					PercentType.valueOf(value.toString()));
			Activator.getPub().post(itemCommandEvent);
		} catch (Exception e) {
			return false;
		}
		return true;
	}

	public void publish(Event event) {
File Project Line
org/universAAL/lddi/lib/ieeex73std/org/bn/coders/per/PERAlignedDecoder.java universAAL LDDI Library IEEE x073 standard implementation 409
org/universAAL/lddi/lib/ieeex73std/org/bn/coders/per/PERAlignedEncoder.java universAAL LDDI Library IEEE x073 standard implementation 237
		boolean hasConstraint = false;
		long min = 0, max = 0;

		if (elementInfo.hasPreparedInfo()) {
			if (elementInfo.getPreparedInfo().hasConstraint()
					&& elementInfo.getPreparedInfo().getConstraint() instanceof ASN1ValueRangeConstraintMetadata) {
				IASN1ConstraintMetadata constraint = elementInfo.getPreparedInfo().getConstraint();
				hasConstraint = true;
				min = ((ASN1ValueRangeConstraintMetadata) constraint).getMin();
				max = ((ASN1ValueRangeConstraintMetadata) constraint).getMax();
			}
		} else if (elementInfo.getAnnotatedClass().isAnnotationPresent(ASN1ValueRangeConstraint.class)) {
			hasConstraint = true;
			ASN1ValueRangeConstraint constraint = elementInfo.getAnnotatedClass()
					.getAnnotation(ASN1ValueRangeConstraint.class);
			min = constraint.min();
			max = constraint.max();
		}

		if (objectClass.equals(Integer.class)) {
File Project Line
org/universAAL/lddi/smarthome/exporter/devices/DimmerSensorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 98
org/universAAL/lddi/smarthome/exporter/devices/LightdimmerSensorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 96
org/universAAL/lddi/smarthome/exporter/devices/LightswitchSensorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 97
		return Integer.valueOf(value.intValue());
	}

	@Override
	public boolean executeSet(Integer value) {
		return false;
	}

	public void publish(Event event) {
		Integer theValue = null;
		Activator.logD("changedCurrentLevel", "Changed-Event received");
		if (event instanceof ItemStateEvent) {
			ItemStateEvent stateEvent = (ItemStateEvent) event;
			State s = stateEvent.getItemState();
			if (s instanceof PercentType) {
				theValue = Integer.valueOf(((PercentType) s).intValue());
			} else if (s instanceof OnOffType) {
				if (((OnOffType) s).compareTo(OnOffType.OFF) == 0) {
					theValue = Integer.valueOf(0);
				} else {
					theValue = Integer.valueOf(100);
				}
			}
		}
		if (theValue != null) {
File Project Line
org/universAAL/lddi/abstraction/config/tool/DatapointConfigTool.java universAAL LDDI Common ont-based abstraction 522
org/universAAL/lddi/abstraction/simulation/SimulationTool.java universAAL LDDI Common ont-based abstraction 100
	}
	
	private void changeOperationMode(int mode) {
		List<EntityPattern> patterns = new ArrayList<EntityPattern>();
		patterns.add(new ApplicationPattern(CommunicationGateway.class.getSimpleName()));
		patterns.add(new ApplicationPartPattern(CommunicationGateway.CGW_CONF_APP_PART_PROTOCOL_ID));
		patterns.add(new IdPattern(Activator.CONF_PARAM_CGW_PROTOCOL_OPERATION_MODE));
		List<ConfigurableEntityEditor> configs = Activator.getConfigEditor().getMatchingConfigurationEditors(patterns, Locale.ENGLISH);
		try {
			ConfigurationParameterEditor configParam = (ConfigurationParameterEditor) configs.get(0);
			configParam.setValue(mode);
		} catch (Exception e) {
			LogUtils.logError(Activator.getMC(), DatapointConfigTool.class, "changeOperationMode()", e.getMessage());
		}
	}
	
	private Thread eventsThread = null;
File Project Line
org/universAAL/lddi/lib/ieeex73std/x73/p104zz/p10404PulsiOximeter.java universAAL LDDI Library IEEE x073 standard implementation 154
org/universAAL/lddi/lib/ieeex73std/x73/p104zz/p10407BloodPressure.java universAAL LDDI Library IEEE x073 standard implementation 202
		bs_byte[0] = (byte) ((bs_val >> 8) & 0x000000FF);
		// System.out.println(ASNUtils.asHexwithspaces(bs_byte));
		bs.setValue(bs_byte);
		mss.setValue(new BITS_16(new BitString(bs)));
		pulseattr = new Attribute(NomenclatureCodes.MDC_ATTR_METRIC_SPEC_SMALL, mss);
		pulserateattributes.add(pulseattr);

		// Unit Code
		OID_Type unit_oid = new OID_Type();
		unit_oid.setValue(new INT_U16(NomenclatureCodes.MDC_DIM_BEAT_PER_MIN));
		pulseattr = new Attribute(NomenclatureCodes.MDC_ATTR_UNIT_CODE, unit_oid);
		pulserateattributes.add(pulseattr);

		// Attribute Map
		// - MDC_ATTR_NU_VAL_OBS_BASIC (size 2)
		AttrValMap attrmap = new AttrValMap();
		attrmap.initValue();

		AttrValMapEntry entry1 = new AttrValMapEntry();
		OID_Type entry1_oid = new OID_Type();
		entry1_oid.setValue(new INT_U16(NomenclatureCodes.MDC_ATTR_NU_VAL_OBS_BASIC));
		entry1.setAttribute_id(entry1_oid);
		entry1.setAttribute_len(new INT_U16(2)); // 2 bytes (stores an
File Project Line
org/universAAL/lddi/lib/ieeex73std/manager/apdu/APDUProcessor.java universAAL LDDI Library IEEE x073 standard implementation 629
org/universAAL/lddi/lib/ieeex73std/manager/apdu/APDUProcessor.java universAAL LDDI Library IEEE x073 standard implementation 665
org/universAAL/lddi/lib/ieeex73std/manager/apdu/APDUProcessor.java universAAL LDDI Library IEEE x073 standard implementation 750
org/universAAL/lddi/lib/ieeex73std/manager/apdu/APDUProcessor.java universAAL LDDI Library IEEE x073 standard implementation 783
org/universAAL/lddi/lib/ieeex73std/manager/apdu/APDUProcessor.java universAAL LDDI Library IEEE x073 standard implementation 816
		if (choice.isRoiv_cmip_actionSelected()) {
			if (!checkRoivState()) {
				// Manager unassociated. Transmit abrt
				apdu = msg_generator.AbrtApduGenerator(StatusCodes.ABORT_REASON_UNDEFINED);
				return apdu;
			} else {
				// different procedures depending of the state
				if (statemachine
						.getChannelState() == StateMachine20601.CHANNELSTATE_ASSOCIATED_CONFIGURING_WAITINGFORCONFIG) {
					// not allowed
					apdu = msg_generator.RoerGenerator(dataapdu.getInvoke_id(), StatusCodes.NO_SUCH_OBJECT_INSTANCE);
					return apdu;

				} else if (statemachine
						.getChannelState() == StateMachine20601.CHANNELSTATE_ASSOCIATED_CONFIGURING_CHECKINGCONFIG) {

					// The agent only sends event report messages. This should
					// never happen
					apdu = msg_generator.RoerGenerator(dataapdu.getInvoke_id(), StatusCodes.NO_SUCH_ACTION);
					return apdu;

				} else if (statemachine.getChannelState() == StateMachine20601.CHANNELSTATE_ASSOCIATED_OPERATING) {
					// TODO processing of Roiv_cmip_actionSelected
					return null; // modify

				} else if (statemachine.getChannelState() == StateMachine20601.CHANNELSTATE_DISASSOCIATING) {
					// in disassociating state: The agent sent an invoke message
					// as the manager sent an rlrq.
					// The manager has transitioned out of the Operating state
					// and therefore will not provide any response.
					return null;
				}

			}
		}

		if (choice.isRoiv_cmip_confirmed_actionSelected()) {
File Project Line
org/universAAL/hw/exporter/zigbee/ha/devices/ExporterActuatorCallee.java universAAL LDDI ZigBee exporter - Home Automation 90
org/universAAL/hw/exporter/zigbee/ha/devices/OnOffLightCallee.java universAAL LDDI ZigBee exporter - Home Automation 127
				response.addOutput(new ProcessOutput(NAMESPACE + OUT_GET_ON_OFF, result));
				return response;
			} else {
				response = new ServiceResponse(CallStatus.serviceSpecificFailure);
				return response;
			}
		}

		if (operation.startsWith(NAMESPACE + SERVICE_TURN_OFF)) {
			if (executeOff()) {
				return new ServiceResponse(CallStatus.succeeded);
			} else {
				response = new ServiceResponse(CallStatus.serviceSpecificFailure);
				return response;
			}
		}

		if (operation.startsWith(NAMESPACE + SERVICE_TURN_ON)) {
			if (executeOn()) {
				return new ServiceResponse(CallStatus.succeeded);
			} else {
				response = new ServiceResponse(CallStatus.serviceSpecificFailure);
				return response;
			}
		}

		response = new ServiceResponse(CallStatus.serviceSpecificFailure);
		response.addOutput(new ProcessOutput(ServiceResponse.PROP_SERVICE_SPECIFIC_ERROR,
				"The service requested has not been implemented in this simple editor callee"));
		return response;
	}
File Project Line
org/universAAL/lddi/smarthome/exporter/devices/LightswitchControllerWrapper.java universAAL LDDI Eclipse Smarthome Exporter 84
org/universAAL/lddi/smarthome/exporter/devices/LightswitchSensorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 82
				.getFixedValueRestriction(ContextEvent.PROP_RDF_PREDICATE, LightController.PROP_HAS_VALUE);
		// TODO Object restr
		cep.addRestriction(subjectRestriction);
		cep.addRestriction(predicateRestriction);
		info.setProvidedEvents(new ContextEventPattern[] { cep });
		cp = new DefaultContextPublisher(context, info);
	}

	@Override
	public Integer executeGet() {
		OnOffType value = (OnOffType) Activator.getOpenhab().get(shDeviceName)
				.getStateAs((Class<? extends State>) OnOffType.class);
		Activator.logD("getStatus", "The service called was 'get the status'");
		if (value == null)
			return null;
		return (value.compareTo(OnOffType.ON) == 0) ? Integer.valueOf(100) : Integer.valueOf(0);
	}

	@Override
	public boolean executeSet(Integer value) {
File Project Line
org/universAAL/lddi/smarthome/exporter/devices/BlindControllerWrapper.java universAAL LDDI Eclipse Smarthome Exporter 84
org/universAAL/lddi/smarthome/exporter/devices/CurtainControllerWrapper.java universAAL LDDI Eclipse Smarthome Exporter 84
org/universAAL/lddi/smarthome/exporter/devices/DimmerControllerWrapper.java universAAL LDDI Eclipse Smarthome Exporter 84
org/universAAL/lddi/smarthome/exporter/devices/LightdimmerControllerWrapper.java universAAL LDDI Eclipse Smarthome Exporter 84
				.getFixedValueRestriction(ContextEvent.PROP_RDF_PREDICATE, BlindController.PROP_HAS_VALUE);
		// TODO Object restr
		cep.addRestriction(subjectRestriction);
		cep.addRestriction(predicateRestriction);
		info.setProvidedEvents(new ContextEventPattern[] { cep });
		cp = new DefaultContextPublisher(context, info);
	}

	@Override
	public Integer executeGet() {
		PercentType value = (PercentType) Activator.getOpenhab().get(shDeviceName)
				.getStateAs((Class<? extends State>) PercentType.class);
		Activator.logD("getStatus", "The service called was 'get the status'");
		if (value == null)
			return null;
		return Integer.valueOf(value.intValue());
	}

	@Override
	public boolean executeSet(Integer value) {
		Activator.logD("setStatus", "The service called was 'set the status' " + value);
		try {
			ItemCommandEvent itemCommandEvent;
File Project Line
org/universAAL/lddi/exporter/activityhub/driver/Iso11073MotionSensorDriver.java universAAL LDDI Exporter of ActivityHub devices (ISO 11073-10471) 117
org/universAAL/lddi/exporter/activityhub/driver/Iso11073SwitchSensorDriver.java universAAL LDDI Exporter of ActivityHub devices (ISO 11073-10471) 116
org/universAAL/lddi/exporter/activityhub/driver/Iso11073UsageSensorDriver.java universAAL LDDI Exporter of ActivityHub devices (ISO 11073-10471) 117
		Iso11073MotionSensorInstance instance = new Iso11073MotionSensorInstance(this.context, client, this.logger);

		// init service tracker on device service for instance
		tracker = new ServiceTracker(this.context, reference, instance);
		tracker.open();

		synchronized (this.connectedDriver) {
			if (!this.connectedDriver.add(instance))
				this.logger.log(LogService.LOG_ERROR, "Duplicate Element in HashSet connectedDriver");
		}

		return null; // if attachment is correct
	}

	/**
	 * register this driver in OSGi registry
	 */
	private void registerDriver() {
		Dictionary propDriver = new Properties();
		propDriver.put(Constants.DRIVER_ID, MY_DRIVER_ID);
		this.regDriver = this.context.registerService(Driver.class.getName(), this, propDriver);

		if (this.regDriver != null)
			this.logger.log(LogService.LOG_INFO, "Driver for Iso11073-MotionSensor registered!");
File Project Line
org/universAAL/lddi/lib/ieeex73std/mder/DecoderMDER.java universAAL LDDI Library IEEE x073 standard implementation 337
org/universAAL/lddi/lib/ieeex73std/org/bn/coders/per/PERAlignedDecoder.java universAAL LDDI Library IEEE x073 standard implementation 551
		int numberofoctets = length.getValue();
		if (countOfElements > 0) {
			Class paramType = CoderUtils.getCollectionType(elementInfo);

			for (int i = 0; i < countOfElements; i++) {
				ElementInfo info = new ElementInfo();
				info.setAnnotatedClass(paramType);
				info.setParentAnnotated(elementInfo.getAnnotatedClass());
				if (elementInfo.hasPreparedInfo()) {
					ASN1SequenceOfMetadata seqOfMeta = (ASN1SequenceOfMetadata) elementInfo.getPreparedInfo()
							.getTypeMetadata();
					info.setPreparedInfo(seqOfMeta.getItemClassMetadata());
				}

				DecodedObject item = decodeClassType(null, paramType, info, stream);
				if (item != null) {
					result.add(item.getValue());
				}
			}
			;
		}

		// total size: INT_U16(count)+INT_U16(length)+encodeditems
		return new DecodedObject(result, (intObj.getSize() + length.getSize() + numberofoctets));
File Project Line
org/universAAL/lddi/smarthome/exporter/devices/AbstractFloatCallee.java universAAL LDDI Eclipse Smarthome Exporter 132
org/universAAL/lddi/smarthome/exporter/devices/AbstractIntegerCallee.java universAAL LDDI Eclipse Smarthome Exporter 134
	public abstract boolean executeSet(Float value);

	/**
	 * Get the typical service profiles for a controller: GET/SET the has value
	 * prop.
	 *
	 * @param namespace
	 *            Must be the same as the one set in the constructor
	 * @param instance
	 *            The instance of the ontological representation of the device
	 * @return
	 */
	public static ServiceProfile[] getServiceProfiles(String namespace, Device instance) {
		ServiceProfile[] profiles = new ServiceProfile[2];
		profiles[0] = getServiceProfileGET(namespace, instance);
		profiles[1] = getServiceProfileSET(namespace, instance);
		return profiles;
	}

	public static ServiceProfile getServiceProfileGET(String namespace, Device instance) {
		Service getValue = (Service) OntologyManagement.getInstance().getResource(DeviceService.MY_URI,
				namespace + SERVICE_GET_VALUE);
		getValue.addFilteringInput(namespace + IN_DEVICE, instance.getClassURI(), 0, 1,
				new String[] { DeviceService.PROP_CONTROLS });
		getValue.addOutput(namespace + OUT_GET_VALUE, TypeMapper.getDatatypeURI(Float.class), 1, 1,
File Project Line
org/universAAL/lddi/smarthome/exporter/devices/DimmerControllerWrapper.java universAAL LDDI Eclipse Smarthome Exporter 114
org/universAAL/lddi/smarthome/exporter/devices/DimmerSensorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 104
org/universAAL/lddi/smarthome/exporter/devices/LightdimmerControllerWrapper.java universAAL LDDI Eclipse Smarthome Exporter 114
org/universAAL/lddi/smarthome/exporter/devices/LightdimmerSensorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 102
org/universAAL/lddi/smarthome/exporter/devices/LightswitchControllerWrapper.java universAAL LDDI Eclipse Smarthome Exporter 114
org/universAAL/lddi/smarthome/exporter/devices/LightswitchSensorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 103
	}

	public void publish(Event event) {
		Integer theValue = null;
		Activator.logD("changedCurrentLevel", "Changed-Event received");
		if (event instanceof ItemStateEvent) {
			ItemStateEvent stateEvent = (ItemStateEvent) event;
			State s = stateEvent.getItemState();
			if (s instanceof PercentType) {
				theValue = Integer.valueOf(((PercentType) s).intValue());
			} else if (s instanceof OnOffType) {
				if (((OnOffType) s).compareTo(OnOffType.OFF) == 0) {
					theValue = Integer.valueOf(0);
				} else {
					theValue = Integer.valueOf(100);
				}
			}
		}
		if (theValue != null) {
File Project Line
org/universAAL/lddi/smarthome/exporter/devices/SwitchControllerWrapper.java universAAL LDDI Eclipse Smarthome Exporter 67
org/universAAL/lddi/smarthome/exporter/devices/SwitchSensorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 66
				.getFixedValueRestriction(ContextEvent.PROP_RDF_PREDICATE, SwitchController.PROP_HAS_VALUE);
		// TODO Object restr
		cep.addRestriction(subjectRestriction);
		cep.addRestriction(predicateRestriction);
		info.setProvidedEvents(new ContextEventPattern[] { cep });
		cp = new DefaultContextPublisher(context, info);
	}

	@Override
	public StatusValue executeGet() {
		OnOffType value = (OnOffType) Activator.getOpenhab().get(shDeviceName)
				.getStateAs((Class<? extends State>) OnOffType.class);
		Activator.logD("getStatus", "The service called was 'get the status'");
		if (value == null)
			return null;
		return (value.compareTo(OnOffType.ON) == 0) ? StatusValue.Activated : StatusValue.NotActivated;
	}

	@Override
	public boolean executeSet(StatusValue value) {
File Project Line
org/universAAL/lddi/lib/ieeex73std/x73/p20601/GetResultSimple.java universAAL LDDI Library IEEE x073 standard implementation 36
org/universAAL/lddi/lib/ieeex73std/x73/p20601/SetResultSimple.java universAAL LDDI Library IEEE x073 standard implementation 36
public class GetResultSimple implements IASN1PreparedElement {

	@ASN1Element(name = "obj-handle", isOptional = false, hasTag = false, hasDefaultValue = false)

	private HANDLE obj_handle = null;

	@ASN1Element(name = "attribute-list", isOptional = false, hasTag = false, hasDefaultValue = false)

	private AttributeList attribute_list = null;

	public HANDLE getObj_handle() {
		return this.obj_handle;
	}

	public void setObj_handle(HANDLE value) {
		this.obj_handle = value;
	}

	public AttributeList getAttribute_list() {
		return this.attribute_list;
	}

	public void setAttribute_list(AttributeList value) {
		this.attribute_list = value;
	}

	public void initWithDefaults() {

	}

	private static IASN1PreparedElementData preparedData = CoderFactory.getInstance()
			.newPreparedElementData(GetResultSimple.class);
File Project Line
org/universAAL/lddi/smarthome/exporter/devices/AbstractFloatCallee.java universAAL LDDI Eclipse Smarthome Exporter 132
org/universAAL/lddi/smarthome/exporter/devices/AbstractIntegerCallee.java universAAL LDDI Eclipse Smarthome Exporter 134
org/universAAL/lddi/smarthome/exporter/devices/AbstractStatusValueCallee.java universAAL LDDI Eclipse Smarthome Exporter 133
	public abstract boolean executeSet(Float value);

	/**
	 * Get the typical service profiles for a controller: GET/SET the has value
	 * prop.
	 *
	 * @param namespace
	 *            Must be the same as the one set in the constructor
	 * @param instance
	 *            The instance of the ontological representation of the device
	 * @return
	 */
	public static ServiceProfile[] getServiceProfiles(String namespace, Device instance) {
		ServiceProfile[] profiles = new ServiceProfile[2];
		profiles[0] = getServiceProfileGET(namespace, instance);
		profiles[1] = getServiceProfileSET(namespace, instance);
		return profiles;
	}

	public static ServiceProfile getServiceProfileGET(String namespace, Device instance) {
		Service getValue = (Service) OntologyManagement.getInstance().getResource(DeviceService.MY_URI,
				namespace + SERVICE_GET_VALUE);
		getValue.addFilteringInput(namespace + IN_DEVICE, instance.getClassURI(), 0, 1,
				new String[] { DeviceService.PROP_CONTROLS });
		getValue.addOutput(namespace + OUT_GET_VALUE, TypeMapper.getDatatypeURI(Float.class), 1, 1,
File Project Line
org/universAAL/lddi/lib/ieeex73std/testchannel20601/Aarq10407APDUtest.java universAAL LDDI Library IEEE x073 standard implementation 40
org/universAAL/lddi/lib/ieeex73std/testchannel20601/Aarq10415APDUtest.java universAAL LDDI Library IEEE x073 standard implementation 40
org/universAAL/lddi/lib/ieeex73std/testchannel20601/Aarq10417APDUtest.java universAAL LDDI Library IEEE x073 standard implementation 40
org/universAAL/lddi/lib/ieeex73std/testchannel20601/UnknownCfg.java universAAL LDDI Library IEEE x073 standard implementation 40
				(byte) 0xA0, (byte) 0x00, // encoding rules (MDER)
				(byte) 0x80, (byte) 0x00, (byte) 0x00, (byte) 0x00, // nomenclature
																	// version
				(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, // functional
																	// units
				(byte) 0x00, (byte) 0x80, (byte) 0x00, (byte) 0x00, // sysType
																	// (agent)
				(byte) 0x00, (byte) 0x08, // sys-id length (8)
				(byte) 0x11, (byte) 0x22, (byte) 0x33, (byte) 0x44, // sys-id
				(byte) 0x55, (byte) 0x66, (byte) 0x77, (byte) 0x88, (byte) 0x02, (byte) 0xBC, // dev
File Project Line
org/universAAL/lddi/lib/ieeex73std/testchannel20601/RealMeasure10415PrstAPDUtest.java universAAL LDDI Library IEEE x073 standard implementation 41
org/universAAL/lddi/lib/ieeex73std/testchannel20601/RealMeasure10415PrstAPDUtest.java universAAL LDDI Library IEEE x073 standard implementation 65
org/universAAL/lddi/lib/ieeex73std/testchannel20601/RealMeasure10415PrstAPDUtest.java universAAL LDDI Library IEEE x073 standard implementation 77
				(byte) 0x00, (byte) 0xA0, // total length of report

				// Measure 1
				(byte) 0x00, (byte) 0x01, // HANDLE = 1
				(byte) 0x00, (byte) 0x03, // number of objects = 3
				(byte) 0x00, (byte) 0x1A, // Length of measure
				(byte) 0x0A, (byte) 0x56, // Object 1: Type: Nu_val_obs_simp
				(byte) 0x00, (byte) 0x04, // length
				(byte) 0xFE, (byte) 0x00, (byte) 0x1C, (byte) 0x5C, // Value
																	// (mass)
				(byte) 0x09, (byte) 0x90, // Object 2: time_stamp_abs
				(byte) 0x00, (byte) 0x08, // Length
				(byte) 0x20, (byte) 0x12, (byte) 0x05, (byte) 0x08, // Time
				(byte) 0x15, (byte) 0x02, (byte) 0x16, (byte) 0x00, (byte) 0x09, (byte) 0x96, // Object
File Project Line
org/universAAL/lddi/smarthome/exporter/devices/BlindActuatorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 78
org/universAAL/lddi/smarthome/exporter/devices/CurtainActuatorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 80
org/universAAL/lddi/smarthome/exporter/devices/DimmerActuatorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 79
org/universAAL/lddi/smarthome/exporter/devices/LightdimmerActuatorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 77
				.getFixedValueRestriction(ContextEvent.PROP_RDF_PREDICATE, BlindActuator.PROP_HAS_VALUE);
		// TODO Object restr
		cep.addRestriction(subjectRestriction);
		cep.addRestriction(predicateRestriction);
		info.setProvidedEvents(new ContextEventPattern[] { cep });
	}

	@Override
	public Integer executeGet() {
		PercentType value = (PercentType) Activator.getOpenhab().get(shDeviceName)
				.getStateAs((Class<? extends State>) PercentType.class);
		Activator.logD("getStatus", "The service called was 'get the status'");
		if (value == null)
			return null;
		return Integer.valueOf(value.intValue());
	}

	@Override
	public boolean executeSet(Integer value) {
		Activator.logD("setStatus", "The service called was 'set the status' " + value);
		try {
			ItemCommandEvent itemCommandEvent;
File Project Line
org/universAAL/lddi/smarthome/exporter/devices/LightdimmerControllerWrapper.java universAAL LDDI Eclipse Smarthome Exporter 67
org/universAAL/lddi/smarthome/exporter/devices/LightswitchControllerWrapper.java universAAL LDDI Eclipse Smarthome Exporter 67
		Activator.logD("LightdimmerControllerWrapper", "Ready to subscribe");
		shDeviceName = itemName;

		// URI must be the same declared in the super constructor
		String deviceURI = Activator.NAMESPACE + itemName;
		ontDevice = new LightController(deviceURI);

		// Commissioning
		// TODO Set location based on tags?

		// Context reg
		ContextProvider info = new ContextProvider(deviceURI + "Provider");
		info.setType(ContextProviderType.controller);
		ContextEventPattern cep = new ContextEventPattern();
		MergedRestriction subjectRestriction = MergedRestriction.getFixedValueRestriction(ContextEvent.PROP_RDF_SUBJECT,
				ontDevice);
		MergedRestriction predicateRestriction = MergedRestriction
				.getFixedValueRestriction(ContextEvent.PROP_RDF_PREDICATE, LightController.PROP_HAS_VALUE);
		// TODO Object restr
		cep.addRestriction(subjectRestriction);
		cep.addRestriction(predicateRestriction);
		info.setProvidedEvents(new ContextEventPattern[] { cep });
		cp = new DefaultContextPublisher(context, info);
	}

	@Override
	public Integer executeGet() {
File Project Line
org/universAAL/lddi/smarthome/exporter/devices/LightdimmerSensorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 64
org/universAAL/lddi/smarthome/exporter/devices/LightswitchSensorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 65
		Activator.logD("LightdimmerSensorWrapper", "Ready to subscribe");
		shDeviceName = itemName;

		// URI must be the same declared in the super constructor
		String deviceURI = Activator.NAMESPACE + itemName;
		ontDevice = new LightSensor(deviceURI);

		// Commissioning
		// TODO Set location based on tags?

		// Context reg
		ContextProvider info = new ContextProvider(deviceURI + "Provider");
		info.setType(ContextProviderType.controller);
		ContextEventPattern cep = new ContextEventPattern();
		MergedRestriction subjectRestriction = MergedRestriction.getFixedValueRestriction(ContextEvent.PROP_RDF_SUBJECT,
				ontDevice);
		MergedRestriction predicateRestriction = MergedRestriction
				.getFixedValueRestriction(ContextEvent.PROP_RDF_PREDICATE, LightSensor.PROP_HAS_VALUE);
		// TODO Object restr
		cep.addRestriction(subjectRestriction);
		cep.addRestriction(predicateRestriction);
		info.setProvidedEvents(new ContextEventPattern[] { cep });
		cp = new DefaultContextPublisher(context, info);
	}

	@Override
	public Integer executeGet() {
File Project Line
org/universAAL/lddi/smarthome/exporter/devices/BlindControllerWrapper.java universAAL LDDI Eclipse Smarthome Exporter 84
org/universAAL/lddi/smarthome/exporter/devices/BlindSensorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 81
org/universAAL/lddi/smarthome/exporter/devices/CurtainControllerWrapper.java universAAL LDDI Eclipse Smarthome Exporter 84
org/universAAL/lddi/smarthome/exporter/devices/CurtainSensorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 83
org/universAAL/lddi/smarthome/exporter/devices/DimmerControllerWrapper.java universAAL LDDI Eclipse Smarthome Exporter 84
org/universAAL/lddi/smarthome/exporter/devices/DimmerSensorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 83
org/universAAL/lddi/smarthome/exporter/devices/LightdimmerControllerWrapper.java universAAL LDDI Eclipse Smarthome Exporter 84
org/universAAL/lddi/smarthome/exporter/devices/LightdimmerSensorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 81
				.getFixedValueRestriction(ContextEvent.PROP_RDF_PREDICATE, BlindController.PROP_HAS_VALUE);
		// TODO Object restr
		cep.addRestriction(subjectRestriction);
		cep.addRestriction(predicateRestriction);
		info.setProvidedEvents(new ContextEventPattern[] { cep });
		cp = new DefaultContextPublisher(context, info);
	}

	@Override
	public Integer executeGet() {
		PercentType value = (PercentType) Activator.getOpenhab().get(shDeviceName)
				.getStateAs((Class<? extends State>) PercentType.class);
		Activator.logD("getStatus", "The service called was 'get the status'");
		if (value == null)
			return null;
		return Integer.valueOf(value.intValue());
	}

	@Override
	public boolean executeSet(Integer value) {
File Project Line
org/universAAL/lddi/lib/ieeex73std/measurements/Measurement.java universAAL LDDI Library IEEE x073 standard implementation 282
org/universAAL/lddi/lib/ieeex73std/x73/p104zz/DeviceSpecialization.java universAAL LDDI Library IEEE x073 standard implementation 395
		device_year = ASNUtils.BCDtoInt(abstime.getCentury().getValue()) * 100
				+ ASNUtils.BCDtoInt(abstime.getYear().getValue());
		device_month = ASNUtils.BCDtoInt(abstime.getMonth().getValue());
		device_day = ASNUtils.BCDtoInt(abstime.getDay().getValue());
		device_hour = ASNUtils.BCDtoInt(abstime.getHour().getValue());
		device_min = ASNUtils.BCDtoInt(abstime.getMinute().getValue());
		device_secs = ASNUtils.BCDtoInt(abstime.getSecond().getValue());
File Project Line
org/universAAL/lddi/lib/ieeex73std/testchannel20601/Aarq10407APDUtest.java universAAL LDDI Library IEEE x073 standard implementation 26
org/universAAL/lddi/lib/ieeex73std/testchannel20601/Aarq10415APDUtest.java universAAL LDDI Library IEEE x073 standard implementation 26
org/universAAL/lddi/lib/ieeex73std/testchannel20601/Aarq10417APDUtest.java universAAL LDDI Library IEEE x073 standard implementation 26
org/universAAL/lddi/lib/ieeex73std/testchannel20601/UnknownCfg.java universAAL LDDI Library IEEE x073 standard implementation 26
	public Aarq10407APDUtest() {

		apdu = new byte[] { (byte) 0xE2, (byte) 0x00, // choice APDU
				(byte) 0x00, (byte) 0x32, // length
				(byte) 0x80, (byte) 0x00, (byte) 0x00, (byte) 0x00, // association
																	// version
				(byte) 0x00, (byte) 0x01, (byte) 0x00, (byte) 0x2A, // data
																	// protocol
																	// list = 1,
																	// length 42
				(byte) 0x50, (byte) 0x79, // data protocol id 20601
				(byte) 0x00, (byte) 0x26, // data proto info length
				(byte) 0x80, (byte) 0x00, (byte) 0x00, (byte) 0x00, // protocol
																	// version
				(byte) 0xA0, (byte) 0x00, // encoding rules (MDER)
File Project Line
org/universAAL/lddi/lib/ieeex73std/x73/p20601/AttributeIdList.java universAAL LDDI Library IEEE x073 standard implementation 44
org/universAAL/lddi/lib/ieeex73std/x73/p20601/MetricIdList.java universAAL LDDI Library IEEE x073 standard implementation 44
	public AttributeIdList(java.util.Collection<OID_Type> value) {
		setValue(value);
	}

	public void setValue(java.util.Collection<OID_Type> value) {
		this.value = value;
	}

	public java.util.Collection<OID_Type> getValue() {
		return this.value;
	}

	public void initValue() {
		setValue(new java.util.LinkedList<OID_Type>());
	}

	public void add(OID_Type item) {
		value.add(item);
	}

	public void initWithDefaults() {
	}

	private static IASN1PreparedElementData preparedData = CoderFactory.getInstance()
			.newPreparedElementData(AttributeIdList.class);
File Project Line
org/universAAL/lddi/lib/ieeex73std/utils/Testing.java universAAL LDDI Library IEEE x073 standard implementation 94
org/universAAL/lddi/lib/ieeex73std/utils/Testing.java universAAL LDDI Library IEEE x073 standard implementation 121
org/universAAL/lddi/lib/ieeex73std/utils/Testing.java universAAL LDDI Library IEEE x073 standard implementation 308
org/universAAL/lddi/lib/ieeex73std/utils/Testing.java universAAL LDDI Library IEEE x073 standard implementation 335
		Aarq10415APDUtest aarq = new Aarq10415APDUtest();
		try {

			byte[] toDecode = aarq.getByteArray();

			bais = new ByteArrayInputStream(toDecode);
			ApduType apdu = decoder.decode(bais, ApduType.class);
			ApduType response = rmp.processAPDU(apdu);

			// simulate sending response

			if (response != null) {
				baos = new ByteArrayOutputStream();
				encoder.encode((T) response, baos);

				byte[] apdu_bytes = baos.toByteArray();
				Logging.logSend(ASNUtils.asHexwithspaces(apdu_bytes));
			}

		} catch (Exception e) {
			// TODO Auto-generated catch block
			Logging.logError(e.toString());
		}

	}

	public void decodeUnknownCfg(APDUProcessor rmp) {
File Project Line
org/universAAL/lddi/lib/ieeex73std/utils/Testing.java universAAL LDDI Library IEEE x073 standard implementation 148
org/universAAL/lddi/lib/ieeex73std/utils/Testing.java universAAL LDDI Library IEEE x073 standard implementation 175
org/universAAL/lddi/lib/ieeex73std/utils/Testing.java universAAL LDDI Library IEEE x073 standard implementation 201
		ExtendedCfg10415 cfg = new ExtendedCfg10415();
		try {

			byte[] toDecode = cfg.getByteArray();

			bais = new ByteArrayInputStream(toDecode);
			ApduType apdu = decoder.decode(bais, ApduType.class);
			ApduType response = rmp.processAPDU(apdu);

			// simulate sending response

			if (response != null) {
				baos = new ByteArrayOutputStream();
				encoder.encode((T) response, baos);

				byte[] apdu_bytes = baos.toByteArray();
				Logging.logSend(ASNUtils.asHexwithspaces(apdu_bytes));
			}

		} catch (Exception e) {
			// TODO Auto-generated catch block
			Logging.logError(e.toString());
		}

	}

	public void decodeExtended10404CfgReport(APDUProcessor rmp) {
File Project Line
org/universAAL/lddi/lib/ieeex73std/utils/Testing.java universAAL LDDI Library IEEE x073 standard implementation 227
org/universAAL/lddi/lib/ieeex73std/utils/Testing.java universAAL LDDI Library IEEE x073 standard implementation 254
org/universAAL/lddi/lib/ieeex73std/utils/Testing.java universAAL LDDI Library IEEE x073 standard implementation 281
		ExtendedMeasure10415APDUtest extmeasure = new ExtendedMeasure10415APDUtest();
		try {

			byte[] toDecode = extmeasure.getByteArray();

			bais = new ByteArrayInputStream(toDecode);
			ApduType apdu = decoder.decode(bais, ApduType.class);
			ApduType response = rmp.processAPDU(apdu);

			// simulate sending response

			if (response != null) {
				baos = new ByteArrayOutputStream();
				encoder.encode((T) response, baos);

				byte[] apdu_bytes = baos.toByteArray();
				Logging.logSend(ASNUtils.asHexwithspaces(apdu_bytes));
			}

		} catch (Exception e) {
			// TODO Auto-generated catch block
			Logging.logError(e.toString());
		}

	}

	public void decodeExtended10404Measure(APDUProcessor rmp) {
File Project Line
org/universAAL/lddi/lib/ieeex73std/utils/Testing.java universAAL LDDI Library IEEE x073 standard implementation 414
org/universAAL/lddi/lib/ieeex73std/utils/Testing.java universAAL LDDI Library IEEE x073 standard implementation 441
org/universAAL/lddi/lib/ieeex73std/utils/Testing.java universAAL LDDI Library IEEE x073 standard implementation 468
org/universAAL/lddi/lib/ieeex73std/utils/Testing.java universAAL LDDI Library IEEE x073 standard implementation 495
		Measure10415PrstAPDUtest masurement = new Measure10415PrstAPDUtest();

		try {

			byte[] toDecode = masurement.getByteArray();

			bais = new ByteArrayInputStream(toDecode);
			ApduType apdu = decoder.decode(bais, ApduType.class);
			ApduType response = rmp.processAPDU(apdu);

			// simulate sending response

			if (response != null) {
				baos = new ByteArrayOutputStream();
				encoder.encode((T) response, baos);

				byte[] apdu_bytes = baos.toByteArray();
				Logging.logSend(ASNUtils.asHexwithspaces(apdu_bytes));
			}

		} catch (Exception e) {
			// TODO Auto-generated catch block
			Logging.logError(e.toString());
		}
	}

	public void decodeRealWeightMeasure(APDUProcessor rmp) {
File Project Line
org/universAAL/lddi/lib/ieeex73std/manager/apdu/APDUProcessor.java universAAL LDDI Library IEEE x073 standard implementation 629
org/universAAL/lddi/lib/ieeex73std/manager/apdu/APDUProcessor.java universAAL LDDI Library IEEE x073 standard implementation 665
org/universAAL/lddi/lib/ieeex73std/manager/apdu/APDUProcessor.java universAAL LDDI Library IEEE x073 standard implementation 750
org/universAAL/lddi/lib/ieeex73std/manager/apdu/APDUProcessor.java universAAL LDDI Library IEEE x073 standard implementation 783
org/universAAL/lddi/lib/ieeex73std/manager/apdu/APDUProcessor.java universAAL LDDI Library IEEE x073 standard implementation 816
org/universAAL/lddi/lib/ieeex73std/manager/apdu/APDUProcessor.java universAAL LDDI Library IEEE x073 standard implementation 849
		if (choice.isRoiv_cmip_actionSelected()) {
			if (!checkRoivState()) {
				// Manager unassociated. Transmit abrt
				apdu = msg_generator.AbrtApduGenerator(StatusCodes.ABORT_REASON_UNDEFINED);
				return apdu;
			} else {
				// different procedures depending of the state
				if (statemachine
						.getChannelState() == StateMachine20601.CHANNELSTATE_ASSOCIATED_CONFIGURING_WAITINGFORCONFIG) {
					// not allowed
					apdu = msg_generator.RoerGenerator(dataapdu.getInvoke_id(), StatusCodes.NO_SUCH_OBJECT_INSTANCE);
					return apdu;

				} else if (statemachine
						.getChannelState() == StateMachine20601.CHANNELSTATE_ASSOCIATED_CONFIGURING_CHECKINGCONFIG) {

					// The agent only sends event report messages. This should
					// never happen
					apdu = msg_generator.RoerGenerator(dataapdu.getInvoke_id(), StatusCodes.NO_SUCH_ACTION);
					return apdu;

				} else if (statemachine.getChannelState() == StateMachine20601.CHANNELSTATE_ASSOCIATED_OPERATING) {
					// TODO processing of Roiv_cmip_actionSelected
					return null; // modify

				} else if (statemachine.getChannelState() == StateMachine20601.CHANNELSTATE_DISASSOCIATING) {
File Project Line
org/universAAL/lddi/lib/ieeex73std/testchannel20601/ExtendedCfg10404.java universAAL LDDI Library IEEE x073 standard implementation 57
org/universAAL/lddi/lib/ieeex73std/testchannel20601/ExtendedCfg10404.java universAAL LDDI Library IEEE x073 standard implementation 144
				(byte) 0x00, (byte) 0x24, // attributes.length = 36

				// 8
				(byte) 0x09, (byte) 0x2F, // attribute-id = MDC_ATTR_ID_TYPE
				(byte) 0x00, (byte) 0x04, // attribute-value.length = 4
				(byte) 0x00, (byte) 0x02, (byte) 0x4B, (byte) 0xB8, // MDC_PART_SCADA
																	// |
																	// MDC_PULS_OXIM_SAT_O2

				// 6
				(byte) 0x0A, (byte) 0x46, // attribute-id =
											// MDC_ATTR_METRIC_SPEC_SMALL
				(byte) 0x00, (byte) 0x02, // attribute-value.length = 2
				(byte) 0x40, (byte) 0xC0, // avail-stored-data,
											// acc-manager-init, acc-agent-init,
											// measured

				// 6
				(byte) 0x09, (byte) 0x96, // attribute-id = MDC_ATTR_UNIT_CODE
				(byte) 0x00, (byte) 0x02, // attribute-value.length = 2
				(byte) 0x02, (byte) 0x20, // MDC_DIM_PERCENT

				// 16
				(byte) 0x0A, (byte) 0x55, // attribute-id =
File Project Line
org/universAAL/lddi/lib/ieeex73std/x73/p104zz/p10407BloodPressure.java universAAL LDDI Library IEEE x073 standard implementation 212
org/universAAL/lddi/lib/ieeex73std/x73/p104zz/p10417Glucometer.java universAAL LDDI Library IEEE x073 standard implementation 94
		pulserateattributes.add(pulseattr);

		// Attribute Value Map
		// - MDC_ATTR_NU_VAL_OBS_BASIC (the value of mass) size = 2
		// (SFloat-Type)
		// - MDC_ATTR_TIME_STAMP_ABS (time of measurement) size = 8 (8xINT_U8)
		AttrValMap attrmap = new AttrValMap();
		attrmap.initValue();

		AttrValMapEntry entry1 = new AttrValMapEntry();
		OID_Type entry1_oid = new OID_Type();
		entry1_oid.setValue(new INT_U16(NomenclatureCodes.MDC_ATTR_NU_VAL_OBS_BASIC));
		entry1.setAttribute_id(entry1_oid);
		entry1.setAttribute_len(new INT_U16(2));

		AttrValMapEntry entry2 = new AttrValMapEntry();
		OID_Type entry2_oid = new OID_Type();
		entry2_oid.setValue(new INT_U16(NomenclatureCodes.MDC_ATTR_TIME_STAMP_ABS));
		entry2.setAttribute_id(entry2_oid);
		entry2.setAttribute_len(new INT_U16(8));

		attrmap.add(entry1);
		attrmap.add(entry2);
File Project Line
org/universAAL/lddi/lib/ieeex73std/x73/p104zz/p10415WeighingScale.java universAAL LDDI Library IEEE x073 standard implementation 78
org/universAAL/lddi/lib/ieeex73std/x73/p104zz/p10417Glucometer.java universAAL LDDI Library IEEE x073 standard implementation 70
		bodyweight.add(attr);

		// Metric-Spec-Small: can be mss-avail-intermitent,
		// mss-avail-stored-data, mss-upd-aperiodic, mss-msmt-aperiodic,
		// mss-acc-agent-initiated

		MetricSpecSmall mss = new MetricSpecSmall();
		BitString bs = new BitString();
		byte[] bs_byte = new byte[2];

		int bs_val = StatusCodes.MSS_AVAIL_INTERMITTENT | StatusCodes.MSS_AVAIL_STORED_DATA
				| StatusCodes.MSS_UPD_APERIODIC | StatusCodes.MSS_MSMT_APERIODIC | StatusCodes.MSS_ACC_AGENT_INITIATED;

		bs_byte[1] = (byte) (bs_val & 0x000000FF);
		bs_byte[0] = (byte) (bs_val & 0x0000FF00);
		bs.setValue(bs_byte);
		mss.setValue(new BITS_16(new BitString(bs)));
		attr = new Attribute(NomenclatureCodes.MDC_ATTR_METRIC_SPEC_SMALL, mss);
File Project Line
org/universAAL/lddi/lib/ieeex73std/org/bn/coders/Decoder.java universAAL LDDI Library IEEE x073 standard implementation 395
org/universAAL/lddi/lib/ieeex73std/org/bn/coders/Encoder.java universAAL LDDI Library IEEE x073 standard implementation 260
			} else if (!elementInfo.getASN1ElementInfo().hasTag()) {
				ASN1Element fieldInfo = field.getAnnotation(ASN1Element.class);
				if (fieldInfo != null && fieldInfo.hasTag()) {
					ASN1ElementMetadata elData = new ASN1ElementMetadata(elementInfo.getASN1ElementInfo().name(),
							elementInfo.getASN1ElementInfo().isOptional(), fieldInfo.hasTag(),
							fieldInfo.isImplicitTag(), fieldInfo.tagClass(), fieldInfo.tag(),
							elementInfo.getASN1ElementInfo().hasDefaultValue());
					elementInfo.setPreparedASN1ElementInfo(elData);
				}
				;
			}

		}
File Project Line
org/universAAL/lddi/smarthome/exporter/devices/LightdimmerActuatorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 60
org/universAAL/lddi/smarthome/exporter/devices/LightswitchActuatorWrapper.java universAAL LDDI Eclipse Smarthome Exporter 60
		Activator.logD("LightdimmerActuatorWrapper", "Ready to subscribe");
		shDeviceName = itemName;

		// URI must be the same declared in the super constructor
		String deviceURI = Activator.NAMESPACE + itemName;
		ontDevice = new LightActuator(deviceURI);

		// Commissioning
		// TODO Set location based on tags?

		// Context reg
		ContextProvider info = new ContextProvider(deviceURI + "Provider");
		info.setType(ContextProviderType.controller);
		ContextEventPattern cep = new ContextEventPattern();
		MergedRestriction subjectRestriction = MergedRestriction.getFixedValueRestriction(ContextEvent.PROP_RDF_SUBJECT,
				ontDevice);
		MergedRestriction predicateRestriction = MergedRestriction
				.getFixedValueRestriction(ContextEvent.PROP_RDF_PREDICATE, LightActuator.PROP_HAS_VALUE);
		// TODO Object restr
		cep.addRestriction(subjectRestriction);
		cep.addRestriction(predicateRestriction);
		info.setProvidedEvents(new ContextEventPattern[] { cep });
	}

	@Override
	public Integer executeGet() {
File Project Line
org/universAAL/lddi/lib/ieeex73std/testchannel20601/RealMeasure10415PrstAPDUtest.java universAAL LDDI Library IEEE x073 standard implementation 54
org/universAAL/lddi/lib/ieeex73std/testchannel20601/RealMeasure10415PrstAPDUtest.java universAAL LDDI Library IEEE x073 standard implementation 65
org/universAAL/lddi/lib/ieeex73std/testchannel20601/RealMeasure10415PrstAPDUtest.java universAAL LDDI Library IEEE x073 standard implementation 71
org/universAAL/lddi/lib/ieeex73std/testchannel20601/RealMeasure10415PrstAPDUtest.java universAAL LDDI Library IEEE x073 standard implementation 77
				(byte) 0x15, (byte) 0x02, (byte) 0x16, (byte) 0x00, (byte) 0x09, (byte) 0x96, // Object
																								// 3:
																								// Type:
																								// Unit
				(byte) 0x00, (byte) 0x02, // Length
				(byte) 0x06, (byte) 0xC3, // Kg.

				// Measure 2
				(byte) 0x00, (byte) 0x01, (byte) 0x00, (byte) 0x03, (byte) 0x00, (byte) 0x1A, (byte) 0x0A, (byte) 0x56,
				(byte) 0x00, (byte) 0x04, (byte) 0xFE, (byte) 0x00, (byte) 0x1C, (byte) 0x66, (byte) 0x09, (byte) 0x90,
File Project Line
org/universAAL/lddi/smarthome/exporter/devices/AbstractFloatCallee.java universAAL LDDI Eclipse Smarthome Exporter 156
org/universAAL/lddi/smarthome/exporter/devices/AbstractIntegerCallee.java universAAL LDDI Eclipse Smarthome Exporter 158
		getValue.addOutput(namespace + OUT_GET_VALUE, TypeMapper.getDatatypeURI(Float.class), 1, 1,
				new String[] { DeviceService.PROP_CONTROLS, ValueDevice.PROP_HAS_VALUE });
		return getValue.getProfile();
	}

	public static ServiceProfile getServiceProfileSET(String namespace, Device instance) {
		Service setValue = (Service) OntologyManagement.getInstance().getResource(DeviceService.MY_URI,
				namespace + SERVICE_SET_VALUE);
		setValue.addFilteringInput(namespace + IN_DEVICE, instance.getClassURI(), 0, 1,
				new String[] { DeviceService.PROP_CONTROLS });
		setValue.addInputWithChangeEffect(namespace + IN_SET_VALUE, TypeMapper.getDatatypeURI(Float.class), 1, 1,
File Project Line
org/universAAL/hw/exporter/zigbee/ha/devices/DimmerLightCallee.java universAAL LDDI ZigBee exporter - Home Automation 79
org/universAAL/hw/exporter/zigbee/ha/devices/OnOffLightCallee.java universAAL LDDI ZigBee exporter - Home Automation 83
org/universAAL/hw/exporter/zigbee/ha/devices/PresenceDetectorCallee.java universAAL LDDI ZigBee exporter - Home Automation 82
org/universAAL/hw/exporter/zigbee/ha/devices/TemperatureSensorCallee.java universAAL LDDI ZigBee exporter - Home Automation 91
		ontologyDevice = new LightActuator(deviceURI);
		// Commissioning
		String locationSuffix = Activator.getProperties().getProperty(deviceSuffix);
		if (locationSuffix != null && !locationSuffix.equals(Activator.UNINITIALIZED_SUFFIX)) {
			ontologyDevice.setLocation(new Room(Constants.MIDDLEWARE_LOCAL_ID_PREFIX + locationSuffix));
		} else {
			Properties prop = Activator.getProperties();
			prop.setProperty(deviceSuffix, Activator.UNINITIALIZED_SUFFIX);
			Activator.setProperties(prop);
		}
		// Serv reg
		newProfiles = getServiceProfiles(NAMESPACE, DeviceService.MY_URI, ontologyDevice);
		this.addNewServiceProfiles(newProfiles);
		// Context reg
		ContextProvider info = new ContextProvider(NAMESPACE + "zbLightingContextProvider");
File Project Line
org/universAAL/lddi/lib/ieeex73std/utils/Testing.java universAAL LDDI Library IEEE x073 standard implementation 70
org/universAAL/lddi/lib/ieeex73std/utils/Testing.java universAAL LDDI Library IEEE x073 standard implementation 97
org/universAAL/lddi/lib/ieeex73std/utils/Testing.java universAAL LDDI Library IEEE x073 standard implementation 124
org/universAAL/lddi/lib/ieeex73std/utils/Testing.java universAAL LDDI Library IEEE x073 standard implementation 151
org/universAAL/lddi/lib/ieeex73std/utils/Testing.java universAAL LDDI Library IEEE x073 standard implementation 178
org/universAAL/lddi/lib/ieeex73std/utils/Testing.java universAAL LDDI Library IEEE x073 standard implementation 204
org/universAAL/lddi/lib/ieeex73std/utils/Testing.java universAAL LDDI Library IEEE x073 standard implementation 230
org/universAAL/lddi/lib/ieeex73std/utils/Testing.java universAAL LDDI Library IEEE x073 standard implementation 257
org/universAAL/lddi/lib/ieeex73std/utils/Testing.java universAAL LDDI Library IEEE x073 standard implementation 284
org/universAAL/lddi/lib/ieeex73std/utils/Testing.java universAAL LDDI Library IEEE x073 standard implementation 311
org/universAAL/lddi/lib/ieeex73std/utils/Testing.java universAAL LDDI Library IEEE x073 standard implementation 338
org/universAAL/lddi/lib/ieeex73std/utils/Testing.java universAAL LDDI Library IEEE x073 standard implementation 365
org/universAAL/lddi/lib/ieeex73std/utils/Testing.java universAAL LDDI Library IEEE x073 standard implementation 391
org/universAAL/lddi/lib/ieeex73std/utils/Testing.java universAAL LDDI Library IEEE x073 standard implementation 418
org/universAAL/lddi/lib/ieeex73std/utils/Testing.java universAAL LDDI Library IEEE x073 standard implementation 445
org/universAAL/lddi/lib/ieeex73std/utils/Testing.java universAAL LDDI Library IEEE x073 standard implementation 472
org/universAAL/lddi/lib/ieeex73std/utils/Testing.java universAAL LDDI Library IEEE x073 standard implementation 499
			byte[] toDecode = aare.getByteArray();

			bais = new ByteArrayInputStream(toDecode);
			ApduType apdu = decoder.decode(bais, ApduType.class);
			ApduType response = rmp.processAPDU(apdu);

			// simulate sending response

			if (response != null) {
				baos = new ByteArrayOutputStream();
				encoder.encode((T) response, baos);

				byte[] apdu_bytes = baos.toByteArray();
				Logging.logSend(ASNUtils.asHexwithspaces(apdu_bytes));
			}

		} catch (Exception e) {
			// TODO Auto-generated catch block
			Logging.logError(e.toString());
		}

	}

	public void decode10415AARQ(APDUProcessor rmp) {