Click or drag to resize

CnAmpx12x60 Class

CNAMPX-12x60 audio amplifier’s device class.
Inheritance Hierarchy
SystemObject
  Crestron.SimplSharpProGenericBase
    Crestron.SimplSharpProGenericDevice
      Crestron.SimplSharpPro.AudioDistributionCnAmpxBase
        Crestron.SimplSharpPro.AudioDistributionCnAmpx12x60

Namespace: Crestron.SimplSharpPro.AudioDistribution
Assembly: Crestron.SimplSharpPro.AudioDistribution (in Crestron.SimplSharpPro.AudioDistribution.dll) Version: 2.21.121
Syntax
C#
public sealed class CnAmpx12x60 : CnAmpxBase

The CnAmpx12x60 type exposes the following members.

Constructors
 NameDescription
Public methodCnAmpx12x60(UInt32, CrestronControlSystem) Constructor to create a new CnAmpx12x60 object.
Public methodCnAmpx12x60(UInt32, IDeviceBranch) Constructor to create a new CnAmpx12x60 object.
Top
Properties
 NameDescription
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 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 propertyMainPower Property to power on and off the main operating power to the CNAMPX circuitry.

True = Power On; False = Power Off.


(Inherited from CnAmpxBase)
Public propertyName Get the name of this device.
(Inherited from GenericBase)
Public propertyOverrideFeedback Property to indicates that the amplifier is in override mode.

True = In override mode, False = In standard mode.

The BaseEvent event will trigger with OverrideFeedbackEventId.


(Inherited from CnAmpxBase)
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 propertyTemperatureFormat Property to set the temperature format to Celsius or Fahrenheit.

True = Temperature format is Celsius, False = Temperature format is Fahrenheit.


(Inherited from CnAmpxBase)
Public propertyTemperatureReportEnabled Property to enable and disable the temperature reporting (via the TemperatureX10Feedback.

True = Enable temperature reporting, False = Disable temperature reporting.


(Inherited from CnAmpxBase)
Public propertyTemperatureX10Feedback Property that reports the internal temperature of the amplifier in tenths of a degree (1d = 0.1 degree, e.g. 700d = 70.0 degrees), and updates the value every two seconds for as long as TemperatureReportEnabled is high.

The temperature is displayed in the format specified by TemperatureFormat.

The BaseEvent event will trigger with TemperatureX10FeedbackEventId.


(Inherited from CnAmpxBase)
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)
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)
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)
Top
Example
C#
CnAmpx12x60 _myCnAmpx;

public ControlSystemCnAmpx()
{
    //Register console commands
    CrestronConsole.AddNewConsoleCommand(CreateDeviceCmd, "CreateDevice", "This is an CN-AMPX CreateDevice command", ConsoleAccessLevelEnum.AccessOperator);
    CrestronConsole.AddNewConsoleCommand(TestSigsCmd, "TestSigs", "This is an CN-AMPX TestSigs command", ConsoleAccessLevelEnum.AccessOperator);
    CrestronConsole.AddNewConsoleCommand(SetSigsCmd, "SetSigs", "This is an CN-AMPX SetSigs command", ConsoleAccessLevelEnum.AccessOperator);
}

public void CreateDeviceCmd(String args)
{
    _myCnAmpx = new CnAmpx12x60(0x08, this);

    Thread.MaxNumberOfUserThreads = 20;
    _myCnAmpx.w += new BaseEventHandler(_myCnAmpx_BaseEvent);
    _myCnAmpx.Register();
    CrestronConsole.PrintLine("{0} device successfully registered\r\n", _myCnAmpx.ToString());
}

public void TestSigsCmd(String args)
{
    CrestronConsole.PrintLine("Details of {0}", _myCnAmpx.ToString());

    CrestronConsole.PrintLine("Main power {0} Sig number is {1}", _myCnAmpx.MainPower.BoolValue, _myCnAmpx.MainPower.Number);
    CrestronConsole.PrintLine("Enable temperature report {0} Sig number is {1}", _myCnAmpx.TemperatureReportEnabled.BoolValue, _myCnAmpx.TemperatureReportEnabled.Number);
    CrestronConsole.PrintLine("Temperature format {0} Sig number is {1}", _myCnAmpx.TemperatureFormat.BoolValue, _myCnAmpx.TemperatureFormat.Number);

    CrestronConsole.PrintLine("Overide feedback {0} Sig number is {1}", _myCnAmpx.OverrideFeedback.BoolValue, _myCnAmpx.OverrideFeedback.Number);
    CrestronConsole.PrintLine("Temperature x10 {0} Sig number is {1}", _myCnAmpx.TemperatureX10Feedback.BoolValue, _myCnAmpx.TemperatureX10Feedback.Number);

    CrestronConsole.PrintLine("Details of {0} successfully printed", _myCnAmpx.ToString());
}

public void SetSigsCmd(String args)
{

    CrestronConsole.PrintLine("Details of {0}", _myCnAmpx.ToString());

    _myCnAmpx.MainPower.BoolValue = true;
    _myCnAmpx.TemperatureReportEnabled.BoolValue = true;
    _myCnAmpx.TemperatureFormat.BoolValue = true;

    CrestronConsole.PrintLine("Details of {0} successfully set", _myCnAmpx.ToString());
}

void _myCnAmpx_BaseEvent(GenericBase device, BaseEventArgs args)
{
    CrestronConsole.PrintLine("CnAmpx BaseEvent triggered");

    if (args.EventId == CnAmpxEventIds.OverrideFeedbackEventId)
    {
        CrestronConsole.PrintLine("OverrideFeedback event for {0} occurred, value is {1}\r\n", device, _myCnAmpx.OverrideFeedback.BoolValue);
    }
    else if (args.EventId == CnAmpxEventIds.TemperatureX10FeedbackEventId)
    {
        CrestronConsole.PrintLine("TemperatureX10Feedback event for {0} occurred value is {1}\r\n", device, _myCnAmpx.TemperatureX10Feedback.UShortValue);
    }
}

Version Information

.NET

Supported in: 6.0

.NET Compact Framework

Supported in: 3.5
See Also