public interface SimulationManager extends ContextManager
GATEWAY_ID_PROP_NAME
Modifier and Type | Method and Description |
---|---|
Person |
addPerson(String personName,
String personType)
Creates an instance of a new simulated person.
|
PersonType |
addPersonType(String personType)
Add a new person type to the simulation only if it not exist.
|
void |
attachDeviceToPerson(String deviceId,
String personId)
Attach a device to a person, When moving the person, the device will be also moved
|
void |
attachDeviceToZone(String deviceId,
String zoneId)
Attach a device to a zone.
|
void |
attachPersonToZone(String personId,
String zoneId)
Attach a person to a zone.
|
void |
attachZoneToDevice(String zoneId,
String deviceId)
Attach a zone to a device.
|
LocatedDevice |
createDevice(String deviceType,
String deviceId,
Map<String,Object> properties)
Creates an instance of a simulated device.
|
void |
detachDeviceFromPerson(String deviceId,
String personId)
Detach a device from a person.
|
void |
detachDeviceFromZone(String deviceId,
String zoneId)
Detach a device from a zone.
|
void |
detachPersonFromZone(String personId,
String zoneId)
Detach a person from a zone.
|
void |
detachZoneFromDevice(String zoneId,
String deviceId)
Detach a zone from the device.
|
Person |
getPerson(String personName)
Get a person instance currently available in iCasa simulator.
|
List<Person> |
getPersons()
Retrieves the list of tha available person in the iCasa simulator.
|
Set<Person> |
getPersonsIntoZone(Zone zone)
Gets a set with person in the specified zone
|
PersonType |
getPersonType(String personType)
Get the person type if exist.
|
List<PersonType> |
getPersonTypes()
Get an non-modifiable list of person types available.
|
Set<String> |
getSimulatedDeviceTypes()
Get a non-modifiable set of the device types available in the iCasa context.
|
void |
removeAllDevices()
Removes all simulated device instance in iCasa.
|
void |
removeAllPersons()
Removes all simulated persons in iCasa.
|
void |
removeDevice(String deviceId)
Removes a simulated device instance.
|
void |
removePerson(String personName)
Removes a person currently available in iCasa simulator.
|
void |
removePersonType(String personType)
Removes a person type and all created persons having the removed type.
|
void |
setDeviceFault(String deviceId,
boolean value)
Simulates a fail/reparation in a device.
|
void |
setPersonPosition(String personName,
Position position)
Change the position of a given person.
|
void |
setPersonZone(String personName,
String zoneId)
Moves a person to a zone, into a random generated position inside the given zone.
|
addGlobalVariable, addListener, addZoneVariable, createZone, createZone, getDevice, getDeviceIds, getDevicePosition, getDevices, getDeviceTypes, getGenericDevice, getGlobalVariables, getGlobalVariableValue, getProvidedServices, getProvidedServices, getZone, getZoneFromPosition, getZoneIds, getZones, getZoneVariables, getZoneVariableValue, moveDeviceIntoZone, moveZone, removeAllZones, removeListener, removeZone, resetContext, resizeZone, setDevicePosition, setDeviceState, setGlobalVariable, setParentZone, setZoneVariable
void setDeviceFault(String deviceId, boolean value)
deviceId
- The device to manipulate.value
- true
to simulate a fail. false
to repair.LocatedDevice createDevice(String deviceType, String deviceId, Map<String,Object> properties)
deviceType
- The device typedeviceId
- The new device identifier.properties
- The properties for the new simulated device.IllegalArgumentException
- if a device instance exists with the same identifier.IllegalStateException
- if there no exists a factory matching the deviceType
argument.LocatedDevice
void removeDevice(String deviceId)
deviceId
- The identifier of the simulated device.Set<String> getSimulatedDeviceTypes()
void removeAllDevices()
void setPersonPosition(String personName, Position position)
personName
- the name of the person to move.position
- the new position center absolute positionLocatedObject.getCenterAbsolutePosition()
void setPersonZone(String personName, String zoneId)
personName
- the name of the person.zoneId
- the zone identifier.void removeAllPersons()
Person addPerson(String personName, String personType)
personName
- the new person name.personType
- the person typeIllegalArgumentException
- when a person with the same name exists or if no exist the
personType
.addPersonType(String)
Person getPerson(String personName)
personName
- the person to retrieve.Person
object instance. null
if does not exist.void removePerson(String personName)
personName
- List<Person> getPersons()
PersonType addPersonType(String personType)
personType
- the new person type name..
PersonType getPersonType(String personType)
personType
- the person type name.null
if not.void removePersonType(String personType)
personType
- the person type name to remove.List<PersonType> getPersonTypes()
Set<Person> getPersonsIntoZone(Zone zone)
zone
- the zonevoid attachZoneToDevice(String zoneId, String deviceId)
zoneId
- the identifier of the zone.deviceId
- the identifier of the device.detachZoneFromDevice(String, String)
void detachZoneFromDevice(String zoneId, String deviceId)
zoneId
- the zone identifier.deviceId
- the device identifier.attachZoneToDevice(String, String)
void attachDeviceToPerson(String deviceId, String personId)
deviceId
- the device identifier.personId
- the person name.detachDeviceFromPerson(String, String)
void detachDeviceFromPerson(String deviceId, String personId)
deviceId
- the device identifier.personId
- the person name.attachDeviceToPerson(String, String)
void attachPersonToZone(String personId, String zoneId)
personId
- the person name.zoneId
- the zone identifier.detachPersonFromZone(String, String)
void detachPersonFromZone(String personId, String zoneId)
personId
- the person name.zoneId
- the zone identifier.attachPersonToZone(String, String)
void attachDeviceToZone(String deviceId, String zoneId)
deviceId
- the device identifier.zoneId
- the zone identifier.detachDeviceFromZone(String, String)
void detachDeviceFromZone(String deviceId, String zoneId)
deviceId
- the device identifier.zoneId
- the zone identifier.(String, String)
Copyright © 2012-2013 ADELE Research Group. All Rights Reserved.