Processes - TobCar/carla GitHub Wiki

Processes are groupings of Orderables that can be run directly from other processes.

Declaring A Process

Declaring a process is done at the top level of a ".crr" file with the following syntax:

process [Process Name]

using [Variable Type] [Variable name], [Variable Type] [Variable name]

passing [Variable Type] [Variable name], [Variable Type] [Variable name]

See Variable Passing for details on the "using" and "passing" keywords.

Brackets are expected after every process declaration. There must be Orderables within those brackets for the process to do anything.

Running A Process

Generated Scala code can be run directly but it will only work if the process doesn't need any variables to be passed to it.

Alternatively, a process can be run from another process using the following syntax:

run [Process Name]

after [Orderable Name], [Orderable Name]

using ([Variable Type] [Expected Variable Name] -> [Actual Variable Name])

passing ([Variable Type] [Expected Variable Name] -> [Actual Variable Name])

See the Orderables page for details on the "after" keyword.

"using" and "passing" map the variable names the being run process expects to the variable names the process calling it actually has. As usual, additional pairs can be added by separating them with a comma. (Example is not shown due to lack of space.)