vcProcessPointSensor
vcProcessPointSensor is the object type for Process Point Sensor behaviors.
Inherits: vcBehaviour
Properties
Name | Type | Access | Description |
Frame | vcFeature | RW | Defines a Frame feature referenced as the location of sensor in 3D world. |
BoolSignal | vcBoolSignal | RW | Defines a Boolean Signal used to send a True value when processing starts and a False value when processing ends. |
ProcessAt | Enumeration | RW | Defines the trigger used to initialize processing in sensor.
See Path Constants for more information. |
RuleComponent | Enumeration | RW | Defines the processing rule of sensor.
See Process Point Constants for more information. |
TriggerAt | Enumeration | RW | Defines whether a path connected to sensor or component triggering sensor is stopped during processing.
See Process Point Constants for more information. |
Methods
Name | Return Type | Parameters | Description |
processValue | Real | Real from_connector_index, vcComponent component, [vcBehaviour behavior] | Calculates the processing time of a given component entering from an input port of a path connected to sensor, and then returns the total time from start to finish. |
setValue | None | Real value | Sets the processing time of sensor.
Generally, this method is used with OnValue event to define multiple processing times and handle issues, for example bottlenecks and simulated failures. |
startFailure | None | None | Sets the state of sensor to Failure, thereby stopping all tasks performed by sensor.
Sensor will stay in failure state until either simulation is reset or sensor calls stopFailure() method. |
stopFailure | None | None | Brings sensor out of failure state, for example to simulate a repair. |
Events
Name | Parameters | Description |
OnValue | Integer ignore, vcComponent component, vcBehaviour behavior | Triggered when sensor starts processing a component.
To override default processing time, use setValue() method. |
Examples
Example. Use OnValue event to manipulate sensor
from vcScript import * def my_event(ignore, component, behaviour): print '-'*99 print component.Name print behaviour.Name sensor.setValue(10) comp = getComponent() sensor = comp.findBehaviour('ProcessPointSensor') sensor.OnValue = my_event |