User guide
194
2. The CreateOp.py script creates a folder in your current working directory for each <Op_Name> you specify. The
hierarchy of the directory created is:
OpName
src/
op.cpp
README
Makefile
3. If you wish to create the Ops in a different directory you can specify it using:
-d <dir_name>
4. By default, op.cpp contains an empty Op. By including the -i flag, a simple “hello world” example is generated.
5. Ensure you have set the environment variable $KATANA_HOME to point at your Katana install directory, then to
build and install the Op simply type:
make && make install
6. This generates a shared object and copy it to $KATANA_HOME/bin/Geolib3/Ops.
NOTE: Custom Ops can be sourced from the ‘Ops’ sub-directory of any KATANA_RESOURCES path.
Client Configuration
You can point a Client at a particular Op, configure it to listen to particular locations, and interrogate the scene graph
locations and attributes that are returned by the Runtime. With client configuration, you are also able to use
transactions, which are objects used to batch together operations that are submitted to the Runtime at one time.
The first step in Client configuration is the setup of the client with the Runtime. To do this:
# Create the Runtime and a transaction to batch our work for the Runtime into
runtime = FnGeolib.GetRegisteredRuntimeInstance()
transaction = runtime.createTransaction()
# Create the Client and point it a terminalOp
client = transaction.createClient()
transaction.setClientOp(client, terminalOp)
# Push these changes to the Runtime
runtime.commit([transaction,])
# Set a location we're interested in as active
client.setLocationsActive(('/root/world',))
We can then ask the Client for information about the locations we’ve registered interest in, at any point:
# Get the list of changed locations
24 OP API | CLIENT CONFIGURATION