G
- GTU typepublic interface Perception<G extends GTU> extends Serializable
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Modifier and Type | Method and Description |
---|---|
<T extends PerceptionCategory<?,?>> |
addPerceptionCategory(T perceptionCategory)
Adds given perception category to the perception.
|
<T extends PerceptionCategory<?,?>> |
contains(Class<T> category)
Returns whether the given perception category is present.
|
G |
getGtu()
Return the GTU of this perception.
|
<T extends PerceptionCategory<?,?>> |
getPerceptionCategory(Class<T> category)
Returns the given perception category.
|
<T extends PerceptionCategory<?,?>> |
getPerceptionCategoryOrNull(Class<T> category)
Returns the given perception category, or
null if not present. |
void |
perceive()
Invoked by the GTU prior to determining the operational plan.
|
void |
removePerceptionCategory(PerceptionCategory<?,?> perceptionCategory)
Remove give perception category.
|
void perceive() throws GTUException, NetworkException, ParameterException
GTUException
- when GTU has not been properly initialized.NetworkException
- in case of inconsistencies in the network during perception calculations.ParameterException
- in case of a parameter error.G getGtu() throws GTUException
GTUException
- if the GTU has not been initialized<T extends PerceptionCategory<?,?>> void addPerceptionCategory(T perceptionCategory)
T
- perception category typeperceptionCategory
- T; perception category<T extends PerceptionCategory<?,?>> boolean contains(Class<T> category)
T
- perception categorycategory
- Class<T>; perception category class<T extends PerceptionCategory<?,?>> T getPerceptionCategory(Class<T> category) throws OperationalPlanException
T
- perception categorycategory
- Class<T>; perception category classOperationalPlanException
- if the perception category is not present<T extends PerceptionCategory<?,?>> T getPerceptionCategoryOrNull(Class<T> category)
null
if not present.T
- perception categorycategory
- Class<T>; perception category classvoid removePerceptionCategory(PerceptionCategory<?,?> perceptionCategory)
perceptionCategory
- PerceptionCategory<?,?>; perception category to removeCopyright © 2014–2019 Delft University of Technology. All rights reserved.