Skip to content
johnloser edited this page Apr 6, 2024 · 4 revisions

WwiseTools

Contents

Client type

Namespace

WaapiClient

Summary

The Waapi Client provide a core interface to Waapi using strings only. You will need to provide your own JSON serialization.

Call(uri,args,options,timeout) method

Summary

Call a WAAPI remote procedure. Refer to WAAPI reference documentation for a list of URIs and their arguments and options.

Returns

A JSON string with the result of the Remote Procedure Call.

Parameters
Name Type Description
uri System.String The URI of the remote procedure.
args System.String The arguments of the remote procedure.
options System.String The options the remote procedure.
timeout System.Int32 The maximum timeout in milliseconds for the function to execute. Will raise Waapi.TimeoutException when timeout is reached.

Close(timeout) method

Summary

Close the connection.

Parameters
Name Type Description
timeout System.Int32 The maximum timeout in milliseconds for the function to execute. Will raise Waapi.TimeoutException when timeout is reached.

Connect(uri,timeout) method

Summary

Connect to a running instance of Wwise Authoring.

Parameters
Name Type Description
uri System.String URI to connect. Usually the WebSocket protocol (ws:) followed by the hostname and port, followed by waapi.
timeout System.Int32 The maximum timeout in milliseconds for the function to execute. Will raise Waapi.TimeoutException when timeout is reached.
Example

Connect("ws://localhost:8080/waapi")

IsConnected() method

Summary

Return true if the client is connected and ready for operations.

Parameters

This method has no parameters.

