CAUTION: The Q-SYS Communications Library interface, or its functional details, may change from release to release. Please be sure to check the Release Notes before installing subsequent releases of Q-SYS Designer. QSC is not responsible for the compatibility of your code with the Q-SYS Communications Library.
IMPORTANT: Please read the External Control Overview first.
IMPORTANT: An External Control client must communicate with the Q-SYS Core at least once every 60 seconds, or the socket connection will be closed by the Core. This is a form of "keep-alive" to make sure that abandoned connections get reclaimed by the Core. Most client programs poll a Change Group at a much higher rate which serves as a keep-alive. If not, the client program can issue a "Status Get" command periodically, or a "Control Set Value" on an unused control if no return response is desired.
As an alternative to connecting and controlling a Core directly via a TCP/IP connection, you can use the same communications library used by Q-SYS Designer. This library presents connection, status, control and monitoring of a Core at a higher level than direct TCP/IP socket communications, and thus is easier to use.
The Q-SYS Communications Library uses a library assembly in Microsoft .NET framework. The library, named QSysControl.dll, can be found in the Q-SYS Designer install directory. (typically "\program files\qscaudio\qsys\qsyscontrol.dll") The Q-SYS Communications Library supports multi-threading, creating one thread for each client the host application creates.
A vector type control has multiple strings, values and positions at a time, for example, a meter bar. A meter displays peak and RMS values. The GetControl
Method returns ControlResponse
(for non-vector controls) and ControlVectorResponse
for vector type controls. You cannot set the values of a vector type control.
Metadata means "data about data". In Q-SYS, some controls have metadata attached that describe aspects of the control. These aspects can include the range of the control, its color, whether it is disabled or invisible or its value is indeterminate, or a list of legal values for the control.
As an example, take the Crossover component. The Slope, Type and Bessel Normalization controls all have metadata that describe the choices available in the drop-down list. The Bessel Normalization control also has metadata to make it invisible when the filter type is not Bessel-Thomson. When a Link button is pressed, all of the controls on the high frequency side of the crossover point are disabled using metadata.
The AsciiClient class provides simple methods for connecting, monitoring and controlling a Q-SYS system over a network.
In order to connect and control a Q-SYS system, an AsciiClient needs to be created using the host name or IP Address and port number (1702) of the Q-SYS Core. If the system has a redundant Core, you must use its host name or IP Address.
Excluding the initial Constructor, all methods are asynchronous - they do not block waiting for a network response. Any responses or errors are registered through Events.
Events |
||
---|---|---|
Event |
Syntax |
Purpose |
ChangeGroupAck |
() |
Response to |
CommunicationError |
string errorMessage |
A communication error defined in the returned string. |
ControlMetaDataResponse |
ControlValue value, ControlMetaData metadata |
Occurs when metadata changes on a control in a Change Group. |
ControlMetaDataVectorResponse |
ControlValueVector value, ControlMetaData metadata |
Occurs when metadata changes on a control in a Change Group. |
ControlResponse |
ControlValue value |
The value of a control. |
ControlVectorResponse |
ControlValueVector value |
The array of values of a control. |
EngineStatusResponse |
EngineStatus status |
The status of the Core. |
InvalidChangeGroup |
unsigned int ChangeGroupId |
The changeGroupID sent to Q-SYS is incorrect. |
InvalidCommand |
string command |
|
InvalidControlId |
string ControlId |
Methods Quick Reference |
||
---|---|---|
Method |
Syntax |
Purpose |
unsigned int changeGroupID, string controlID |
Add a control to a ChangeGroup. |
|
unsigned int changeGroupID |
Remove all of the controls from a change group. |
|
string controlID |
Trigger a control |
|
unsigned int changeGroupID |
Creates the specified ChangeGroup. Maximum of four Change Groups. |
|
unsigned int changeGroupID |
Destroy a ChangeGroup. |
|
string controlID |
Get the value, position and string descriptions of a control's state. |
|
string controlID |
Gets any metadata attached to a control |
|
() |
Gets the status of the Core. |
|
unsigned int changeGroupID |
Marks all the controls in a Change Group as if they had changed. |
|
Login |
string name, string pin |
Initiates a login to a Q-SYS Core for an external control system. |
unsigned int changeGroupID |
Checks the specified ChangeGroup for changes. |
|
unsigned int changeGroupID, string controlID |
Remove a control from a change group. |
|
string controlID, unsigned int |
The interval, in milliseconds, for a change group to be polled. |
|
string controlID float controlPosition |
Set a control's state from a position. This is converted to a value using the controls range and its mapping. |
|
string controlID , string controlString |
Sets the specified control to the specified control string value. |
|
string controlID , float controlValue |
Sets the specified control to the specified single precision value. |
|
string snapshotID, unsigned int snapshotNumber, float secondsToRamp |
Loads a saved snapshot. |
|
string snapshotID, unsigned int snapshotNumber |
Saves a snapshot. |
InvalidChangeGroup
response is returned if you attempt to create more than four. This command is "silently" ignored if you attempt to create a change group with a changeGroupID
that is already in use.LoginRequired
response is sent. name
is a valid user in the Q-SYS design running on a Q-SYS Core. The PIN is set up in the Q-SYS Designer Administrator, on the User tab.pollPeriodMS
is the interval in milliseconds. Minimum for pollPeriodMS
is 30 ms, any amount less than this is changed to 30 ms. To turn off the scheduling of a group, enter 0 (zero) for pollPeriodMS
. To change the schedule, issue this command with a new pollPeriodMS
.
Properties |
||
---|---|---|
System.String |
ID |
The identifier of the control |
System.String |
String |
The string representation of the value of a control |
float |
Position |
The position representation of the value of a control (0.0 -> 1.0) |
float |
Value |
The value representation of the value of a control |
Properties |
||
---|---|---|
System.String |
ID |
The identifier of the control |
System.String[] |
Strings |
The string representations of the value of a control |
float[] |
Positions |
The position representations of the value of a control (0.0 -> 1.0) |
float[] |
Values |
The value representations of the value of a control |
Properties |
||
---|---|---|
System.String |
DesignName |
The name of the design currently running on the Core. |
System.String |
ComplieGuid |
The compile ID of the design currently running on the Core. |
Boolean |
IsActive |
True if core is currently active and passing audio |
Boolean |
IsPrimary |
True if core is the primary (or only core) in the design |
Members |
|
---|---|
Range |
Description |
!IsIndeterminate |
Description |
Choices |
Description |
Color |
Description |
!IsHidden |
Description |
!IsDisabled |
Description |
Legend |
Description |
QSC.com | Software and Firmware | Resources | QSC Self Help Portal
© 2009 - 2018 QSC, LLC. All rights reserved. QSC and the QSC logo are trademarks of QSC, LLC in the U.S. Patent and Trademark office and other countries. All other trademarks are the property of their respective owners.
http://patents.qsc.com