Click or drag to resize

Ts1542 Class

Ethernet surface-mounted touch screen TS 1542 Device class.

This class will trigger SigChange and DeviceExtenderSigChange events.

Inheritance Hierarchy

Namespace: Crestron.SimplSharpPro.UI
Assembly: Crestron.SimplSharpPro.UI (in Crestron.SimplSharpPro.UI.dll) Version: 2.21.121
Syntax
C#
public class Ts1542 : BasicTriListWithSmartObject

The Ts1542 type exposes the following members.

Constructors
 NameDescription
Public methodTs1542 Constructor to generate a new TS 1542 Touch Screen.
Top
Properties
 NameDescription
Public propertyBooleanInput Collection of Boolean Inputs sent to the device.
(Inherited from BasicTriList)
Public propertyBooleanOutput Collection of Boolean Outputs received from the device.
(Inherited from BasicTriList)
Public propertyConnectedIpList A property containing the list of the ConnectedIpInformation objects which contain information about the devices that are connected to this IP ID. This property is only valid for an ethernet device. If this is not an ethernet device, then this property will return null. If this is an ethernet device, the list will be non-null. It will be empty if no devices are connected. The order of items in this list is not guaranteed.
(Inherited from GenericDevice)
Public propertyCode exampleDescription Get/Set the description of this device.
(Inherited from GenericBase)
Public propertyDisposed Property to indicate if the device has been disposed.
(Inherited from GenericDevice)
Public propertyExtenderAnnotationReservedSigs Property to access the DVP4 Annotation functionality of the TS 1542 Touch Screen.

This property will trigger DeviceExtenderSigChange event.

Public propertyExtenderApplicationControlReservedSigs Property to access the Application Control functionality of the TS 1542 Touch Screen.

This property will trigger DeviceExtenderSigChange event.

Public propertyExtenderAudioReservedSigs Property to access the Audio functionality of the TS 1542 Touch Screen.

This property will trigger DeviceExtenderSigChange event.

Public propertyExtenderAuthenticationReservedSigs Property to access the Authentication functionality of the TS 1542 Touch Screen.

This property will trigger DeviceExtenderSigChange event.

Public propertyExtenderAutoUpdateReservedSigs Property to access the Auto Update functionality of the TS 1542 Touch Screen.

This property will trigger DeviceExtenderSigChange event.

Public propertyExtenderEthernetReservedSigs Property to access the Ethernet functionality of the TS 1542 Touch Screen.

This property will trigger DeviceExtenderSigChange event.

Public propertyExtenderScreenSaverReservedSigs Property to access the Screen Saver functionality of the TS 1542 Touch Screen.

This property will trigger DeviceExtenderSigChange event.

Public propertyExtenderSystem2ReservedSigs Property to access the System2 functionality of the TS 1542 Touch Screen.

This property will trigger DeviceExtenderSigChange event.

Public propertyExtenderSystem3ReservedSigs Property to access the System3 functionality of the TS 1542 Touch Screen.

This property will trigger DeviceExtenderSigChange event.

Public propertyExtenderSystemReservedSigs Property to access the System functionality of the TS 1542 Touch Screen.

This property will trigger DeviceExtenderSigChange event.

Public propertyExtenderTouchDetectionReservedSigs Extender to access the touch detection functionality on this device.

This property will trigger DeviceExtenderSigChange event.

Public propertyExtenderVoiceControlReservedSigs Property to access the Voice Control functionality of the TS 1542 Touch Screen.

This property will trigger DeviceExtenderSigChange event.

Public propertyExtenderVoipReservedSigs Property to access the VOIP functionality of the TS 1542 Touch Screen.

This property will trigger DeviceExtenderSigChange event.