Subscribe(topic,options,publishHandler////// ,timeout) method

Summary

Subscribe to WAAPI topic. Refer to WAAPI reference documentation for a list of topics and their options.

Returns

Subscription id, that you can use to unsubscribe.

Parameters
Name Type Description
topic System.String The topic to which subscribe.
options System.String The options the subscription.
publishHandler////// WaapiClient.Wamp.PublishHandler The delegate function to call when the topic is published.
timeout System.Int32 The maximum timeout in milliseconds for the function to execute. Will raise Waapi.TimeoutException when timeout is reached.

Unsubscribe(subscriptionId) method

Summary

Unsubscribe from a subscription.

Parameters
Name Type Description
subscriptionId System.Int32 The subscription id received from the initial subscription.

ErrorException type

Namespace

WaapiClient.Wamp

Summary

Exception thrown during WAMP operations.

JsonClient type

Namespace

WaapiClient

Summary

The JsonClient provides an abstraction layer over the base Waapi Client and wraps everything under Newtonsoft.Json.Linq.JObject for convenience.

Call(uri,args,options,timeout) method

Summary

Call a WAAPI remote procedure. Refer to WAAPI reference documentation for a list of URIs and their arguments and options.

Returns

A Newtonsoft.Json.Linq.JObject with the result of the Remote Procedure Call.

Parameters
Name Type Description
uri System.String The URI of the remote procedure.
args System.Object The arguments of the remote procedure. C# anonymous objects will be automatically serialized to Json.
options System.Object The options the remote procedure. C# anonymous objects will be automatically serialized to Json.
timeout System.Int32 The maximum timeout in milliseconds for the function to execute. Will raise Waapi.TimeoutException when timeout is reached.

Call(uri,args,options,timeout) method

Summary

Call a WAAPI remote procedure. Refer to WAAPI reference documentation for a list of URIs and their arguments and options.

Returns

A Newtonsoft.Json.Linq.JObject with the result of the Remote Procedure Call.

Parameters
Name Type Description
uri System.String The URI of the remote procedure.
args Newtonsoft.Json.Linq.JObject The arguments of the remote procedure as a Newtonsoft.Json.Linq.JObject
options Newtonsoft.Json.Linq.JObject The options the remote procedure as a Newtonsoft.Json.Linq.JObject.
timeout System.Int32 The maximum timeout in milliseconds for the function to execute. Will raise Waapi.TimeoutException when timeout is reached.

Close(timeout) method

Summary

Close the connection.

Parameters
Name Type Description
timeout M:WaapiClient.JsonClient.Close The maximum timeout in milliseconds for the function to execute. Will raise Waapi.TimeoutException when timeout is reached.

Connect(uri,timeout) method

Summary

Connect to a running instance of Wwise Authoring.

Parameters
Name Type Description
uri System.String URI to connect. Usually the WebSocket protocol (ws:) followed by the hostname and port, followed by waapi.
timeout System.Int32 The maximum timeout in milliseconds for the function to execute. Will raise Waapi.TimeoutException when timeout is reached.
Example

Connect("ws://localhost:8080/waapi")

IsConnected() method

Summary

Return true if the client is connected and ready for operations.

Parameters

This method has no parameters.

Subscribe(topic,options,publishHandler,timeout) method

Summary

Subscribe to a topic. Refer to WAAPI reference documentation to obtain the list of topics available.

Returns
Parameters
Name Type Description
topic System.String Topic to subscribe
options System.Object Option for the subscrition.
publishHandler WaapiClient.JsonClient.PublishHandler Delegate that will be executed when the topic is pusblished.
timeout System.Int32 The maximum timeout in milliseconds for the function to execute. Will raise Waapi.TimeoutException when timeout is reached.

Subscribe(topic,options,publishHandler,timeout) method

Summary

Subscribe to a topic. Refer to WAAPI reference documentation to obtain the list of topics available.

Returns

The subscription id assigned to the subscription. Store the id to call Unsubscribe.

Parameters
Name Type Description
topic System.String Topic to subscribe
options Newtonsoft.Json.Linq.JObject Option for the subscrition.
publishHandler WaapiClient.JsonClient.PublishHandler Delegate that will be executed when the topic is pusblished.
timeout System.Int32 The maximum timeout in milliseconds for the function to execute. Will raise Waapi.TimeoutException when timeout is reached.

Unsubscribe(subscriptionId,timeout) method

Summary

Unsubscribe from a subscription.

Parameters
Name Type Description
subscriptionId System.Int32 The subscription id received from the initial subscription.
timeout System.Int32 The maximum timeout in milliseconds for the function to execute. Will raise Waapi.TimeoutException when timeout is reached.

Messages type

Namespace

WaapiClient.Wamp

Summary

Messages ids defined by the WAMP protocol

PublishHandler type

Namespace

WaapiClient.Wamp

Summary

Publish events are delegates registered with Subscribe.

Response type

Namespace

WaapiClient.Wamp

Summary

Encapsulate a response from the server.

TimeoutException type

Namespace

WaapiClient.Wamp

Summary

Exception thrown during WAMP operations when the timeout is reached.

Wamp type

Namespace

WaapiClient

Summary

WAMP protocol implementation using only strings and regular expressions. This implements only a subset of the WAMP feature set and is only compatible with Wwise.

Call(uri,args,options) method

Summary

Invoke an RPC function from the uri

Returns
Parameters
Name Type Description
uri System.String URI of the function
args System.String Arguments
options System.String Options

Close(timeout) method

Summary

Close the connection.

Parameters
Name Type Description
timeout System.Int32 The maximum timeout in milliseconds for the function to execute. Will raise Waapi.TimeoutException when timeout is reached.

Connect(host) method

Summary

Connect to the specified host, handshake and prepare the listening task.

Returns
Parameters
Name Type Description
host System.String The URI of the host, usually something like ws://host:port

IsConnected() method

Summary

Tell the connection state of the WebSocket client.

Returns

Return true if the connection is open and ready.

Parameters

This method has no parameters.

Parse() method

Summary

Parse a WAMP message from the server.

Parameters

This method has no parameters.

Receive() method

Summary

Wait for the next response

Returns

The response from the server.

Parameters

This method has no parameters.

ReceiveExpect(message,requestId) method

Summary

Wait for the next response and do some validation on the response

Returns
Parameters
Name Type Description
message WaapiClient.Wamp.Messages What message to expect
requestId System.Int32 What request id to expect

Subscribe(topic,options,publishEvent,timeout) method

Summary

Subscribe to a WAMP topic.

Returns

Subscription id, that you can use to unsubscribe.

Parameters
Name Type Description
topic System.String The topic to which subscribe.
options System.String The options the subscription.
publishEvent WaapiClient.Wamp.PublishHandler The delegate function to call when the topic is published.
timeout System.Int32 The maximum timeout in milliseconds for the function to execute. Will raise Waapi.TimeoutException when timeout is reached.

Unsubscribe(subscriptionId) method

Summary

Unsubscribe from a subscription.

Parameters
Name Type Description
subscriptionId System.Int32 The subscription id received from the initial subscription.

WwiseUtility type

Namespace

WwiseTools.Utils

Summary

Standard Wwise Utility class for WAAPI operations.

Clone this wiki locally