Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

Chameleon.API is a WCF (Windows Communications Foundation) based API that can be used to connect to an instance of Chameleon, Load graphic projects, and put them Online

ChameleonClient class

static ChameleonClient CreateTcpClient( IChameleonCallback callback, string serverAddress, int serverPort )

Create an instance of ChameleonClient

Parameters

Description

IChameleonCallback callback

a class that implements IChameleonCallback

string serverAddress

The ip address of the system that the Chameleon Web Server is running on (use localhost for same system)

int serverPort

The API port the the Instance of Chameleon Web Server is using as set in the Chameleon Web Server Instance settings

void LoadProject( string projectName )

load a project with the specified projectName - will look in the Instance project folder for a project with this name. The project folder will be defined in the Chameleon Web Server settings tab.

Parameters

Description

string projectName

The name of the project to load without extension.

e.g.: “Hello World”

void LoadProjects( IEnumerable<string> projectNames )

load list of projects with the specified project names - will look in the instances project folder for projects with these names

Parameters

Description

IEnumerable<string> projectNames

a list of project names to load without extensions. - will look in the instances project folder for projects with these names

void UnloadProject( string projectName )

unload a project with the specified project name

Parameters

Description

string projectName

The name of the project to Unload without extension.

e.g.: “Hello World”

void UnloadProjects( IEnumerable<string> projectNames )

unload a list of projects with the specified project names

Parameters

Description

IEnumerable<string> projectNames

a list of project names to unload without extensions.

void Clear(string projectName, string templateName)

Clears the template that belongs to specified project

Parameters

Description

string projectName

The name of the project to Clear without extension.

e.g.: “Hello World”

string templateName

The name of the template \ scene in the project to Clear

e.g.: “SceneX”

void ClearAll(string projectName, bool animate)

Clears all the templates that belongs to specified project

Parameters

Description

string projectName

The name of the project to Clear without extension.

e.g.: “Hello World”

bool animate

If True will run the scene out animation(s)

void ClearAll(IEnumerable<string> projectNames, bool animate)

Clears all the templates that belongs to specified projects in the project list

Parameters

Description

IEnumerable<string> projectNames

a list of project names to clear without extensions.

bool animate

If True will run the scene out animation(s)

void SetOnline(string projectName, string templateName, IDictionary<string, TagData> tags, bool keepOnline)

Set the specified template that belongs to specified project Online

Parameters

Description

string projectName

a project name without extensions.

string templateName

The name of the template \ scene in the project to set online

IDictionary<string, TagData> tags

A dictionary containing TagData that will be applied to tags in the template \ scene when putting the scene online. The dictionary key will be the tag name.

bool keepOnline

If True the scene will remain online until it is taken offline with a SetOffline call. If False the scene will go offline when the SceneIn animation has finished.

void SetOnline(string assetName, string projectName, string templateName, IDictionary<string, TagData> tags, bool keepOnline)

Set the specified template that belongs to specified project Online, also allows an assetName to be set

Parameters

Description

string assetName

Assign an Asset Name to the template \ scene going online. When an assetName is provided the AsRunReport method in the class that implements the IChameleonCallback will be fired when this template \ scene scene goes offline.

string projectName

a project name without extensions.

string templateName

The name of the template \ scene in the project to set online

IDictionary<string, TagData> tags

A dictionary containing TagData that will be applied to tags in the template \ scene when putting the scene online. The dictionary key will be the tag name.

bool keepOnline

If True the scene will remain online until it is taken offline with a SetOffline call. If False the scene will go offline when the SceneIn animation has finished.

void SetOnline(string assetName, string projectName, string templateName, IDictionary<string, TagData> tags, bool keepOnline, bool makeVisible)

Set the specified template that belongs to specified project Online, also allows an assetName to be set

Parameters

Description

string assetName

Assign an Asset Name to the template \ scene going online. When an assetName is provided the AsRunReport method in the class that implements the IChameleonCallback will be fired when this template \ scene scene goes offline.

string projectName

a project name without extensions.

string templateName

The name of the template \ scene in the project to set online

IDictionary<string, TagData> tags

A dictionary containing TagData that will be applied to tags in the template \ scene when putting the scene online. The dictionary key will be the tag name.

bool keepOnline

If True the scene will remain online until it is taken offline with a SetOffline call. If False the scene will go offline when the SceneIn animation has finished.

bool makeVisible

makeVisible=false is used when getting a thumbnail for a scene that you don't want to show

void Update(string projectName, string templateName, IDictionary<string, TagData> tags)

Update a template that belongs to specified project that may already be online. Will run the UpdateIn animation in the scene if one is applied

Parameters

Description

string projectName

a project name without extensions.

string templateName

The name of the template \ scene in the project to update

void Update(string projectName, string templateName, IDictionary<string, TagData> tags)

Update a template that belongs to specified project that may already be online. Will run the UpdateIn animation in the scene if one is applied

Parameters

Description

string assetName

assign an assetName to the template \ scene

string projectName

a project name without extensions.

string templateName

The name of the template \ scene in the project to update

void SetOffline(string projectName, string templateName)

Set the specified template that belongs to specified project Offline

Parameters

Description

string projectName

a project name without extensions.

string templateName

The name of the template \ scene in the project to set online

string GetVersion()

return the api version the that server is running

void GetOnlineStatus(string projectName, string templateName)

Get the online status from the specified project and template

The status will be returned via the OnlineStatus method in the class that implements the IChameleonCallback interface that was passed into the call to ChameleonClient.CreateTcpClient

Parameters

Description

string projectName

a project name without extensions

string templateName

The name of the template \ scene in the project

void GetOnlineStatus(string assetName, string projectName, string templateName)

Get the online status from the specified asset, project and template

The status will be returned via the OnlineStatus method in the class that implements the IChameleonCallback interface that was passed into the call to ChameleonClient.CreateTcpClient

Parameters

Description

string assetName

the assetName name without extensions. Will look for a specific assetName that is online. SetOnline with an assetName parameter would have been used to set an assetName when going online.

string projectName

a project name without extensions

string templateName

The name of the template \ scene in the project

  • No labels