Public propertyID Property to get the ID of the device.
(Inherited from GenericDevice)
Public propertyIsOnline Property to get the current online state of the device.
(Inherited from GenericDevice)
Public propertyName Get the name of this device.
(Inherited from GenericBase)
Public propertyParent The parent that a given object was added to.
(Inherited from GenericBase)
Public propertyRegisterable Property to indicate that this device can be registered.
(Inherited from GenericDevice)
Public propertyRegistered Property to get the current registration state of the device.
(Inherited from GenericDevice)
Public propertyRegistrationFailureReason Property to get the Registration Failure Reason, this will match the return value from the call to register.
(Inherited from GenericDevice)
Protected propertySIMPLDeviceImplementation Internal protected member used for actual device control.
(Inherited from GenericDevice)
Public propertySmartObjects Collection containing the loaded SmartObjects of this device.
(Inherited from BasicTriListWithSmartObject)
Public propertyStringInput Collection of String Inputs sent to the device.
(Inherited from BasicTriList)
Public propertyStringOutput Collection of String Outputs received from the device.
(Inherited from BasicTriList)
Public propertyType Property to determine to type of device this is.
(Inherited from GenericDevice)
Public propertyUnRegistrationFailureReason Property to get the Unregistration Failure Reason, this will match the return value from the call to unregister.
(Inherited from GenericDevice)
Public propertyUserSpecifiedObject Can be assigned anything that user wants.
(Inherited from GenericBase)
Public propertyUShortInput Collection of Integer Inputs sent to the device.
(Inherited from BasicTriList)
Public propertyUShortOutput Collection of Integer Outputs received from the device.
(Inherited from BasicTriList)
Protected propertyXioEndpointStubSIMPLDevice The SIMPL "stub" Device that the XiO Director creates for an endpoint to send the 1C/0E to the correct place in hierarchy.
(Inherited from GenericDevice)
Top
Methods
 NameDescription
Public methodDispose Clean up of resources.
(Inherited from GenericBase)
Protected methodDispose(Boolean) Method to perform the actual disposing of the device.
(Inherited from GenericDevice)
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalize Destructor of the device.
(Inherited from GenericDevice)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodCode exampleLoadSmartObjects(ISmartObject) Load the smart objects to this device that are already loaded for the specified device.
(Inherited from BasicTriListWithSmartObject)
Public methodCode exampleLoadSmartObjects(Stream) Load a smart object given a reference to a stream for the SGD file.
(Inherited from BasicTriListWithSmartObject)
Public methodCode exampleLoadSmartObjects(String) Load a smart object given a SGD Filename with an absolute path.
(Inherited from BasicTriListWithSmartObject)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Protected methodOnBaseEvent(Int32) Protected member used to fire the BaseEvent with the default extended information.
(Inherited from GenericBase)
Protected methodOnBaseEvent(Int32, UInt16) Protected member used to fine the BaseEvent with extended event information.
(Inherited from GenericBase)
Public methodRegister Register this device with the system.
(Inherited from GenericDevice)
Public methodToString Return the name of the device.
(Inherited from GenericDevice)
Public methodUnRegister Unregister this device with the system. This function can not be called from the device's own SigChange event handler.

On successful unregistration, if this device supports the OnlineStatusChange event, it will trigger indicating the device when offline.


(Inherited from GenericDevice)
Top
Events
 NameDescription
Public eventBaseEvent Generic base event, triggered when the there are no other handlers available for a specific EventID.
(Inherited from GenericBase)
Public eventIpInformationChange Event that tells what IP Address is connected/disconnected from an IP ID for a non-UDP device. This is only valid for an Ethernet device. An exception will be thrown if it is not.
(Inherited from GenericDevice)
Public eventOnlineStatusChange Event triggered when the Online status of the device changes.
(Inherited from GenericDevice)
Public eventSigChange Event triggered when cue information is received from a device. When processing this event, it will hold off other cues from being received from the device. If one desires to continue processing the data and receive more information, launch a new thread and allow this event to exit.
(Inherited from BasicTriList)
Top
Example
C#
static Ts1542 _ts1542;
static int _count;

public ControlSystemTs1542()
{
    //Register console commands
    CrestronConsole.AddNewConsoleCommand(AllAudioOnCmd, "AllAudioOn", "This is a Ts1542 AllAudioOn command", ConsoleAccessLevelEnum.AccessOperator);
    CrestronConsole.AddNewConsoleCommand(CreateDeviceCmd, "CreateDevice", "This is a Ts1542 CreateDevice command", ConsoleAccessLevelEnum.AccessOperator);
}

// Sig callback used to read Audio Reserved Sig information received from the Touch Panel.
static void ExtenderAudioReservedSigs_DeviceExtenderSigChange(DeviceExtender currentDeviceExtender, SigEventArgs args)
{
    CrestronConsole.PrintLine("Audio Reserved Sig {0}", args.Sig.Number);

    if (args.Sig == _ts1542.ExtenderAudioReservedSigs.AllAudioVolumeFeedback)
    {
        CrestronConsole.PrintLine("AllAudioVolumeFeedback: {0}", args.Sig.UShortValue);
    }
}


