Chameleon.API
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 | |
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 | |
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 |
| |
void GetThumbnail(string projectName, string templateName); | |
get thumbnail from the specified project and template. size is 256x256 | |
Parameters | Description |
string projectName | a project name without extensions |
string templateName | The name of the template \ scene in the project |
|
|
void GetThumbnail(string projectName, string templateName, int width, int height, bool letterbox); | |
get thumbnail from the specified project and template | |
Parameters | Description |
string projectName | a project name without extensions |
string templateName | The name of the template \ scene in the project |
int width | width of thumbnail image returned |
int height | width of thumbnail image returned |
bool letterBox | when true, if the aspect of the scene is different from the aspect of the width and height requested the thumbnail of the original scene will be letter boxed in an image of the requested width and height. when false, if the aspect of the scene is different from the aspect of the width and height requested the thumbnail the width and height of the image returned will be adjusted to match the aspect ratio of the scene |
|
|
|
|
void GetThumbnail(string projectName, string templateName, int width, int height, bool aspectCorrect, bool letterbox); | |
get thumbnail from the specified project and template | |
Parameters | Description |
string projectName | a project name without extensions |
string templateName | The name of the template \ scene in the project |
int width | width of thumbnail image returned |
int height | width of thumbnail image returned |
bool aspectCorrect | true : if the aspect of the scene is different from the aspect of the width and height requested will adjust the aspect ratio of the returned imaged based on the letterBox parameter. false : will be scaled to the requested thumbnail size |
bool letterBox | true : if the aspect of the scene is different from the aspect of the width and height requested the thumbnail of the original scene will be letter boxed in an image of the requested width and height. false : if the aspect of the scene is different from the aspect of the width and height requested the thumbnail the width and height of the image returned will be adjusted to match the aspect ratio of the scene |
|
|
TagData Class | |
---|---|
void TagData() | |
default constructor - creates a TagData object with a default Type of TagType.Text | |
| |
void TagData(DateTime dateTime) | |
DateTime constructor - creates a TagData object of Type of TagType.DateTime with a specified dateTime value | |
| |
void TagData(bool val) | |
bool constructor - creates a TagData object of Type of TagType.Visibility with a specified value (True = visible, False = Not Visible) | |
| |
TagType Type | |
property named Type which can be used to get \ set the TagType of the TagData object | |
TagType.Text | a text tag |
TageType.Graphic | a graphic tag (to update quad objects in the scene \ template) |
TagType.DateTime | a DateTime specific text tag |
TagType.Visibility | a visibility based TagData object which can be used to toggle the visibility of a tag |
| |
string Value | |
property named Value which will get \ set the Value of the TagData object as a string | |
| |
object GetValue() | |
GetValue method which will return the true object type based on it’s TagType Type. object could be of type string, DataTime, or bool |