// Method to create TS 1542 device        
public void CreateDeviceCmd(String args)
{
    //Initialize the TS 1542 device
    _ts1542 = new Ts1542(0x16, this);

    _ts1542.ExtenderAudioReservedSigs.Use();
    _ts1542.ExtenderEthernetReservedSigs.Use();
    _ts1542.ExtenderSystemReservedSigs.Use();
    _ts1542.ExtenderSystem3ReservedSigs.Use();
    _ts1542.ExtenderVoipReservedSigs.Use();
    _ts1542.ExtenderVoiceControlReservedSigs.Use();
    _ts1542.ExtenderScreenSaverReservedSigs.Use();
    _ts1542.ExtenderApplicationControlReservedSigs.Use();
    _ts1542.ExtenderSystem2ReservedSigs.Use();
    _ts1542.ExtenderAuthenticationReservedSigs.Use();
    _ts1542.ExtenderAnnotationReservedSigs.Use();

    //Register the TS 1542 with the Control system
    //This will enable the gateway connection ("127.0.0.1") in the system at the 
    //ID specified above that the TS 1542 will connect to.
    _ts1542.Register();

    _ts1542.SigChange += Ts1542SigChange;

    //Reserved sig handler initialization
    _ts1542.ExtenderAudioReservedSigs.DeviceExtenderSigChange += ExtenderAudioReservedSigs_DeviceExtenderSigChange;
}

// Method to set the Audio to ON state
public void AllAudioOnCmd(String args)
{
    CrestronConsole.ConsoleCommandResponse("Enable Audio\r\n");
    _ts1542.ExtenderAudioReservedSigs.AllAudioOn();
}

// Sig callback used to read information received from the TS 1542.
static void Ts1542SigChange(GenericBase currentDevice, SigEventArgs args)
{
    if (args.Event == eSigEvent.BoolChange)
    {
        var tempBooleanSig = args.Sig as BoolOutputSig;

        if (tempBooleanSig != null)
        {
            if (tempBooleanSig.Number <= 16000)
            {
                //This means Boolean "cue" changed on the TS 1542
                //Just print some information for now.
                CrestronConsole.PrintLine("Boolean Sig {0}'s state {1}", tempBooleanSig.Number, tempBooleanSig.BoolValue);

                _ts1542.StringInput[tempBooleanSig.Number].StringValue = string.Format("Press {0} {1}", tempBooleanSig.Number, _count++);

                _ts1542.BooleanInput[50].BoolValue = true;
            }
            else
            {
                CrestronConsole.PrintLine("Boolean Sig {0} is not processed", tempBooleanSig.Number);
            }
        }
    }
    else if (args.Event == eSigEvent.UShortChange)
    {
        var tempIntegerSig = args.Sig as UShortOutputSig;

        if (tempIntegerSig != null)
        {
            if (tempIntegerSig.Number <= 16000)
            {
                //This means Integer "cue" changed on the _ts1542
                //Just print some information for now.
                CrestronConsole.PrintLine("Integer Sig {0}'s state {1}", tempIntegerSig.Number, tempIntegerSig.UShortValue);

                _ts1542.UShortInput[tempIntegerSig.Number].UShortValue = tempIntegerSig.UShortValue;
            }
            else
            {
                CrestronConsole.PrintLine("Integer Sig {0} is not processed", tempIntegerSig.Number);
            }
        }
    }
    else if (args.Event == eSigEvent.StringChange)
    {
        var tempStringSig = args.Sig as StringOutputSig;

        if (tempStringSig != null)
        {
            if (tempStringSig.Number <= 16000)
            {
                //This means String "cue" changed on the TS 1542
                //Just print some information for now.
                CrestronConsole.PrintLine("String Sig {0}'s state {1}", tempStringSig.Number, tempStringSig.StringValue);

                _ts1542.StringInput[tempStringSig.Number].StringValue = tempStringSig.StringValue;
            }
            else
            {
                CrestronConsole.PrintLine("String Sig {0} is not processed", tempStringSig.Number);
            }
        }
    }   
}

Version Information

.NET

Supported in: 6.0

.NET Compact Framework

Supported in: 3.5
See Also