From 473c6d459083f98a8c7ecff58e096c1b63704fec Mon Sep 17 00:00:00 2001 From: Nick Genovese Date: Sun, 27 Jul 2025 21:35:43 -0400 Subject: [PATCH] feat: wip commit prior to removing the crestron library --- .../Comm/CommunicationGather.cs | 5 +- .../Comm/CommunicationStreamDebugging.cs | 1 - .../Comm/ControlPropertiesConfig.cs | 3 +- .../{eControlMethods.cs => eControlMethod.cs} | 8 +- .../Bridges/BridgeBase.cs | 6 +- .../Bridges/BridgeHelper.cs | 2 +- .../JoinMaps/AirMediaControllerJoinMap.cs | 3 +- .../Bridges/JoinMaps/AppleTvJoinMap.cs | 5 +- .../JoinMaps/C2nRthsControllerJoinMap.cs | 5 +- .../JoinMaps/CameraControllerJoinMap.cs | 5 +- .../CenOdtOccupancySensorBaseJoinMap.cs | 5 +- .../JoinMaps/DisplayControllerJoinMap.cs | 5 +- .../DmBladeChassisControllerJoinMap.cs | 6 +- .../JoinMaps/DmChassisControllerJoinMap.cs | 3 +- .../JoinMaps/DmRmcControllerJoinMap.cs | 3 +- .../Bridges/JoinMaps/DmTxControllerJoinMap.cs | 5 +- .../DmpsAudioOutputControllerJoinMap.cs | 5 +- .../DmpsMicrophoneControllerJoinMap.cs | 5 +- .../JoinMaps/DmpsRoutingControllerJoinMap.cs | 5 +- .../JoinMaps/GenericIrControllerJoinMap.cs | 4 +- .../JoinMaps/GenericLightingJoinMap.cs | 5 +- .../JoinMaps/GenericRelayControllerJoinMap.cs | 5 +- .../JoinMaps/GlsOccupancySensorBaseJoinMap.cs | 5 +- .../JoinMaps/GlsPartitionSensorJoinMap.cs | 3 +- .../JoinMaps/HdMdNxM4kEControllerJoinMap.cs | 5 +- .../JoinMaps/HdMdxxxCEControllerJoinMap.cs | 5 +- .../JoinMaps/HdPsXxxControllerJoinMap.cs | 5 +- .../Hrxxx0WirelessRemoteControllerJoinMap.cs | 5 +- .../Bridges/JoinMaps/IAnalogInputJoinMap.cs | 5 +- .../JoinMaps/IBasicCommunicationJoinMap.cs | 5 +- .../Bridges/JoinMaps/IDigitalInputJoinMap.cs | 5 +- .../Bridges/JoinMaps/IDigitalOutputJoinMap.cs | 5 +- .../Bridges/JoinMaps/IRBlurayBaseJoinMap.cs | 5 +- .../Bridges/JoinMaps/PduJoinMapBase.cs | 5 +- .../JoinMaps/SetTopBoxControllerJoinMap.cs | 5 +- .../JoinMaps/StatusSignControllerJoinMap.cs | 5 +- .../Bridges/JoinMaps/SystemMonitorJoinMap.cs | 5 +- .../JoinMaps/VideoCodecControllerJoinMap.cs | 1 + .../Bridges/SigHelper.cs | 72 +++++ .../CecPortController.cs | 6 +- .../ComPortController.cs | 8 +- .../ComSpecJsonConverter.cs | 2 +- .../Communications/ComTextHelper.cs | 49 +++ .../CommFactory.cs | 11 +- .../Communications/CommunicationExtras.cs | 91 ++++++ .../Communications/CommunicationGather.cs | 173 ++++++++++ .../CommunicationStreamDebugging.cs | 182 +++++++++++ .../ConsoleCommMockDevice.cs | 6 +- .../Communications/ControlPropertiesConfig.cs | 92 ++++++ .../Communications/EventArgs.cs | 247 ++++++++++++++ .../GenericComm.cs | 14 +- .../GenericHttpClient.cs | 19 +- .../Communications/IAutoReconnect.cs | 21 ++ .../Communications/IBasicCommunication.cs | 20 ++ .../IBasicCommunicationWithStreamDebugging.cs | 10 + .../IComPortsDevice.cs} | 2 +- .../Communications/ICommunicationReceiver.cs | 34 ++ .../IRPortHelper.cs | 4 +- .../Communications/ISocketStatus.cs | 25 ++ .../ISocketStatusWithStreamDebugging.cs | 10 + .../Communications/IStreamDebugging.cs | 16 + .../Communications/TcpClientConfigObject.cs | 59 ++++ .../Communications/TcpServerConfigObject.cs | 54 ++++ .../Communications/TcpSshPropertiesConfig.cs | 59 ++++ .../Communications/eControlMethod.cs | 73 +++++ .../Config/AudioControlPointListItem.cs | 1 + .../Config/BasicConfig.cs | 2 + .../Config/Essentials/ConfigReader.cs | 10 +- .../Config/Essentials/ConfigUpdater.cs | 8 +- .../Config/Essentials/ConfigWriter.cs | 11 +- .../Config/Essentials/EssentialsConfig.cs | 10 +- .../Config/ILoadConfig.cs | 2 +- .../Config/InfoConfig.cs | 3 +- .../Crestron/CrestronGenericBaseDevice.cs | 18 +- .../CrestronGenericBaseDevice.cs.orig | 128 -------- .../CrestronIO/GenericDigitalInputDevice.cs | 5 +- .../CrestronIO/GenericRelayDevice.cs | 6 +- .../GenericVersiportAnalogInputDevice.cs | 7 +- .../CrestronIO/GenericVersiportInputDevice.cs | 7 +- .../GenericVersiportOutputDevice.cs | 7 +- .../CrestronIO/IAnalogInput.cs | 4 +- .../CrestronIO/IDigitalInput.cs | 4 +- .../CrestronIO/IDigitalOutput.cs | 4 +- .../CrestronIO/IHasCresnetBranches.cs | 2 +- .../CrestronIO/ISwitchedOutput.cs | 3 +- src/PepperDash.Essentials.Core/Debug.cs | 306 ++++++++++++++++++ .../Device Info/IDeviceInfoProvider.cs | 4 +- .../Device Info/NetworkDeviceHelpers.cs | 2 +- src/PepperDash.Essentials.Core/Device.cs | 199 ++++++++++++ .../IPresentationSource.cs | 19 -- .../DeviceTypeInterfaces/IChannel.cs | 3 +- .../DeviceTypeInterfaces/IColorFunctions.cs | 3 +- .../DeviceTypeInterfaces/IDPad.cs | 4 +- .../IDiscPlayerControls.cs | 2 +- .../DeviceTypeInterfaces/IDisplay.cs | 3 +- .../DeviceTypeInterfaces/IDisplayBasic.cs | 2 +- .../DeviceTypeInterfaces/IDumbSource.cs | 2 +- .../DeviceTypeInterfaces/IDvr.cs | 3 +- .../IHasFarEndContentStatus.cs | 4 +- .../DeviceTypeInterfaces/IHasInputs.cs | 4 +- .../DeviceTypeInterfaces/IHasPhoneDialing.cs | 4 +- .../IHasSurroundSoundModes.cs | 4 +- .../DeviceTypeInterfaces/IHumiditySensor.cs | 4 +- .../DeviceTypeInterfaces/ILevelControls.cs | 3 +- .../DeviceTypeInterfaces/IMeterFeedback.cs | 2 + .../DeviceTypeInterfaces/IMobileControl.cs | 2 +- .../DeviceTypeInterfaces/INumeric.cs | 4 +- .../INvxNetworkPortInformation.cs | 2 +- .../DeviceTypeInterfaces/IPasswordPrompt.cs | 2 +- .../DeviceTypeInterfaces/IPower.cs | 4 +- .../IProjectorScreenLiftControl.cs | 3 +- .../DeviceTypeInterfaces/ISelectableItem.cs | 1 - .../ISetTopBoxControls.cs | 5 +- .../DeviceTypeInterfaces/IStateFeedback.cs | 2 + .../ITemperatureSensor.cs | 4 +- .../DeviceTypeInterfaces/ITransport.cs | 3 +- .../DeviceTypeInterfaces/IUiDisplayInfo.cs | 4 +- .../DeviceTypeInterfaces/IWarmingCooling.cs | 4 +- .../DeviceTypeInterfaces/Template.cs | 2 +- .../Devices/AudioControlListItemBase.cs | 2 +- .../Devices/AudioInterfaces.cs | 2 +- .../Devices/CameraListItem.cs | 3 +- .../Devices/CodecInterfaces.cs | 4 +- .../Devices/ConfigSnippetAttribute.cs | 2 +- .../Devices/CrestronProcessor.cs | 5 +- .../Devices/DescriptionAttribute.cs | 2 +- .../Devices/DestinationListItem.cs | 3 +- .../Devices/DeviceApiBase.cs | 3 +- .../Devices/DeviceFeedbackExtensions.cs | 4 +- .../Devices/DeviceJsonApi.cs | 25 +- .../Devices/DeviceManager.cs | 14 +- .../Devices/DisplayUiConstants.cs | 2 +- .../Devices/EssentialsBridgeableDevice.cs | 2 +- .../Devices/EssentialsDevice.cs | 3 +- .../Devices/EssentialsDeviceFactory.cs | 3 +- ...ssentialsPluginDevelopmentDeviceFactory.cs | 3 +- .../Devices/EssentialsPluginDeviceFactory.cs | 4 +- .../Devices/GenericIRController.cs | 5 +- .../Devices/GenericMonitoredTcpDevice.cs | 3 +- .../Devices/IAttachVideoStatus.cs | 5 +- .../Devices/IAttachVideoStatusExtensions.cs | 6 +- .../Devices/IDisplayUsage.cs | 4 +- .../Devices/IDspPresets.cs | 5 +- .../Devices/IHasFeedbacks.cs | 13 +- .../Devices/IMakeModel.cs | 5 +- .../Devices/IOnline.cs | 4 +- .../Devices/IProjectorInterfaces.cs | 4 +- .../Devices/IUsageTracking.cs | 4 +- .../Devices/IVolumeAndAudioInterfaces.cs | 6 +- .../Devices/IrOutputPortController.cs | 7 +- .../Devices/LevelControlListItem.cs | 3 +- .../Devices/PduInterfaces.cs | 2 +- .../Devices/PowerInterfaces.cs | 5 +- .../Devices/PresentationDeviceType.cs | 2 +- .../Devices/PresetListItem.cs | 3 +- .../ProcessorExtensionDeviceFactory.cs | 5 +- .../Devices/ReconfigurableDevice.cs | 1 + .../Devices/SmartObjectBaseTypes.cs | 3 +- .../Devices/SourceListItem.cs | 4 +- .../Devices/VolumeDeviceChangeEventArgs.cs | 2 +- .../Ethernet/EthernetStatistics.cs | 1 + .../Extensions/IpAddressExtensions.cs | 26 +- .../Extensions/JsonExtensions.cs | 8 +- .../Extensions/StringExtensions.cs | 2 +- .../Factory/DeviceFactory.cs | 8 +- .../Factory/DeviceFactoryWrapper.cs | 3 +- .../Factory/IDeviceFactory.cs | 3 +- .../IProcessorExtensionDeviceFactory.cs | 2 +- .../ProcessorExtensionDeviceFactory.cs | 11 +- .../Factory/ReadyEventArgs.cs | 2 +- .../Feedbacks/BoolFeedback.cs | 4 +- .../Feedbacks/BoolFeedbackOneShot.cs | 2 +- .../Feedbacks/BoolFeedbackPulseExtender.cs | 4 +- .../Feedbacks/BoolOutputLogicals.cs | 2 +- .../Feedbacks/FeedbackBase.cs | 4 +- .../Feedbacks/FeedbackCollection.cs | 2 +- .../Feedbacks/FeedbackEventArgs.cs | 2 +- .../Feedbacks/IntFeedback.cs | 2 +- .../Feedbacks/SerialFeedback.cs | 2 +- .../Feedbacks/StringFeedback.cs | 2 +- src/PepperDash.Essentials.Core/File/FileIO.cs | 305 ----------------- ...lsHuddleSpaceFusionSystemControllerBase.cs | 10 +- ...entialsHuddleSpaceRoomFusionRoomJoinMap.cs | 3 +- .../Fusion/FusionCustomPropertiesBridge.cs | 3 +- .../Fusion/FusionProcessorQueries.cs | 1 - .../Fusion/FusionRviDataClasses.cs | 2 - .../{Global => }/Global.cs | 14 +- .../Global/EthernetAdapterInfo.cs | 2 +- .../Global/JobTimer.cs | 2 +- .../Global/Scheduler.cs | 8 +- src/PepperDash.Essentials.Core/IKeyName.cs | 18 ++ src/PepperDash.Essentials.Core/IKeyed.cs | 17 + .../Interfaces/ILogStrings.cs | 4 +- .../Interfaces/ILogStringsWithLevel.cs | 4 +- .../JoinMaps/JoinMapBase.cs | 11 +- .../License/EssentialsLicenseManager.cs | 7 +- .../Lighting/Lighting Interfaces.cs | 3 +- .../Lighting/LightingScene.cs | 1 + ...CrestronGenericBaseCommunicationMonitor.cs | 4 +- .../Monitoring/GenericCommunicationMonitor.cs | 7 +- .../Monitoring/Interfaces.cs | 6 +- .../Monitoring/StatusMonitorBase.cs | 5 +- .../Monitoring/StatusMonitorCollection.cs | 11 +- .../Monitoring/SystemMonitorController.cs | 6 +- .../EssentialsPartitionController.cs | 4 +- .../IPartitionStateProvider.cs | 4 +- .../PepperDash.Essentials.Core.csproj | 66 ++-- ...perDash_Essentials_Core.csproj.DotSettings | 3 - .../Plugins/IPluginDeviceFactory.cs | 3 +- .../Plugins/PluginLoader.cs | 24 +- .../Presets/DevicePresets.cs | 3 +- .../Presets/DevicePresetsView.cs | 1 + .../PresetsListSubpageReferenceListItem.cs | 3 +- .../MicrophonePrivacyController.cs | 4 +- .../MicrophonePrivacyControllerConfig.cs | 0 .../Queues/ComsMessage.cs | 4 +- .../Queues/GenericQueue.cs | 1 - .../Queues/IQueue.cs | 1 - .../Queues/StringResponseProcessor.cs | 2 +- src/PepperDash.Essentials.Core/Room/Room.cs | 70 ---- .../RoomOnToDefaultSourceWhenOccupied.cs | 28 +- .../Combining/EssentialsRoomCombiner.cs | 10 +- .../EssentialsRoomCombinerPropertiesConfig.cs | 53 ++- .../Combining/IEssentialsRoomCombiner.cs | 5 +- .../Combining/RoomCombinationScenario.cs | 10 +- ...sentialsDualDisplayRoomPropertiesConfig.cs | 3 +- .../EssentialsHuddleRoomPropertiesConfig.cs | 2 +- .../EssentialsHuddleVtc1PropertiesConfig.cs | 2 +- .../EssentialsNDisplayRoomPropertiesConfig.cs | 5 +- .../EssentialsPresentationPropertiesConfig.cs | 2 +- .../Config/EssentialsRoomConfig.cs | 7 +- .../Config/EssentialsRoomEmergencyConfig.cs | 2 +- .../EssentialsRoomScheduledEventsConfig.cs | 4 +- .../Config/EssentialsTechRoomConfig.cs | 2 +- .../Config/EssentialsVolumeLevelConfig.cs | 4 +- .../Config/SimplRoomPropertiesConfig.cs | 2 +- .../EsentialsRoomEmergencyContactClosure.cs | 3 +- .../{Room => Rooms}/EssentialsRoomBase.cs | 10 +- .../{Room => Rooms}/IEssentialsRoom.cs | 6 +- .../IOccupancyStatusProvider.cs} | 4 +- .../{Room => Rooms}/IRoomEventSchedule.cs | 4 +- .../{Room => Rooms}/Interfaces.cs | 12 +- src/PepperDash.Essentials.Core/Rooms/Room.cs | 70 ++++ .../Routing/DummyRoutingInputsDevice.cs | 4 +- .../Routing/Extensions.cs | 14 +- .../Routing/ICurrentSources.cs | 1 + .../Routing/IHasCurrentSourceInfoChange.cs | 3 +- .../Routing/IInputSync.cs | 3 +- .../Routing/IRmcRouting.cs | 4 +- .../Routing/IRmcRoutingWithFeedback.cs | 2 +- .../Routing/IRouting.cs | 2 +- .../Routing/IRoutingFeedback.cs | 4 +- .../IRoutingHasVideoInputSyncFeedbacks.cs | 4 +- .../Routing/IRoutingInputSlot.cs | 4 +- .../Routing/IRoutingInputs.cs | 5 +- .../Routing/IRoutingInputsOutputs.cs | 2 +- .../Routing/IRoutingNumeric.cs | 2 +- .../Routing/IRoutingNumericWithFeedback.cs | 2 +- .../Routing/IRoutingOutputs.cs | 5 +- .../Routing/IRoutingSink.cs | 4 +- .../Routing/IRoutingSinkWithFeedback.cs | 2 +- .../Routing/IRoutingSinkWithSwitching.cs | 2 +- .../Routing/IRoutingSlot.cs | 4 +- .../Routing/IRoutingSource.cs | 2 +- .../Routing/IRoutingWithClear.cs | 2 +- .../Routing/IRoutingWithFeedback.cs | 2 +- .../Routing/ITxRouting.cs | 4 +- .../Routing/ITxRoutingWithFeedback.cs | 2 +- .../Routing/RouteDescriptor.cs | 4 +- .../Routing/RouteDescriptorCollection.cs | 5 +- .../Routing/RouteRequest.cs | 5 +- .../Routing/RouteRequestQueueItem.cs | 3 +- .../Routing/RouteSwitchDescriptor.cs | 2 +- .../Routing/RoutingFeedbackManager.cs | 5 +- .../Routing/RoutingInputPort.cs | 2 +- .../RoutingInputPortWithVideoStatuses.cs | 4 +- .../Routing/RoutingNumericEventArgs.cs | 2 +- .../Routing/RoutingOutputPort.cs | 2 +- .../Routing/RoutingPort.cs | 5 +- .../Routing/RoutingPortCollection.cs | 2 +- .../Routing/RoutingPortNames.cs | 2 +- .../Routing/TieLine.cs | 2 +- .../Routing/TieLineConfig.cs | 4 +- .../Routing/eRoutingPortConnectionType.cs | 2 +- .../Routing/eRoutingSignalType.cs | 2 +- .../Secrets/CrestronGlobalSecretsProvider.cs | 7 +- .../Secrets/CrestronLocalSecretsProvider.cs | 7 +- .../Secrets/CrestronSecret.cs | 2 +- .../Secrets/ISecret.cs | 24 ++ .../{Interfaces.cs => ISecretProvider.cs} | 25 +- .../Secrets/SecretsManager.cs | 27 +- .../Secrets/SecretsPropertiesConfig.cs | 2 +- .../Shades/ICrestronBasicShade.cs | 9 + .../Shades/ISceneFeedback.cs | 13 + .../Shades/IShades.cs | 12 + .../Shades/IShadesFeedback.cs | 12 + .../Shades/IShadesOpenClosePreset.cs | 13 + .../Shades/IShadesOpenCloseStop.cs | 12 + .../Shades/IShadesOpenClosedFeedback.cs | 13 + .../Shades/IShadesPosition.cs | 10 + .../Shades/IShadesRaiseLowerFeedback.cs | 13 + .../Shades/IShadesStopFeedback.cs | 12 + .../Shades/IShadesStopOrMove.cs | 12 + .../Shades/Shade Interfaces.cs | 100 ------ .../Shades/ShadeBase.cs | 3 +- src/PepperDash.Essentials.Core/SigHelper.cs | 72 ----- .../SmartObjects/SmartObjectDynamicList.cs | 2 - .../SmartObjects/SmartObjectHelperBase.cs | 2 - .../SubpageReferenceList.cs | 16 +- .../SubpageReferenceListItem.cs | 2 +- .../Timers/CountdownTimer.cs | 9 +- .../Timers/RetriggerableTimer.cs | 3 +- .../CrestronTouchpanelPropertiesConfig.cs | 3 +- .../Touchpanels/Interfaces.cs | 2 +- .../Keyboards/HabaneroKeyboardController.cs | 1 + .../Touchpanels/ModalDialog.cs | 3 +- .../Touchpanels/Mpc3Touchpanel.cs | 4 +- .../Touchpanels/TriListExtensions.cs | 18 +- .../TriListBridges/HandlerBridge.cs | 2 +- .../UI PageManagers/BlurayPageManager.cs | 2 + .../UI PageManagers/PageManager.cs | 1 + .../SetTopBoxThreePanelPageManager.cs | 2 +- .../SetTopBoxTwoPanelPageManager.cs | 2 + .../UI/TouchpanelBase.cs | 4 +- .../IInUseTracking.cs | 2 +- .../{InUseTracking => USage}/InUseTracking.cs | 5 +- .../ActionIncrementer.cs | 10 +- .../Utilities/ActionSequence.cs | 3 +- .../NumericalHelpers.cs | 8 +- .../UshortSigIncrementer.cs | 10 +- .../VideoStatus/VideoStatusOutputs.cs | 5 +- src/PepperDash.Essentials.Core/app.config | 11 - .../Audio/GenericAudioOut.cs | 3 +- .../AudioCodec/AudioCodecBase.cs | 2 +- .../AudioCodec/Interfaces/IHasAudioCodec.cs | 2 +- .../AudioCodec/MockAC/MockAC.cs | 1 + .../Cameras/CameraBase.cs | 9 +- .../Cameras/CameraControl.cs | 1 + .../Cameras/CameraVisca.cs | 8 +- .../Codec/Cisco/IPresenterTrack.cs | 1 + .../Codec/Cisco/ISpeakerTrack.cs | 1 + .../Codec/IHasDoNotDisturb.cs | 2 +- .../Codec/iCodecAudio.cs | 2 +- .../Codec/iHasContentSharing.cs | 2 +- .../Codec/iHasDirectory.cs | 2 +- .../Codec/iHasScheduleAwareness.cs | 1 + .../DSP/DspBase.cs | 2 + .../DeviceFactory.cs | 5 +- .../Displays/BasicIrDisplay.cs | 4 + .../Displays/DisplayBase.cs | 8 +- .../Displays/MockDisplay.cs | 3 + .../Displays/ScreenLiftController.cs | 2 + .../Generic/GenericSink.cs | 2 + .../Generic/GenericSource.cs | 3 + .../Lighting/LightingBase.cs | 5 + .../Room/IEssentialsHuddleSpaceRoom.cs | 6 +- .../Room/IEssentialsHuddleVtc1Room.cs | 6 +- .../Room/IEssentialsRoomPropertiesConfig.cs | 2 +- .../Room/IEssentialsTechRoom.cs | 6 +- .../SetTopBox/IRSetTopBoxBase.cs | 8 +- .../SetTopBox/SetTopBoxPropertiesConfig.cs | 1 + .../Shades/RelayControlledShade.cs | 1 + .../Shades/ShadeBase.cs | 2 +- .../Shades/ShadeController.cs | 1 + .../SoftCodec/BlueJeansPc.cs | 6 + .../SoftCodec/GenericSoftCodec.cs | 2 + .../Sources/InRoomPc.cs | 5 + .../Sources/Laptop.cs | 5 + .../Streaming/AppleTV.cs | 9 +- .../Streaming/Roku.cs | 4 + .../VideoCodec/Interfaces/IHasCodecLayouts.cs | 2 +- .../Interfaces/IHasCodecSelfview.cs | 2 +- .../VideoCodec/Interfaces/IHasMeetingLock.cs | 2 +- .../Interfaces/IHasMeetingRecording.cs | 2 +- .../VideoCodec/Interfaces/IHasParticipants.cs | 2 +- .../Interfaces/IHasSelfviewPosition.cs | 3 +- .../VideoCodec/Interfaces/IHasSelfviewSize.cs | 3 +- .../VideoCodec/Interfaces/IHasStandbyMode.cs | 2 +- .../VideoCodec/Interfaces/IHasVideoCodec.cs | 4 +- .../VideoCodec/MockVC/MockVC.cs | 5 +- .../VideoCodec/MockVC/MockVCCamera.cs | 1 + .../VideoCodec/VideoCodecBase.cs | 8 +- .../ContentTypes.cs | 2 +- .../DeviceTypeExtensions/IChannelMessenger.cs | 1 + .../DeviceTypeExtensions/IColorMessenger.cs | 1 + .../DeviceTypeExtensions/IDPadMessenger.cs | 1 + .../DeviceTypeExtensions/IDvrMessenger.cs | 1 + .../IHasPowerMessenger.cs | 1 + .../DeviceTypeExtensions/INumericMessenger.cs | 1 + .../ISetTopBoxControlsMessenger.cs | 1 + .../ITransportMessenger.cs | 1 + .../Messengers/CameraBaseMessenger.cs | 2 +- .../Messengers/DeviceInfoMessenger.cs | 1 + .../Messengers/DevicePresetsModelMessenger.cs | 1 + .../Messengers/DeviceVolumeMessenger.cs | 1 + .../Messengers/GenericMessenger.cs | 2 +- .../ICommunicationMonitorMessenger.cs | 1 + .../Messengers/IDspPresetsMessenger.cs | 1 + .../IEssentialsRoomCombinerMessenger.cs | 2 + .../IHasCurrentSourceInfoMessenger.cs | 2 + .../IHasPowerControlWithFeedbackMessenger.cs | 2 + .../IHasScheduleAwarenessMessenger.cs | 1 + .../Messengers/IHumiditySensor.cs | 4 +- .../Messengers/ILevelControlsMessenger.cs | 1 + .../IProjectorScreenLiftControlMessenger.cs | 1 + .../Messengers/IRunRouteActionMessenger.cs | 3 + .../Messengers/ISelectableItemsMessenger.cs | 1 + .../IShutdownPromptTimerMessenger.cs | 1 + .../Messengers/ISwitchedOutputMessenger.cs | 4 +- .../Messengers/ITechPasswordMessenger.cs | 1 + .../Messengers/ITemperatureSensorMessenger.cs | 6 +- .../Messengers/LightingBaseMessenger.cs | 1 + .../Messengers/MessengerBase.cs | 1 + .../Messengers/PressAndHoldHandler.cs | 1 + .../Messengers/RoomEventScheduleMessenger.cs | 1 - .../Messengers/ShadeBaseMessenger.cs | 10 +- .../Messengers/TwoWayDisplayBaseMessenger.cs | 2 +- .../Messengers/VideoCodecBaseMessenger.cs | 2 +- .../MobileControlSIMPLRoomJoinMap.cs | 2 +- ...ControlSIMPLRunDirectRouteActionJoinMap.cs | 2 +- .../SIMPLJoinMaps/SIMPLAtcJoinMap.cs | 2 +- .../SIMPLJoinMaps/SIMPLVtcJoinMap.cs | 2 +- .../MobileControlDeviceFactory.cs | 1 + .../MobileControlEssentialsConfig.cs | 2 + .../MobileControlFactory.cs | 3 + .../MobileControlSystemController.cs | 7 +- .../RoomBridges/MobileControlBridgeBase.cs | 1 + .../MobileControlEssentialsRoomBridge.cs | 8 +- .../Services/MobileControlApiService.cs | 1 + .../Touchpanel/ITheme.cs | 1 + .../Touchpanel/ITswAppControl.cs | 1 + .../Touchpanel/ITswAppControlMessenger.cs | 1 + .../Touchpanel/ITswZoomControlMessenger.cs | 1 + .../MobileControlTouchpanelController.cs | 6 +- .../MobileControlTouchpanelProperties.cs | 2 +- .../Touchpanel/ThemeMessenger.cs | 1 + .../TransmitMessage.cs | 1 + .../MobileAuthRequestHandler.cs | 1 + .../WebApiHandlers/MobileInfoHandler.cs | 3 +- .../WebApiHandlers/UiClientHandler.cs | 1 + .../MobileControlWebsocketServer.cs | 1 + .../WebSocketServer/UiClient.cs | 1 + .../WebSocketServerSecretProvider.cs | 2 +- src/PepperDash.Essentials/ControlSystem.cs | 10 +- .../Factory/DeviceFactory.cs | 5 +- src/PepperDash.Essentials/HttpLogoServer.cs | 1 + .../Web/EssentialsWebApi.cs | 3 +- .../Web/EssentialsWebApiFactory.cs | 2 +- .../Web/EssentialsWebApiHelpers.cs | 4 +- .../Web/EssentialsWebApiPropertiesConfig.cs | 0 .../RequestHandlers/AppDebugRequestHandler.cs | 2 - .../DebugSessionRequestHandler.cs | 2 - .../RequestHandlers/DefaultRequestHandler.cs | 1 - .../RequestHandlers/DevJsonRequestHandler.cs | 3 +- .../RequestHandlers/DevListRequestHandler.cs | 2 +- .../DevMethodsRequestHandler.cs | 3 +- .../RequestHandlers/DevPropsRequestHandler.cs | 2 +- .../DisableAllStreamDebugRequestHandler.cs | 2 +- ...DoNotLoadConfigOnNextBootRequestHandler.cs | 2 - .../GetFeedbacksForDeviceRequestHandler.cs | 3 +- .../GetJoinMapForBridgeKeyRequestHandler.cs | 2 +- .../GetJoinMapForDeviceKeyRequestHandler.cs | 3 +- .../Web/RequestHandlers/GetRoutesHandler.cs | 1 - .../RequestHandlers/GetRoutingPortsHandler.cs | 3 +- .../GetTieLinesRequestHandler.cs | 2 +- .../GetTypesByFilterRequestHandler.cs | 2 +- .../RequestHandlers/GetTypesRequestHandler.cs | 2 +- .../LoadConfigRequestHandler.cs | 2 +- .../ReportVersionsRequestHandler.cs | 2 +- .../RestartProgramRequestHandler.cs | 1 - .../SetDeviceStreamDebugRequestHandler.cs | 3 +- .../ShowConfigRequestHandler.cs | 3 +- 472 files changed, 3075 insertions(+), 1528 deletions(-) rename src/PepperDash.Core/Comm/{eControlMethods.cs => eControlMethod.cs} (91%) create mode 100644 src/PepperDash.Essentials.Core/Bridges/SigHelper.cs rename src/PepperDash.Essentials.Core/{Comm and IR => Communications}/CecPortController.cs (97%) rename src/PepperDash.Essentials.Core/{Comm and IR => Communications}/ComPortController.cs (96%) rename src/PepperDash.Essentials.Core/{Comm and IR => Communications}/ComSpecJsonConverter.cs (98%) create mode 100644 src/PepperDash.Essentials.Core/Communications/ComTextHelper.cs rename src/PepperDash.Essentials.Core/{Comm and IR => Communications}/CommFactory.cs (96%) create mode 100644 src/PepperDash.Essentials.Core/Communications/CommunicationExtras.cs create mode 100644 src/PepperDash.Essentials.Core/Communications/CommunicationGather.cs create mode 100644 src/PepperDash.Essentials.Core/Communications/CommunicationStreamDebugging.cs rename src/PepperDash.Essentials.Core/{Comm and IR => Communications}/ConsoleCommMockDevice.cs (96%) create mode 100644 src/PepperDash.Essentials.Core/Communications/ControlPropertiesConfig.cs create mode 100644 src/PepperDash.Essentials.Core/Communications/EventArgs.cs rename src/PepperDash.Essentials.Core/{Comm and IR => Communications}/GenericComm.cs (94%) rename src/PepperDash.Essentials.Core/{Comm and IR => Communications}/GenericHttpClient.cs (81%) create mode 100644 src/PepperDash.Essentials.Core/Communications/IAutoReconnect.cs create mode 100644 src/PepperDash.Essentials.Core/Communications/IBasicCommunication.cs create mode 100644 src/PepperDash.Essentials.Core/Communications/IBasicCommunicationWithStreamDebugging.cs rename src/PepperDash.Essentials.Core/{Comm and IR/CommunicationExtras.cs => Communications/IComPortsDevice.cs} (73%) create mode 100644 src/PepperDash.Essentials.Core/Communications/ICommunicationReceiver.cs rename src/PepperDash.Essentials.Core/{Comm and IR => Communications}/IRPortHelper.cs (98%) create mode 100644 src/PepperDash.Essentials.Core/Communications/ISocketStatus.cs create mode 100644 src/PepperDash.Essentials.Core/Communications/ISocketStatusWithStreamDebugging.cs create mode 100644 src/PepperDash.Essentials.Core/Communications/IStreamDebugging.cs create mode 100644 src/PepperDash.Essentials.Core/Communications/TcpClientConfigObject.cs create mode 100644 src/PepperDash.Essentials.Core/Communications/TcpServerConfigObject.cs create mode 100644 src/PepperDash.Essentials.Core/Communications/TcpSshPropertiesConfig.cs create mode 100644 src/PepperDash.Essentials.Core/Communications/eControlMethod.cs delete mode 100644 src/PepperDash.Essentials.Core/Crestron/CrestronGenericBaseDevice.cs.orig create mode 100644 src/PepperDash.Essentials.Core/Debug.cs create mode 100644 src/PepperDash.Essentials.Core/Device.cs delete mode 100644 src/PepperDash.Essentials.Core/DeviceControlsParentInterfaces/IPresentationSource.cs delete mode 100644 src/PepperDash.Essentials.Core/File/FileIO.cs rename src/PepperDash.Essentials.Core/{Global => }/Global.cs (96%) create mode 100644 src/PepperDash.Essentials.Core/IKeyName.cs create mode 100644 src/PepperDash.Essentials.Core/IKeyed.cs delete mode 100644 src/PepperDash.Essentials.Core/PepperDash_Essentials_Core.csproj.DotSettings rename src/PepperDash.Essentials.Core/{Microphone Privacy => Privacy}/MicrophonePrivacyController.cs (98%) rename src/PepperDash.Essentials.Core/{Microphone Privacy => Privacy}/MicrophonePrivacyControllerConfig.cs (100%) delete mode 100644 src/PepperDash.Essentials.Core/Room/Room.cs rename src/PepperDash.Essentials.Core/{Room => Rooms}/Behaviours/RoomOnToDefaultSourceWhenOccupied.cs (97%) rename src/PepperDash.Essentials.Core/{Room => Rooms}/Combining/EssentialsRoomCombiner.cs (98%) rename src/PepperDash.Essentials.Core/{Room => Rooms}/Combining/EssentialsRoomCombinerPropertiesConfig.cs (98%) rename src/PepperDash.Essentials.Core/{Room => Rooms}/Combining/IEssentialsRoomCombiner.cs (96%) rename src/PepperDash.Essentials.Core/{Room => Rooms}/Combining/RoomCombinationScenario.cs (93%) rename src/PepperDash.Essentials.Core/{Room => Rooms}/Config/EssentialsDualDisplayRoomPropertiesConfig.cs (80%) rename src/PepperDash.Essentials.Core/{Room => Rooms}/Config/EssentialsHuddleRoomPropertiesConfig.cs (95%) rename src/PepperDash.Essentials.Core/{Room => Rooms}/Config/EssentialsHuddleVtc1PropertiesConfig.cs (88%) rename src/PepperDash.Essentials.Core/{Room => Rooms}/Config/EssentialsNDisplayRoomPropertiesConfig.cs (91%) rename src/PepperDash.Essentials.Core/{Room => Rooms}/Config/EssentialsPresentationPropertiesConfig.cs (94%) rename src/PepperDash.Essentials.Core/{Room => Rooms}/Config/EssentialsRoomConfig.cs (98%) rename src/PepperDash.Essentials.Core/{Room => Rooms}/Config/EssentialsRoomEmergencyConfig.cs (94%) rename src/PepperDash.Essentials.Core/{Room => Rooms}/Config/EssentialsRoomScheduledEventsConfig.cs (94%) rename src/PepperDash.Essentials.Core/{Room => Rooms}/Config/EssentialsTechRoomConfig.cs (98%) rename src/PepperDash.Essentials.Core/{Room => Rooms}/Config/EssentialsVolumeLevelConfig.cs (97%) rename src/PepperDash.Essentials.Core/{Room => Rooms}/Config/SimplRoomPropertiesConfig.cs (95%) rename src/PepperDash.Essentials.Core/{Room => Rooms}/EsentialsRoomEmergencyContactClosure.cs (97%) rename src/PepperDash.Essentials.Core/{Room => Rooms}/EssentialsRoomBase.cs (98%) rename src/PepperDash.Essentials.Core/{Room => Rooms}/IEssentialsRoom.cs (90%) rename src/PepperDash.Essentials.Core/{Room/iOccupancyStatusProvider.cs => Rooms/IOccupancyStatusProvider.cs} (69%) rename src/PepperDash.Essentials.Core/{Room => Rooms}/IRoomEventSchedule.cs (88%) rename src/PepperDash.Essentials.Core/{Room => Rooms}/Interfaces.cs (93%) create mode 100644 src/PepperDash.Essentials.Core/Rooms/Room.cs create mode 100644 src/PepperDash.Essentials.Core/Secrets/ISecret.cs rename src/PepperDash.Essentials.Core/Secrets/{Interfaces.cs => ISecretProvider.cs} (63%) create mode 100644 src/PepperDash.Essentials.Core/Shades/ICrestronBasicShade.cs create mode 100644 src/PepperDash.Essentials.Core/Shades/ISceneFeedback.cs create mode 100644 src/PepperDash.Essentials.Core/Shades/IShades.cs create mode 100644 src/PepperDash.Essentials.Core/Shades/IShadesFeedback.cs create mode 100644 src/PepperDash.Essentials.Core/Shades/IShadesOpenClosePreset.cs create mode 100644 src/PepperDash.Essentials.Core/Shades/IShadesOpenCloseStop.cs create mode 100644 src/PepperDash.Essentials.Core/Shades/IShadesOpenClosedFeedback.cs create mode 100644 src/PepperDash.Essentials.Core/Shades/IShadesPosition.cs create mode 100644 src/PepperDash.Essentials.Core/Shades/IShadesRaiseLowerFeedback.cs create mode 100644 src/PepperDash.Essentials.Core/Shades/IShadesStopFeedback.cs create mode 100644 src/PepperDash.Essentials.Core/Shades/IShadesStopOrMove.cs delete mode 100644 src/PepperDash.Essentials.Core/Shades/Shade Interfaces.cs delete mode 100644 src/PepperDash.Essentials.Core/SigHelper.cs rename src/PepperDash.Essentials.Core/{InUseTracking => USage}/IInUseTracking.cs (77%) rename src/PepperDash.Essentials.Core/{InUseTracking => USage}/InUseTracking.cs (95%) rename src/PepperDash.Essentials.Core/{Ramps and Increments => Utilities}/ActionIncrementer.cs (93%) rename src/PepperDash.Essentials.Core/{Ramps and Increments => Utilities}/NumericalHelpers.cs (83%) rename src/PepperDash.Essentials.Core/{Ramps and Increments => Utilities}/UshortSigIncrementer.cs (93%) delete mode 100644 src/PepperDash.Essentials.Core/app.config rename src/{PepperDash.Essentials.Core => PepperDash.Essentials}/Web/EssentialsWebApi.cs (99%) rename src/{PepperDash.Essentials.Core => PepperDash.Essentials}/Web/EssentialsWebApiFactory.cs (95%) rename src/{PepperDash.Essentials.Core => PepperDash.Essentials}/Web/EssentialsWebApiHelpers.cs (95%) rename src/{PepperDash.Essentials.Core => PepperDash.Essentials}/Web/EssentialsWebApiPropertiesConfig.cs (100%) rename src/{PepperDash.Essentials.Core => PepperDash.Essentials}/Web/RequestHandlers/AppDebugRequestHandler.cs (97%) rename src/{PepperDash.Essentials.Core => PepperDash.Essentials}/Web/RequestHandlers/DebugSessionRequestHandler.cs (97%) rename src/{PepperDash.Essentials.Core => PepperDash.Essentials}/Web/RequestHandlers/DefaultRequestHandler.cs (98%) rename src/{PepperDash.Essentials.Core => PepperDash.Essentials}/Web/RequestHandlers/DevJsonRequestHandler.cs (97%) rename src/{PepperDash.Essentials.Core => PepperDash.Essentials}/Web/RequestHandlers/DevListRequestHandler.cs (97%) rename src/{PepperDash.Essentials.Core => PepperDash.Essentials}/Web/RequestHandlers/DevMethodsRequestHandler.cs (97%) rename src/{PepperDash.Essentials.Core => PepperDash.Essentials}/Web/RequestHandlers/DevPropsRequestHandler.cs (98%) rename src/{PepperDash.Essentials.Core => PepperDash.Essentials}/Web/RequestHandlers/DisableAllStreamDebugRequestHandler.cs (94%) rename src/{PepperDash.Essentials.Core => PepperDash.Essentials}/Web/RequestHandlers/DoNotLoadConfigOnNextBootRequestHandler.cs (97%) rename src/{PepperDash.Essentials.Core => PepperDash.Essentials}/Web/RequestHandlers/GetFeedbacksForDeviceRequestHandler.cs (96%) rename src/{PepperDash.Essentials.Core => PepperDash.Essentials}/Web/RequestHandlers/GetJoinMapForBridgeKeyRequestHandler.cs (97%) rename src/{PepperDash.Essentials.Core => PepperDash.Essentials}/Web/RequestHandlers/GetJoinMapForDeviceKeyRequestHandler.cs (96%) rename src/{PepperDash.Essentials.Core => PepperDash.Essentials}/Web/RequestHandlers/GetRoutesHandler.cs (98%) rename src/{PepperDash.Essentials.Core => PepperDash.Essentials}/Web/RequestHandlers/GetRoutingPortsHandler.cs (96%) rename src/{PepperDash.Essentials.Core => PepperDash.Essentials}/Web/RequestHandlers/GetTieLinesRequestHandler.cs (96%) rename src/{PepperDash.Essentials.Core => PepperDash.Essentials}/Web/RequestHandlers/GetTypesByFilterRequestHandler.cs (97%) rename src/{PepperDash.Essentials.Core => PepperDash.Essentials}/Web/RequestHandlers/GetTypesRequestHandler.cs (97%) rename src/{PepperDash.Essentials.Core => PepperDash.Essentials}/Web/RequestHandlers/LoadConfigRequestHandler.cs (95%) rename src/{PepperDash.Essentials.Core => PepperDash.Essentials}/Web/RequestHandlers/ReportVersionsRequestHandler.cs (96%) rename src/{PepperDash.Essentials.Core => PepperDash.Essentials}/Web/RequestHandlers/RestartProgramRequestHandler.cs (96%) rename src/{PepperDash.Essentials.Core => PepperDash.Essentials}/Web/RequestHandlers/SetDeviceStreamDebugRequestHandler.cs (98%) rename src/{PepperDash.Essentials.Core => PepperDash.Essentials}/Web/RequestHandlers/ShowConfigRequestHandler.cs (92%) diff --git a/src/PepperDash.Core/Comm/CommunicationGather.cs b/src/PepperDash.Core/Comm/CommunicationGather.cs index e75a012d..28a886a2 100644 --- a/src/PepperDash.Core/Comm/CommunicationGather.cs +++ b/src/PepperDash.Core/Comm/CommunicationGather.cs @@ -1,14 +1,11 @@ using System; -using System.Collections.Generic; -using System.Linq; using System.Text; using System.Text.RegularExpressions; -using Crestron.SimplSharp; using PepperDash.Core; -namespace PepperDash.Core +namespace PepperDash.Essentials.Core.Communications { /// /// Defines the string event handler for line events on the gather diff --git a/src/PepperDash.Core/Comm/CommunicationStreamDebugging.cs b/src/PepperDash.Core/Comm/CommunicationStreamDebugging.cs index 33141f0c..94ba22a5 100644 --- a/src/PepperDash.Core/Comm/CommunicationStreamDebugging.cs +++ b/src/PepperDash.Core/Comm/CommunicationStreamDebugging.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; -using PepperDash.Core; namespace PepperDash.Core { diff --git a/src/PepperDash.Core/Comm/ControlPropertiesConfig.cs b/src/PepperDash.Core/Comm/ControlPropertiesConfig.cs index c665dad8..22705d7c 100644 --- a/src/PepperDash.Core/Comm/ControlPropertiesConfig.cs +++ b/src/PepperDash.Core/Comm/ControlPropertiesConfig.cs @@ -1,9 +1,8 @@ using System; -using Crestron.SimplSharp; using Newtonsoft.Json; using Newtonsoft.Json.Converters; -namespace PepperDash.Core +namespace PepperDash.Essentials.Core.Communications { /// /// Represents a ControlPropertiesConfig diff --git a/src/PepperDash.Core/Comm/eControlMethods.cs b/src/PepperDash.Core/Comm/eControlMethod.cs similarity index 91% rename from src/PepperDash.Core/Comm/eControlMethods.cs rename to src/PepperDash.Core/Comm/eControlMethod.cs index 28a95b12..377405d6 100644 --- a/src/PepperDash.Core/Comm/eControlMethods.cs +++ b/src/PepperDash.Core/Comm/eControlMethod.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; - -namespace PepperDash.Core +namespace PepperDash.Essentials.Core.Communications { /// /// Crestron Control Methods for a comm object diff --git a/src/PepperDash.Essentials.Core/Bridges/BridgeBase.cs b/src/PepperDash.Essentials.Core/Bridges/BridgeBase.cs index acb2e3b5..32572be6 100644 --- a/src/PepperDash.Essentials.Core/Bridges/BridgeBase.cs +++ b/src/PepperDash.Essentials.Core/Bridges/BridgeBase.cs @@ -8,9 +8,11 @@ using Crestron.SimplSharpPro.DeviceSupport; using Crestron.SimplSharpPro.EthernetCommunication; using Newtonsoft.Json; - -using PepperDash.Core; +using PepperDash.Essentials.Core.Communications; using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.JoinMaps; +using PepperDash.Essentials.Core.Monitoring; using Serilog.Events; //using PepperDash.Essentials.Devices.Common.Cameras; diff --git a/src/PepperDash.Essentials.Core/Bridges/BridgeHelper.cs b/src/PepperDash.Essentials.Core/Bridges/BridgeHelper.cs index 599c06a6..495da6dd 100644 --- a/src/PepperDash.Essentials.Core/Bridges/BridgeHelper.cs +++ b/src/PepperDash.Essentials.Core/Bridges/BridgeHelper.cs @@ -1,4 +1,4 @@ -using PepperDash.Core; +using PepperDash.Essentials.Core.Devices; using Serilog.Events; //using PepperDash.Essentials.Devices.Common.Cameras; diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/AirMediaControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/AirMediaControllerJoinMap.cs index 6975ce3c..7b625b36 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/AirMediaControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/AirMediaControllerJoinMap.cs @@ -1,6 +1,7 @@ +using PepperDash.Essentials.Core.JoinMaps; using System; -namespace PepperDash.Essentials.Core.Bridges +namespace PepperDash.Essentials.Core.Bridges.JoinMaps { /// /// Represents a AirMediaControllerJoinMap diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/AppleTvJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/AppleTvJoinMap.cs index 0776f653..34dff0f5 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/AppleTvJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/AppleTvJoinMap.cs @@ -1,6 +1,7 @@ -using System; +using PepperDash.Essentials.Core.JoinMaps; +using System; -namespace PepperDash.Essentials.Core.Bridges +namespace PepperDash.Essentials.Core.Bridges.JoinMaps { /// /// Represents a AppleTvJoinMap diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/C2nRthsControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/C2nRthsControllerJoinMap.cs index 3d6d01b1..2be776cc 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/C2nRthsControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/C2nRthsControllerJoinMap.cs @@ -1,6 +1,7 @@ -using System; +using PepperDash.Essentials.Core.JoinMaps; +using System; -namespace PepperDash.Essentials.Core.Bridges +namespace PepperDash.Essentials.Core.Bridges.JoinMaps { /// /// Represents a C2nRthsControllerJoinMap diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/CameraControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/CameraControllerJoinMap.cs index 70f182cb..dcb98051 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/CameraControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/CameraControllerJoinMap.cs @@ -1,6 +1,7 @@ -using System; +using PepperDash.Essentials.Core.JoinMaps; +using System; -namespace PepperDash.Essentials.Core.Bridges +namespace PepperDash.Essentials.Core.Bridges.JoinMaps { /// /// Represents a CameraControllerJoinMap diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/CenOdtOccupancySensorBaseJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/CenOdtOccupancySensorBaseJoinMap.cs index 8ad097e6..c9b8721c 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/CenOdtOccupancySensorBaseJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/CenOdtOccupancySensorBaseJoinMap.cs @@ -1,6 +1,7 @@ -using System; +using PepperDash.Essentials.Core.JoinMaps; +using System; -namespace PepperDash.Essentials.Core.Bridges +namespace PepperDash.Essentials.Core.Bridges.JoinMaps { /// /// Represents a CenOdtOccupancySensorBaseJoinMap diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DisplayControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DisplayControllerJoinMap.cs index d200c591..13278d5d 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DisplayControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DisplayControllerJoinMap.cs @@ -1,6 +1,7 @@ -using System; +using PepperDash.Essentials.Core.JoinMaps; +using System; -namespace PepperDash.Essentials.Core.Bridges +namespace PepperDash.Essentials.Core.Bridges.JoinMaps { /// /// Represents a DisplayControllerJoinMap diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmBladeChassisControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmBladeChassisControllerJoinMap.cs index 99d59a7c..0b96d637 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmBladeChassisControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmBladeChassisControllerJoinMap.cs @@ -1,6 +1,8 @@ -using System; +using PepperDash.Essentials.Core.JoinMaps; +using System; -namespace PepperDash.Essentials.Core.Bridges { +namespace PepperDash.Essentials.Core.Bridges.JoinMaps +{ /// /// Represents a DmBladeChassisControllerJoinMap /// diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmChassisControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmChassisControllerJoinMap.cs index 27770d81..dd2f8d45 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmChassisControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmChassisControllerJoinMap.cs @@ -1,6 +1,7 @@ +using PepperDash.Essentials.Core.JoinMaps; using System; -namespace PepperDash.Essentials.Core.Bridges +namespace PepperDash.Essentials.Core.Bridges.JoinMaps { /// /// Represents a DmChassisControllerJoinMap diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmRmcControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmRmcControllerJoinMap.cs index 6eae5037..c4920c8f 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmRmcControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmRmcControllerJoinMap.cs @@ -1,6 +1,7 @@ +using PepperDash.Essentials.Core.JoinMaps; using System; -namespace PepperDash.Essentials.Core.Bridges +namespace PepperDash.Essentials.Core.Bridges.JoinMaps { /// /// Represents a DmRmcControllerJoinMap diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmTxControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmTxControllerJoinMap.cs index 6aec8c33..eb0214ab 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmTxControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmTxControllerJoinMap.cs @@ -1,6 +1,7 @@ -using System; +using PepperDash.Essentials.Core.JoinMaps; +using System; -namespace PepperDash.Essentials.Core.Bridges +namespace PepperDash.Essentials.Core.Bridges.JoinMaps { /// /// Represents a DmTxControllerJoinMap diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmpsAudioOutputControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmpsAudioOutputControllerJoinMap.cs index 7ab0900d..09ea6549 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmpsAudioOutputControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmpsAudioOutputControllerJoinMap.cs @@ -1,6 +1,7 @@ -using System; +using PepperDash.Essentials.Core.JoinMaps; +using System; -namespace PepperDash.Essentials.Core.Bridges +namespace PepperDash.Essentials.Core.Bridges.JoinMaps { /// /// Represents a DmpsAudioOutputControllerJoinMap diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmpsMicrophoneControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmpsMicrophoneControllerJoinMap.cs index 91f642bb..e1d3780f 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmpsMicrophoneControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmpsMicrophoneControllerJoinMap.cs @@ -1,6 +1,7 @@ -using System; +using PepperDash.Essentials.Core.JoinMaps; +using System; -namespace PepperDash.Essentials.Core.Bridges +namespace PepperDash.Essentials.Core.Bridges.JoinMaps { /// /// Represents a DmpsMicrophoneControllerJoinMap diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmpsRoutingControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmpsRoutingControllerJoinMap.cs index 71ce39a6..84beb78d 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmpsRoutingControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/DmpsRoutingControllerJoinMap.cs @@ -1,6 +1,7 @@ -using System; +using PepperDash.Essentials.Core.JoinMaps; +using System; -namespace PepperDash.Essentials.Core.Bridges +namespace PepperDash.Essentials.Core.Bridges.JoinMaps { /// /// Represents a DmpsRoutingControllerJoinMap diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GenericIrControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GenericIrControllerJoinMap.cs index a4f93401..28113009 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GenericIrControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GenericIrControllerJoinMap.cs @@ -1,4 +1,6 @@ -namespace PepperDash.Essentials.Core.Bridges.JoinMaps +using PepperDash.Essentials.Core.JoinMaps; + +namespace PepperDash.Essentials.Core.Bridges.JoinMaps { public sealed class GenericIrControllerJoinMap : JoinMapBaseAdvanced { diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GenericLightingJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GenericLightingJoinMap.cs index e98fdaf3..6adb7ffe 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GenericLightingJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GenericLightingJoinMap.cs @@ -1,7 +1,8 @@ -using System; +using PepperDash.Essentials.Core.JoinMaps; +using System; -namespace PepperDash.Essentials.Core.Bridges +namespace PepperDash.Essentials.Core.Bridges.JoinMaps { /// /// Represents a GenericLightingJoinMap diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GenericRelayControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GenericRelayControllerJoinMap.cs index 65e49843..cdec3656 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GenericRelayControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GenericRelayControllerJoinMap.cs @@ -1,6 +1,7 @@ -using System; +using PepperDash.Essentials.Core.JoinMaps; +using System; -namespace PepperDash.Essentials.Core.Bridges +namespace PepperDash.Essentials.Core.Bridges.JoinMaps { /// /// Represents a GenericRelayControllerJoinMap diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GlsOccupancySensorBaseJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GlsOccupancySensorBaseJoinMap.cs index ca223921..10d5ff7f 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GlsOccupancySensorBaseJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GlsOccupancySensorBaseJoinMap.cs @@ -1,6 +1,7 @@ -using System; +using PepperDash.Essentials.Core.JoinMaps; +using System; -namespace PepperDash.Essentials.Core.Bridges +namespace PepperDash.Essentials.Core.Bridges.JoinMaps { /// /// Represents a GlsOccupancySensorBaseJoinMap diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GlsPartitionSensorJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GlsPartitionSensorJoinMap.cs index 290832cd..abd2c7ae 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GlsPartitionSensorJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/GlsPartitionSensorJoinMap.cs @@ -1,4 +1,5 @@ -using System; +using PepperDash.Essentials.Core.JoinMaps; +using System; namespace PepperDash.Essentials.Core.Bridges.JoinMaps { diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/HdMdNxM4kEControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/HdMdNxM4kEControllerJoinMap.cs index cbc5d9ae..6516f149 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/HdMdNxM4kEControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/HdMdNxM4kEControllerJoinMap.cs @@ -1,6 +1,7 @@ -using System; +using PepperDash.Essentials.Core.JoinMaps; +using System; -namespace PepperDash.Essentials.Core.Bridges +namespace PepperDash.Essentials.Core.Bridges.JoinMaps { /// /// Represents a HdMdNxM4kEControllerJoinMap diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/HdMdxxxCEControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/HdMdxxxCEControllerJoinMap.cs index ea1a9784..95adc348 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/HdMdxxxCEControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/HdMdxxxCEControllerJoinMap.cs @@ -1,6 +1,7 @@ -using System; +using PepperDash.Essentials.Core.JoinMaps; +using System; -namespace PepperDash.Essentials.Core.Bridges +namespace PepperDash.Essentials.Core.Bridges.JoinMaps { /// /// Represents a HdMdxxxCEControllerJoinMap diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/HdPsXxxControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/HdPsXxxControllerJoinMap.cs index c8f16f0b..130202b1 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/HdPsXxxControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/HdPsXxxControllerJoinMap.cs @@ -1,6 +1,7 @@ -using System; +using PepperDash.Essentials.Core.JoinMaps; +using System; -namespace PepperDash.Essentials.Core.Bridges +namespace PepperDash.Essentials.Core.Bridges.JoinMaps { /// /// Represents a HdPsXxxControllerJoinMap diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/Hrxxx0WirelessRemoteControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/Hrxxx0WirelessRemoteControllerJoinMap.cs index c93da2f7..831a9c3a 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/Hrxxx0WirelessRemoteControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/Hrxxx0WirelessRemoteControllerJoinMap.cs @@ -1,6 +1,7 @@ -using System; +using PepperDash.Essentials.Core.JoinMaps; +using System; -namespace PepperDash.Essentials.Core.Bridges +namespace PepperDash.Essentials.Core.Bridges.JoinMaps { /// /// Represents a Hrxxx0WirelessRemoteControllerJoinMap diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IAnalogInputJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IAnalogInputJoinMap.cs index dc4c29f1..44568cc8 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IAnalogInputJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IAnalogInputJoinMap.cs @@ -1,6 +1,7 @@ -using System; +using PepperDash.Essentials.Core.JoinMaps; +using System; -namespace PepperDash.Essentials.Core.Bridges +namespace PepperDash.Essentials.Core.Bridges.JoinMaps { /// /// Represents a IAnalogInputJoinMap diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IBasicCommunicationJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IBasicCommunicationJoinMap.cs index 303f9b1b..c3341945 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IBasicCommunicationJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IBasicCommunicationJoinMap.cs @@ -1,6 +1,7 @@ -using System; +using PepperDash.Essentials.Core.JoinMaps; +using System; -namespace PepperDash.Essentials.Core.Bridges +namespace PepperDash.Essentials.Core.Bridges.JoinMaps { /// /// Represents a IBasicCommunicationJoinMap diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IDigitalInputJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IDigitalInputJoinMap.cs index 77405182..67f22bf7 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IDigitalInputJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IDigitalInputJoinMap.cs @@ -1,6 +1,7 @@ -using System; +using PepperDash.Essentials.Core.JoinMaps; +using System; -namespace PepperDash.Essentials.Core.Bridges +namespace PepperDash.Essentials.Core.Bridges.JoinMaps { /// /// Represents a IDigitalInputJoinMap diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IDigitalOutputJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IDigitalOutputJoinMap.cs index 92d78772..f9d94dd4 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IDigitalOutputJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IDigitalOutputJoinMap.cs @@ -1,6 +1,7 @@ -using System; +using PepperDash.Essentials.Core.JoinMaps; +using System; -namespace PepperDash.Essentials.Core.Bridges +namespace PepperDash.Essentials.Core.Bridges.JoinMaps { /// /// Represents a IDigitalOutputJoinMap diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IRBlurayBaseJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IRBlurayBaseJoinMap.cs index a8997b48..3e62125d 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IRBlurayBaseJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/IRBlurayBaseJoinMap.cs @@ -1,6 +1,7 @@ -using System; +using PepperDash.Essentials.Core.JoinMaps; +using System; -namespace PepperDash.Essentials.Core.Bridges +namespace PepperDash.Essentials.Core.Bridges.JoinMaps { /// /// Join map for IRBlurayBase devices diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/PduJoinMapBase.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/PduJoinMapBase.cs index e50d9b8f..2a7a2bea 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/PduJoinMapBase.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/PduJoinMapBase.cs @@ -1,6 +1,7 @@ -using System; +using PepperDash.Essentials.Core.JoinMaps; +using System; -namespace PepperDash.Essentials.Core.Bridges +namespace PepperDash.Essentials.Core.Bridges.JoinMaps { /// /// Represents a PduJoinMapBase diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/SetTopBoxControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/SetTopBoxControllerJoinMap.cs index a5e2ea6f..39c26171 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/SetTopBoxControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/SetTopBoxControllerJoinMap.cs @@ -1,7 +1,8 @@ -using System; +using PepperDash.Essentials.Core.JoinMaps; +using System; -namespace PepperDash.Essentials.Core.Bridges +namespace PepperDash.Essentials.Core.Bridges.JoinMaps { /// /// Represents a SetTopBoxControllerJoinMap diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/StatusSignControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/StatusSignControllerJoinMap.cs index 60b7e5d8..ff77a9a9 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/StatusSignControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/StatusSignControllerJoinMap.cs @@ -1,6 +1,7 @@ -using System; +using PepperDash.Essentials.Core.JoinMaps; +using System; -namespace PepperDash.Essentials.Core.Bridges +namespace PepperDash.Essentials.Core.Bridges.JoinMaps { /// /// Represents a StatusSignControllerJoinMap diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/SystemMonitorJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/SystemMonitorJoinMap.cs index b594a685..3e58c118 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/SystemMonitorJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/SystemMonitorJoinMap.cs @@ -1,6 +1,7 @@ -using System; +using PepperDash.Essentials.Core.JoinMaps; +using System; -namespace PepperDash.Essentials.Core.Bridges +namespace PepperDash.Essentials.Core.Bridges.JoinMaps { /// /// Represents a SystemMonitorJoinMap diff --git a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/VideoCodecControllerJoinMap.cs b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/VideoCodecControllerJoinMap.cs index d84d52bd..380dbe78 100644 --- a/src/PepperDash.Essentials.Core/Bridges/JoinMaps/VideoCodecControllerJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Bridges/JoinMaps/VideoCodecControllerJoinMap.cs @@ -1,3 +1,4 @@ +using PepperDash.Essentials.Core.JoinMaps; using System; namespace PepperDash.Essentials.Core.Bridges.JoinMaps { diff --git a/src/PepperDash.Essentials.Core/Bridges/SigHelper.cs b/src/PepperDash.Essentials.Core/Bridges/SigHelper.cs new file mode 100644 index 00000000..f4dc38c8 --- /dev/null +++ b/src/PepperDash.Essentials.Core/Bridges/SigHelper.cs @@ -0,0 +1,72 @@ +using System; +using Crestron.SimplSharpPro; + +namespace PepperDash.Essentials.Core.Bridges +{ + /// + /// Helper class for various Sig events + /// + public class SigHelper + { + /// + /// Runs action when Sig is pressed + /// + /// + public static void Pressed(Sig sig, Action act) { if (sig.BoolValue) act(); } + + /// + /// Runs action when Sig is released + /// + public static void Released(Sig sig, Action act) { if (!sig.BoolValue) act(); } + + /// + /// SetBoolOutAction method + /// + public static void SetBoolOutAction(BoolOutputSig sig, Action a) + { + if (sig != null) + sig.UserObject = a; + } + + /// + /// Safely clears action of non-null sig. + /// + public static void ClearBoolOutAction(BoolOutputSig sig) + { + if (sig != null) + sig.UserObject = null; + } + + /// + /// Does a timed ramp, where the time is scaled proportional to the + /// remaining range to cover + /// + /// Ushort sig to scale + /// Level to go to + /// In ms (not hundredths like Crestron Sig ramp function) + /// + /// RampTimeScaled method + /// + public static void RampTimeScaled(Sig sig, ushort newLevel, uint time) + { + var level = sig.UShortValue; + var diff = Math.Abs(level - newLevel); + var scaledTime = (uint)(diff * time / 65535); + Ramp(sig, newLevel, scaledTime); + } + + /// + /// Ramps signal + /// + /// + /// + /// In ms (not hundredths like Crestron Sig ramp function) + /// + /// Ramp method + /// + public static void Ramp(Sig sig, ushort level, uint time) + { + sig.CreateRamp(level, time / 10); + } + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Comm and IR/CecPortController.cs b/src/PepperDash.Essentials.Core/Communications/CecPortController.cs similarity index 97% rename from src/PepperDash.Essentials.Core/Comm and IR/CecPortController.cs rename to src/PepperDash.Essentials.Core/Communications/CecPortController.cs index 38ae5ae0..d1dccb0a 100644 --- a/src/PepperDash.Essentials.Core/Comm and IR/CecPortController.cs +++ b/src/PepperDash.Essentials.Core/Communications/CecPortController.cs @@ -2,11 +2,9 @@ using System.Text; using System.Text.RegularExpressions; using Crestron.SimplSharpPro.DM; - -using PepperDash.Core; using Serilog.Events; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Communications { /// /// Represents a CecPortController @@ -135,7 +133,7 @@ namespace PepperDash.Essentials.Core foreach (var t in split) { if (t.StartsWith(@"\") && t.Length == 4) - b.Append((char)(Convert.ToByte(t.Substring(2, 2), 16))); + b.Append((char)Convert.ToByte(t.Substring(2, 2), 16)); else b.Append(t); } diff --git a/src/PepperDash.Essentials.Core/Comm and IR/ComPortController.cs b/src/PepperDash.Essentials.Core/Communications/ComPortController.cs similarity index 96% rename from src/PepperDash.Essentials.Core/Comm and IR/ComPortController.cs rename to src/PepperDash.Essentials.Core/Communications/ComPortController.cs index 9c6a1747..0798891e 100644 --- a/src/PepperDash.Essentials.Core/Comm and IR/ComPortController.cs +++ b/src/PepperDash.Essentials.Core/Communications/ComPortController.cs @@ -2,12 +2,10 @@ using System.Text; using System.Text.RegularExpressions; using Crestron.SimplSharpPro; - -using PepperDash.Core; using Serilog.Events; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Communications { /// /// Represents a ComPortController @@ -187,11 +185,11 @@ namespace PepperDash.Essentials.Core { // split out hex chars and build string var split = Regex.Split(s, @"(\\[Xx][0-9a-fA-F][0-9a-fA-F])"); - StringBuilder b = new StringBuilder(); + var b = new StringBuilder(); foreach (var t in split) { if (t.StartsWith(@"\") && t.Length == 4) - b.Append((char)(Convert.ToByte(t.Substring(2, 2), 16))); + b.Append((char)Convert.ToByte(t.Substring(2, 2), 16)); else b.Append(t); } diff --git a/src/PepperDash.Essentials.Core/Comm and IR/ComSpecJsonConverter.cs b/src/PepperDash.Essentials.Core/Communications/ComSpecJsonConverter.cs similarity index 98% rename from src/PepperDash.Essentials.Core/Comm and IR/ComSpecJsonConverter.cs rename to src/PepperDash.Essentials.Core/Communications/ComSpecJsonConverter.cs index 1a697a02..f86ef294 100644 --- a/src/PepperDash.Essentials.Core/Comm and IR/ComSpecJsonConverter.cs +++ b/src/PepperDash.Essentials.Core/Communications/ComSpecJsonConverter.cs @@ -6,7 +6,7 @@ using Crestron.SimplSharpPro; using Newtonsoft.Json; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Communications { /// /// This converter creates a proper ComPort.ComPortSpec struct from more-friendly JSON values. It uses diff --git a/src/PepperDash.Essentials.Core/Communications/ComTextHelper.cs b/src/PepperDash.Essentials.Core/Communications/ComTextHelper.cs new file mode 100644 index 00000000..2276107b --- /dev/null +++ b/src/PepperDash.Essentials.Core/Communications/ComTextHelper.cs @@ -0,0 +1,49 @@ +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; + +namespace PepperDash.Essentials.Core.Communications +{ + /// + /// + /// + public class ComTextHelper + { + /// + /// Gets escaped text for a byte array + /// + /// + /// + public static string GetEscapedText(byte[] bytes) + { + return string.Concat(bytes.Select(b => string.Format(@"[{0:X2}]", (int)b)).ToArray()); + } + + /// + /// Gets escaped text for a string + /// + /// + /// + /// + /// GetEscapedText method + /// + public static string GetEscapedText(string text) + { + var bytes = Encoding.GetEncoding(28591).GetBytes(text); + return string.Concat(bytes.Select(b => string.Format(@"[{0:X2}]", (int)b)).ToArray()); + } + + /// + /// Gets debug text for a string + /// + /// + /// + /// + /// GetDebugText method + /// + public static string GetDebugText(string text) + { + return Regex.Replace(text, @"[^\u0020-\u007E]", a => GetEscapedText(a.Value)); + } + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Comm and IR/CommFactory.cs b/src/PepperDash.Essentials.Core/Communications/CommFactory.cs similarity index 96% rename from src/PepperDash.Essentials.Core/Comm and IR/CommFactory.cs rename to src/PepperDash.Essentials.Core/Communications/CommFactory.cs index 720ea820..6bf4f9d1 100644 --- a/src/PepperDash.Essentials.Core/Comm and IR/CommFactory.cs +++ b/src/PepperDash.Essentials.Core/Communications/CommFactory.cs @@ -4,11 +4,12 @@ using System; using Crestron.SimplSharpPro; using Crestron.SimplSharpPro.DM; using Newtonsoft.Json; -using PepperDash.Core; using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Routing; using Serilog.Events; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Communications { /// /// @@ -145,7 +146,7 @@ namespace PepperDash.Essentials.Core if (dev == null) return null; - if (String.IsNullOrEmpty(config.ControlPortName)) + if (string.IsNullOrEmpty(config.ControlPortName)) { Debug.LogMessage(LogEventLevel.Information, "GetCecPort: '{0}' - Configuration missing 'ControlPortName'", config.ControlPortDevKey); return null; @@ -194,8 +195,8 @@ namespace PepperDash.Essentials.Core /// public static IComPorts GetIComPortsDeviceFromManagedDevice(string ComPortDevKey) { - if ((ComPortDevKey.Equals("controlSystem", System.StringComparison.OrdinalIgnoreCase) - || ComPortDevKey.Equals("processor", System.StringComparison.OrdinalIgnoreCase)) + if ((ComPortDevKey.Equals("controlSystem", StringComparison.OrdinalIgnoreCase) + || ComPortDevKey.Equals("processor", StringComparison.OrdinalIgnoreCase)) && Global.ControlSystem is IComPorts) return Global.ControlSystem; else diff --git a/src/PepperDash.Essentials.Core/Communications/CommunicationExtras.cs b/src/PepperDash.Essentials.Core/Communications/CommunicationExtras.cs new file mode 100644 index 00000000..85f12524 --- /dev/null +++ b/src/PepperDash.Essentials.Core/Communications/CommunicationExtras.cs @@ -0,0 +1,91 @@ +using System; + +namespace PepperDash.Essentials.Core.Communications +{ + + /// + /// + /// + public enum eGenericCommMethodStatusChangeType + { + /// + /// Connected + /// + Connected, + /// + /// Disconnected + /// + Disconnected + } + + /// + /// This delegate defines handler for IBasicCommunication status changes + /// + /// Device firing the status change + /// + public delegate void GenericCommMethodStatusHandler(IBasicCommunication comm, eGenericCommMethodStatusChangeType status); + + /// + /// + /// + public class GenericCommMethodReceiveBytesArgs : EventArgs + { + /// + /// Gets or sets the Bytes + /// + public byte[] Bytes { get; private set; } + + /// + /// + /// + /// + public GenericCommMethodReceiveBytesArgs(byte[] bytes) + { + Bytes = bytes; + } + + /// + /// S+ Constructor + /// + public GenericCommMethodReceiveBytesArgs() { } + } + + /// + /// + /// + public class GenericCommMethodReceiveTextArgs : EventArgs + { + /// + /// + /// + public string Text { get; private set; } + /// + /// + /// + public string Delimiter { get; private set; } + /// + /// + /// + /// + public GenericCommMethodReceiveTextArgs(string text) + { + Text = text; + } + + /// + /// + /// + /// + /// + public GenericCommMethodReceiveTextArgs(string text, string delimiter) + :this(text) + { + Delimiter = delimiter; + } + + /// + /// S+ Constructor + /// + public GenericCommMethodReceiveTextArgs() { } + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Communications/CommunicationGather.cs b/src/PepperDash.Essentials.Core/Communications/CommunicationGather.cs new file mode 100644 index 00000000..c3936182 --- /dev/null +++ b/src/PepperDash.Essentials.Core/Communications/CommunicationGather.cs @@ -0,0 +1,173 @@ +using System; +using System.Text; +using System.Text.RegularExpressions; + + +namespace PepperDash.Essentials.Core.Communications +{ + /// + /// Defines the string event handler for line events on the gather + /// + /// + public delegate void LineReceivedHandler(string text); + + /// + /// Attaches to IBasicCommunication as a text gather + /// + public class CommunicationGather + { + /// + /// Event that fires when a line is received from the IBasicCommunication source. + /// The event merely contains the text, not an EventArgs type class. + /// + public event EventHandler LineReceived; + + /// + /// The communication port that this gathers on + /// + public ICommunicationReceiver Port { get; private set; } + + /// + /// Default false. If true, the delimiter will be included in the line output + /// events + /// + public bool IncludeDelimiter { get; set; } + + /// + /// For receive buffer + /// + StringBuilder ReceiveBuffer = new StringBuilder(); + + /// + /// Delimiter, like it says! + /// + char Delimiter; + + string[] StringDelimiters; + + /// + /// Constructor for using a char delimiter + /// + /// + /// + public CommunicationGather(ICommunicationReceiver port, char delimiter) + { + Port = port; + Delimiter = delimiter; + port.TextReceived += new EventHandler(Port_TextReceived); + } + + /// + /// Constructor for using a single string delimiter + /// + /// + /// + public CommunicationGather(ICommunicationReceiver port, string delimiter) + :this(port, new string[] { delimiter} ) + { + } + + /// + /// Constructor for using an array of string delimiters + /// + /// + /// + public CommunicationGather(ICommunicationReceiver port, string[] delimiters) + { + Port = port; + StringDelimiters = delimiters; + port.TextReceived += Port_TextReceivedStringDelimiter; + } + + /// + /// Stop method + /// + public void Stop() + { + Port.TextReceived -= Port_TextReceived; + Port.TextReceived -= Port_TextReceivedStringDelimiter; + } + + /// + /// Handler for raw data coming from port + /// + void Port_TextReceived(object sender, GenericCommMethodReceiveTextArgs args) + { + var handler = LineReceived; + if (handler != null) + { + ReceiveBuffer.Append(args.Text); + var str = ReceiveBuffer.ToString(); + var lines = str.Split(Delimiter); + if (lines.Length > 0) + { + for (int i = 0; i < lines.Length - 1; i++) + { + string strToSend = null; + if (IncludeDelimiter) + strToSend = lines[i] + Delimiter; + else + strToSend = lines[i]; + handler(this, new GenericCommMethodReceiveTextArgs(strToSend)); + } + ReceiveBuffer = new StringBuilder(lines[lines.Length - 1]); + } + } + } + + /// + /// + /// + /// + /// + void Port_TextReceivedStringDelimiter(object sender, GenericCommMethodReceiveTextArgs args) + { + var handler = LineReceived; + if (handler != null) + { + // Receive buffer should either be empty or not contain the delimiter + // If the line does not have a delimiter, append the + ReceiveBuffer.Append(args.Text); + var str = ReceiveBuffer.ToString(); + + // Case: Receiving DEVICE get version\x0d\0x0a+OK "value":"1234"\x0d\x0a + + // RX: DEV + // Split: (1) "DEV" + // RX: I + // Split: (1) "DEVI" + // RX: CE get version + // Split: (1) "DEVICE get version" + // RX: \x0d\x0a+OK "value":"1234"\x0d\x0a + // Split: (2) DEVICE get version, +OK "value":"1234" + + // Iterate the delimiters and fire an event for any matching delimiter + foreach (var delimiter in StringDelimiters) + { + var lines = Regex.Split(str, delimiter); + if (lines.Length == 1) + continue; + + for (int i = 0; i < lines.Length - 1; i++) + { + string strToSend = null; + if (IncludeDelimiter) + strToSend = lines[i] + delimiter; + else + strToSend = lines[i]; + handler(this, new GenericCommMethodReceiveTextArgs(strToSend, delimiter)); + } + ReceiveBuffer = new StringBuilder(lines[lines.Length - 1]); + } + } + } + + /// + /// Deconstructor. Disconnects from port TextReceived events. + /// + ~CommunicationGather() + { + Stop(); + } + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Communications/CommunicationStreamDebugging.cs b/src/PepperDash.Essentials.Core/Communications/CommunicationStreamDebugging.cs new file mode 100644 index 00000000..71906ffb --- /dev/null +++ b/src/PepperDash.Essentials.Core/Communications/CommunicationStreamDebugging.cs @@ -0,0 +1,182 @@ +using System; +using Crestron.SimplSharp; + +namespace PepperDash.Essentials.Core.Communications +{ + /// + /// Controls the ability to disable/enable debugging of TX/RX data sent to/from a device with a built in timer to disable + /// + public class CommunicationStreamDebugging + { + /// + /// Device Key that this instance configures + /// + public string ParentDeviceKey { get; private set; } + + /// + /// Timer to disable automatically if not manually disabled + /// + private CTimer DebugExpiryPeriod; + + /// + /// Gets or sets the DebugSetting + /// + public eStreamDebuggingSetting DebugSetting { get; private set; } + + private uint _DebugTimeoutInMs; + private const uint _DefaultDebugTimeoutMin = 30; + + /// + /// Timeout in Minutes + /// + public uint DebugTimeoutMinutes + { + get + { + return _DebugTimeoutInMs/60000; + } + } + + /// + /// Gets or sets the RxStreamDebuggingIsEnabled + /// + public bool RxStreamDebuggingIsEnabled{ get; private set; } + + /// + /// Indicates that transmit stream debugging is enabled + /// + public bool TxStreamDebuggingIsEnabled { get; private set; } + + /// + /// Constructor + /// + /// + public CommunicationStreamDebugging(string parentDeviceKey) + { + ParentDeviceKey = parentDeviceKey; + } + + + /// + /// Sets the debugging setting and if not setting to off, assumes the default of 30 mintues + /// + /// + /// + /// SetDebuggingWithDefaultTimeout method + /// + public void SetDebuggingWithDefaultTimeout(eStreamDebuggingSetting setting) + { + if (setting == eStreamDebuggingSetting.Off) + { + DisableDebugging(); + return; + } + + SetDebuggingWithSpecificTimeout(setting, _DefaultDebugTimeoutMin); + } + + /// + /// Sets the debugging setting for the specified number of minutes + /// + /// + /// + /// + /// SetDebuggingWithSpecificTimeout method + /// + public void SetDebuggingWithSpecificTimeout(eStreamDebuggingSetting setting, uint minutes) + { + if (setting == eStreamDebuggingSetting.Off) + { + DisableDebugging(); + return; + } + + _DebugTimeoutInMs = minutes * 60000; + + StopDebugTimer(); + + DebugExpiryPeriod = new CTimer((o) => DisableDebugging(), _DebugTimeoutInMs); + + if ((setting & eStreamDebuggingSetting.Rx) == eStreamDebuggingSetting.Rx) + RxStreamDebuggingIsEnabled = true; + + if ((setting & eStreamDebuggingSetting.Tx) == eStreamDebuggingSetting.Tx) + TxStreamDebuggingIsEnabled = true; + + Debug.SetDeviceDebugSettings(ParentDeviceKey, setting); + + } + + /// + /// Disabled debugging + /// + private void DisableDebugging() + { + StopDebugTimer(); + + Debug.SetDeviceDebugSettings(ParentDeviceKey, eStreamDebuggingSetting.Off); + } + + private void StopDebugTimer() + { + RxStreamDebuggingIsEnabled = false; + TxStreamDebuggingIsEnabled = false; + + if (DebugExpiryPeriod == null) + { + return; + } + + DebugExpiryPeriod.Stop(); + DebugExpiryPeriod.Dispose(); + DebugExpiryPeriod = null; + } + } + + /// + /// The available settings for stream debugging + /// + [Flags] + /// + /// Enumeration of eStreamDebuggingSetting values + /// + public enum eStreamDebuggingSetting + { + /// + /// Debug off + /// + Off = 0, + /// + /// Debug received data + /// + Rx = 1, + /// + /// Debug transmitted data + /// + Tx = 2, + /// + /// Debug both received and transmitted data + /// + Both = Rx | Tx + } + + /// + /// The available settings for stream debugging response types + /// + [Flags] + public enum eStreamDebuggingDataTypeSettings + { + /// + /// Debug data in byte format + /// + Bytes = 0, + /// + /// Debug data in text format + /// + Text = 1, + /// + /// Debug data in both byte and text formats + /// + Both = Bytes | Text, + } +} diff --git a/src/PepperDash.Essentials.Core/Comm and IR/ConsoleCommMockDevice.cs b/src/PepperDash.Essentials.Core/Communications/ConsoleCommMockDevice.cs similarity index 96% rename from src/PepperDash.Essentials.Core/Comm and IR/ConsoleCommMockDevice.cs rename to src/PepperDash.Essentials.Core/Communications/ConsoleCommMockDevice.cs index 0bfd6874..6b594a18 100644 --- a/src/PepperDash.Essentials.Core/Comm and IR/ConsoleCommMockDevice.cs +++ b/src/PepperDash.Essentials.Core/Communications/ConsoleCommMockDevice.cs @@ -1,12 +1,12 @@ using System.Collections.Generic; using Crestron.SimplSharp; - -using PepperDash.Core; using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Monitoring; using Serilog.Events; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Communications { /// /// Represents a ConsoleCommMockDevice diff --git a/src/PepperDash.Essentials.Core/Communications/ControlPropertiesConfig.cs b/src/PepperDash.Essentials.Core/Communications/ControlPropertiesConfig.cs new file mode 100644 index 00000000..22705d7c --- /dev/null +++ b/src/PepperDash.Essentials.Core/Communications/ControlPropertiesConfig.cs @@ -0,0 +1,92 @@ +using System; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace PepperDash.Essentials.Core.Communications +{ + /// + /// Represents a ControlPropertiesConfig + /// + public class ControlPropertiesConfig + { + /// + /// The method of control + /// + [JsonProperty("method")] + [JsonConverter(typeof(StringEnumConverter))] + public eControlMethod Method { get; set; } + + /// + /// The key of the device that contains the control port + /// + [JsonProperty("controlPortDevKey", NullValueHandling = NullValueHandling.Ignore)] + public string ControlPortDevKey { get; set; } + + /// + /// The number of the control port on the device specified by ControlPortDevKey + /// + [JsonProperty("controlPortNumber", NullValueHandling = NullValueHandling.Ignore)] // In case "null" is present in config on this value + public uint? ControlPortNumber { get; set; } + + /// + /// The name of the control port on the device specified by ControlPortDevKey + /// + [JsonProperty("controlPortName", NullValueHandling = NullValueHandling.Ignore)] // In case "null" is present in config on this value + public string ControlPortName { get; set; } + + /// + /// Properties for ethernet based communications + /// + [JsonProperty("tcpSshProperties", NullValueHandling = NullValueHandling.Ignore)] + public TcpSshPropertiesConfig TcpSshProperties { get; set; } + + /// + /// The filename and path for the IR file + /// + [JsonProperty("irFile", NullValueHandling = NullValueHandling.Ignore)] + public string IrFile { get; set; } + + /// + /// The IpId of a Crestron device + /// + [JsonProperty("ipId", NullValueHandling = NullValueHandling.Ignore)] + public string IpId { get; set; } + + /// + /// Readonly uint representation of the IpId + /// + [JsonIgnore] + public uint IpIdInt { get { return Convert.ToUInt32(IpId, 16); } } + + /// + /// Char indicating end of line + /// + [JsonProperty("endOfLineChar", NullValueHandling = NullValueHandling.Ignore)] + public char EndOfLineChar { get; set; } + + /// + /// Defaults to Environment.NewLine; + /// + [JsonProperty("endOfLineString", NullValueHandling = NullValueHandling.Ignore)] + public string EndOfLineString { get; set; } + + /// + /// Indicates + /// + [JsonProperty("deviceReadyResponsePattern", NullValueHandling = NullValueHandling.Ignore)] + public string DeviceReadyResponsePattern { get; set; } + + /// + /// Used when communcating to programs running in VC-4 + /// + [JsonProperty("roomId", NullValueHandling = NullValueHandling.Ignore)] + public string RoomId { get; set; } + + /// + /// Constructor + /// + public ControlPropertiesConfig() + { + } + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Communications/EventArgs.cs b/src/PepperDash.Essentials.Core/Communications/EventArgs.cs new file mode 100644 index 00000000..58686ff3 --- /dev/null +++ b/src/PepperDash.Essentials.Core/Communications/EventArgs.cs @@ -0,0 +1,247 @@ +/*PepperDash Technology Corp. +Copyright: 2017 +------------------------------------ +***Notice of Ownership and Copyright*** +The material in which this notice appears is the property of PepperDash Technology Corporation, +which claims copyright under the laws of the United States of America in the entire body of material +and in all parts thereof, regardless of the use to which it is being put. Any use, in whole or in part, +of this material by another party without the express written permission of PepperDash Technology Corporation is prohibited. +PepperDash Technology Corporation reserves all rights under applicable laws. +------------------------------------ */ +using System; +using Crestron.SimplSharp.CrestronSockets; + + +namespace PepperDash.Essentials.Core.Communications +{ + /// + /// Delegate for notifying of socket status changes + /// + /// + public delegate void GenericSocketStatusChangeEventDelegate(ISocketStatus client); + + /// + /// EventArgs class for socket status changes + /// + public class GenericSocketStatusChageEventArgs : EventArgs + { + /// + /// Gets or sets the Client + /// + public ISocketStatus Client { get; private set; } + + /// + /// + /// + /// + public GenericSocketStatusChageEventArgs(ISocketStatus client) + { + Client = client; + } + /// + /// S+ Constructor + /// + public GenericSocketStatusChageEventArgs() { } + } + + /// + /// Delegate for notifying of TCP Server state changes + /// + /// + public delegate void GenericTcpServerStateChangedEventDelegate(ServerState state); + + /// + /// EventArgs class for TCP Server state changes + /// + public class GenericTcpServerStateChangedEventArgs : EventArgs + { + /// + /// Gets or sets the State + /// + public ServerState State { get; private set; } + + /// + /// + /// + /// + public GenericTcpServerStateChangedEventArgs(ServerState state) + { + State = state; + } + /// + /// S+ Constructor + /// + public GenericTcpServerStateChangedEventArgs() { } + } + + /// + /// Delegate for TCP Server socket status changes + /// + /// + /// + /// + public delegate void GenericTcpServerSocketStatusChangeEventDelegate(object socket, uint clientIndex, SocketStatus clientStatus); + /// + /// EventArgs for TCP server socket status changes + /// + public class GenericTcpServerSocketStatusChangeEventArgs : EventArgs + { + /// + /// + /// + public object Socket { get; private set; } + /// + /// + /// + public uint ReceivedFromClientIndex { get; private set; } + /// + /// + /// + public SocketStatus ClientStatus { get; set; } + + /// + /// + /// + /// + /// + public GenericTcpServerSocketStatusChangeEventArgs(object socket, SocketStatus clientStatus) + { + Socket = socket; + ClientStatus = clientStatus; + } + + /// + /// + /// + /// + /// + /// + public GenericTcpServerSocketStatusChangeEventArgs(object socket, uint clientIndex, SocketStatus clientStatus) + { + Socket = socket; + ReceivedFromClientIndex = clientIndex; + ClientStatus = clientStatus; + } + /// + /// S+ Constructor + /// + public GenericTcpServerSocketStatusChangeEventArgs() { } + } + + /// + /// EventArgs for TCP server com method receive text + /// + public class GenericTcpServerCommMethodReceiveTextArgs : EventArgs + { + /// + /// + /// + public uint ReceivedFromClientIndex { get; private set; } + + /// + /// + /// + public ushort ReceivedFromClientIndexShort + { + get + { + return (ushort)ReceivedFromClientIndex; + } + } + + /// + /// Gets or sets the Text + /// + public string Text { get; private set; } + + /// + /// + /// + /// + public GenericTcpServerCommMethodReceiveTextArgs(string text) + { + Text = text; + } + + /// + /// + /// + /// + /// + public GenericTcpServerCommMethodReceiveTextArgs(string text, uint clientIndex) + { + Text = text; + ReceivedFromClientIndex = clientIndex; + } + /// + /// S+ Constructor + /// + public GenericTcpServerCommMethodReceiveTextArgs() { } + } + + /// + /// EventArgs for TCP server client ready for communication + /// + public class GenericTcpServerClientReadyForcommunicationsEventArgs : EventArgs + { + /// + /// + /// + public bool IsReady; + + /// + /// + /// + /// + public GenericTcpServerClientReadyForcommunicationsEventArgs(bool isReady) + { + IsReady = isReady; + } + /// + /// S+ Constructor + /// + public GenericTcpServerClientReadyForcommunicationsEventArgs() { } + } + + /// + /// EventArgs for UDP connected + /// + public class GenericUdpConnectedEventArgs : EventArgs + { + /// + /// + /// + public ushort UConnected; + /// + /// + /// + public bool Connected; + + /// + /// Constructor + /// + public GenericUdpConnectedEventArgs() { } + + /// + /// + /// + /// + public GenericUdpConnectedEventArgs(ushort uconnected) + { + UConnected = uconnected; + } + + /// + /// + /// + /// + public GenericUdpConnectedEventArgs(bool connected) + { + Connected = connected; + } + + } + + + +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Comm and IR/GenericComm.cs b/src/PepperDash.Essentials.Core/Communications/GenericComm.cs similarity index 94% rename from src/PepperDash.Essentials.Core/Comm and IR/GenericComm.cs rename to src/PepperDash.Essentials.Core/Communications/GenericComm.cs index a9c4df08..8aad38ce 100644 --- a/src/PepperDash.Essentials.Core/Comm and IR/GenericComm.cs +++ b/src/PepperDash.Essentials.Core/Communications/GenericComm.cs @@ -1,19 +1,19 @@ - - -using System; +using System; using System.Collections.Generic; using Crestron.SimplSharp.CrestronSockets; using Crestron.SimplSharpPro.DeviceSupport; using Newtonsoft.Json; - -using PepperDash.Core; using PepperDash.Essentials.Core.Bridges; using PepperDash.Essentials.Core.Devices; using PepperDash.Essentials.Core.Config; using Serilog.Events; +using PepperDash.Essentials.Core.Bridges.JoinMaps; +using PepperDash.Essentials.Core.JoinMaps; +using PepperDash.Essentials.Core.Config.Essentials; +using PepperDash.Essentials.Core.Touchpanels; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Communications { /// /// Serves as a generic wrapper class for all styles of IBasicCommuncation ports @@ -120,7 +120,7 @@ namespace PepperDash.Essentials.Core if (sComm == null) return; sComm.ConnectionChange += (s, a) => { - trilist.SetUshort(joinMap.Status.JoinNumber, (ushort)(a.Client.ClientStatus)); + trilist.SetUshort(joinMap.Status.JoinNumber, (ushort)a.Client.ClientStatus); trilist.SetBool(joinMap.Connected.JoinNumber, a.Client.ClientStatus == SocketStatus.SOCKET_STATUS_CONNECTED); }; diff --git a/src/PepperDash.Essentials.Core/Comm and IR/GenericHttpClient.cs b/src/PepperDash.Essentials.Core/Communications/GenericHttpClient.cs similarity index 81% rename from src/PepperDash.Essentials.Core/Comm and IR/GenericHttpClient.cs rename to src/PepperDash.Essentials.Core/Communications/GenericHttpClient.cs index 3a1ba4d4..fada6b67 100644 --- a/src/PepperDash.Essentials.Core/Comm and IR/GenericHttpClient.cs +++ b/src/PepperDash.Essentials.Core/Communications/GenericHttpClient.cs @@ -1,8 +1,7 @@ using Crestron.SimplSharp.Net.Http; -using PepperDash.Core; using System; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Communications { [Obsolete("Please use the builtin HttpClient class instead: https://learn.microsoft.com/en-us/dotnet/fundamentals/networking/http/httpclient-guidelines")] /// @@ -33,17 +32,17 @@ namespace PepperDash.Essentials.Core /// public void SendText(string path) { - HttpClientRequest request = new HttpClientRequest(); - string url = string.Format("http://{0}/{1}", Client.HostName, path); + var request = new HttpClientRequest(); + var url = string.Format("http://{0}/{1}", Client.HostName, path); request.Url = new UrlParser(url); - HttpClient.DISPATCHASYNC_ERROR error = Client.DispatchAsyncEx(request, Response, request); + var error = Client.DispatchAsyncEx(request, Response, request); } public void SendText(string format, params object[] items) { - HttpClientRequest request = new HttpClientRequest(); - string url = string.Format("http://{0}/{1}", Client.HostName, string.Format(format, items)); + var request = new HttpClientRequest(); + var url = string.Format("http://{0}/{1}", Client.HostName, string.Format(format, items)); request.Url = new UrlParser(url); - HttpClient.DISPATCHASYNC_ERROR error = Client.DispatchAsyncEx(request, Response, request); + var error = Client.DispatchAsyncEx(request, Response, request); } /// @@ -51,8 +50,8 @@ namespace PepperDash.Essentials.Core /// public void SendTextNoResponse(string format, params object[] items) { - HttpClientRequest request = new HttpClientRequest(); - string url = string.Format("http://{0}/{1}", Client.HostName, string.Format(format, items)); + var request = new HttpClientRequest(); + var url = string.Format("http://{0}/{1}", Client.HostName, string.Format(format, items)); request.Url = new UrlParser(url); Client.Dispatch(request); } diff --git a/src/PepperDash.Essentials.Core/Communications/IAutoReconnect.cs b/src/PepperDash.Essentials.Core/Communications/IAutoReconnect.cs new file mode 100644 index 00000000..0dcd4ff2 --- /dev/null +++ b/src/PepperDash.Essentials.Core/Communications/IAutoReconnect.cs @@ -0,0 +1,21 @@ +using Newtonsoft.Json; + +namespace PepperDash.Essentials.Core.Communications +{ + /// + /// Describes a device that can automatically attempt to reconnect + /// + public interface IAutoReconnect + { + /// + /// Enable automatic recconnect + /// + [JsonProperty("autoReconnect")] + bool AutoReconnect { get; set; } + /// + /// Interval in ms to attempt automatic recconnections + /// + [JsonProperty("autoReconnectIntervalMs")] + int AutoReconnectIntervalMs { get; set; } + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Communications/IBasicCommunication.cs b/src/PepperDash.Essentials.Core/Communications/IBasicCommunication.cs new file mode 100644 index 00000000..48b8e203 --- /dev/null +++ b/src/PepperDash.Essentials.Core/Communications/IBasicCommunication.cs @@ -0,0 +1,20 @@ +namespace PepperDash.Essentials.Core.Communications +{ + /// + /// Defines the contract for IBasicCommunication + /// + public interface IBasicCommunication : ICommunicationReceiver + { + /// + /// Send text to the device + /// + /// + void SendText(string text); + + /// + /// Send bytes to the device + /// + /// + void SendBytes(byte[] bytes); + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Communications/IBasicCommunicationWithStreamDebugging.cs b/src/PepperDash.Essentials.Core/Communications/IBasicCommunicationWithStreamDebugging.cs new file mode 100644 index 00000000..aaca31a8 --- /dev/null +++ b/src/PepperDash.Essentials.Core/Communications/IBasicCommunicationWithStreamDebugging.cs @@ -0,0 +1,10 @@ +namespace PepperDash.Essentials.Core.Communications +{ + /// + /// Represents a device that implements IBasicCommunication and IStreamDebugging + /// + public interface IBasicCommunicationWithStreamDebugging : IBasicCommunication, IStreamDebugging + { + + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Comm and IR/CommunicationExtras.cs b/src/PepperDash.Essentials.Core/Communications/IComPortsDevice.cs similarity index 73% rename from src/PepperDash.Essentials.Core/Comm and IR/CommunicationExtras.cs rename to src/PepperDash.Essentials.Core/Communications/IComPortsDevice.cs index 705e7203..0dd8133e 100644 --- a/src/PepperDash.Essentials.Core/Comm and IR/CommunicationExtras.cs +++ b/src/PepperDash.Essentials.Core/Communications/IComPortsDevice.cs @@ -1,7 +1,7 @@ using Crestron.SimplSharpPro; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Communications { /// /// diff --git a/src/PepperDash.Essentials.Core/Communications/ICommunicationReceiver.cs b/src/PepperDash.Essentials.Core/Communications/ICommunicationReceiver.cs new file mode 100644 index 00000000..c4b405c9 --- /dev/null +++ b/src/PepperDash.Essentials.Core/Communications/ICommunicationReceiver.cs @@ -0,0 +1,34 @@ +using System; +using Newtonsoft.Json; + +namespace PepperDash.Essentials.Core.Communications +{ + /// + /// An incoming communication stream + /// + public interface ICommunicationReceiver : IKeyed + { + /// + /// Notifies of bytes received + /// + event EventHandler BytesReceived; + /// + /// Notifies of text received + /// + event EventHandler TextReceived; + + /// + /// Indicates connection status + /// + [JsonProperty("isConnected")] + bool IsConnected { get; } + /// + /// Connect to the device + /// + void Connect(); + /// + /// Disconnect from the device + /// + void Disconnect(); + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Comm and IR/IRPortHelper.cs b/src/PepperDash.Essentials.Core/Communications/IRPortHelper.cs similarity index 98% rename from src/PepperDash.Essentials.Core/Comm and IR/IRPortHelper.cs rename to src/PepperDash.Essentials.Core/Communications/IRPortHelper.cs index 6a6fda3a..b7bb8d93 100644 --- a/src/PepperDash.Essentials.Core/Comm and IR/IRPortHelper.cs +++ b/src/PepperDash.Essentials.Core/Communications/IRPortHelper.cs @@ -5,11 +5,11 @@ using Crestron.SimplSharpPro; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using PepperDash.Core; using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Devices; using Serilog.Events; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Communications { /// /// diff --git a/src/PepperDash.Essentials.Core/Communications/ISocketStatus.cs b/src/PepperDash.Essentials.Core/Communications/ISocketStatus.cs new file mode 100644 index 00000000..9c902acd --- /dev/null +++ b/src/PepperDash.Essentials.Core/Communications/ISocketStatus.cs @@ -0,0 +1,25 @@ +using System; +using Crestron.SimplSharp.CrestronSockets; +using Newtonsoft.Json; + +namespace PepperDash.Essentials.Core.Communications +{ + /// + /// For IBasicCommunication classes that have SocketStatus. GenericSshClient, + /// GenericTcpIpClient + /// + public interface ISocketStatus : IBasicCommunication + { + /// + /// Notifies of socket status changes + /// + event EventHandler ConnectionChange; + + /// + /// The current socket status of the client + /// + [JsonProperty("clientStatus")] + [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + SocketStatus ClientStatus { get; } + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Communications/ISocketStatusWithStreamDebugging.cs b/src/PepperDash.Essentials.Core/Communications/ISocketStatusWithStreamDebugging.cs new file mode 100644 index 00000000..163fb8cb --- /dev/null +++ b/src/PepperDash.Essentials.Core/Communications/ISocketStatusWithStreamDebugging.cs @@ -0,0 +1,10 @@ +namespace PepperDash.Essentials.Core.Communications +{ + /// + /// Describes a device that implements ISocketStatus and IStreamDebugging + /// + public interface ISocketStatusWithStreamDebugging : ISocketStatus, IStreamDebugging + { + + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Communications/IStreamDebugging.cs b/src/PepperDash.Essentials.Core/Communications/IStreamDebugging.cs new file mode 100644 index 00000000..c3646993 --- /dev/null +++ b/src/PepperDash.Essentials.Core/Communications/IStreamDebugging.cs @@ -0,0 +1,16 @@ +using Newtonsoft.Json; + +namespace PepperDash.Essentials.Core.Communications +{ + /// + /// Represents a device with stream debugging capablities + /// + public interface IStreamDebugging + { + /// + /// Object to enable stream debugging + /// + [JsonProperty("streamDebugging")] + CommunicationStreamDebugging StreamDebugging { get; } + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Communications/TcpClientConfigObject.cs b/src/PepperDash.Essentials.Core/Communications/TcpClientConfigObject.cs new file mode 100644 index 00000000..a30c4b93 --- /dev/null +++ b/src/PepperDash.Essentials.Core/Communications/TcpClientConfigObject.cs @@ -0,0 +1,59 @@ +using Newtonsoft.Json; + +namespace PepperDash.Essentials.Core.Communications +{ + /// + /// Represents a TcpClientConfigObject + /// + public class TcpClientConfigObject + { + /// + /// TcpSsh Properties + /// + [JsonProperty("control")] + public ControlPropertiesConfig Control { get; set; } + + /// + /// Bool value for secure. Currently not implemented in TCP sockets as they are not dynamic + /// + [JsonProperty("secure")] + public bool Secure { get; set; } + + /// + /// Require a shared key that both server and client negotiate. If negotiation fails server disconnects the client + /// + [JsonProperty("sharedKeyRequired")] + public bool SharedKeyRequired { get; set; } + + /// + /// The shared key that must match on the server and client + /// + [JsonProperty("sharedKey")] + public string SharedKey { get; set; } + + /// + /// Require a heartbeat on the client/server connection that will cause the server/client to disconnect if the heartbeat is not received. + /// heartbeats do not raise received events. + /// + [JsonProperty("heartbeatRequired")] + public bool HeartbeatRequired { get; set; } + + /// + /// The interval in seconds for the heartbeat from the client. If not received client is disconnected + /// + [JsonProperty("heartbeatRequiredIntervalInSeconds")] + public ushort HeartbeatRequiredIntervalInSeconds { get; set; } + + /// + /// HeartbeatString that will be checked against the message received. defaults to heartbeat if no string is provided. + /// + [JsonProperty("heartbeatStringToMatch")] + public string HeartbeatStringToMatch { get; set; } + + /// + /// Receive Queue size must be greater than 20 or defaults to 20 + /// + [JsonProperty("receiveQueueSize")] + public int ReceiveQueueSize { get; set; } + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Communications/TcpServerConfigObject.cs b/src/PepperDash.Essentials.Core/Communications/TcpServerConfigObject.cs new file mode 100644 index 00000000..9b6b0d8c --- /dev/null +++ b/src/PepperDash.Essentials.Core/Communications/TcpServerConfigObject.cs @@ -0,0 +1,54 @@ +namespace PepperDash.Essentials.Core.Communications +{ + /// + /// Tcp Server Config object with properties for a tcp server with shared key and heartbeat capabilities + /// + public class TcpServerConfigObject + { + /// + /// Uique key + /// + public string Key { get; set; } + /// + /// Max Clients that the server will allow to connect. + /// + public ushort MaxClients { get; set; } + /// + /// Bool value for secure. Currently not implemented in TCP sockets as they are not dynamic + /// + public bool Secure { get; set; } + /// + /// Port for the server to listen on + /// + public int Port { get; set; } + /// + /// Require a shared key that both server and client negotiate. If negotiation fails server disconnects the client + /// + public bool SharedKeyRequired { get; set; } + /// + /// The shared key that must match on the server and client + /// + public string SharedKey { get; set; } + /// + /// Require a heartbeat on the client/server connection that will cause the server/client to disconnect if the heartbeat is not received. + /// heartbeats do not raise received events. + /// + public bool HeartbeatRequired { get; set; } + /// + /// The interval in seconds for the heartbeat from the client. If not received client is disconnected + /// + public ushort HeartbeatRequiredIntervalInSeconds { get; set; } + /// + /// HeartbeatString that will be checked against the message received. defaults to heartbeat if no string is provided. + /// + public string HeartbeatStringToMatch { get; set; } + /// + /// Client buffer size. See Crestron help. defaults to 2000 if not greater than 2000 + /// + public int BufferSize { get; set; } + /// + /// Receive Queue size must be greater than 20 or defaults to 20 + /// + public int ReceiveQueueSize { get; set; } + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Communications/TcpSshPropertiesConfig.cs b/src/PepperDash.Essentials.Core/Communications/TcpSshPropertiesConfig.cs new file mode 100644 index 00000000..a462ecae --- /dev/null +++ b/src/PepperDash.Essentials.Core/Communications/TcpSshPropertiesConfig.cs @@ -0,0 +1,59 @@ +using Newtonsoft.Json; + +namespace PepperDash.Essentials.Core.Communications +{ + /// + /// Represents a TcpSshPropertiesConfig + /// + public class TcpSshPropertiesConfig + { + /// + /// Address to connect to + /// + [JsonProperty(Required = Required.Always)] + public string Address { get; set; } + + /// + /// Port to connect to + /// + [JsonProperty(Required = Required.Always)] + public int Port { get; set; } + + /// + /// Username credential + /// + public string Username { get; set; } + /// + /// Gets or sets the Password + /// + public string Password { get; set; } + + /// + /// Defaults to 32768 + /// + public int BufferSize { get; set; } + + /// + /// Gets or sets the AutoReconnect + /// + public bool AutoReconnect { get; set; } + + /// + /// Gets or sets the AutoReconnectIntervalMs + /// + public int AutoReconnectIntervalMs { get; set; } + + /// + /// Default constructor + /// + public TcpSshPropertiesConfig() + { + BufferSize = 32768; + AutoReconnect = true; + AutoReconnectIntervalMs = 5000; + Username = ""; + Password = ""; + } + + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Communications/eControlMethod.cs b/src/PepperDash.Essentials.Core/Communications/eControlMethod.cs new file mode 100644 index 00000000..377405d6 --- /dev/null +++ b/src/PepperDash.Essentials.Core/Communications/eControlMethod.cs @@ -0,0 +1,73 @@ +namespace PepperDash.Essentials.Core.Communications +{ + /// + /// Crestron Control Methods for a comm object + /// + public enum eControlMethod + { + /// + /// + /// + None = 0, + /// + /// RS232/422/485 + /// + Com, + /// + /// Crestron IpId (most Crestron ethernet devices) + /// + IpId, + /// + /// Crestron IpIdTcp (HD-MD series, etc.) + /// + IpidTcp, + /// + /// Crestron IR control + /// + IR, + /// + /// SSH client + /// + Ssh, + /// + /// TCP/IP client + /// + Tcpip, + /// + /// Telnet + /// + Telnet, + /// + /// Crestnet device + /// + Cresnet, + /// + /// CEC Control, via a DM HDMI port + /// + Cec, + /// + /// UDP Server + /// + Udp, + /// + /// HTTP client + /// + Http, + /// + /// HTTPS client + /// + Https, + /// + /// Websocket client + /// + Ws, + /// + /// Secure Websocket client + /// + Wss, + /// + /// Secure TCP/IP + /// + SecureTcpIp + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Config/AudioControlPointListItem.cs b/src/PepperDash.Essentials.Core/Config/AudioControlPointListItem.cs index a71a150c..778b54f5 100644 --- a/src/PepperDash.Essentials.Core/Config/AudioControlPointListItem.cs +++ b/src/PepperDash.Essentials.Core/Config/AudioControlPointListItem.cs @@ -1,4 +1,5 @@ using Newtonsoft.Json; +using PepperDash.Essentials.Core.Devices; using System.Collections.Generic; namespace PepperDash.Essentials.Core.Config diff --git a/src/PepperDash.Essentials.Core/Config/BasicConfig.cs b/src/PepperDash.Essentials.Core/Config/BasicConfig.cs index b1bbf683..b8ea89d1 100644 --- a/src/PepperDash.Essentials.Core/Config/BasicConfig.cs +++ b/src/PepperDash.Essentials.Core/Config/BasicConfig.cs @@ -5,6 +5,8 @@ using System.Linq; using Newtonsoft.Json; using Newtonsoft.Json.Linq; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Routing; namespace PepperDash.Essentials.Core.Config { diff --git a/src/PepperDash.Essentials.Core/Config/Essentials/ConfigReader.cs b/src/PepperDash.Essentials.Core/Config/Essentials/ConfigReader.cs index 03d72d0a..130b2e16 100644 --- a/src/PepperDash.Essentials.Core/Config/Essentials/ConfigReader.cs +++ b/src/PepperDash.Essentials.Core/Config/Essentials/ConfigReader.cs @@ -6,11 +6,9 @@ using System.Text; using Crestron.SimplSharp; using Crestron.SimplSharp.CrestronIO; using Newtonsoft.Json.Linq; -using PepperDash.Core; -using PepperDash.Core.Config; using Serilog.Events; -namespace PepperDash.Essentials.Core.Config +namespace PepperDash.Essentials.Core.Config.Essentials { /// /// Loads the ConfigObject from the file @@ -36,7 +34,7 @@ namespace PepperDash.Essentials.Core.Config // Check for local config file first var filePath = Global.FilePathPrefix + ConfigWriter.LocalConfigFolder + Global.DirectorySeparator + Global.ConfigFileName; - bool localConfigFound = false; + var localConfigFound = false; Debug.LogMessage(LogEventLevel.Information, "Attempting to load Local config file: '{0}'", filePath); @@ -112,7 +110,7 @@ namespace PepperDash.Essentials.Core.Config } // Read the file - using (StreamReader fs = new StreamReader(filePath)) + using (var fs = new StreamReader(filePath)) { Debug.LogMessage(LogEventLevel.Information, "Loading config file: '{0}'", filePath); @@ -212,7 +210,7 @@ namespace PepperDash.Essentials.Core.Config { debugStringWidth = 51; } - var qualifier = (filePathLength % 2 != 0) + var qualifier = filePathLength % 2 != 0 ? " Using Local Config File " : " Using Local Config File "; var bookend1 = (debugStringWidth - qualifier.Length) / 2; diff --git a/src/PepperDash.Essentials.Core/Config/Essentials/ConfigUpdater.cs b/src/PepperDash.Essentials.Core/Config/Essentials/ConfigUpdater.cs index cfb2af65..ebd16ab1 100644 --- a/src/PepperDash.Essentials.Core/Config/Essentials/ConfigUpdater.cs +++ b/src/PepperDash.Essentials.Core/Config/Essentials/ConfigUpdater.cs @@ -5,11 +5,9 @@ using Crestron.SimplSharp; using Crestron.SimplSharp.CrestronIO; using Newtonsoft.Json.Linq; using Crestron.SimplSharp.Net.Http; - -using PepperDash.Core; using Serilog.Events; -namespace PepperDash.Essentials.Core.Config +namespace PepperDash.Essentials.Core.Config.Essentials { public static class ConfigUpdater { @@ -141,7 +139,7 @@ namespace PepperDash.Essentials.Core.Config { Debug.LogMessage(LogEventLevel.Information, "{0} Existing files found in archive folder. Deleting.", archivedConfigFiles.Length); - for (int i = 0; i < archivedConfigFiles.Length; i++ ) + for (var i = 0; i < archivedConfigFiles.Length; i++ ) { var file = archivedConfigFiles[i]; Debug.LogMessage(LogEventLevel.Information, "Deleting archived file: '{0}'", file.FullName); @@ -191,7 +189,7 @@ namespace PepperDash.Essentials.Core.Config OnStatusUpdate(eUpdateStatus.RestartingProgram); - string response = string.Empty; + var response = string.Empty; CrestronConsole.SendControlSystemCommand(string.Format("progreset -p:{0}", InitialParametersClass.ApplicationNumber), ref response); diff --git a/src/PepperDash.Essentials.Core/Config/Essentials/ConfigWriter.cs b/src/PepperDash.Essentials.Core/Config/Essentials/ConfigWriter.cs index 6057f445..21763943 100644 --- a/src/PepperDash.Essentials.Core/Config/Essentials/ConfigWriter.cs +++ b/src/PepperDash.Essentials.Core/Config/Essentials/ConfigWriter.cs @@ -6,10 +6,9 @@ using Crestron.SimplSharp; using Crestron.SimplSharp.CrestronIO; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using PepperDash.Core; using Serilog.Events; -namespace PepperDash.Essentials.Core.Config +namespace PepperDash.Essentials.Core.Config.Essentials { /// /// Responsible for updating config at runtime, and writing the updates out to a local file @@ -34,7 +33,7 @@ namespace PepperDash.Essentials.Core.Config /// public static bool UpdateDeviceProperties(string deviceKey, JToken properties) { - bool success = false; + var success = false; // Get the current device config var deviceConfig = ConfigReader.ConfigObject.Devices.FirstOrDefault(d => d.Key.Equals(deviceKey)); @@ -59,7 +58,7 @@ namespace PepperDash.Essentials.Core.Config /// public static bool UpdateDeviceConfig(DeviceConfig config) { - bool success = false; + var success = false; var deviceConfigIndex = ConfigReader.ConfigObject.Devices.FindIndex(d => d.Key.Equals(config.Key)); @@ -82,7 +81,7 @@ namespace PepperDash.Essentials.Core.Config /// public static bool UpdateRoomConfig(DeviceConfig config) { - bool success = false; + var success = false; var roomConfigIndex = ConfigReader.ConfigObject.Rooms.FindIndex(d => d.Key.Equals(config.Key)); @@ -147,7 +146,7 @@ namespace PepperDash.Essentials.Core.Config { if (fileLock.TryEnter()) { - using (StreamWriter sw = new StreamWriter(filePath)) + using (var sw = new StreamWriter(filePath)) { sw.Write(configData); sw.Flush(); diff --git a/src/PepperDash.Essentials.Core/Config/Essentials/EssentialsConfig.cs b/src/PepperDash.Essentials.Core/Config/Essentials/EssentialsConfig.cs index a06b5198..9dcc0ca5 100644 --- a/src/PepperDash.Essentials.Core/Config/Essentials/EssentialsConfig.cs +++ b/src/PepperDash.Essentials.Core/Config/Essentials/EssentialsConfig.cs @@ -2,7 +2,7 @@ using System.Text.RegularExpressions; using Newtonsoft.Json; -namespace PepperDash.Essentials.Core.Config +namespace PepperDash.Essentials.Core.Config.Essentials { /// /// Loads the ConfigObject from the file @@ -27,12 +27,12 @@ namespace PepperDash.Essentials.Core.Config if (SystemUrl.Contains("#")) { var result = Regex.Match(SystemUrl, @"https?:\/\/.*\/systems\/(.*)\/#.*"); - string uuid = result.Groups[1].Value; + var uuid = result.Groups[1].Value; return uuid; } else { var result = Regex.Match(SystemUrl, @"https?:\/\/.*\/systems\/(.*)\/.*"); - string uuid = result.Groups[1].Value; + var uuid = result.Groups[1].Value; return uuid; } } @@ -49,12 +49,12 @@ namespace PepperDash.Essentials.Core.Config if (TemplateUrl.Contains("#")) { var result = Regex.Match(TemplateUrl, @"https?:\/\/.*\/templates\/(.*)\/#.*"); - string uuid = result.Groups[1].Value; + var uuid = result.Groups[1].Value; return uuid; } else { var result = Regex.Match(TemplateUrl, @"https?:\/\/.*\/system-templates\/(.*)\/system-template-versions\/(.*)\/.*"); - string uuid = result.Groups[2].Value; + var uuid = result.Groups[2].Value; return uuid; } } diff --git a/src/PepperDash.Essentials.Core/Config/ILoadConfig.cs b/src/PepperDash.Essentials.Core/Config/ILoadConfig.cs index 6bb4e260..4f7afa78 100644 --- a/src/PepperDash.Essentials.Core/Config/ILoadConfig.cs +++ b/src/PepperDash.Essentials.Core/Config/ILoadConfig.cs @@ -1,4 +1,4 @@ -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Config { /// /// Defines the contract for ILoadConfig diff --git a/src/PepperDash.Essentials.Core/Config/InfoConfig.cs b/src/PepperDash.Essentials.Core/Config/InfoConfig.cs index 8c506f17..3ff86bd1 100644 --- a/src/PepperDash.Essentials.Core/Config/InfoConfig.cs +++ b/src/PepperDash.Essentials.Core/Config/InfoConfig.cs @@ -2,6 +2,7 @@ using Crestron.SimplSharp; using Newtonsoft.Json; +using PepperDash.Essentials.Core.Global; using System; using System.Collections.Generic; @@ -112,7 +113,7 @@ namespace PepperDash.Essentials.Core.Config /// The information gathered by the processor at runtime about it's NICs and their IP addresses. /// [JsonProperty("ipInfo")] - public Dictionary IpInfo + public Dictionary IpInfo { get { diff --git a/src/PepperDash.Essentials.Core/Crestron/CrestronGenericBaseDevice.cs b/src/PepperDash.Essentials.Core/Crestron/CrestronGenericBaseDevice.cs index 45f3a7a7..1982eae9 100644 --- a/src/PepperDash.Essentials.Core/Crestron/CrestronGenericBaseDevice.cs +++ b/src/PepperDash.Essentials.Core/Crestron/CrestronGenericBaseDevice.cs @@ -1,11 +1,13 @@ using System.Linq; using Crestron.SimplSharpPro; using Crestron.SimplSharpPro.DeviceSupport; -using PepperDash.Core; using PepperDash.Essentials.Core.Bridges; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Feedbacks; +using PepperDash.Essentials.Core.Monitoring; using Serilog.Events; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Crestron { public abstract class CrestronGenericBaseDevice : EssentialsDevice, IOnline, IHasFeedback, ICommunicationMonitor, IUsageTracking { @@ -14,7 +16,7 @@ namespace PepperDash.Essentials.Core /// /// Gets or sets the Feedbacks /// - public FeedbackCollection Feedbacks { get; private set; } + public FeedbackCollection Feedbacks { get; private set; } /// /// Gets or sets the IsOnline @@ -37,7 +39,7 @@ namespace PepperDash.Essentials.Core protected CrestronGenericBaseDevice(string key, string name, GenericBase hardware) : base(key, name) { - Feedbacks = new FeedbackCollection(); + Feedbacks = new FeedbackCollection(); Hardware = hardware; IsOnline = new BoolFeedback("IsOnlineFeedback", () => Hardware.IsOnline); @@ -51,7 +53,7 @@ namespace PepperDash.Essentials.Core protected CrestronGenericBaseDevice(string key, string name) : base(key, name) { - Feedbacks = new FeedbackCollection(); + Feedbacks = new FeedbackCollection(); } @@ -140,7 +142,7 @@ namespace PepperDash.Essentials.Core /// /// AddToFeedbackList method /// - public void AddToFeedbackList(params Feedback[] newFbs) + public void AddToFeedbackList(params Feedbacks.Feedback[] newFbs) { foreach (var f in newFbs) { @@ -184,8 +186,10 @@ namespace PepperDash.Essentials.Core /// public UsageTracking UsageTracker { get; set; } + FeedbackCollection IHasFeedback.Feedbacks => throw new System.NotImplementedException(); + #endregion - } + } public abstract class CrestronGenericBridgeableBaseDevice : CrestronGenericBaseDevice, IBridgeAdvanced { diff --git a/src/PepperDash.Essentials.Core/Crestron/CrestronGenericBaseDevice.cs.orig b/src/PepperDash.Essentials.Core/Crestron/CrestronGenericBaseDevice.cs.orig deleted file mode 100644 index bef4ae01..00000000 --- a/src/PepperDash.Essentials.Core/Crestron/CrestronGenericBaseDevice.cs.orig +++ /dev/null @@ -1,128 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; - -using PepperDash.Core; - -namespace PepperDash.Essentials.Core -{ - /// - /// A bridge class to cover the basic features of GenericBase hardware - /// - public class CrestronGenericBaseDevice : Device, IOnline, IHasFeedback, ICommunicationMonitor, IUsageTracking - { - public virtual GenericBase Hardware { get; protected set; } - - public BoolFeedback IsOnline { get; private set; } - public BoolFeedback IsRegistered { get; private set; } - public StringFeedback IpConnectionsText { get; private set; } - - public CrestronGenericBaseDevice(string key, string name, GenericBase hardware) - : base(key, name) - { - Hardware = hardware; - IsOnline = new BoolFeedback(CommonBoolCue.IsOnlineFeedback, () => Hardware.IsOnline); - IsRegistered = new BoolFeedback(new Cue("IsRegistered", 0, eCueType.Bool), () => Hardware.Registered); - IpConnectionsText = new StringFeedback(CommonStringCue.IpConnectionsText, () => - string.Join(",", Hardware.ConnectedIpList.Select(cip => cip.DeviceIpAddress).ToArray())); - CommunicationMonitor = new CrestronGenericBaseCommunicationMonitor(this, hardware, 120000, 300000); - } - - /// - /// Make sure that overriding classes call this! - /// Registers the Crestron device, connects up to the base events, starts communication monitor - /// - public override bool CustomActivate() - { - Debug.LogMessage(LogEventLevel.Information, this, "Activating"); - var response = Hardware.RegisterWithLogging(Key); - if (response != eDeviceRegistrationUnRegistrationResponse.Success) - { -<<<<<<< HEAD - Debug.LogMessage(LogEventLevel.Information, this, "ERROR: Cannot register Crestron device: {0}", response); - return false; - } -======= - Debug.LogMessage(LogEventLevel.Information, this, "ERROR: Cannot register Crestron device: {0}", response); - return false; - } ->>>>>>> origin/feature/ecs-342-neil - Hardware.OnlineStatusChange += new OnlineStatusChangeEventHandler(Hardware_OnlineStatusChange); - CommunicationMonitor.Start(); - - return true; - } - - /// - /// This disconnects events and unregisters the base hardware device. - /// - /// - public override bool Deactivate() - { - CommunicationMonitor.Stop(); - Hardware.OnlineStatusChange -= Hardware_OnlineStatusChange; - - return Hardware.UnRegister() == eDeviceRegistrationUnRegistrationResponse.Success; - } - - /// - /// Returns a list containing the Outputs that we want to expose. - /// - public virtual List Feedbacks - { - get - { - return new List - { - IsOnline, - IsRegistered, - IpConnectionsText - }; - } - } - - void Hardware_OnlineStatusChange(GenericBase currentDevice, OnlineOfflineEventArgs args) - { - IsOnline.FireUpdate(); - } - - #region IStatusMonitor Members - - public StatusMonitorBase CommunicationMonitor { get; private set; } - #endregion - - #region IUsageTracking Members - - public UsageTracking UsageTracker { get; set; } - - #endregion - } - - //*********************************************************************************** - public class CrestronGenericBaseDeviceEventIds - { - public const uint IsOnline = 1; - public const uint IpConnectionsText =2; - } - - /// - /// Adds logging to Register() failure - /// - public static class GenericBaseExtensions - { - public static eDeviceRegistrationUnRegistrationResponse RegisterWithLogging(this GenericBase device, string key) - { - var result = device.Register(); - if (result != eDeviceRegistrationUnRegistrationResponse.Success) - { - Debug.LogMessage(LogEventLevel.Information, "Cannot register device '{0}': {1}", key, result); - } - return result; - } - - } -} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/CrestronIO/GenericDigitalInputDevice.cs b/src/PepperDash.Essentials.Core/CrestronIO/GenericDigitalInputDevice.cs index 3cd476df..4b8fbe4c 100644 --- a/src/PepperDash.Essentials.Core/CrestronIO/GenericDigitalInputDevice.cs +++ b/src/PepperDash.Essentials.Core/CrestronIO/GenericDigitalInputDevice.cs @@ -5,9 +5,12 @@ using System.Collections.Generic; using Crestron.SimplSharpPro; using Crestron.SimplSharpPro.DeviceSupport; using Newtonsoft.Json; -using PepperDash.Core; using PepperDash.Essentials.Core.Bridges; +using PepperDash.Essentials.Core.Bridges.JoinMaps; using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Feedbacks; +using PepperDash.Essentials.Core.JoinMaps; using Serilog.Events; diff --git a/src/PepperDash.Essentials.Core/CrestronIO/GenericRelayDevice.cs b/src/PepperDash.Essentials.Core/CrestronIO/GenericRelayDevice.cs index 7b236bff..ec50422d 100644 --- a/src/PepperDash.Essentials.Core/CrestronIO/GenericRelayDevice.cs +++ b/src/PepperDash.Essentials.Core/CrestronIO/GenericRelayDevice.cs @@ -5,9 +5,13 @@ using System.Collections.Generic; using Crestron.SimplSharpPro; using Crestron.SimplSharpPro.DeviceSupport; using Newtonsoft.Json; -using PepperDash.Core; using PepperDash.Essentials.Core.Bridges; +using PepperDash.Essentials.Core.Bridges.JoinMaps; using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Feedbacks; +using PepperDash.Essentials.Core.JoinMaps; +using PepperDash.Essentials.Core.Touchpanels; using Serilog.Events; namespace PepperDash.Essentials.Core.CrestronIO diff --git a/src/PepperDash.Essentials.Core/CrestronIO/GenericVersiportAnalogInputDevice.cs b/src/PepperDash.Essentials.Core/CrestronIO/GenericVersiportAnalogInputDevice.cs index 77982374..a19b7127 100644 --- a/src/PepperDash.Essentials.Core/CrestronIO/GenericVersiportAnalogInputDevice.cs +++ b/src/PepperDash.Essentials.Core/CrestronIO/GenericVersiportAnalogInputDevice.cs @@ -4,14 +4,17 @@ using System; using System.Collections.Generic; using Crestron.SimplSharpPro; using Crestron.SimplSharpPro.DeviceSupport; - -using PepperDash.Core; using PepperDash.Essentials.Core.Config; using PepperDash.Essentials.Core.Bridges; using Newtonsoft.Json; using Serilog.Events; +using PepperDash.Essentials.Core.JoinMaps; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Bridges.JoinMaps; +using PepperDash.Essentials.Core.Feedbacks; +using PepperDash.Essentials.Core.Touchpanels; namespace PepperDash.Essentials.Core.CrestronIO { diff --git a/src/PepperDash.Essentials.Core/CrestronIO/GenericVersiportInputDevice.cs b/src/PepperDash.Essentials.Core/CrestronIO/GenericVersiportInputDevice.cs index 969d8747..87955bf0 100644 --- a/src/PepperDash.Essentials.Core/CrestronIO/GenericVersiportInputDevice.cs +++ b/src/PepperDash.Essentials.Core/CrestronIO/GenericVersiportInputDevice.cs @@ -4,14 +4,17 @@ using System; using System.Collections.Generic; using Crestron.SimplSharpPro; using Crestron.SimplSharpPro.DeviceSupport; - -using PepperDash.Core; using PepperDash.Essentials.Core.Config; using PepperDash.Essentials.Core.Bridges; using Newtonsoft.Json; using Serilog.Events; +using PepperDash.Essentials.Core.Feedbacks; +using PepperDash.Essentials.Core.PartitionSensor; +using PepperDash.Essentials.Core.Bridges.JoinMaps; +using PepperDash.Essentials.Core.JoinMaps; +using PepperDash.Essentials.Core.Devices; namespace PepperDash.Essentials.Core.CrestronIO { diff --git a/src/PepperDash.Essentials.Core/CrestronIO/GenericVersiportOutputDevice.cs b/src/PepperDash.Essentials.Core/CrestronIO/GenericVersiportOutputDevice.cs index c70562a9..17772710 100644 --- a/src/PepperDash.Essentials.Core/CrestronIO/GenericVersiportOutputDevice.cs +++ b/src/PepperDash.Essentials.Core/CrestronIO/GenericVersiportOutputDevice.cs @@ -4,14 +4,17 @@ using System; using System.Collections.Generic; using Crestron.SimplSharpPro; using Crestron.SimplSharpPro.DeviceSupport; - -using PepperDash.Core; using PepperDash.Essentials.Core.Config; using PepperDash.Essentials.Core.Bridges; using Newtonsoft.Json; using Serilog.Events; +using PepperDash.Essentials.Core.Bridges.JoinMaps; +using PepperDash.Essentials.Core.Feedbacks; +using PepperDash.Essentials.Core.JoinMaps; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Touchpanels; namespace PepperDash.Essentials.Core.CrestronIO { diff --git a/src/PepperDash.Essentials.Core/CrestronIO/IAnalogInput.cs b/src/PepperDash.Essentials.Core/CrestronIO/IAnalogInput.cs index 7c22c24e..44fd9f49 100644 --- a/src/PepperDash.Essentials.Core/CrestronIO/IAnalogInput.cs +++ b/src/PepperDash.Essentials.Core/CrestronIO/IAnalogInput.cs @@ -1,4 +1,6 @@ -namespace PepperDash.Essentials.Core.CrestronIO +using PepperDash.Essentials.Core.Feedbacks; + +namespace PepperDash.Essentials.Core.CrestronIO { /// /// Defines the contract for IAnalogInput diff --git a/src/PepperDash.Essentials.Core/CrestronIO/IDigitalInput.cs b/src/PepperDash.Essentials.Core/CrestronIO/IDigitalInput.cs index 58c5c2ec..b1d64504 100644 --- a/src/PepperDash.Essentials.Core/CrestronIO/IDigitalInput.cs +++ b/src/PepperDash.Essentials.Core/CrestronIO/IDigitalInput.cs @@ -1,4 +1,6 @@ -namespace PepperDash.Essentials.Core.CrestronIO +using PepperDash.Essentials.Core.Feedbacks; + +namespace PepperDash.Essentials.Core.CrestronIO { /// /// Represents a device that provides digital input diff --git a/src/PepperDash.Essentials.Core/CrestronIO/IDigitalOutput.cs b/src/PepperDash.Essentials.Core/CrestronIO/IDigitalOutput.cs index 2275402e..d131c40b 100644 --- a/src/PepperDash.Essentials.Core/CrestronIO/IDigitalOutput.cs +++ b/src/PepperDash.Essentials.Core/CrestronIO/IDigitalOutput.cs @@ -1,4 +1,6 @@ -namespace PepperDash.Essentials.Core.CrestronIO +using PepperDash.Essentials.Core.Feedbacks; + +namespace PepperDash.Essentials.Core.CrestronIO { /// /// Represents a device that provides digital input diff --git a/src/PepperDash.Essentials.Core/CrestronIO/IHasCresnetBranches.cs b/src/PepperDash.Essentials.Core/CrestronIO/IHasCresnetBranches.cs index fe2aacd3..d8dbbffd 100644 --- a/src/PepperDash.Essentials.Core/CrestronIO/IHasCresnetBranches.cs +++ b/src/PepperDash.Essentials.Core/CrestronIO/IHasCresnetBranches.cs @@ -1,7 +1,7 @@ using Crestron.SimplSharpPro; using Crestron.SimplSharpPro.DeviceSupport; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.CrestronIO { /// /// Defines the contract for IHasCresnetBranches diff --git a/src/PepperDash.Essentials.Core/CrestronIO/ISwitchedOutput.cs b/src/PepperDash.Essentials.Core/CrestronIO/ISwitchedOutput.cs index 49b4c271..bcf27ea5 100644 --- a/src/PepperDash.Essentials.Core/CrestronIO/ISwitchedOutput.cs +++ b/src/PepperDash.Essentials.Core/CrestronIO/ISwitchedOutput.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using PepperDash.Essentials.Core.Feedbacks; +using System.Collections.Generic; namespace PepperDash.Essentials.Core.CrestronIO { diff --git a/src/PepperDash.Essentials.Core/Debug.cs b/src/PepperDash.Essentials.Core/Debug.cs new file mode 100644 index 00000000..6b7172a9 --- /dev/null +++ b/src/PepperDash.Essentials.Core/Debug.cs @@ -0,0 +1,306 @@ +using Crestron.SimplSharp; +using Crestron.SimplSharp.CrestronIO; +using Newtonsoft.Json; +using Serilog; +using Serilog.Context; +using Serilog.Events; +using System; +using System.Collections.Generic; +using static Crestron.SimplSharpPro.Lighting.ZumWired.ZumNetBridgeRoom.ZumWiredRoomInterface; + +namespace PepperDash.Essentials.Core +{ + /// + /// Contains debug commands for use in various situations + /// + public static class Debug + { + private static readonly Dictionary _logLevels = new Dictionary() + { + {0, LogEventLevel.Information }, + {3, LogEventLevel.Warning }, + {4, LogEventLevel.Error }, + {5, LogEventLevel.Fatal }, + {1, LogEventLevel.Debug }, + {2, LogEventLevel.Verbose }, + }; + + public static void LogMessage(LogEventLevel level, string message, params object[] args) + { + Log.Write(level, message, args); + } + + /// + /// LogMessage method + /// + public static void LogMessage(LogEventLevel level, Exception ex, string message, params object[] args) + { + Log.Write(level, ex, message, args); + } + + /// + /// LogMessage method + /// + public static void LogMessage(LogEventLevel level, IKeyed keyed, string message, params object[] args) + { + using (LogContext.PushProperty("Key", keyed.Key)) + { + Log.Write(level, message, args); + } + } + + /// + /// LogMessage method + /// + public static void LogMessage(LogEventLevel level, IKeyed keyed, Exception ex, string message, params object[] args) + { + using (LogContext.PushProperty("Key", keyed.Key)) + { + Log.Write(level, ex, message, args); + } + } + + #region Explicit methods for logging levels + /// + /// LogVerbose method + /// + public static void LogVerbose(IKeyed keyed, string message, params object[] args) + { + using (LogContext.PushProperty("Key", keyed?.Key)) + { + Log.Write(LogEventLevel.Verbose, message, args); + } + } + + /// + /// LogVerbose method + /// + public static void LogVerbose(IKeyed keyed, Exception ex, string message, params object[] args) + { + using (LogContext.PushProperty("Key", keyed?.Key)) + { + Log.Write(LogEventLevel.Verbose, ex, message, args); + } + } + + /// + /// LogVerbose method + /// + public static void LogVerbose(string message, params object[] args) + { + Log.Write(LogEventLevel.Verbose, message, args); + } + + /// + /// LogVerbose method + /// + public static void LogVerbose(Exception ex, string message, params object[] args) + { + Log.Write(LogEventLevel.Verbose, ex, message, args); + } + + /// + /// LogDebug method + /// + public static void LogDebug(IKeyed keyed, string message, params object[] args) + { + LogMessage(LogEventLevel.Debug, keyed, message, args); + } + + /// + /// LogDebug method + /// + public static void LogDebug(IKeyed keyed, Exception ex, string message, params object[] args) + { + LogMessage(LogEventLevel.Debug, keyed, ex, message, args); + } + + /// + /// LogDebug method + /// + public static void LogDebug(string message, params object[] args) + { + Log.Debug(message, args); + } + + /// + /// LogDebug method + /// + public static void LogDebug(Exception ex, string message, params object[] args) + { + Log.Debug(ex, message, args); + } + + /// + /// LogInformation method + /// + public static void LogInformation(IKeyed keyed, string message, params object[] args) + { + LogMessage(LogEventLevel.Information, keyed, message, args); + } + + /// + /// LogInformation method + /// + public static void LogInformation(IKeyed keyed, Exception ex, string message, params object[] args) + { + LogMessage(LogEventLevel.Information, keyed, ex, message, args); + } + + /// + /// LogInformation method + /// + public static void LogInformation(string message, params object[] args) + { + Log.Information(message, args); + } + + /// + /// LogInformation method + /// + public static void LogInformation(Exception ex, string message, params object[] args) + { + Log.Information(ex, message, args); + } + + /// + /// LogWarning method + /// + public static void LogWarning(IKeyed keyed, string message, params object[] args) + { + LogMessage(LogEventLevel.Warning, keyed, message, args); + } + + /// + /// LogWarning method + /// + public static void LogWarning(Exception ex, IKeyed keyed, string message, params object[] args) + { + LogMessage(LogEventLevel.Warning, keyed, ex, message, args); + } + + /// + /// LogWarning method + /// + public static void LogWarning(string message, params object[] args) + { + LogMessage(LogEventLevel.Warning, message, args); + } + + /// + /// LogWarning method + /// + public static void LogWarning(Exception ex, string message, params object[] args) + { + LogMessage(LogEventLevel.Warning, ex, message, args); + } + + /// + /// LogError method + /// + public static void LogError(IKeyed keyed, string message, params object[] args) + { + LogMessage(LogEventLevel.Error, keyed, message, args); + } + + /// + /// LogError method + /// + public static void LogError(IKeyed keyed, Exception ex, string message, params object[] args) + { + LogMessage(LogEventLevel.Error, keyed, ex, message, args); + } + + /// + /// LogError method + /// + public static void LogError(string message, params object[] args) + { + LogMessage(LogEventLevel.Error, message, args); + } + + /// + /// LogError method + /// + public static void LogError(Exception ex, string message, params object[] args) + { + LogMessage(LogEventLevel.Error, ex, message, args); + } + + /// + /// LogFatal method + /// + public static void LogFatal(IKeyed keyed, string message, params object[] args) + { + LogMessage(LogEventLevel.Fatal, keyed, message, args); + } + + /// + /// LogFatal method + /// + public static void LogFatal(IKeyed keyed, Exception ex, string message, params object[] args) + { + LogMessage(LogEventLevel.Fatal, keyed, ex, message, args); + } + + /// + /// LogFatal method + /// + public static void LogFatal(string message, params object[] args) + { + LogMessage(LogEventLevel.Fatal, message, args); + } + + /// + /// LogFatal method + /// + public static void LogFatal(Exception ex, string message, params object[] args) + { + LogMessage(LogEventLevel.Fatal, ex, message, args); + } + + #endregion + + private static void LogMessage(uint level, string format, params object[] items) + { + if (!_logLevels.ContainsKey(level)) return; + + var logLevel = _logLevels[level]; + + LogMessage(logLevel, format, items); + } + + private static void LogMessage(uint level, IKeyed keyed, string format, params object[] items) + { + if (!_logLevels.ContainsKey(level)) return; + + var logLevel = _logLevels[level]; + + LogMessage(logLevel, keyed, format, items); + } + + + /// + /// Enumeration of ErrorLogLevel values + /// + public enum ErrorLogLevel + { + /// + /// Error + /// + Error, + /// + /// Warning + /// + Warning, + /// + /// Notice + /// + Notice, + /// + /// None + /// + None, + } + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Device Info/IDeviceInfoProvider.cs b/src/PepperDash.Essentials.Core/Device Info/IDeviceInfoProvider.cs index 52d52bc6..a8da4d3a 100644 --- a/src/PepperDash.Essentials.Core/Device Info/IDeviceInfoProvider.cs +++ b/src/PepperDash.Essentials.Core/Device Info/IDeviceInfoProvider.cs @@ -1,6 +1,4 @@ -using PepperDash.Core; - -namespace PepperDash.Essentials.Core.DeviceInfo +namespace PepperDash.Essentials.Core.DeviceInfo { /// /// Defines the contract for IDeviceInfoProvider diff --git a/src/PepperDash.Essentials.Core/Device Info/NetworkDeviceHelpers.cs b/src/PepperDash.Essentials.Core/Device Info/NetworkDeviceHelpers.cs index c76cc3f0..972c51cc 100644 --- a/src/PepperDash.Essentials.Core/Device Info/NetworkDeviceHelpers.cs +++ b/src/PepperDash.Essentials.Core/Device Info/NetworkDeviceHelpers.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; using System.Linq; -using PepperDash.Core; using Crestron.SimplSharp; +using PepperDash.Essentials.Core.Extensions; using Serilog.Events; namespace PepperDash.Essentials.Core.DeviceInfo diff --git a/src/PepperDash.Essentials.Core/Device.cs b/src/PepperDash.Essentials.Core/Device.cs new file mode 100644 index 00000000..9ac34dcb --- /dev/null +++ b/src/PepperDash.Essentials.Core/Device.cs @@ -0,0 +1,199 @@ +using System; +using System.Collections.Generic; +using Serilog.Events; + +namespace PepperDash.Essentials.Core +{ + //********************************************************************************************************* + /// + /// Represents a Device + /// + public class Device : IKeyName + { + + /// + /// Unique Key + /// + public string Key { get; protected set; } + /// + /// Gets or sets the Name + /// + public string Name { get; protected set; } + /// + /// + /// + public bool Enabled { get; protected set; } + + /// + /// A place to store reference to the original config object, if any. These values should + /// NOT be used as properties on the device as they are all publicly-settable values. + /// + //public DeviceConfig Config { get; private set; } + /// + /// Helper method to check if Config exists + /// + //public bool HasConfig { get { return Config != null; } } + + List _PreActivationActions; + List _PostActivationActions; + + /// + /// + /// + public static Device DefaultDevice { get { return _DefaultDevice; } } + static Device _DefaultDevice = new Device("Default", "Default"); + + /// + /// Base constructor for all Devices. + /// + /// + public Device(string key) + { + Key = key; + if (key.Contains(".")) Debug.LogMessage(LogEventLevel.Information, "WARNING: Device key should not include '.'", this); + Name = ""; + } + + /// + /// Constructor with key and name + /// + /// + /// + public Device(string key, string name) : this(key) + { + Name = name; + + } + + //public Device(DeviceConfig config) + // : this(config.Key, config.Name) + //{ + // Config = config; + //} + + /// + /// Adds a pre activation action + /// + /// + public void AddPreActivationAction(Action act) + { + if (_PreActivationActions == null) + _PreActivationActions = new List(); + _PreActivationActions.Add(act); + } + + /// + /// Adds a post activation action + /// + /// + /// + /// AddPostActivationAction method + /// + public void AddPostActivationAction(Action act) + { + if (_PostActivationActions == null) + _PostActivationActions = new List(); + _PostActivationActions.Add(act); + } + + /// + /// PreActivate method + /// + public void PreActivate() + { + if (_PreActivationActions != null) + _PreActivationActions.ForEach(a => + { + try + { + a.Invoke(); + } + catch (Exception e) + { + Debug.LogMessage(e, "Error in PreActivationAction: " + e.Message, this); + } + }); + } + + /// + /// Activate method + /// + public bool Activate() + { + //if (_PreActivationActions != null) + // _PreActivationActions.ForEach(a => a.Invoke()); + var result = CustomActivate(); + //if(result && _PostActivationActions != null) + // _PostActivationActions.ForEach(a => a.Invoke()); + return result; + } + + /// + /// PostActivate method + /// + public void PostActivate() + { + if (_PostActivationActions != null) + _PostActivationActions.ForEach(a => + { + try + { + a.Invoke(); + } + catch (Exception e) + { + Debug.LogMessage(e, "Error in PostActivationAction: " + e.Message, this); + } + }); + } + + /// + /// Called in between Pre and PostActivationActions when Activate() is called. + /// Override to provide addtitional setup when calling activation. Overriding classes + /// do not need to call base.CustomActivate() + /// + /// true if device activated successfully. + /// + /// CustomActivate method + /// + public virtual bool CustomActivate() { return true; } + + /// + /// Call to deactivate device - unlink events, etc. Overriding classes do not + /// need to call base.Deactivate() + /// + /// + public virtual bool Deactivate() { return true; } + + /// + /// Call this method to start communications with a device. Overriding classes do not need to call base.Initialize() + /// + public virtual void Initialize() + { + } + + /// + /// Helper method to check object for bool value false and fire an Action method + /// + /// Should be of type bool, others will be ignored + /// Action to be run when o is false + public void OnFalse(object o, Action a) + { + if (o is bool && !(bool)o) a(); + } + + /// + /// Returns a string representation of the object, including its key and name. + /// + /// The returned string is formatted as "{Key} - {Name}". If the Name property is + /// null or empty, "---" is used in place of the name. + /// A string that represents the object, containing the key and name in the format "{Key} - {Name}". + /// + /// ToString method + /// + public override string ToString() + { + return string.Format("{0} - {1}", Key, string.IsNullOrEmpty(Name) ? "---" : Name); + } + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/DeviceControlsParentInterfaces/IPresentationSource.cs b/src/PepperDash.Essentials.Core/DeviceControlsParentInterfaces/IPresentationSource.cs deleted file mode 100644 index ac45a9d4..00000000 --- a/src/PepperDash.Essentials.Core/DeviceControlsParentInterfaces/IPresentationSource.cs +++ /dev/null @@ -1,19 +0,0 @@ -//using System; -//using System.Collections.Generic; -//using Crestron.SimplSharpPro; -//using Crestron.SimplSharpPro.DeviceSupport; - -//using PepperDash.Core; - - -//namespace PepperDash.Essentials.Core -//{ -// public interface IPresentationSource : IKeyed -// { -// string Name { get; } -// PresentationSourceType Type { get; } -// string IconName { get; set; } -// BoolFeedback HasPowerOnFeedback { get; } - -// } -//} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IChannel.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IChannel.cs index 4d7c40e1..aaf339b0 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IChannel.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IChannel.cs @@ -1,6 +1,7 @@ using Crestron.SimplSharpPro.DeviceSupport; +using PepperDash.Essentials.Core.Touchpanels; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { /// /// diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IColorFunctions.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IColorFunctions.cs index 5626904c..1db61171 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IColorFunctions.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IColorFunctions.cs @@ -1,6 +1,7 @@ using Crestron.SimplSharpPro.DeviceSupport; +using PepperDash.Essentials.Core.Touchpanels; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { /// /// diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDPad.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDPad.cs index 0090ee75..9234111a 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDPad.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDPad.cs @@ -1,7 +1,7 @@ using Crestron.SimplSharpPro.DeviceSupport; -using PepperDash.Core; +using PepperDash.Essentials.Core.Touchpanels; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { /// /// diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDiscPlayerControls.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDiscPlayerControls.cs index 77cd0b6e..7450261c 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDiscPlayerControls.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDiscPlayerControls.cs @@ -1,4 +1,4 @@ -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { /// diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDisplay.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDisplay.cs index af3428f6..8009e5d0 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDisplay.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDisplay.cs @@ -1,4 +1,5 @@ -using PepperDash.Core; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Routing; namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDisplayBasic.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDisplayBasic.cs index 8d584b59..58d48948 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDisplayBasic.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDisplayBasic.cs @@ -1,4 +1,4 @@ -namespace PepperDash.Essentials.Core.Devices.DeviceTypeInterfaces +namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { /// /// Defines the contract for IDisplayBasic diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDumbSource.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDumbSource.cs index a96890f0..d4bb7f9a 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDumbSource.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDumbSource.cs @@ -1,4 +1,4 @@ -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { /// /// Defines the contract for IDumbSource diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDvr.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDvr.cs index 713b027c..f2db3ef8 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDvr.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IDvr.cs @@ -1,6 +1,7 @@ using Crestron.SimplSharpPro.DeviceSupport; +using PepperDash.Essentials.Core.Touchpanels; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { /// /// diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasFarEndContentStatus.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasFarEndContentStatus.cs index 114665db..5e859de9 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasFarEndContentStatus.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasFarEndContentStatus.cs @@ -1,4 +1,6 @@ -namespace PepperDash.Essentials.Core.DeviceTypeInterfaces +using PepperDash.Essentials.Core.Feedbacks; + +namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { /// /// Defines the contract for IHasFarEndContentStatus diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasInputs.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasInputs.cs index ff9511fa..7a96d8d1 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasInputs.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasInputs.cs @@ -1,6 +1,4 @@ -using PepperDash.Core; - -namespace PepperDash.Essentials.Core.DeviceTypeInterfaces +namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { /// /// Describes a device that has selectable inputs diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasPhoneDialing.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasPhoneDialing.cs index b178b41e..7250de4d 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasPhoneDialing.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasPhoneDialing.cs @@ -1,4 +1,6 @@ -namespace PepperDash.Essentials.Core.DeviceTypeInterfaces +using PepperDash.Essentials.Core.Feedbacks; + +namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { /// /// Defines the contract for IHasPhoneDialing diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasSurroundSoundModes.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasSurroundSoundModes.cs index 008dd0d0..21d2e1c5 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasSurroundSoundModes.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHasSurroundSoundModes.cs @@ -1,6 +1,4 @@ -using PepperDash.Core; - -namespace PepperDash.Essentials.Core.DeviceTypeInterfaces +namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { /// /// Describes a device that has selectable surround sound modes diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHumiditySensor.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHumiditySensor.cs index 9c924927..70634824 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHumiditySensor.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IHumiditySensor.cs @@ -1,4 +1,6 @@ -namespace PepperDash.Essentials.Core.DeviceTypeInterfaces +using PepperDash.Essentials.Core.Feedbacks; + +namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { /// /// Defines the contract for IHumiditySensor diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ILevelControls.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ILevelControls.cs index 393af55a..8f89431b 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ILevelControls.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ILevelControls.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using PepperDash.Essentials.Core.Devices; +using System.Collections.Generic; namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMeterFeedback.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMeterFeedback.cs index 113d1d19..7b2e509c 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMeterFeedback.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMeterFeedback.cs @@ -1,3 +1,5 @@ +using PepperDash.Essentials.Core.Feedbacks; + namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMobileControl.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMobileControl.cs index 09420b7e..a5d6b8a3 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMobileControl.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IMobileControl.cs @@ -3,7 +3,7 @@ using System.Collections.ObjectModel; using Crestron.SimplSharpPro; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using PepperDash.Core; +using PepperDash.Essentials.Core.Feedbacks; namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/INumeric.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/INumeric.cs index a15689bd..7d6b43c6 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/INumeric.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/INumeric.cs @@ -1,7 +1,7 @@ using Crestron.SimplSharpPro.DeviceSupport; -using PepperDash.Core; +using PepperDash.Essentials.Core.Touchpanels; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { /// /// Defines the contract for INumericKeypad diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/INvxNetworkPortInformation.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/INvxNetworkPortInformation.cs index c1592c94..101daca9 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/INvxNetworkPortInformation.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/INvxNetworkPortInformation.cs @@ -2,7 +2,7 @@ using Crestron.SimplSharpPro.DM.Streaming; using System; using System.Collections.Generic; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { /// /// Represents a collection of network port information and provides notifications when the information changes. diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IPasswordPrompt.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IPasswordPrompt.cs index 3048eeaa..7d5ae8cc 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IPasswordPrompt.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IPasswordPrompt.cs @@ -1,6 +1,6 @@ using System; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { /// /// Describes the functionality required to prompt a user to enter a password diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IPower.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IPower.cs index a7035c78..548343a0 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IPower.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IPower.cs @@ -1,7 +1,9 @@ using Crestron.SimplSharpPro.DeviceSupport; +using PepperDash.Essentials.Core.Feedbacks; +using PepperDash.Essentials.Core.Touchpanels; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { /// diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IProjectorScreenLiftControl.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IProjectorScreenLiftControl.cs index 15d74806..275e0f5e 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IProjectorScreenLiftControl.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IProjectorScreenLiftControl.cs @@ -1,4 +1,5 @@ -using System; +using PepperDash.Essentials.Core.Feedbacks; +using System; namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ISelectableItem.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ISelectableItem.cs index 8d99b959..bd4cab0b 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ISelectableItem.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ISelectableItem.cs @@ -1,6 +1,5 @@ using System; using Newtonsoft.Json; -using PepperDash.Core; namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ISetTopBoxControls.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ISetTopBoxControls.cs index 57fbc38c..6e3f3abd 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ISetTopBoxControls.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ISetTopBoxControls.cs @@ -1,6 +1,7 @@ using Crestron.SimplSharpPro.DeviceSupport; +using PepperDash.Essentials.Core.Touchpanels; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { /// /// Defines the contract for ISetTopBoxControls @@ -28,7 +29,7 @@ namespace PepperDash.Essentials.Core /// bool HasDpad { get; } - PepperDash.Essentials.Core.Presets.DevicePresetsModel TvPresets { get; } + Presets.DevicePresetsModel TvPresets { get; } void LoadPresets(string filePath); void DvrList(bool pressRelease); diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IStateFeedback.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IStateFeedback.cs index 3dfac906..78cec03d 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IStateFeedback.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IStateFeedback.cs @@ -1,3 +1,5 @@ +using PepperDash.Essentials.Core.Feedbacks; + namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ITemperatureSensor.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ITemperatureSensor.cs index 7183b723..e5534f26 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ITemperatureSensor.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ITemperatureSensor.cs @@ -1,4 +1,6 @@ -namespace PepperDash.Essentials.Core.DeviceTypeInterfaces +using PepperDash.Essentials.Core.Feedbacks; + +namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { /// /// Defines the contract for ITemperatureSensor diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ITransport.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ITransport.cs index 1a8f2a2b..d24a030b 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ITransport.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/ITransport.cs @@ -1,6 +1,7 @@ using Crestron.SimplSharpPro.DeviceSupport; +using PepperDash.Essentials.Core.Touchpanels; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { /// /// Defines the contract for ITransport diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IUiDisplayInfo.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IUiDisplayInfo.cs index aa0144fe..a3cc7a98 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IUiDisplayInfo.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IUiDisplayInfo.cs @@ -1,6 +1,4 @@ -using PepperDash.Core; - -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { /// /// Defines the contract for IUiDisplayInfo diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IWarmingCooling.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IWarmingCooling.cs index b2412fed..d570c881 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IWarmingCooling.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/IWarmingCooling.cs @@ -1,4 +1,6 @@ -namespace PepperDash.Essentials.Core +using PepperDash.Essentials.Core.Feedbacks; + +namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { /// /// Defines a class that has warm up and cool down diff --git a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/Template.cs b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/Template.cs index 014f8d2f..7ecf333e 100644 --- a/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/Template.cs +++ b/src/PepperDash.Essentials.Core/DeviceTypeInterfaces/Template.cs @@ -1,4 +1,4 @@ -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Devices/AudioControlListItemBase.cs b/src/PepperDash.Essentials.Core/Devices/AudioControlListItemBase.cs index 684924cf..34813d6c 100644 --- a/src/PepperDash.Essentials.Core/Devices/AudioControlListItemBase.cs +++ b/src/PepperDash.Essentials.Core/Devices/AudioControlListItemBase.cs @@ -1,6 +1,6 @@ using Newtonsoft.Json; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Devices { public abstract class AudioControlListItemBase { diff --git a/src/PepperDash.Essentials.Core/Devices/AudioInterfaces.cs b/src/PepperDash.Essentials.Core/Devices/AudioInterfaces.cs index 65290d86..c0d9c58c 100644 --- a/src/PepperDash.Essentials.Core/Devices/AudioInterfaces.cs +++ b/src/PepperDash.Essentials.Core/Devices/AudioInterfaces.cs @@ -1,4 +1,4 @@ -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Devices { /// diff --git a/src/PepperDash.Essentials.Core/Devices/CameraListItem.cs b/src/PepperDash.Essentials.Core/Devices/CameraListItem.cs index 9b45c728..1afce1a6 100644 --- a/src/PepperDash.Essentials.Core/Devices/CameraListItem.cs +++ b/src/PepperDash.Essentials.Core/Devices/CameraListItem.cs @@ -1,7 +1,6 @@ using Newtonsoft.Json; -using PepperDash.Core; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Devices { /// /// Represents a CameraListItem diff --git a/src/PepperDash.Essentials.Core/Devices/CodecInterfaces.cs b/src/PepperDash.Essentials.Core/Devices/CodecInterfaces.cs index 5e083ba1..ec8cdd45 100644 --- a/src/PepperDash.Essentials.Core/Devices/CodecInterfaces.cs +++ b/src/PepperDash.Essentials.Core/Devices/CodecInterfaces.cs @@ -1,4 +1,6 @@ -namespace PepperDash.Essentials.Core +using PepperDash.Essentials.Core.Feedbacks; + +namespace PepperDash.Essentials.Core.Devices { /// /// Adds control of codec receive volume diff --git a/src/PepperDash.Essentials.Core/Devices/ConfigSnippetAttribute.cs b/src/PepperDash.Essentials.Core/Devices/ConfigSnippetAttribute.cs index a1fdef35..36bb63e6 100644 --- a/src/PepperDash.Essentials.Core/Devices/ConfigSnippetAttribute.cs +++ b/src/PepperDash.Essentials.Core/Devices/ConfigSnippetAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Devices { /// /// Represents a ConfigSnippetAttribute diff --git a/src/PepperDash.Essentials.Core/Devices/CrestronProcessor.cs b/src/PepperDash.Essentials.Core/Devices/CrestronProcessor.cs index 928b4de0..8fab2893 100644 --- a/src/PepperDash.Essentials.Core/Devices/CrestronProcessor.cs +++ b/src/PepperDash.Essentials.Core/Devices/CrestronProcessor.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; - -using PepperDash.Core; +using Crestron.SimplSharpPro; using PepperDash.Essentials.Core.CrestronIO; using Serilog.Events; @@ -14,7 +13,7 @@ namespace PepperDash.Essentials.Core.Devices { public Dictionary SwitchedOutputs { get; private set; } - public Crestron.SimplSharpPro.CrestronControlSystem Processor { get; private set; } + public CrestronControlSystem Processor { get; private set; } public CrestronProcessor(string key) : base(key) diff --git a/src/PepperDash.Essentials.Core/Devices/DescriptionAttribute.cs b/src/PepperDash.Essentials.Core/Devices/DescriptionAttribute.cs index abe51665..3f8cb1e5 100644 --- a/src/PepperDash.Essentials.Core/Devices/DescriptionAttribute.cs +++ b/src/PepperDash.Essentials.Core/Devices/DescriptionAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Devices { /// /// Represents a description attribute for a device. diff --git a/src/PepperDash.Essentials.Core/Devices/DestinationListItem.cs b/src/PepperDash.Essentials.Core/Devices/DestinationListItem.cs index 26980265..49ef3115 100644 --- a/src/PepperDash.Essentials.Core/Devices/DestinationListItem.cs +++ b/src/PepperDash.Essentials.Core/Devices/DestinationListItem.cs @@ -1,8 +1,9 @@  using Newtonsoft.Json; +using PepperDash.Essentials.Core.Routing; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Devices { /// /// Represents a destination item in a routing system that can receive audio/video signals. diff --git a/src/PepperDash.Essentials.Core/Devices/DeviceApiBase.cs b/src/PepperDash.Essentials.Core/Devices/DeviceApiBase.cs index 7587f79c..afb8877c 100644 --- a/src/PepperDash.Essentials.Core/Devices/DeviceApiBase.cs +++ b/src/PepperDash.Essentials.Core/Devices/DeviceApiBase.cs @@ -1,4 +1,5 @@ -using System; +using PepperDash.Essentials.Core.Feedbacks; +using System; using System.Collections.Generic; namespace PepperDash.Essentials.Core.Devices diff --git a/src/PepperDash.Essentials.Core/Devices/DeviceFeedbackExtensions.cs b/src/PepperDash.Essentials.Core/Devices/DeviceFeedbackExtensions.cs index cc4110a1..7c7f1b14 100644 --- a/src/PepperDash.Essentials.Core/Devices/DeviceFeedbackExtensions.cs +++ b/src/PepperDash.Essentials.Core/Devices/DeviceFeedbackExtensions.cs @@ -1,6 +1,6 @@ -using PepperDash.Core; +using PepperDash.Essentials.Core.Feedbacks; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Devices { public static class DeviceFeedbackExtensions { diff --git a/src/PepperDash.Essentials.Core/Devices/DeviceJsonApi.cs b/src/PepperDash.Essentials.Core/Devices/DeviceJsonApi.cs index a71ca455..916c7ce2 100644 --- a/src/PepperDash.Essentials.Core/Devices/DeviceJsonApi.cs +++ b/src/PepperDash.Essentials.Core/Devices/DeviceJsonApi.cs @@ -1,6 +1,5 @@ using Crestron.SimplSharp; using Newtonsoft.Json; -using PepperDash.Core; using Serilog.Events; using System; using System.Collections; @@ -9,7 +8,7 @@ using System.Linq; using System.Reflection; using System.Threading.Tasks; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Devices { /// /// Represents a DeviceJsonApi @@ -25,7 +24,7 @@ namespace PepperDash.Essentials.Core /// public static void DoDeviceActionWithJson(string json) { - if (String.IsNullOrEmpty(json)) + if (string.IsNullOrEmpty(json)) { CrestronConsole.ConsoleCommandResponse( "Please provide a JSON object matching the format {\"deviceKey\":\"myDevice\", \"methodName\":\"someMethod\", \"params\": [\"param1\", true]}.\r\nIf the method has no parameters, the \"params\" object may be omitted."); @@ -68,7 +67,7 @@ namespace PepperDash.Essentials.Core action.Params = new object[0]; } - Type t = obj.GetType(); + var t = obj.GetType(); try { var methods = t.GetMethods().Where(m => m.Name == action.MethodName).ToList(); @@ -127,7 +126,7 @@ namespace PepperDash.Essentials.Core action.Params = new object[0]; } - Type t = obj.GetType(); + var t = obj.GetType(); try { var methods = t.GetMethods().Where(m => m.Name == action.MethodName).ToList(); @@ -183,10 +182,10 @@ namespace PepperDash.Essentials.Core var stringValue = Convert.ToString(value); - if (String.IsNullOrEmpty(stringValue)) + if (string.IsNullOrEmpty(stringValue)) { throw new InvalidCastException( - String.Format("{0} cannot be converted to a string prior to conversion to enum")); + string.Format("{0} cannot be converted to a string prior to conversion to enum")); } return Enum.Parse(conversionType, stringValue, true); } @@ -205,7 +204,7 @@ namespace PepperDash.Essentials.Core if (obj == null) return "{ \"error\":\"No Device\"}"; - Type t = obj.GetType(); + var t = obj.GetType(); // get the properties and set them into a new collection of NameType wrappers var props = t.GetProperties().Select(p => new PropertyNameType(p, obj)); return JsonConvert.SerializeObject(props, Formatting.Indented); @@ -226,7 +225,7 @@ namespace PepperDash.Essentials.Core if (dev == null) return "{ \"error\":\"No Device\"}"; - object prop = dev.GetType().GetProperty(propertyName).GetValue(dev, null); + var prop = dev.GetType().GetProperty(propertyName).GetValue(dev, null); // var prop = t.GetProperty(propertyName); if (prop != null) @@ -255,7 +254,7 @@ namespace PepperDash.Essentials.Core return "{ \"error\":\"No Device\"}"; // Package up method names using helper objects - Type t = obj.GetType(); + var t = obj.GetType(); var methods = t.GetMethods() .Where(m => !m.IsSpecialName) .Select(p => new MethodNameParams(p)); @@ -272,7 +271,7 @@ namespace PepperDash.Essentials.Core return "{ \"error\":\"No Device\"}"; // Package up method names using helper objects - Type t = obj.GetType(); + var t = obj.GetType(); var methods = t.GetMethods() .Where(m => !m.IsSpecialName) .Where(m => m.GetCustomAttributes(typeof(ApiAttribute), true).Any()) @@ -299,7 +298,7 @@ namespace PepperDash.Essentials.Core object obj = dev; if (path.Length > 1) { - for (int i = 1; i < path.Length; i++) + for (var i = 1; i < path.Length; i++) { var objName = path[i]; string indexStr = null; @@ -318,7 +317,7 @@ namespace PepperDash.Essentials.Core Debug.LogMessage(LogEventLevel.Information, dev, " Checking for collection '{0}', index '{1}'", objName, indexStr); } - Type oType = obj.GetType(); + var oType = obj.GetType(); var prop = oType.GetProperty(objName); if (prop == null) { diff --git a/src/PepperDash.Essentials.Core/Devices/DeviceManager.cs b/src/PepperDash.Essentials.Core/Devices/DeviceManager.cs index 7572835e..f012ec9a 100644 --- a/src/PepperDash.Essentials.Core/Devices/DeviceManager.cs +++ b/src/PepperDash.Essentials.Core/Devices/DeviceManager.cs @@ -4,11 +4,13 @@ using System.Linq; using System.Text.RegularExpressions; using Crestron.SimplSharp; using Crestron.SimplSharpPro; -using PepperDash.Core; +using PepperDash.Essentials.Core.Communications; +using PepperDash.Essentials.Core.Monitoring; +using PepperDash.Essentials.Core.Routing; using Serilog.Events; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Devices { /// /// Manages the devices in the system @@ -445,8 +447,8 @@ namespace PepperDash.Essentials.Core var device = GetDeviceForKey(s); if (device == null) return; - var inputPorts = ((device as IRoutingInputs) != null) ? (device as IRoutingInputs).InputPorts : null; - var outputPorts = ((device as IRoutingOutputs) != null) ? (device as IRoutingOutputs).OutputPorts : null; + var inputPorts = device as IRoutingInputs != null ? (device as IRoutingInputs).InputPorts : null; + var outputPorts = device as IRoutingOutputs != null ? (device as IRoutingOutputs).OutputPorts : null; if (inputPorts != null) { CrestronConsole.ConsoleCommandResponse("Device {0} has {1} Input Ports:{2}", s, inputPorts.Count, CrestronEnvironment.NewLine); @@ -472,7 +474,7 @@ namespace PepperDash.Essentials.Core /// public static void SetDeviceStreamDebugging(string s) { - if (String.IsNullOrEmpty(s) || s.Contains("?")) + if (string.IsNullOrEmpty(s) || s.Contains("?")) { CrestronConsole.ConsoleCommandResponse( @"SETDEVICESTREAMDEBUG [{deviceKey}] [OFF |TX | RX | BOTH] [timeOutInMinutes] @@ -486,7 +488,7 @@ namespace PepperDash.Essentials.Core var deviceKey = args[0]; var setting = args[1]; - var timeout = String.Empty; + var timeout = string.Empty; if (args.Length >= 3) { diff --git a/src/PepperDash.Essentials.Core/Devices/DisplayUiConstants.cs b/src/PepperDash.Essentials.Core/Devices/DisplayUiConstants.cs index a76822da..39229f93 100644 --- a/src/PepperDash.Essentials.Core/Devices/DisplayUiConstants.cs +++ b/src/PepperDash.Essentials.Core/Devices/DisplayUiConstants.cs @@ -1,4 +1,4 @@ -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Devices { /// /// Integers that represent the "source type number" for given sources. diff --git a/src/PepperDash.Essentials.Core/Devices/EssentialsBridgeableDevice.cs b/src/PepperDash.Essentials.Core/Devices/EssentialsBridgeableDevice.cs index 0812ca4e..d1f4fc65 100644 --- a/src/PepperDash.Essentials.Core/Devices/EssentialsBridgeableDevice.cs +++ b/src/PepperDash.Essentials.Core/Devices/EssentialsBridgeableDevice.cs @@ -1,7 +1,7 @@ using Crestron.SimplSharpPro.DeviceSupport; using PepperDash.Essentials.Core.Bridges; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Devices { public abstract class EssentialsBridgeableDevice:EssentialsDevice, IBridgeAdvanced { diff --git a/src/PepperDash.Essentials.Core/Devices/EssentialsDevice.cs b/src/PepperDash.Essentials.Core/Devices/EssentialsDevice.cs index 59fba681..75ff617c 100644 --- a/src/PepperDash.Essentials.Core/Devices/EssentialsDevice.cs +++ b/src/PepperDash.Essentials.Core/Devices/EssentialsDevice.cs @@ -1,9 +1,8 @@ using System; using System.Threading.Tasks; -using PepperDash.Core; using Serilog.Events; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Devices { /// /// Defines the basic needs for an EssentialsDevice to enable it to be build by an IDeviceFactory class diff --git a/src/PepperDash.Essentials.Core/Devices/EssentialsDeviceFactory.cs b/src/PepperDash.Essentials.Core/Devices/EssentialsDeviceFactory.cs index 3ac326bf..a7c695cf 100644 --- a/src/PepperDash.Essentials.Core/Devices/EssentialsDeviceFactory.cs +++ b/src/PepperDash.Essentials.Core/Devices/EssentialsDeviceFactory.cs @@ -1,8 +1,9 @@ using System; using System.Collections.Generic; using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Factory; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Devices { /// /// Provides the basic needs for a Device Factory diff --git a/src/PepperDash.Essentials.Core/Devices/EssentialsPluginDevelopmentDeviceFactory.cs b/src/PepperDash.Essentials.Core/Devices/EssentialsPluginDevelopmentDeviceFactory.cs index 62864551..01f00898 100644 --- a/src/PepperDash.Essentials.Core/Devices/EssentialsPluginDevelopmentDeviceFactory.cs +++ b/src/PepperDash.Essentials.Core/Devices/EssentialsPluginDevelopmentDeviceFactory.cs @@ -1,6 +1,7 @@ +using PepperDash.Essentials.Core.Plugins; using System.Collections.Generic; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Devices { public abstract class EssentialsPluginDevelopmentDeviceFactory : EssentialsDeviceFactory, IPluginDevelopmentDeviceFactory where T : EssentialsDevice { diff --git a/src/PepperDash.Essentials.Core/Devices/EssentialsPluginDeviceFactory.cs b/src/PepperDash.Essentials.Core/Devices/EssentialsPluginDeviceFactory.cs index 7a891905..8581704f 100644 --- a/src/PepperDash.Essentials.Core/Devices/EssentialsPluginDeviceFactory.cs +++ b/src/PepperDash.Essentials.Core/Devices/EssentialsPluginDeviceFactory.cs @@ -1,4 +1,6 @@ -namespace PepperDash.Essentials.Core +using PepperDash.Essentials.Core.Plugins; + +namespace PepperDash.Essentials.Core.Devices { /// /// Devices the basic needs for a Device Factory diff --git a/src/PepperDash.Essentials.Core/Devices/GenericIRController.cs b/src/PepperDash.Essentials.Core/Devices/GenericIRController.cs index 0c27f362..d2c07b0b 100644 --- a/src/PepperDash.Essentials.Core/Devices/GenericIRController.cs +++ b/src/PepperDash.Essentials.Core/Devices/GenericIRController.cs @@ -2,11 +2,14 @@ using System.Linq; using Crestron.SimplSharpPro.DeviceSupport; using Newtonsoft.Json; -using PepperDash.Core; using PepperDash.Essentials.Core.Bridges; using PepperDash.Essentials.Core.Config; using PepperDash.Essentials.Core.Bridges.JoinMaps; using Serilog.Events; +using PepperDash.Essentials.Core.JoinMaps; +using PepperDash.Essentials.Core.Feedbacks; +using PepperDash.Essentials.Core.Communications; +using PepperDash.Essentials.Core.Touchpanels; namespace PepperDash.Essentials.Core.Devices { diff --git a/src/PepperDash.Essentials.Core/Devices/GenericMonitoredTcpDevice.cs b/src/PepperDash.Essentials.Core/Devices/GenericMonitoredTcpDevice.cs index d80fa350..0c757bce 100644 --- a/src/PepperDash.Essentials.Core/Devices/GenericMonitoredTcpDevice.cs +++ b/src/PepperDash.Essentials.Core/Devices/GenericMonitoredTcpDevice.cs @@ -1,4 +1,5 @@ -using PepperDash.Core; +using PepperDash.Essentials.Core.Communications; +using PepperDash.Essentials.Core.Monitoring; using Serilog.Events; diff --git a/src/PepperDash.Essentials.Core/Devices/IAttachVideoStatus.cs b/src/PepperDash.Essentials.Core/Devices/IAttachVideoStatus.cs index 4b9b36ca..1b217050 100644 --- a/src/PepperDash.Essentials.Core/Devices/IAttachVideoStatus.cs +++ b/src/PepperDash.Essentials.Core/Devices/IAttachVideoStatus.cs @@ -1,7 +1,4 @@ -using PepperDash.Core; - - -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Devices { /// /// Defines the contract for IAttachVideoStatus diff --git a/src/PepperDash.Essentials.Core/Devices/IAttachVideoStatusExtensions.cs b/src/PepperDash.Essentials.Core/Devices/IAttachVideoStatusExtensions.cs index aa47163e..58b7641d 100644 --- a/src/PepperDash.Essentials.Core/Devices/IAttachVideoStatusExtensions.cs +++ b/src/PepperDash.Essentials.Core/Devices/IAttachVideoStatusExtensions.cs @@ -1,6 +1,8 @@ -using System.Linq; +using PepperDash.Essentials.Core.Routing; +using PepperDash.Essentials.Core.VideoStatus; +using System.Linq; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Devices { public static class IAttachVideoStatusExtensions { diff --git a/src/PepperDash.Essentials.Core/Devices/IDisplayUsage.cs b/src/PepperDash.Essentials.Core/Devices/IDisplayUsage.cs index 0d74d819..57ca9c84 100644 --- a/src/PepperDash.Essentials.Core/Devices/IDisplayUsage.cs +++ b/src/PepperDash.Essentials.Core/Devices/IDisplayUsage.cs @@ -1,4 +1,6 @@ -namespace PepperDash.Essentials.Core +using PepperDash.Essentials.Core.Feedbacks; + +namespace PepperDash.Essentials.Core.Devices { /// /// For display classes that can provide usage data diff --git a/src/PepperDash.Essentials.Core/Devices/IDspPresets.cs b/src/PepperDash.Essentials.Core/Devices/IDspPresets.cs index 90006b3b..9a1e8ad2 100644 --- a/src/PepperDash.Essentials.Core/Devices/IDspPresets.cs +++ b/src/PepperDash.Essentials.Core/Devices/IDspPresets.cs @@ -1,7 +1,6 @@ -using PepperDash.Core; -using System.Collections.Generic; +using System.Collections.Generic; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Devices { /// /// Defines the contract for IDspPresets diff --git a/src/PepperDash.Essentials.Core/Devices/IHasFeedbacks.cs b/src/PepperDash.Essentials.Core/Devices/IHasFeedbacks.cs index 91620c63..f0db5eed 100644 --- a/src/PepperDash.Essentials.Core/Devices/IHasFeedbacks.cs +++ b/src/PepperDash.Essentials.Core/Devices/IHasFeedbacks.cs @@ -1,10 +1,9 @@ using System; using System.Linq; - -using PepperDash.Core; +using PepperDash.Essentials.Core.Feedbacks; using Serilog.Events; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Devices { /// /// Defines the contract for IHasFeedback @@ -24,7 +23,7 @@ namespace PepperDash.Essentials.Core { public static void DumpFeedbacksToConsole(this IHasFeedback source, bool getCurrentStates) { - Type t = source.GetType(); + var t = source.GetType(); // get the properties and set them into a new collection of NameType wrappers var props = t.GetProperties().Select(p => new PropertyNameType(p, t)); @@ -34,8 +33,8 @@ namespace PepperDash.Essentials.Core Debug.LogMessage(LogEventLevel.Information, source, "\n\nAvailable feedbacks:"); foreach (var f in feedbacks) { - string val = ""; - string type = ""; + var val = ""; + var type = ""; if (getCurrentStates) { if (f is BoolFeedback) @@ -55,7 +54,7 @@ namespace PepperDash.Essentials.Core } } Debug.LogMessage(LogEventLevel.Information, "{0,-12} {1, -25} {2}", type, - (string.IsNullOrEmpty(f.Key) ? "-no key-" : f.Key), val); + string.IsNullOrEmpty(f.Key) ? "-no key-" : f.Key, val); } } else diff --git a/src/PepperDash.Essentials.Core/Devices/IMakeModel.cs b/src/PepperDash.Essentials.Core/Devices/IMakeModel.cs index 494c9af3..90441ba5 100644 --- a/src/PepperDash.Essentials.Core/Devices/IMakeModel.cs +++ b/src/PepperDash.Essentials.Core/Devices/IMakeModel.cs @@ -1,7 +1,4 @@ -using PepperDash.Core; - - -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Devices { /// diff --git a/src/PepperDash.Essentials.Core/Devices/IOnline.cs b/src/PepperDash.Essentials.Core/Devices/IOnline.cs index 8c86a480..41b3150c 100644 --- a/src/PepperDash.Essentials.Core/Devices/IOnline.cs +++ b/src/PepperDash.Essentials.Core/Devices/IOnline.cs @@ -1,4 +1,6 @@ -namespace PepperDash.Essentials.Core +using PepperDash.Essentials.Core.Feedbacks; + +namespace PepperDash.Essentials.Core.Devices { /// /// Defines the contract for IOnline diff --git a/src/PepperDash.Essentials.Core/Devices/IProjectorInterfaces.cs b/src/PepperDash.Essentials.Core/Devices/IProjectorInterfaces.cs index 3d3ab55f..dd4378dd 100644 --- a/src/PepperDash.Essentials.Core/Devices/IProjectorInterfaces.cs +++ b/src/PepperDash.Essentials.Core/Devices/IProjectorInterfaces.cs @@ -1,4 +1,6 @@ -namespace PepperDash.Essentials.Core +using PepperDash.Essentials.Core.Feedbacks; + +namespace PepperDash.Essentials.Core.Devices { /// /// Defines the contract for IBasicVideoMute diff --git a/src/PepperDash.Essentials.Core/Devices/IUsageTracking.cs b/src/PepperDash.Essentials.Core/Devices/IUsageTracking.cs index 72e27202..7218dbb4 100644 --- a/src/PepperDash.Essentials.Core/Devices/IUsageTracking.cs +++ b/src/PepperDash.Essentials.Core/Devices/IUsageTracking.cs @@ -1,8 +1,8 @@ using System; -using PepperDash.Core; +using PepperDash.Essentials.Core.Usage; using Serilog.Events; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Devices { /// /// Defines the contract for IUsageTracking diff --git a/src/PepperDash.Essentials.Core/Devices/IVolumeAndAudioInterfaces.cs b/src/PepperDash.Essentials.Core/Devices/IVolumeAndAudioInterfaces.cs index 6e1004d7..33c02d74 100644 --- a/src/PepperDash.Essentials.Core/Devices/IVolumeAndAudioInterfaces.cs +++ b/src/PepperDash.Essentials.Core/Devices/IVolumeAndAudioInterfaces.cs @@ -1,7 +1,9 @@ -using System; +using PepperDash.Essentials.Core.Feedbacks; +using PepperDash.Essentials.Core.Routing; +using System; using System.Collections.Generic; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Devices { /// /// Defines minimal volume and mute control methods diff --git a/src/PepperDash.Essentials.Core/Devices/IrOutputPortController.cs b/src/PepperDash.Essentials.Core/Devices/IrOutputPortController.cs index 0dbea093..4ddbf453 100644 --- a/src/PepperDash.Essentials.Core/Devices/IrOutputPortController.cs +++ b/src/PepperDash.Essentials.Core/Devices/IrOutputPortController.cs @@ -4,14 +4,11 @@ using System; using Crestron.SimplSharpPro; using Newtonsoft.Json.Linq; using PepperDash.Essentials.Core.Config; - - -using PepperDash.Core; using Serilog.Events; using System.IO; -using PepperDash.Core.Logging; +using PepperDash.Essentials.Core.Feedbacks; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Devices { /// diff --git a/src/PepperDash.Essentials.Core/Devices/LevelControlListItem.cs b/src/PepperDash.Essentials.Core/Devices/LevelControlListItem.cs index f6334f43..23ad1a02 100644 --- a/src/PepperDash.Essentials.Core/Devices/LevelControlListItem.cs +++ b/src/PepperDash.Essentials.Core/Devices/LevelControlListItem.cs @@ -1,9 +1,8 @@ using System; using System.Linq; using Newtonsoft.Json; -using PepperDash.Core; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Devices { /// /// Represents a level control item in a list, which can be used to control volume or mute functionality. diff --git a/src/PepperDash.Essentials.Core/Devices/PduInterfaces.cs b/src/PepperDash.Essentials.Core/Devices/PduInterfaces.cs index 36ae81e9..b760012f 100644 --- a/src/PepperDash.Essentials.Core/Devices/PduInterfaces.cs +++ b/src/PepperDash.Essentials.Core/Devices/PduInterfaces.cs @@ -1,5 +1,5 @@ using Crestron.SimplSharp; -using PepperDash.Core; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; namespace PepperDash.Essentials.Core.Devices { diff --git a/src/PepperDash.Essentials.Core/Devices/PowerInterfaces.cs b/src/PepperDash.Essentials.Core/Devices/PowerInterfaces.cs index e09a002d..ec7e19c4 100644 --- a/src/PepperDash.Essentials.Core/Devices/PowerInterfaces.cs +++ b/src/PepperDash.Essentials.Core/Devices/PowerInterfaces.cs @@ -1,7 +1,8 @@ using Crestron.SimplSharp; -using PepperDash.Core; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; +using PepperDash.Essentials.Core.Feedbacks; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Devices { /// /// Defines the contract for IHasBatteryStats diff --git a/src/PepperDash.Essentials.Core/Devices/PresentationDeviceType.cs b/src/PepperDash.Essentials.Core/Devices/PresentationDeviceType.cs index ae9e5f30..0d735e88 100644 --- a/src/PepperDash.Essentials.Core/Devices/PresentationDeviceType.cs +++ b/src/PepperDash.Essentials.Core/Devices/PresentationDeviceType.cs @@ -1,4 +1,4 @@ -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Devices { /// /// Enumeration of PresentationSourceType values diff --git a/src/PepperDash.Essentials.Core/Devices/PresetListItem.cs b/src/PepperDash.Essentials.Core/Devices/PresetListItem.cs index f03fe3e0..926b1b3f 100644 --- a/src/PepperDash.Essentials.Core/Devices/PresetListItem.cs +++ b/src/PepperDash.Essentials.Core/Devices/PresetListItem.cs @@ -1,8 +1,7 @@ using Newtonsoft.Json; -using PepperDash.Core; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Devices { /// /// Represents a PresetListItem diff --git a/src/PepperDash.Essentials.Core/Devices/ProcessorExtensionDeviceFactory.cs b/src/PepperDash.Essentials.Core/Devices/ProcessorExtensionDeviceFactory.cs index 8549fd38..c44de801 100644 --- a/src/PepperDash.Essentials.Core/Devices/ProcessorExtensionDeviceFactory.cs +++ b/src/PepperDash.Essentials.Core/Devices/ProcessorExtensionDeviceFactory.cs @@ -1,8 +1,9 @@ using System; using System.Collections.Generic; using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Factory; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Devices { /// /// Represents a factory for creating processor extension devices. @@ -25,7 +26,7 @@ namespace PepperDash.Essentials.Core { foreach (var typeName in TypeNames) { - string description = typeof(T).GetCustomAttributes(typeof(DescriptionAttribute), true) is DescriptionAttribute[] descriptionAttribute && descriptionAttribute.Length > 0 + var description = typeof(T).GetCustomAttributes(typeof(DescriptionAttribute), true) is DescriptionAttribute[] descriptionAttribute && descriptionAttribute.Length > 0 ? descriptionAttribute[0].Description : "No description available"; diff --git a/src/PepperDash.Essentials.Core/Devices/ReconfigurableDevice.cs b/src/PepperDash.Essentials.Core/Devices/ReconfigurableDevice.cs index 428b381f..a04be8b0 100644 --- a/src/PepperDash.Essentials.Core/Devices/ReconfigurableDevice.cs +++ b/src/PepperDash.Essentials.Core/Devices/ReconfigurableDevice.cs @@ -4,6 +4,7 @@ using System; using Crestron.SimplSharpPro.DeviceSupport; using PepperDash.Essentials.Core.Bridges; using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Config.Essentials; namespace PepperDash.Essentials.Core.Devices { diff --git a/src/PepperDash.Essentials.Core/Devices/SmartObjectBaseTypes.cs b/src/PepperDash.Essentials.Core/Devices/SmartObjectBaseTypes.cs index 48020690..82f87956 100644 --- a/src/PepperDash.Essentials.Core/Devices/SmartObjectBaseTypes.cs +++ b/src/PepperDash.Essentials.Core/Devices/SmartObjectBaseTypes.cs @@ -1,5 +1,4 @@ - -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Devices { /// /// Represents a SmartObjectJoinOffsets diff --git a/src/PepperDash.Essentials.Core/Devices/SourceListItem.cs b/src/PepperDash.Essentials.Core/Devices/SourceListItem.cs index d171b3d9..537e838d 100644 --- a/src/PepperDash.Essentials.Core/Devices/SourceListItem.cs +++ b/src/PepperDash.Essentials.Core/Devices/SourceListItem.cs @@ -2,9 +2,9 @@ using System.Collections.Generic; using Newtonsoft.Json; using Newtonsoft.Json.Converters; -using PepperDash.Core; +using PepperDash.Essentials.Core.Routing; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Devices { /// /// Defines the type of source list item, which can be a route, off, or other. diff --git a/src/PepperDash.Essentials.Core/Devices/VolumeDeviceChangeEventArgs.cs b/src/PepperDash.Essentials.Core/Devices/VolumeDeviceChangeEventArgs.cs index 9089ee51..6e546d47 100644 --- a/src/PepperDash.Essentials.Core/Devices/VolumeDeviceChangeEventArgs.cs +++ b/src/PepperDash.Essentials.Core/Devices/VolumeDeviceChangeEventArgs.cs @@ -1,6 +1,6 @@ using System; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Devices { /// /// diff --git a/src/PepperDash.Essentials.Core/Ethernet/EthernetStatistics.cs b/src/PepperDash.Essentials.Core/Ethernet/EthernetStatistics.cs index ea73a2d9..13c7e6dc 100644 --- a/src/PepperDash.Essentials.Core/Ethernet/EthernetStatistics.cs +++ b/src/PepperDash.Essentials.Core/Ethernet/EthernetStatistics.cs @@ -1,4 +1,5 @@ using Crestron.SimplSharp; +using PepperDash.Essentials.Core.Feedbacks; namespace PepperDash.Essentials.Core.Ethernet { diff --git a/src/PepperDash.Essentials.Core/Extensions/IpAddressExtensions.cs b/src/PepperDash.Essentials.Core/Extensions/IpAddressExtensions.cs index 42bd859c..a20be449 100644 --- a/src/PepperDash.Essentials.Core/Extensions/IpAddressExtensions.cs +++ b/src/PepperDash.Essentials.Core/Extensions/IpAddressExtensions.cs @@ -1,7 +1,7 @@ using System; using System.Net; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Extensions { /// /// Extensions for IPAddress to provide additional functionality such as getting broadcast address, network address, and checking if two addresses are in the same subnet. @@ -20,16 +20,16 @@ namespace PepperDash.Essentials.Core /// public static IPAddress GetBroadcastAddress(this IPAddress address, IPAddress subnetMask) { - byte[] ipAdressBytes = address.GetAddressBytes(); - byte[] subnetMaskBytes = subnetMask.GetAddressBytes(); + var ipAdressBytes = address.GetAddressBytes(); + var subnetMaskBytes = subnetMask.GetAddressBytes(); if (ipAdressBytes.Length != subnetMaskBytes.Length) throw new ArgumentException("Lengths of IP address and subnet mask do not match."); - byte[] broadcastAddress = new byte[ipAdressBytes.Length]; - for (int i = 0; i < broadcastAddress.Length; i++) + var broadcastAddress = new byte[ipAdressBytes.Length]; + for (var i = 0; i < broadcastAddress.Length; i++) { - broadcastAddress[i] = (byte)(ipAdressBytes[i] | (subnetMaskBytes[i] ^ 255)); + broadcastAddress[i] = (byte)(ipAdressBytes[i] | subnetMaskBytes[i] ^ 255); } return new IPAddress(broadcastAddress); } @@ -46,16 +46,16 @@ namespace PepperDash.Essentials.Core /// public static IPAddress GetNetworkAddress(this IPAddress address, IPAddress subnetMask) { - byte[] ipAdressBytes = address.GetAddressBytes(); - byte[] subnetMaskBytes = subnetMask.GetAddressBytes(); + var ipAdressBytes = address.GetAddressBytes(); + var subnetMaskBytes = subnetMask.GetAddressBytes(); if (ipAdressBytes.Length != subnetMaskBytes.Length) throw new ArgumentException("Lengths of IP address and subnet mask do not match."); - byte[] broadcastAddress = new byte[ipAdressBytes.Length]; - for (int i = 0; i < broadcastAddress.Length; i++) + var broadcastAddress = new byte[ipAdressBytes.Length]; + for (var i = 0; i < broadcastAddress.Length; i++) { - broadcastAddress[i] = (byte)(ipAdressBytes[i] & (subnetMaskBytes[i])); + broadcastAddress[i] = (byte)(ipAdressBytes[i] & subnetMaskBytes[i]); } return new IPAddress(broadcastAddress); } @@ -73,8 +73,8 @@ namespace PepperDash.Essentials.Core /// public static bool IsInSameSubnet(this IPAddress address2, IPAddress address, IPAddress subnetMask) { - IPAddress network1 = address.GetNetworkAddress(subnetMask); - IPAddress network2 = address2.GetNetworkAddress(subnetMask); + var network1 = address.GetNetworkAddress(subnetMask); + var network2 = address2.GetNetworkAddress(subnetMask); return network1.Equals(network2); } diff --git a/src/PepperDash.Essentials.Core/Extensions/JsonExtensions.cs b/src/PepperDash.Essentials.Core/Extensions/JsonExtensions.cs index 0ef50125..94a38f25 100644 --- a/src/PepperDash.Essentials.Core/Extensions/JsonExtensions.cs +++ b/src/PepperDash.Essentials.Core/Extensions/JsonExtensions.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Newtonsoft.Json.Linq; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Extensions { public static class JsonExtensions { @@ -10,7 +10,7 @@ namespace PepperDash.Essentials.Core /// public static List FindTokens(this JToken containerToken, string name) { - List matches = new List(); + var matches = new List(); FindTokens(containerToken, name, matches); return matches; } @@ -19,7 +19,7 @@ namespace PepperDash.Essentials.Core { if (containerToken.Type == JTokenType.Object) { - foreach (JProperty child in containerToken.Children()) + foreach (var child in containerToken.Children()) { if (child.Name == name) { @@ -30,7 +30,7 @@ namespace PepperDash.Essentials.Core } else if (containerToken.Type == JTokenType.Array) { - foreach (JToken child in containerToken.Children()) + foreach (var child in containerToken.Children()) { FindTokens(child, name, matches); } diff --git a/src/PepperDash.Essentials.Core/Extensions/StringExtensions.cs b/src/PepperDash.Essentials.Core/Extensions/StringExtensions.cs index 9c670c60..c25ad9b9 100644 --- a/src/PepperDash.Essentials.Core/Extensions/StringExtensions.cs +++ b/src/PepperDash.Essentials.Core/Extensions/StringExtensions.cs @@ -1,6 +1,6 @@ using System; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Extensions { public static class StringExtensions { diff --git a/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs b/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs index b723f6c9..2a30ef80 100644 --- a/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs +++ b/src/PepperDash.Essentials.Core/Factory/DeviceFactory.cs @@ -7,11 +7,13 @@ using System.Linq; using System.Reflection; using Crestron.SimplSharp; using Newtonsoft.Json.Linq; -using PepperDash.Core; using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Plugins; +using PepperDash.Essentials.Core.Secrets; using Serilog.Events; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Factory { /// /// Provides functionality for managing and registering device factories, including loading plugin-based factories and @@ -92,7 +94,7 @@ namespace PepperDash.Essentials.Core { foreach (var typeName in deviceFactory.TypeNames) { - string description = deviceFactory.FactoryType.GetCustomAttributes(typeof(DescriptionAttribute), true) is DescriptionAttribute[] descriptionAttribute && descriptionAttribute.Length > 0 + var description = deviceFactory.FactoryType.GetCustomAttributes(typeof(DescriptionAttribute), true) is DescriptionAttribute[] descriptionAttribute && descriptionAttribute.Length > 0 ? descriptionAttribute[0].Description : "No description available"; diff --git a/src/PepperDash.Essentials.Core/Factory/DeviceFactoryWrapper.cs b/src/PepperDash.Essentials.Core/Factory/DeviceFactoryWrapper.cs index dc1f72d9..1b339808 100644 --- a/src/PepperDash.Essentials.Core/Factory/DeviceFactoryWrapper.cs +++ b/src/PepperDash.Essentials.Core/Factory/DeviceFactoryWrapper.cs @@ -1,10 +1,9 @@ using System; -using PepperDash.Core; using PepperDash.Essentials.Core.Config; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Factory { /// /// Wraps a device factory, providing metadata and a factory method for creating devices. diff --git a/src/PepperDash.Essentials.Core/Factory/IDeviceFactory.cs b/src/PepperDash.Essentials.Core/Factory/IDeviceFactory.cs index b267edf6..d85c9b0e 100644 --- a/src/PepperDash.Essentials.Core/Factory/IDeviceFactory.cs +++ b/src/PepperDash.Essentials.Core/Factory/IDeviceFactory.cs @@ -1,8 +1,9 @@ using System; using System.Collections.Generic; using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Devices; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Factory { /// /// Defines the contract for IDeviceFactory diff --git a/src/PepperDash.Essentials.Core/Factory/IProcessorExtensionDeviceFactory.cs b/src/PepperDash.Essentials.Core/Factory/IProcessorExtensionDeviceFactory.cs index 5bae3182..232c7891 100644 --- a/src/PepperDash.Essentials.Core/Factory/IProcessorExtensionDeviceFactory.cs +++ b/src/PepperDash.Essentials.Core/Factory/IProcessorExtensionDeviceFactory.cs @@ -1,4 +1,4 @@ -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Factory { /// /// Defines the contract for IProcessorExtensionDeviceFactory diff --git a/src/PepperDash.Essentials.Core/Factory/ProcessorExtensionDeviceFactory.cs b/src/PepperDash.Essentials.Core/Factory/ProcessorExtensionDeviceFactory.cs index 02bf1bcd..b2dca3be 100644 --- a/src/PepperDash.Essentials.Core/Factory/ProcessorExtensionDeviceFactory.cs +++ b/src/PepperDash.Essentials.Core/Factory/ProcessorExtensionDeviceFactory.cs @@ -1,13 +1,14 @@  using System.Reflection; -using PepperDash.Core; using PepperDash.Essentials.Core.Config; using Serilog.Events; using System; using System.Collections.Generic; using System.Linq; +using PepperDash.Essentials.Core.Secrets; +using PepperDash.Essentials.Core.Plugins; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Factory { /// @@ -55,7 +56,7 @@ namespace PepperDash.Essentials.Core public static void AddFactoryForType(string extensionName, Func method) { //Debug.LogMessage(LogEventLevel.Debug, "Adding factory method for type '{0}'", typeName); - ProcessorExtensionDeviceFactory.ProcessorExtensionFactoryMethods.Add(extensionName, new DeviceFactoryWrapper() { FactoryMethod = method }); + ProcessorExtensionFactoryMethods.Add(extensionName, new DeviceFactoryWrapper() { FactoryMethod = method }); } public static void AddFactoryForType(string extensionName, string description, Type Type, Func method) @@ -69,7 +70,7 @@ namespace PepperDash.Essentials.Core } var wrapper = new DeviceFactoryWrapper() { Type = Type, Description = description, FactoryMethod = method }; - ProcessorExtensionDeviceFactory.ProcessorExtensionFactoryMethods.Add(extensionName, wrapper); + ProcessorExtensionFactoryMethods.Add(extensionName, wrapper); } private static void CheckForSecrets(IEnumerable obj) @@ -97,7 +98,7 @@ namespace PepperDash.Essentials.Core Debug.LogMessage(LogEventLevel.Debug, "Unable to retrieve secret {0}{1} - Make sure you've added it to the secrets provider", data.Provider, data.Key); - return String.Empty; + return string.Empty; } /// diff --git a/src/PepperDash.Essentials.Core/Factory/ReadyEventArgs.cs b/src/PepperDash.Essentials.Core/Factory/ReadyEventArgs.cs index 27cdcb4d..cc71c081 100644 --- a/src/PepperDash.Essentials.Core/Factory/ReadyEventArgs.cs +++ b/src/PepperDash.Essentials.Core/Factory/ReadyEventArgs.cs @@ -1,6 +1,6 @@ using System; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Factory { /// /// Represents a IsReadyEventArgs diff --git a/src/PepperDash.Essentials.Core/Feedbacks/BoolFeedback.cs b/src/PepperDash.Essentials.Core/Feedbacks/BoolFeedback.cs index 6f791010..d54caeee 100644 --- a/src/PepperDash.Essentials.Core/Feedbacks/BoolFeedback.cs +++ b/src/PepperDash.Essentials.Core/Feedbacks/BoolFeedback.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using Crestron.SimplSharpPro; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Feedbacks { /// /// A Feedback whose output is derived from the return value of a provided Func. @@ -71,7 +71,7 @@ namespace PepperDash.Essentials.Core /// public override void FireUpdate() { - bool newValue = InTestMode ? TestValue : ValueFunc.Invoke(); + var newValue = InTestMode ? TestValue : ValueFunc.Invoke(); if (newValue != _BoolValue) { _BoolValue = newValue; diff --git a/src/PepperDash.Essentials.Core/Feedbacks/BoolFeedbackOneShot.cs b/src/PepperDash.Essentials.Core/Feedbacks/BoolFeedbackOneShot.cs index 566ead9c..2712caa2 100644 --- a/src/PepperDash.Essentials.Core/Feedbacks/BoolFeedbackOneShot.cs +++ b/src/PepperDash.Essentials.Core/Feedbacks/BoolFeedbackOneShot.cs @@ -1,5 +1,5 @@ using Crestron.SimplSharp; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Feedbacks { /// /// Represents a BoolFeedbackPulse diff --git a/src/PepperDash.Essentials.Core/Feedbacks/BoolFeedbackPulseExtender.cs b/src/PepperDash.Essentials.Core/Feedbacks/BoolFeedbackPulseExtender.cs index 2d464664..8d0d466a 100644 --- a/src/PepperDash.Essentials.Core/Feedbacks/BoolFeedbackPulseExtender.cs +++ b/src/PepperDash.Essentials.Core/Feedbacks/BoolFeedbackPulseExtender.cs @@ -1,5 +1,5 @@ using Crestron.SimplSharp; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Feedbacks { /// /// A class that wraps a BoolFeedback with logic that extends it's true state for @@ -50,7 +50,7 @@ namespace PepperDash.Essentials.Core public BoolFeedbackPulseExtender(uint timeoutMs) { TimeoutMs = timeoutMs; - Feedback = new BoolFeedback(() => this.BoolValue); + Feedback = new BoolFeedback(() => BoolValue); } /// diff --git a/src/PepperDash.Essentials.Core/Feedbacks/BoolOutputLogicals.cs b/src/PepperDash.Essentials.Core/Feedbacks/BoolOutputLogicals.cs index fb7bb3e4..7e2c0b33 100644 --- a/src/PepperDash.Essentials.Core/Feedbacks/BoolOutputLogicals.cs +++ b/src/PepperDash.Essentials.Core/Feedbacks/BoolOutputLogicals.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Feedbacks { diff --git a/src/PepperDash.Essentials.Core/Feedbacks/FeedbackBase.cs b/src/PepperDash.Essentials.Core/Feedbacks/FeedbackBase.cs index e856cd6f..a468f3eb 100644 --- a/src/PepperDash.Essentials.Core/Feedbacks/FeedbackBase.cs +++ b/src/PepperDash.Essentials.Core/Feedbacks/FeedbackBase.cs @@ -1,9 +1,7 @@ using System; using Crestron.SimplSharp; -using PepperDash.Core; - -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Feedbacks { /// /// Base class for all feedback types diff --git a/src/PepperDash.Essentials.Core/Feedbacks/FeedbackCollection.cs b/src/PepperDash.Essentials.Core/Feedbacks/FeedbackCollection.cs index 372aae86..5dad41d8 100644 --- a/src/PepperDash.Essentials.Core/Feedbacks/FeedbackCollection.cs +++ b/src/PepperDash.Essentials.Core/Feedbacks/FeedbackCollection.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Feedbacks { /// /// Basically a List , with an indexer to find feedbacks by key name diff --git a/src/PepperDash.Essentials.Core/Feedbacks/FeedbackEventArgs.cs b/src/PepperDash.Essentials.Core/Feedbacks/FeedbackEventArgs.cs index 7e8c8acf..6c2bfd13 100644 --- a/src/PepperDash.Essentials.Core/Feedbacks/FeedbackEventArgs.cs +++ b/src/PepperDash.Essentials.Core/Feedbacks/FeedbackEventArgs.cs @@ -1,6 +1,6 @@ using System; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Feedbacks { /// /// Represents a FeedbackEventArgs diff --git a/src/PepperDash.Essentials.Core/Feedbacks/IntFeedback.cs b/src/PepperDash.Essentials.Core/Feedbacks/IntFeedback.cs index 42152597..ecd1e9b5 100644 --- a/src/PepperDash.Essentials.Core/Feedbacks/IntFeedback.cs +++ b/src/PepperDash.Essentials.Core/Feedbacks/IntFeedback.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using Crestron.SimplSharpPro; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Feedbacks { /// /// Represents a IntFeedback diff --git a/src/PepperDash.Essentials.Core/Feedbacks/SerialFeedback.cs b/src/PepperDash.Essentials.Core/Feedbacks/SerialFeedback.cs index 29163005..7082719c 100644 --- a/src/PepperDash.Essentials.Core/Feedbacks/SerialFeedback.cs +++ b/src/PepperDash.Essentials.Core/Feedbacks/SerialFeedback.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using Crestron.SimplSharpPro; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Feedbacks { /// /// To be used for serial data feedback where the event chain / asynchronicity must be maintained diff --git a/src/PepperDash.Essentials.Core/Feedbacks/StringFeedback.cs b/src/PepperDash.Essentials.Core/Feedbacks/StringFeedback.cs index 4698f836..4a99b685 100644 --- a/src/PepperDash.Essentials.Core/Feedbacks/StringFeedback.cs +++ b/src/PepperDash.Essentials.Core/Feedbacks/StringFeedback.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using Crestron.SimplSharpPro; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Feedbacks { /// diff --git a/src/PepperDash.Essentials.Core/File/FileIO.cs b/src/PepperDash.Essentials.Core/File/FileIO.cs deleted file mode 100644 index 3c2c3302..00000000 --- a/src/PepperDash.Essentials.Core/File/FileIO.cs +++ /dev/null @@ -1,305 +0,0 @@ -using System; -using System.Linq; -using Crestron.SimplSharp; -using Crestron.SimplSharp.CrestronIO; -using PepperDash.Core; -using Crestron.SimplSharpPro.CrestronThread; -using Serilog.Events; - -namespace PepperDash.Essentials.Core -{ - public static class FileIO - { - - static CCriticalSection fileLock = new CCriticalSection(); - /// - /// Delegate for GotFileEventHandler - /// - public delegate void GotFileEventHandler(object sender, FileEventArgs e); - public static event GotFileEventHandler GotFileEvent; - - /// - /// Get the full file info from a path/filename, can include wildcards. - /// - /// - /// - /// - /// GetFiles method - /// - public static FileInfo[] GetFiles(string fileName) - { - string fullFilePath = Global.FilePathPrefix + fileName; - DirectoryInfo dirInfo = new DirectoryInfo(Path.GetDirectoryName(fullFilePath)); - var files = dirInfo.GetFiles(Path.GetFileName(fullFilePath)); - Debug.LogMessage(LogEventLevel.Information, "FileIO found: {0}, {1}", files.Count(), fullFilePath); - if (files.Count() > 0) - { - return files; - } - else - { - return null; - } - } - - /// - /// GetFile method - /// - public static FileInfo GetFile(string fileName) - { - string fullFilePath = Global.FilePathPrefix + fileName; - DirectoryInfo dirInfo = new DirectoryInfo(Path.GetDirectoryName(fullFilePath)); - var files = dirInfo.GetFiles(Path.GetFileName(fullFilePath)); - Debug.LogMessage(LogEventLevel.Information, "FileIO found: {0}, {1}", files.Count(), fullFilePath); - if (files.Count() > 0) - { - return files.FirstOrDefault(); - } - else - { - return null; - } - } - - - /// - /// Get the data from string path/filename - /// - /// - /// - /// - /// ReadDataFromFile method - /// - public static string ReadDataFromFile(string fileName) - { - try - { - return ReadDataFromFile(GetFile(fileName)); - } - catch (Exception e) - { - Debug.LogMessage(LogEventLevel.Information, "Error: FileIO read failed: \r{0}", e); - return ""; - } - } - - /// - /// Get the data with fileInfo object - /// - /// - /// - /// - /// ReadDataFromFile method - /// - public static string ReadDataFromFile(FileInfo file) - { - try - { - if (fileLock.TryEnter()) - { - DirectoryInfo dirInfo = new DirectoryInfo(file.DirectoryName); - Debug.LogMessage(LogEventLevel.Verbose, "FileIO Getting Data {0}", file.FullName); - - if (File.Exists(file.FullName)) - { - using (StreamReader r = new StreamReader(file.FullName)) - { - return r.ReadToEnd(); - } - } - else - { - Debug.LogMessage(LogEventLevel.Verbose, "File {0} does not exsist", file.FullName); - return ""; - } - } - else - { - Debug.LogMessage(LogEventLevel.Information, "FileIO Unable to enter FileLock"); - return ""; - } - - } - catch (Exception e) - { - Debug.LogMessage(LogEventLevel.Information, "Error: FileIO read failed: \r{0}", e); - return ""; - } - finally - { - if (fileLock != null && !fileLock.Disposed) - fileLock.Leave(); - - } - } - - - /// - /// ReadDataFromFileASync method - /// - public static void ReadDataFromFileASync(string fileName) - { - try - { - ReadDataFromFileASync(GetFile(fileName)); - } - catch (Exception e) - { - Debug.LogMessage(LogEventLevel.Information, "Error: FileIO read failed: \r{0}", e); - } - } - - /// - /// ReadDataFromFileASync method - /// - public static void ReadDataFromFileASync(FileInfo file) - { - try - { - CrestronInvoke.BeginInvoke(o => _ReadDataFromFileASync(file)); - } - catch (Exception e) - { - Debug.LogMessage(LogEventLevel.Information, "Error: FileIO read failed: \r{0}", e); - } - } - - private static void _ReadDataFromFileASync(FileInfo file) - { - string data; - try - { - if (fileLock.TryEnter()) - { - DirectoryInfo dirInfo = new DirectoryInfo(file.Name); - Debug.LogMessage(LogEventLevel.Verbose, "FileIO Getting Data {0}", file.FullName); - - - if (File.Exists(file.FullName)) - { - using (StreamReader r = new StreamReader(file.FullName)) - { - data = r.ReadToEnd(); - } - } - else - { - Debug.LogMessage(LogEventLevel.Verbose, "File {0} Does not exsist", file.FullName); - data = ""; - } - GotFileEvent.Invoke(null, new FileEventArgs(data)); - } - else - { - Debug.LogMessage(LogEventLevel.Information, "FileIO Unable to enter FileLock"); - } - - } - catch (Exception e) - { - Debug.LogMessage(LogEventLevel.Information, "Error: FileIO read failed: \r{0}", e); - data = ""; - } - finally - { - if (fileLock != null && !fileLock.Disposed) - fileLock.Leave(); - - } - - - - } - - /// - /// - /// - /// - /// - public static void WriteDataToFile(string data, string filePath) - { - Thread _WriteFileThread; - _WriteFileThread = new Thread((O) => _WriteFileMethod(data, Global.FilePathPrefix + "/" + filePath), null, Thread.eThreadStartOptions.CreateSuspended); - _WriteFileThread.Priority = Thread.eThreadPriority.LowestPriority; - _WriteFileThread.Start(); - Debug.LogMessage(LogEventLevel.Information, "New WriteFile Thread"); - - } - - static object _WriteFileMethod(string data, string filePath) - { - Debug.LogMessage(LogEventLevel.Information, "Attempting to write file: '{0}'", filePath); - - try - { - if (fileLock.TryEnter()) - { - - using (StreamWriter sw = new StreamWriter(filePath)) - { - sw.Write(data); - sw.Flush(); - } - - } - else - { - Debug.LogMessage(LogEventLevel.Information, "FileIO Unable to enter FileLock"); - } - - } - catch (Exception e) - { - Debug.LogMessage(LogEventLevel.Error, "Error: FileIO write failed: \r{0}", e); - } - finally - { - if (fileLock != null && !fileLock.Disposed) - fileLock.Leave(); - - } - return null; - - } - - /// - /// - /// - /// - /// - /// FileIoUnitTest method - /// - public static bool FileIoUnitTest() - { - var testData = "Testing FileIO"; - FileIO.WriteDataToFile(testData, "\\user\\FileIOTest.pdt"); - - var file = FileIO.GetFile("\\user\\*FileIOTest*"); - - var readData = FileIO.ReadDataFromFile(file); - Debug.LogMessage(LogEventLevel.Information, "Returned {0}", readData); - File.Delete(file.FullName); - if (testData == readData) - { - return true; - } - else - { - return false; - } - } - - } - /// - /// Represents a FileEventArgs - /// - public class FileEventArgs - { - public FileEventArgs(string data) { Data = data; } - /// - /// Gets or sets the Data - /// - public string Data { get; private set; } // readonly - - } -} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Fusion/EssentialsHuddleSpaceFusionSystemControllerBase.cs b/src/PepperDash.Essentials.Core/Fusion/EssentialsHuddleSpaceFusionSystemControllerBase.cs index e2638493..5ea4c1ad 100644 --- a/src/PepperDash.Essentials.Core/Fusion/EssentialsHuddleSpaceFusionSystemControllerBase.cs +++ b/src/PepperDash.Essentials.Core/Fusion/EssentialsHuddleSpaceFusionSystemControllerBase.cs @@ -7,9 +7,15 @@ using Crestron.SimplSharp.CrestronXml.Serialization; using Crestron.SimplSharpPro; using Crestron.SimplSharpPro.Fusion; using Newtonsoft.Json; -using PepperDash.Core; -using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Config.Essentials; +using PepperDash.Essentials.Core.Devices; using PepperDash.Essentials.Core.DeviceTypeInterfaces; +using PepperDash.Essentials.Core.Feedbacks; +using PepperDash.Essentials.Core.JoinMaps; +using PepperDash.Essentials.Core.Monitoring; +using PepperDash.Essentials.Core.Rooms; +using PepperDash.Essentials.Core.Routing; +using PepperDash.Essentials.Core.Touchpanels; using Serilog.Events; using System; using System.Collections.Generic; diff --git a/src/PepperDash.Essentials.Core/Fusion/EssentialsHuddleSpaceRoomFusionRoomJoinMap.cs b/src/PepperDash.Essentials.Core/Fusion/EssentialsHuddleSpaceRoomFusionRoomJoinMap.cs index 9c5f407b..b24d3dd0 100644 --- a/src/PepperDash.Essentials.Core/Fusion/EssentialsHuddleSpaceRoomFusionRoomJoinMap.cs +++ b/src/PepperDash.Essentials.Core/Fusion/EssentialsHuddleSpaceRoomFusionRoomJoinMap.cs @@ -1,4 +1,5 @@ -using System; +using PepperDash.Essentials.Core.JoinMaps; +using System; namespace PepperDash.Essentials.Core.Fusion diff --git a/src/PepperDash.Essentials.Core/Fusion/FusionCustomPropertiesBridge.cs b/src/PepperDash.Essentials.Core/Fusion/FusionCustomPropertiesBridge.cs index 7de7096d..91f04d7a 100644 --- a/src/PepperDash.Essentials.Core/Fusion/FusionCustomPropertiesBridge.cs +++ b/src/PepperDash.Essentials.Core/Fusion/FusionCustomPropertiesBridge.cs @@ -4,9 +4,8 @@ using System; using System.Linq; using Newtonsoft.Json; using Newtonsoft.Json.Linq; - -using PepperDash.Core; using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Rooms; using Serilog.Events; namespace PepperDash.Essentials.Core.Fusion diff --git a/src/PepperDash.Essentials.Core/Fusion/FusionProcessorQueries.cs b/src/PepperDash.Essentials.Core/Fusion/FusionProcessorQueries.cs index 809a884e..d39bd209 100644 --- a/src/PepperDash.Essentials.Core/Fusion/FusionProcessorQueries.cs +++ b/src/PepperDash.Essentials.Core/Fusion/FusionProcessorQueries.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using Crestron.SimplSharp; -using PepperDash.Core; using Serilog.Events; namespace PepperDash.Essentials.Core.Fusion diff --git a/src/PepperDash.Essentials.Core/Fusion/FusionRviDataClasses.cs b/src/PepperDash.Essentials.Core/Fusion/FusionRviDataClasses.cs index a7f83b06..e2615ed8 100644 --- a/src/PepperDash.Essentials.Core/Fusion/FusionRviDataClasses.cs +++ b/src/PepperDash.Essentials.Core/Fusion/FusionRviDataClasses.cs @@ -1,8 +1,6 @@ using System; using System.Collections.Generic; using Crestron.SimplSharpPro.Fusion; - -using PepperDash.Core; using Serilog.Events; namespace PepperDash.Essentials.Core.Fusion diff --git a/src/PepperDash.Essentials.Core/Global/Global.cs b/src/PepperDash.Essentials.Core/Global.cs similarity index 96% rename from src/PepperDash.Essentials.Core/Global/Global.cs rename to src/PepperDash.Essentials.Core/Global.cs index 8094cd15..d3c0648c 100644 --- a/src/PepperDash.Essentials.Core/Global/Global.cs +++ b/src/PepperDash.Essentials.Core/Global.cs @@ -9,10 +9,8 @@ using System.Collections.Generic; using Crestron.SimplSharp.CrestronDataStore; using Crestron.SimplSharpPro; using Crestron.SimplSharpPro.DM; - -using PepperDash.Core; -using PepperDash.Essentials.License; using Serilog.Events; +using PepperDash.Essentials.Core.License; namespace PepperDash.Essentials.Core @@ -196,7 +194,7 @@ namespace PepperDash.Essentials.Core var versionMatch = developmentVersions.FirstOrDefault(x => x == AssemblyVersion); - if (String.IsNullOrEmpty(versionMatch)) + if (string.IsNullOrEmpty(versionMatch)) { Debug.LogMessage(LogEventLevel.Information, "Essentials Build does not match any builds required for plugin load. Bypassing Plugin Load."); return false; @@ -218,7 +216,7 @@ namespace PepperDash.Essentials.Core { Debug.LogMessage(LogEventLevel.Verbose, "Comparing running version '{0}' to minimum version '{1}'", AssemblyVersion, minimumVersion); - if (String.IsNullOrEmpty(minimumVersion)) + if (string.IsNullOrEmpty(minimumVersion)) { Debug.LogMessage(LogEventLevel.Information,"Plugin does not specify a minimum version. Loading plugin may not work as expected. Proceeding with loading plugin"); return true; @@ -226,9 +224,9 @@ namespace PepperDash.Essentials.Core var runtimeVersion = Regex.Match(AssemblyVersion, @"^(\d*).(\d*).(\d*).*"); - var runtimeVersionMajor = Int16.Parse(runtimeVersion.Groups[1].Value); - var runtimeVersionMinor = Int16.Parse(runtimeVersion.Groups[2].Value); - var runtimeVersionBuild = Int16.Parse(runtimeVersion.Groups[3].Value); + var runtimeVersionMajor = short.Parse(runtimeVersion.Groups[1].Value); + var runtimeVersionMinor = short.Parse(runtimeVersion.Groups[2].Value); + var runtimeVersionBuild = short.Parse(runtimeVersion.Groups[3].Value); var runtimeVer = new Version(runtimeVersionMajor, runtimeVersionMinor, runtimeVersionBuild); diff --git a/src/PepperDash.Essentials.Core/Global/EthernetAdapterInfo.cs b/src/PepperDash.Essentials.Core/Global/EthernetAdapterInfo.cs index 39904ec0..2e92977e 100644 --- a/src/PepperDash.Essentials.Core/Global/EthernetAdapterInfo.cs +++ b/src/PepperDash.Essentials.Core/Global/EthernetAdapterInfo.cs @@ -1,6 +1,6 @@ using Crestron.SimplSharp; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Global { /// /// Represents a EthernetAdapterInfo diff --git a/src/PepperDash.Essentials.Core/Global/JobTimer.cs b/src/PepperDash.Essentials.Core/Global/JobTimer.cs index 92350dc8..13fac9a5 100644 --- a/src/PepperDash.Essentials.Core/Global/JobTimer.cs +++ b/src/PepperDash.Essentials.Core/Global/JobTimer.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using Crestron.SimplSharp; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Global { public static class JobTimer { diff --git a/src/PepperDash.Essentials.Core/Global/Scheduler.cs b/src/PepperDash.Essentials.Core/Global/Scheduler.cs index 2096ce28..28aa1a6b 100644 --- a/src/PepperDash.Essentials.Core/Global/Scheduler.cs +++ b/src/PepperDash.Essentials.Core/Global/Scheduler.cs @@ -2,12 +2,10 @@ using System.Collections.Generic; using Crestron.SimplSharp; using Crestron.SimplSharp.Scheduler; - -using PepperDash.Core; -using PepperDash.Essentials.Room.Config; +using PepperDash.Essentials.Core.Global; using Serilog.Events; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Global { /// /// Global Scheduler for the system @@ -155,7 +153,7 @@ Recurrence Days: {evt.Value.Recurrence.RecurrenceDays} /// public static bool CheckIfDayOfWeekMatchesRecurrenceDays(DateTime eventTime, ScheduledEventCommon.eWeekDays recurrence) { - bool isMatch = false; + var isMatch = false; var dayOfWeek = eventTime.DayOfWeek; diff --git a/src/PepperDash.Essentials.Core/IKeyName.cs b/src/PepperDash.Essentials.Core/IKeyName.cs new file mode 100644 index 00000000..c1009fd8 --- /dev/null +++ b/src/PepperDash.Essentials.Core/IKeyName.cs @@ -0,0 +1,18 @@ +using Newtonsoft.Json; + +namespace PepperDash.Essentials.Core +{ + + /// + /// Named Keyed device interface. Forces the device to have a Unique Key and a name. + /// + public interface IKeyName : IKeyed + { + /// + /// Isn't it obvious :) + /// + [JsonProperty("name")] + string Name { get; } + } + +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/IKeyed.cs b/src/PepperDash.Essentials.Core/IKeyed.cs new file mode 100644 index 00000000..6d3a6405 --- /dev/null +++ b/src/PepperDash.Essentials.Core/IKeyed.cs @@ -0,0 +1,17 @@ +using Newtonsoft.Json; + +namespace PepperDash.Essentials.Core +{ + /// + /// Unique key interface to require a unique key for the class + /// + public interface IKeyed + { + /// + /// Unique Key + /// + [JsonProperty("key")] + string Key { get; } + } + +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Interfaces/ILogStrings.cs b/src/PepperDash.Essentials.Core/Interfaces/ILogStrings.cs index dfeb90bb..25d89eeb 100644 --- a/src/PepperDash.Essentials.Core/Interfaces/ILogStrings.cs +++ b/src/PepperDash.Essentials.Core/Interfaces/ILogStrings.cs @@ -1,6 +1,4 @@ -using PepperDash.Core; - -namespace PepperDash.Essentials.Core.Interfaces +namespace PepperDash.Essentials.Core.Interfaces { /// /// Defines the contract for ILogStrings diff --git a/src/PepperDash.Essentials.Core/Interfaces/ILogStringsWithLevel.cs b/src/PepperDash.Essentials.Core/Interfaces/ILogStringsWithLevel.cs index 25700051..25c8636a 100644 --- a/src/PepperDash.Essentials.Core/Interfaces/ILogStringsWithLevel.cs +++ b/src/PepperDash.Essentials.Core/Interfaces/ILogStringsWithLevel.cs @@ -1,6 +1,4 @@ -using PepperDash.Core; - -namespace PepperDash.Essentials.Core.Interfaces +namespace PepperDash.Essentials.Core.Interfaces { /// /// Defines the contract for ILogStringsWithLevel diff --git a/src/PepperDash.Essentials.Core/JoinMaps/JoinMapBase.cs b/src/PepperDash.Essentials.Core/JoinMaps/JoinMapBase.cs index 01f71098..3efae41b 100644 --- a/src/PepperDash.Essentials.Core/JoinMaps/JoinMapBase.cs +++ b/src/PepperDash.Essentials.Core/JoinMaps/JoinMapBase.cs @@ -9,13 +9,12 @@ using System.Reflection; using Crestron.SimplSharp.CrestronIO; using Crestron.SimplSharp; -using PepperDash.Core; -using PepperDash.Essentials.Core.Config; - using Newtonsoft.Json; using Serilog.Events; +using PepperDash.Essentials.Core.Extensions; +using PepperDash.Essentials.Core.Config.Essentials; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.JoinMaps { public static class JoinMapHelper { @@ -175,7 +174,7 @@ namespace PepperDash.Essentials.Core Joins.Where(j => j.Value.Metadata.JoinType.HasFlag(eJoinType.Serial)) .ToDictionary(j => j.Key, j => j.Value); - Debug.LogMessage(Serilog.Events.LogEventLevel.Debug, "Digital join count {digitalCount} Analog join count {analogCount} Serial join count {serialCount}", null, digitals.Count, analogs.Count, serials.Count); + Debug.LogMessage(LogEventLevel.Debug, "Digital join count {digitalCount} Analog join count {analogCount} Serial join count {serialCount}", null, digitals.Count, analogs.Count, serials.Count); // Get the joins of each type and print them sb.Append($"# {GetType().Name}\r\n"); @@ -483,7 +482,7 @@ namespace PepperDash.Essentials.Core errorKey = item.Key; break; } - Debug.LogMessage(LogEventLevel.Information, "Unable to decode join metadata {1}- {0}", e.Message, !string.IsNullOrEmpty(errorKey) ? (' ' + errorKey) : string.Empty); + Debug.LogMessage(LogEventLevel.Information, "Unable to decode join metadata {1}- {0}", e.Message, !string.IsNullOrEmpty(errorKey) ? ' ' + errorKey : string.Empty); return string.Format(stringFormatter, dataArray["joinNumber"], dataArray["joinSpan"], diff --git a/src/PepperDash.Essentials.Core/License/EssentialsLicenseManager.cs b/src/PepperDash.Essentials.Core/License/EssentialsLicenseManager.cs index d845dada..5227e700 100644 --- a/src/PepperDash.Essentials.Core/License/EssentialsLicenseManager.cs +++ b/src/PepperDash.Essentials.Core/License/EssentialsLicenseManager.cs @@ -1,14 +1,11 @@ using System; using Crestron.SimplSharp; using Crestron.SimplSharp.CrestronDataStore; - -using PepperDash.Essentials.Core; - -using PepperDash.Core; +using PepperDash.Essentials.Core.Feedbacks; using Serilog.Events; -namespace PepperDash.Essentials.License +namespace PepperDash.Essentials.Core.License { public abstract class LicenseManager { diff --git a/src/PepperDash.Essentials.Core/Lighting/Lighting Interfaces.cs b/src/PepperDash.Essentials.Core/Lighting/Lighting Interfaces.cs index de581681..3b699d84 100644 --- a/src/PepperDash.Essentials.Core/Lighting/Lighting Interfaces.cs +++ b/src/PepperDash.Essentials.Core/Lighting/Lighting Interfaces.cs @@ -1,4 +1,5 @@ -using System; +using PepperDash.Essentials.Core.Feedbacks; +using System; using System.Collections.Generic; namespace PepperDash.Essentials.Core.Lighting diff --git a/src/PepperDash.Essentials.Core/Lighting/LightingScene.cs b/src/PepperDash.Essentials.Core/Lighting/LightingScene.cs index 788dbb35..eaa36013 100644 --- a/src/PepperDash.Essentials.Core/Lighting/LightingScene.cs +++ b/src/PepperDash.Essentials.Core/Lighting/LightingScene.cs @@ -2,6 +2,7 @@ using System; using Newtonsoft.Json; +using PepperDash.Essentials.Core.Feedbacks; namespace PepperDash.Essentials.Core.Lighting { diff --git a/src/PepperDash.Essentials.Core/Monitoring/CrestronGenericBaseCommunicationMonitor.cs b/src/PepperDash.Essentials.Core/Monitoring/CrestronGenericBaseCommunicationMonitor.cs index 0164b39d..c048b32b 100644 --- a/src/PepperDash.Essentials.Core/Monitoring/CrestronGenericBaseCommunicationMonitor.cs +++ b/src/PepperDash.Essentials.Core/Monitoring/CrestronGenericBaseCommunicationMonitor.cs @@ -1,9 +1,7 @@ using Crestron.SimplSharpPro; -using PepperDash.Core; - -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Monitoring { /// /// diff --git a/src/PepperDash.Essentials.Core/Monitoring/GenericCommunicationMonitor.cs b/src/PepperDash.Essentials.Core/Monitoring/GenericCommunicationMonitor.cs index eca013c5..20e2ced7 100644 --- a/src/PepperDash.Essentials.Core/Monitoring/GenericCommunicationMonitor.cs +++ b/src/PepperDash.Essentials.Core/Monitoring/GenericCommunicationMonitor.cs @@ -1,9 +1,8 @@ -using System; -using PepperDash.Core; +using PepperDash.Essentials.Core.Communications; +using System; using System.Threading; -using PepperDash.Core.Logging; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Monitoring { /// /// Used for monitoring comms that are IBasicCommunication. Will send a poll string and provide an event when diff --git a/src/PepperDash.Essentials.Core/Monitoring/Interfaces.cs b/src/PepperDash.Essentials.Core/Monitoring/Interfaces.cs index a4d8d2ae..a0d96b4c 100644 --- a/src/PepperDash.Essentials.Core/Monitoring/Interfaces.cs +++ b/src/PepperDash.Essentials.Core/Monitoring/Interfaces.cs @@ -1,10 +1,8 @@ - +using PepperDash.Essentials.Core.Feedbacks; using System; -using PepperDash.Core; - -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Monitoring { /// /// Defines the contract for IStatusMonitor diff --git a/src/PepperDash.Essentials.Core/Monitoring/StatusMonitorBase.cs b/src/PepperDash.Essentials.Core/Monitoring/StatusMonitorBase.cs index 27050d56..4341e53a 100644 --- a/src/PepperDash.Essentials.Core/Monitoring/StatusMonitorBase.cs +++ b/src/PepperDash.Essentials.Core/Monitoring/StatusMonitorBase.cs @@ -1,10 +1,9 @@ using System; using Crestron.SimplSharp; - -using PepperDash.Core; +using PepperDash.Essentials.Core.Feedbacks; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Monitoring { public abstract class StatusMonitorBase : IStatusMonitor, IKeyName { diff --git a/src/PepperDash.Essentials.Core/Monitoring/StatusMonitorCollection.cs b/src/PepperDash.Essentials.Core/Monitoring/StatusMonitorCollection.cs index 76e57015..8d2d2d97 100644 --- a/src/PepperDash.Essentials.Core/Monitoring/StatusMonitorCollection.cs +++ b/src/PepperDash.Essentials.Core/Monitoring/StatusMonitorCollection.cs @@ -1,12 +1,11 @@ -using System; +using PepperDash.Essentials.Core.Feedbacks; +using System; using System.Collections.Generic; using System.Linq; using System.Text; -using PepperDash.Core; - -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Monitoring { /// /// @@ -60,7 +59,7 @@ namespace PepperDash.Essentials.Core MonitorStatus initialStatus; - string prefix = "0:"; + var prefix = "0:"; if (InError.Count() > 0) { initialStatus = MonitorStatus.InError; @@ -79,7 +78,7 @@ namespace PepperDash.Essentials.Core // Build the error message string if (InError.Count() > 0 || InWarning.Count() > 0) { - StringBuilder sb = new StringBuilder(prefix); + var sb = new StringBuilder(prefix); if (InError.Count() > 0) { // Do string splits and joins diff --git a/src/PepperDash.Essentials.Core/Monitoring/SystemMonitorController.cs b/src/PepperDash.Essentials.Core/Monitoring/SystemMonitorController.cs index a353a072..3a3664d7 100644 --- a/src/PepperDash.Essentials.Core/Monitoring/SystemMonitorController.cs +++ b/src/PepperDash.Essentials.Core/Monitoring/SystemMonitorController.cs @@ -6,10 +6,14 @@ using System.Linq; using Crestron.SimplSharp; using Crestron.SimplSharpPro.DeviceSupport; using Crestron.SimplSharpPro.Diagnostics; -using PepperDash.Core; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using PepperDash.Essentials.Core.Bridges; +using PepperDash.Essentials.Core.Bridges.JoinMaps; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Feedbacks; +using PepperDash.Essentials.Core.JoinMaps; +using PepperDash.Essentials.Core.Touchpanels; using Serilog.Events; namespace PepperDash.Essentials.Core.Monitoring diff --git a/src/PepperDash.Essentials.Core/PartitionSensor/EssentialsPartitionController.cs b/src/PepperDash.Essentials.Core/PartitionSensor/EssentialsPartitionController.cs index f2043dbc..ed06d7e7 100644 --- a/src/PepperDash.Essentials.Core/PartitionSensor/EssentialsPartitionController.cs +++ b/src/PepperDash.Essentials.Core/PartitionSensor/EssentialsPartitionController.cs @@ -1,7 +1,7 @@ -using PepperDash.Core; +using PepperDash.Essentials.Core.Feedbacks; using System.Collections.Generic; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.PartitionSensor { /// /// Represents an abstract controller device for a partition dividing rooms that are combinable diff --git a/src/PepperDash.Essentials.Core/PartitionSensor/IPartitionStateProvider.cs b/src/PepperDash.Essentials.Core/PartitionSensor/IPartitionStateProvider.cs index f41a3f35..f60d5196 100644 --- a/src/PepperDash.Essentials.Core/PartitionSensor/IPartitionStateProvider.cs +++ b/src/PepperDash.Essentials.Core/PartitionSensor/IPartitionStateProvider.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using Newtonsoft.Json; -using PepperDash.Core; +using PepperDash.Essentials.Core.Feedbacks; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.PartitionSensor { /// /// Defines the contract for IPartitionStateProvider diff --git a/src/PepperDash.Essentials.Core/PepperDash.Essentials.Core.csproj b/src/PepperDash.Essentials.Core/PepperDash.Essentials.Core.csproj index e1599edb..335542bf 100644 --- a/src/PepperDash.Essentials.Core/PepperDash.Essentials.Core.csproj +++ b/src/PepperDash.Essentials.Core/PepperDash.Essentials.Core.csproj @@ -1,36 +1,34 @@  - - Debug;Release - - - net8 - true - true - bin\$(Configuration)\ - PepperDash_Essentials_Core - PepperDash.Essentials.Core - PepperDash Essentials Core - PepperDash.Essentials.Core - $(Version) - false - - - full - - - pdbonly - bin\$(Configuration)\PepperDash_Essentials_Core.xml - - - - - - - - - - - - - + + Debug;Release + + + net8 + true + true + bin\$(Configuration)\ + PepperDash.Essentials.Core + PepperDash Essentials Core + PepperDash.Essentials.Core + $(Version) + false + + + full + + + pdbonly + bin\$(Configuration)\PepperDash_Essentials_Core.xml + + + + + + + + + + + + \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/PepperDash_Essentials_Core.csproj.DotSettings b/src/PepperDash.Essentials.Core/PepperDash_Essentials_Core.csproj.DotSettings deleted file mode 100644 index cb991a69..00000000 --- a/src/PepperDash.Essentials.Core/PepperDash_Essentials_Core.csproj.DotSettings +++ /dev/null @@ -1,3 +0,0 @@ - - True - False \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Plugins/IPluginDeviceFactory.cs b/src/PepperDash.Essentials.Core/Plugins/IPluginDeviceFactory.cs index caad4b57..62b6594b 100644 --- a/src/PepperDash.Essentials.Core/Plugins/IPluginDeviceFactory.cs +++ b/src/PepperDash.Essentials.Core/Plugins/IPluginDeviceFactory.cs @@ -1,8 +1,9 @@ +using PepperDash.Essentials.Core.Factory; using System; using System.Collections.Generic; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Plugins { /// /// Defines a class that is capable of loading custom plugin device types diff --git a/src/PepperDash.Essentials.Core/Plugins/PluginLoader.cs b/src/PepperDash.Essentials.Core/Plugins/PluginLoader.cs index a1dd9413..0b7fde42 100644 --- a/src/PepperDash.Essentials.Core/Plugins/PluginLoader.cs +++ b/src/PepperDash.Essentials.Core/Plugins/PluginLoader.cs @@ -5,11 +5,11 @@ using System.Linq; using System.Reflection; using Crestron.SimplSharp; using Newtonsoft.Json; -using PepperDash.Core; -using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Factory; using Serilog.Events; -namespace PepperDash.Essentials +namespace PepperDash.Essentials.Core.Plugins { /// /// Deals with loading plugins at runtime @@ -76,28 +76,28 @@ namespace PepperDash.Essentials foreach (var fi in assemblyFiles.Where(fi => fi.Name.Contains("Essentials") || fi.Name.Contains("PepperDash"))) { - string version = string.Empty; + var version = string.Empty; Assembly assembly = null; switch (fi.Name) { - case ("PepperDashEssentials.dll"): + case "PepperDashEssentials.dll": { version = Global.AssemblyVersion; EssentialsAssembly = new LoadedAssembly(fi.Name, version, assembly); break; } - case ("PepperDash_Essentials_Core.dll"): + case "PepperDash_Essentials_Core.dll": { version = Global.AssemblyVersion; break; } - case ("Essentials Devices Common.dll"): + case "Essentials Devices Common.dll": { version = Global.AssemblyVersion; break; } - case ("PepperDashCore.dll"): + case "PepperDashCore.dll": { Debug.LogMessage(LogEventLevel.Verbose, "Found PepperDash_Core.dll"); version = Debug.PepperDashCoreVersion; @@ -183,7 +183,7 @@ namespace PepperDash.Essentials if (ver != null && ver.Length > 0) { // Get the AssemblyInformationalVersion - AssemblyInformationalVersionAttribute verAttribute = ver[0] as AssemblyInformationalVersionAttribute; + var verAttribute = ver[0] as AssemblyInformationalVersionAttribute; return verAttribute.InformationalVersion; } else @@ -283,7 +283,7 @@ namespace PepperDash.Essentials if (!CheckIfAssemblyLoaded(pluginFile.Name)) { - string filePath = string.Empty; + var filePath = string.Empty; filePath = _loadedPluginsDirectoryPath + Global.DirectorySeparator + pluginFile.Name; @@ -356,7 +356,7 @@ namespace PepperDash.Essentials { if (!CheckIfAssemblyLoaded(tempFile.Name)) { - string filePath = string.Empty; + var filePath = string.Empty; filePath = _loadedPluginsDirectoryPath + Global.DirectorySeparator + tempFile.Name; @@ -523,7 +523,7 @@ namespace PepperDash.Essentials { foreach (var typeName in deviceFactory.TypeNames) { - string description = deviceFactory.FactoryType.GetCustomAttributes(typeof(DescriptionAttribute), true) is DescriptionAttribute[] descriptionAttribute && descriptionAttribute.Length > 0 + var description = deviceFactory.FactoryType.GetCustomAttributes(typeof(DescriptionAttribute), true) is DescriptionAttribute[] descriptionAttribute && descriptionAttribute.Length > 0 ? descriptionAttribute[0].Description : "No description available"; diff --git a/src/PepperDash.Essentials.Core/Presets/DevicePresets.cs b/src/PepperDash.Essentials.Core/Presets/DevicePresets.cs index b2096e67..6adc7cfb 100644 --- a/src/PepperDash.Essentials.Core/Presets/DevicePresets.cs +++ b/src/PepperDash.Essentials.Core/Presets/DevicePresets.cs @@ -6,7 +6,8 @@ using System.Text; using Crestron.SimplSharp; using Crestron.SimplSharp.CrestronIO; using Newtonsoft.Json; -using PepperDash.Core; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; + //using SSMono.IO; using Serilog.Events; diff --git a/src/PepperDash.Essentials.Core/Presets/DevicePresetsView.cs b/src/PepperDash.Essentials.Core/Presets/DevicePresetsView.cs index d2f247b0..7d3e5c8c 100644 --- a/src/PepperDash.Essentials.Core/Presets/DevicePresetsView.cs +++ b/src/PepperDash.Essentials.Core/Presets/DevicePresetsView.cs @@ -1,5 +1,6 @@ using System; using Crestron.SimplSharpPro.DeviceSupport; +using PepperDash.Essentials.Core.SmartObjects.SubpageReferencList; namespace PepperDash.Essentials.Core.Presets { diff --git a/src/PepperDash.Essentials.Core/Presets/PresetsListSubpageReferenceListItem.cs b/src/PepperDash.Essentials.Core/Presets/PresetsListSubpageReferenceListItem.cs index c476cb37..abf738a7 100644 --- a/src/PepperDash.Essentials.Core/Presets/PresetsListSubpageReferenceListItem.cs +++ b/src/PepperDash.Essentials.Core/Presets/PresetsListSubpageReferenceListItem.cs @@ -1,6 +1,5 @@ using System; - -using PepperDash.Core; +using PepperDash.Essentials.Core.SmartObjects.SubpageReferencList; using Serilog.Events; diff --git a/src/PepperDash.Essentials.Core/Microphone Privacy/MicrophonePrivacyController.cs b/src/PepperDash.Essentials.Core/Privacy/MicrophonePrivacyController.cs similarity index 98% rename from src/PepperDash.Essentials.Core/Microphone Privacy/MicrophonePrivacyController.cs rename to src/PepperDash.Essentials.Core/Privacy/MicrophonePrivacyController.cs index cb858399..1dc91b5d 100644 --- a/src/PepperDash.Essentials.Core/Microphone Privacy/MicrophonePrivacyController.cs +++ b/src/PepperDash.Essentials.Core/Privacy/MicrophonePrivacyController.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Generic; using System.Linq; - -using PepperDash.Core; using PepperDash.Essentials.Core.Config; using PepperDash.Essentials.Core.CrestronIO; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Feedbacks; using Serilog.Events; diff --git a/src/PepperDash.Essentials.Core/Microphone Privacy/MicrophonePrivacyControllerConfig.cs b/src/PepperDash.Essentials.Core/Privacy/MicrophonePrivacyControllerConfig.cs similarity index 100% rename from src/PepperDash.Essentials.Core/Microphone Privacy/MicrophonePrivacyControllerConfig.cs rename to src/PepperDash.Essentials.Core/Privacy/MicrophonePrivacyControllerConfig.cs diff --git a/src/PepperDash.Essentials.Core/Queues/ComsMessage.cs b/src/PepperDash.Essentials.Core/Queues/ComsMessage.cs index 1eb3a281..37f33d1a 100644 --- a/src/PepperDash.Essentials.Core/Queues/ComsMessage.cs +++ b/src/PepperDash.Essentials.Core/Queues/ComsMessage.cs @@ -1,5 +1,5 @@ -using System; -using PepperDash.Core; +using PepperDash.Essentials.Core.Communications; +using System; namespace PepperDash.Essentials.Core.Queues { diff --git a/src/PepperDash.Essentials.Core/Queues/GenericQueue.cs b/src/PepperDash.Essentials.Core/Queues/GenericQueue.cs index ab1b53e0..52c888e8 100644 --- a/src/PepperDash.Essentials.Core/Queues/GenericQueue.cs +++ b/src/PepperDash.Essentials.Core/Queues/GenericQueue.cs @@ -2,7 +2,6 @@ using System.Collections.Concurrent; using System.Threading; using Crestron.SimplSharp; -using PepperDash.Core; using Serilog.Events; using Thread = Crestron.SimplSharpPro.CrestronThread.Thread; diff --git a/src/PepperDash.Essentials.Core/Queues/IQueue.cs b/src/PepperDash.Essentials.Core/Queues/IQueue.cs index 502fd0ef..16a60388 100644 --- a/src/PepperDash.Essentials.Core/Queues/IQueue.cs +++ b/src/PepperDash.Essentials.Core/Queues/IQueue.cs @@ -1,5 +1,4 @@ using System; -using PepperDash.Core; namespace PepperDash.Essentials.Core.Queues { diff --git a/src/PepperDash.Essentials.Core/Queues/StringResponseProcessor.cs b/src/PepperDash.Essentials.Core/Queues/StringResponseProcessor.cs index 2f03a9d4..ca5e4246 100644 --- a/src/PepperDash.Essentials.Core/Queues/StringResponseProcessor.cs +++ b/src/PepperDash.Essentials.Core/Queues/StringResponseProcessor.cs @@ -1,6 +1,6 @@ using System; using Crestron.SimplSharp; -using PepperDash.Core; +using PepperDash.Essentials.Core.Communications; namespace PepperDash.Essentials.Core.Queues { diff --git a/src/PepperDash.Essentials.Core/Room/Room.cs b/src/PepperDash.Essentials.Core/Room/Room.cs deleted file mode 100644 index 005733e6..00000000 --- a/src/PepperDash.Essentials.Core/Room/Room.cs +++ /dev/null @@ -1,70 +0,0 @@ -using PepperDash.Core; - - -namespace PepperDash.Essentials.Core -{ - //*************************************************************************************************** - - public abstract class Room : Device, IHasFeedback - { - public abstract BoolFeedback RoomIsOnFeedback { get; protected set; } - public abstract BoolFeedback IsCoolingDownFeedback { get; protected set; } - public abstract BoolFeedback IsWarmingUpFeedback { get; protected set; } - - // In concrete classes, these should be computed from the relevant devices - /// - /// Gets or sets the CooldownTime - /// - /// - public virtual uint CooldownTime { get { return 10000; } } - /// - /// Gets or sets the WarmupTime - /// - /// - public virtual uint WarmupTime { get { return 5000; } } - - /// - /// Gets or sets the Description - /// - public string Description { get; set; } - /// - /// Gets or sets the HelpMessage - /// - public string HelpMessage { get; set; } - - public Room(string key, string name) - : base(key, name) - { - Description = ""; - HelpMessage = ""; - } - - /// - /// RoomOn method - /// - /// - public virtual void RoomOn() { } - - /// - /// RoomOff method - /// - public virtual void RoomOff() { } - - #region IDeviceWithOutputs Members - - public virtual FeedbackCollection Feedbacks - { - get - { - return new FeedbackCollection - { - RoomIsOnFeedback, - IsCoolingDownFeedback, - IsWarmingUpFeedback - }; - } - } - - #endregion - } -} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Room/Behaviours/RoomOnToDefaultSourceWhenOccupied.cs b/src/PepperDash.Essentials.Core/Rooms/Behaviours/RoomOnToDefaultSourceWhenOccupied.cs similarity index 97% rename from src/PepperDash.Essentials.Core/Room/Behaviours/RoomOnToDefaultSourceWhenOccupied.cs rename to src/PepperDash.Essentials.Core/Rooms/Behaviours/RoomOnToDefaultSourceWhenOccupied.cs index 7bc017e0..2956385c 100644 --- a/src/PepperDash.Essentials.Core/Room/Behaviours/RoomOnToDefaultSourceWhenOccupied.cs +++ b/src/PepperDash.Essentials.Core/Rooms/Behaviours/RoomOnToDefaultSourceWhenOccupied.cs @@ -1,16 +1,14 @@ - - -using System; +using System; using System.Collections.Generic; using Crestron.SimplSharp.Scheduler; using Newtonsoft.Json; - -using PepperDash.Core; using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Config.Essentials; using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Feedbacks; using Serilog.Events; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Rooms.Behaviours { /// /// A device that when linked to a room can power the room on when enabled during scheduled hours. @@ -50,7 +48,7 @@ namespace PepperDash.Essentials.Core { PropertiesConfig = JsonConvert.DeserializeObject(config.Properties.ToString()); - FeatureEventGroup = new ScheduledEventGroup(this.Key); + FeatureEventGroup = new ScheduledEventGroup(Key); FeatureEventGroup.RetrieveAllEvents(); @@ -68,7 +66,7 @@ namespace PepperDash.Essentials.Core var fusionRoomKey = PropertiesConfig.RoomKey + "-fusion"; - FusionRoom = DeviceManager.GetDeviceForKey(fusionRoomKey) as Core.Fusion.EssentialsHuddleSpaceFusionSystemControllerBase; + FusionRoom = DeviceManager.GetDeviceForKey(fusionRoomKey) as Fusion.EssentialsHuddleSpaceFusionSystemControllerBase; if (FusionRoom == null) Debug.LogMessage(LogEventLevel.Debug, this, "Unable to get Fusion Room from Device Manager with key: {0}", fusionRoomKey); @@ -205,7 +203,7 @@ namespace PepperDash.Essentials.Core /// bool CheckIfFeatureShouldBeEnabled() { - bool enabled = false; + var enabled = false; if(PropertiesConfig.EnableRoomOnWhenOccupied) { @@ -347,15 +345,15 @@ namespace PepperDash.Essentials.Core Debug.LogMessage(LogEventLevel.Debug, this, "ackHours = {0}, ackMinutes = {1}", ackHours, ackMinutes); - var ackTotalMinutes = ((ackHours * 60) + ackMinutes) - 1; + var ackTotalMinutes = ackHours * 60 + ackMinutes - 1; var ackExpHour = ackTotalMinutes / 60; var ackExpMinutes = ackTotalMinutes % 60; Debug.LogMessage(LogEventLevel.Debug, this, "Acknowledge Expiration Timeout: {0} hours, {1} minutes", ackExpHour, ackExpMinutes); - schEvent.AcknowledgeExpirationTimeout.Hour = (ushort)(ackHours); - schEvent.AcknowledgeExpirationTimeout.Minute = (ushort)(ackExpMinutes); + schEvent.AcknowledgeExpirationTimeout.Hour = (ushort)ackHours; + schEvent.AcknowledgeExpirationTimeout.Minute = (ushort)ackExpMinutes; } /// @@ -365,7 +363,7 @@ namespace PepperDash.Essentials.Core /// bool CheckExistingEventTimeForMatch(ScheduledEvent existingEvent, DateTime newTime) { - bool isMatch = true; + var isMatch = true; // Check to see if hour and minute match if (existingEvent.DateAndTime.Hour != newTime.Hour || existingEvent.DateAndTime.Minute != newTime.Minute) @@ -383,7 +381,7 @@ namespace PepperDash.Essentials.Core /// bool CheckExistingEventRecurrenceForMatch(ScheduledEvent existingEvent, ScheduledEventCommon.eWeekDays eWeekdays) { - bool isMatch = true; + var isMatch = true; // Check to see if recurrence matches if (eWeekdays != existingEvent.Recurrence.RecurrenceDays) @@ -457,7 +455,7 @@ namespace PepperDash.Essentials.Core /// ScheduledEventCommon.eWeekDays CalculateDaysOfWeekRecurrence() { - ScheduledEventCommon.eWeekDays value = new ScheduledEventCommon.eWeekDays(); + var value = new ScheduledEventCommon.eWeekDays(); if (PropertiesConfig.EnableSunday) value = value | ScheduledEventCommon.eWeekDays.Sunday; diff --git a/src/PepperDash.Essentials.Core/Room/Combining/EssentialsRoomCombiner.cs b/src/PepperDash.Essentials.Core/Rooms/Combining/EssentialsRoomCombiner.cs similarity index 98% rename from src/PepperDash.Essentials.Core/Room/Combining/EssentialsRoomCombiner.cs rename to src/PepperDash.Essentials.Core/Rooms/Combining/EssentialsRoomCombiner.cs index a45adb27..d32ac110 100644 --- a/src/PepperDash.Essentials.Core/Room/Combining/EssentialsRoomCombiner.cs +++ b/src/PepperDash.Essentials.Core/Rooms/Combining/EssentialsRoomCombiner.cs @@ -1,6 +1,8 @@ using Crestron.SimplSharp; -using PepperDash.Core; -using PepperDash.Core.Logging; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Feedbacks; +using PepperDash.Essentials.Core.PartitionSensor; +using PepperDash.Essentials.Core.Room.Combining; using Serilog.Events; using System; using System.Collections.Generic; @@ -8,7 +10,7 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Rooms.Combining { /// /// Represents a device that manages room combinations by controlling partitions and scenarios. @@ -486,7 +488,7 @@ namespace PepperDash.Essentials.Core /// properties for the device to be created successfully. /// The device configuration containing the key and properties required to build the device. /// A new instance of initialized with the specified configuration. - public override EssentialsDevice BuildDevice(PepperDash.Essentials.Core.Config.DeviceConfig dc) + public override EssentialsDevice BuildDevice(Core.Config.DeviceConfig dc) { Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new EssentialsRoomCombiner Device"); diff --git a/src/PepperDash.Essentials.Core/Room/Combining/EssentialsRoomCombinerPropertiesConfig.cs b/src/PepperDash.Essentials.Core/Rooms/Combining/EssentialsRoomCombinerPropertiesConfig.cs similarity index 98% rename from src/PepperDash.Essentials.Core/Room/Combining/EssentialsRoomCombinerPropertiesConfig.cs rename to src/PepperDash.Essentials.Core/Rooms/Combining/EssentialsRoomCombinerPropertiesConfig.cs index fec7e380..f651b750 100644 --- a/src/PepperDash.Essentials.Core/Room/Combining/EssentialsRoomCombinerPropertiesConfig.cs +++ b/src/PepperDash.Essentials.Core/Rooms/Combining/EssentialsRoomCombinerPropertiesConfig.cs @@ -1,20 +1,19 @@ using System.Collections.Generic; -using PepperDash.Core; - using Newtonsoft.Json; +using PepperDash.Essentials.Core.Devices; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Rooms.Combining { /// /// Config properties for an EssentialsRoomCombiner device /// public class EssentialsRoomCombinerPropertiesConfig { - /// - /// Gets or sets a value indicating whether the system operates in automatic mode. - /// Some systems don't have partitions sensors, and show shouldn't allow auto mode to be turned on. When this is true in the configuration, - /// auto mode won't be allowed to be turned on. + /// + /// Gets or sets a value indicating whether the system operates in automatic mode. + /// Some systems don't have partitions sensors, and show shouldn't allow auto mode to be turned on. When this is true in the configuration, + /// auto mode won't be allowed to be turned on. /// [JsonProperty("disableAutoMode")] public bool DisableAutoMode { get; set; } @@ -49,8 +48,8 @@ namespace PepperDash.Essentials.Core [JsonProperty("defaultScenarioKey")] public string defaultScenarioKey { get; set; } - /// - /// Gets or sets the debounce time, in seconds, for scenario changes. + /// + /// Gets or sets the debounce time, in seconds, for scenario changes. /// [JsonProperty("scenarioChangeDebounceTimeSeconds")] public int ScenarioChangeDebounceTimeSeconds { get; set; } @@ -61,14 +60,14 @@ namespace PepperDash.Essentials.Core /// public class PartitionConfig : IKeyName { - /// - /// Gets or sets the unique key associated with the object. + /// + /// Gets or sets the unique key associated with the object. /// [JsonProperty("key")] public string Key { get; set; } - /// - /// Gets or sets the name associated with the object. + /// + /// Gets or sets the name associated with the object. /// [JsonProperty("name")] public string Name { get; set; } @@ -91,20 +90,20 @@ namespace PepperDash.Essentials.Core /// public class RoomCombinationScenarioConfig : IKeyName { - /// - /// Gets or sets the key associated with the object. + /// + /// Gets or sets the key associated with the object. /// [JsonProperty("key")] public string Key { get; set; } - /// - /// Gets or sets the name associated with the object. + /// + /// Gets or sets the name associated with the object. /// [JsonProperty("name")] public string Name { get; set; } - /// - /// Gets or sets the collection of partition states. + /// + /// Gets or sets the collection of partition states. /// [JsonProperty("partitionStates")] public List PartitionStates { get; set; } @@ -115,14 +114,14 @@ namespace PepperDash.Essentials.Core [JsonProperty("uiMap")] public Dictionary UiMap { get; set; } - /// - /// Gets or sets the list of actions to be performed during device activation. + /// + /// Gets or sets the list of actions to be performed during device activation. /// [JsonProperty("activationActions")] public List ActivationActions { get; set; } - /// - /// Gets or sets the list of actions to be performed when a device is deactivated. + /// + /// Gets or sets the list of actions to be performed when a device is deactivated. /// [JsonProperty("deactivationActions")] public List DeactivationActions { get; set; } @@ -133,14 +132,14 @@ namespace PepperDash.Essentials.Core /// public class PartitionState { - /// - /// Gets or sets the partition key used to group and organize data within a storage system. + /// + /// Gets or sets the partition key used to group and organize data within a storage system. /// [JsonProperty("partitionKey")] public string PartitionKey { get; set; } - /// - /// Gets or sets a value indicating whether a partition is currently present. + /// + /// Gets or sets a value indicating whether a partition is currently present. /// [JsonProperty("partitionSensedState")] public bool PartitionPresent { get; set; } diff --git a/src/PepperDash.Essentials.Core/Room/Combining/IEssentialsRoomCombiner.cs b/src/PepperDash.Essentials.Core/Rooms/Combining/IEssentialsRoomCombiner.cs similarity index 96% rename from src/PepperDash.Essentials.Core/Room/Combining/IEssentialsRoomCombiner.cs rename to src/PepperDash.Essentials.Core/Rooms/Combining/IEssentialsRoomCombiner.cs index 50d6d84e..7bd6fd76 100644 --- a/src/PepperDash.Essentials.Core/Room/Combining/IEssentialsRoomCombiner.cs +++ b/src/PepperDash.Essentials.Core/Rooms/Combining/IEssentialsRoomCombiner.cs @@ -2,9 +2,10 @@ using System.Collections.Generic; using System.Threading.Tasks; using Newtonsoft.Json; -using PepperDash.Core; +using PepperDash.Essentials.Core.Feedbacks; +using PepperDash.Essentials.Core.PartitionSensor; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Rooms.Combining { /// /// Describes the functionality for an EssentailsRoomCombiner device diff --git a/src/PepperDash.Essentials.Core/Room/Combining/RoomCombinationScenario.cs b/src/PepperDash.Essentials.Core/Rooms/Combining/RoomCombinationScenario.cs similarity index 93% rename from src/PepperDash.Essentials.Core/Room/Combining/RoomCombinationScenario.cs rename to src/PepperDash.Essentials.Core/Rooms/Combining/RoomCombinationScenario.cs index d2dcb1ea..aea6551c 100644 --- a/src/PepperDash.Essentials.Core/Room/Combining/RoomCombinationScenario.cs +++ b/src/PepperDash.Essentials.Core/Rooms/Combining/RoomCombinationScenario.cs @@ -1,10 +1,10 @@ using Newtonsoft.Json; -using PepperDash.Core; -using PepperDash.Core.Logging; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Feedbacks; using System.Collections.Generic; using System.Threading.Tasks; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Rooms.Combining { /// /// Represents a room combination scenario @@ -79,7 +79,7 @@ namespace PepperDash.Essentials.Core { this.LogInformation("Activating Scenario {name} with {activationActionCount} action(s) defined", Name, activationActions.Count); - List tasks = new List(); + var tasks = new List(); if (activationActions != null) { @@ -97,7 +97,7 @@ namespace PepperDash.Essentials.Core { this.LogInformation("Deactivating Scenario {name} with {deactivationActionCount} action(s) defined", Name, deactivationActions.Count); - List tasks = new List(); + var tasks = new List(); if (deactivationActions != null) { diff --git a/src/PepperDash.Essentials.Core/Room/Config/EssentialsDualDisplayRoomPropertiesConfig.cs b/src/PepperDash.Essentials.Core/Rooms/Config/EssentialsDualDisplayRoomPropertiesConfig.cs similarity index 80% rename from src/PepperDash.Essentials.Core/Room/Config/EssentialsDualDisplayRoomPropertiesConfig.cs rename to src/PepperDash.Essentials.Core/Rooms/Config/EssentialsDualDisplayRoomPropertiesConfig.cs index 83584a5f..c4577328 100644 --- a/src/PepperDash.Essentials.Core/Room/Config/EssentialsDualDisplayRoomPropertiesConfig.cs +++ b/src/PepperDash.Essentials.Core/Rooms/Config/EssentialsDualDisplayRoomPropertiesConfig.cs @@ -1,5 +1,4 @@ - -namespace PepperDash.Essentials.Room.Config +namespace PepperDash.Essentials.Core.Rooms.Config { /// /// Represents a EssentialsDualDisplayRoomPropertiesConfig diff --git a/src/PepperDash.Essentials.Core/Room/Config/EssentialsHuddleRoomPropertiesConfig.cs b/src/PepperDash.Essentials.Core/Rooms/Config/EssentialsHuddleRoomPropertiesConfig.cs similarity index 95% rename from src/PepperDash.Essentials.Core/Room/Config/EssentialsHuddleRoomPropertiesConfig.cs rename to src/PepperDash.Essentials.Core/Rooms/Config/EssentialsHuddleRoomPropertiesConfig.cs index 85f8ca16..d398ed90 100644 --- a/src/PepperDash.Essentials.Core/Room/Config/EssentialsHuddleRoomPropertiesConfig.cs +++ b/src/PepperDash.Essentials.Core/Rooms/Config/EssentialsHuddleRoomPropertiesConfig.cs @@ -1,6 +1,6 @@ using Newtonsoft.Json; -namespace PepperDash.Essentials.Room.Config +namespace PepperDash.Essentials.Core.Rooms.Config { /// /// Represents a EssentialsHuddleRoomPropertiesConfig diff --git a/src/PepperDash.Essentials.Core/Room/Config/EssentialsHuddleVtc1PropertiesConfig.cs b/src/PepperDash.Essentials.Core/Rooms/Config/EssentialsHuddleVtc1PropertiesConfig.cs similarity index 88% rename from src/PepperDash.Essentials.Core/Room/Config/EssentialsHuddleVtc1PropertiesConfig.cs rename to src/PepperDash.Essentials.Core/Rooms/Config/EssentialsHuddleVtc1PropertiesConfig.cs index 72286cec..aa3b0da7 100644 --- a/src/PepperDash.Essentials.Core/Room/Config/EssentialsHuddleVtc1PropertiesConfig.cs +++ b/src/PepperDash.Essentials.Core/Rooms/Config/EssentialsHuddleVtc1PropertiesConfig.cs @@ -1,7 +1,7 @@  using Newtonsoft.Json; -namespace PepperDash.Essentials.Room.Config +namespace PepperDash.Essentials.Core.Rooms.Config { /// diff --git a/src/PepperDash.Essentials.Core/Room/Config/EssentialsNDisplayRoomPropertiesConfig.cs b/src/PepperDash.Essentials.Core/Rooms/Config/EssentialsNDisplayRoomPropertiesConfig.cs similarity index 91% rename from src/PepperDash.Essentials.Core/Room/Config/EssentialsNDisplayRoomPropertiesConfig.cs rename to src/PepperDash.Essentials.Core/Rooms/Config/EssentialsNDisplayRoomPropertiesConfig.cs index 0d5670a9..65254924 100644 --- a/src/PepperDash.Essentials.Core/Room/Config/EssentialsNDisplayRoomPropertiesConfig.cs +++ b/src/PepperDash.Essentials.Core/Rooms/Config/EssentialsNDisplayRoomPropertiesConfig.cs @@ -1,10 +1,9 @@  using System.Collections.Generic; using Newtonsoft.Json; -using PepperDash.Core; -using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Devices; -namespace PepperDash.Essentials.Room.Config +namespace PepperDash.Essentials.Core.Rooms.Config { /// /// diff --git a/src/PepperDash.Essentials.Core/Room/Config/EssentialsPresentationPropertiesConfig.cs b/src/PepperDash.Essentials.Core/Rooms/Config/EssentialsPresentationPropertiesConfig.cs similarity index 94% rename from src/PepperDash.Essentials.Core/Room/Config/EssentialsPresentationPropertiesConfig.cs rename to src/PepperDash.Essentials.Core/Rooms/Config/EssentialsPresentationPropertiesConfig.cs index 74a8813e..172ca72c 100644 --- a/src/PepperDash.Essentials.Core/Room/Config/EssentialsPresentationPropertiesConfig.cs +++ b/src/PepperDash.Essentials.Core/Rooms/Config/EssentialsPresentationPropertiesConfig.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace PepperDash.Essentials.Room.Config +namespace PepperDash.Essentials.Core.Rooms.Config { /// /// Represents a EssentialsPresentationRoomPropertiesConfig diff --git a/src/PepperDash.Essentials.Core/Room/Config/EssentialsRoomConfig.cs b/src/PepperDash.Essentials.Core/Rooms/Config/EssentialsRoomConfig.cs similarity index 98% rename from src/PepperDash.Essentials.Core/Room/Config/EssentialsRoomConfig.cs rename to src/PepperDash.Essentials.Core/Rooms/Config/EssentialsRoomConfig.cs index 40810a89..405fff3c 100644 --- a/src/PepperDash.Essentials.Core/Room/Config/EssentialsRoomConfig.cs +++ b/src/PepperDash.Essentials.Core/Rooms/Config/EssentialsRoomConfig.cs @@ -2,12 +2,11 @@ using System.Collections.Generic; using Crestron.SimplSharp; using Newtonsoft.Json; -using PepperDash.Core; -using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Devices; using PepperDash.Essentials.Core.Privacy; using Serilog.Events; -namespace PepperDash.Essentials.Room.Config +namespace PepperDash.Essentials.Core.Rooms.Config { /// /// Represents a EssentialsRoomConfigHelper @@ -50,7 +49,7 @@ namespace PepperDash.Essentials.Room.Config return null; } // Get the MicrophonePrivacy device from the device manager - var mP = (DeviceManager.GetDeviceForKey(props.MicrophonePrivacy.DeviceKey) as MicrophonePrivacyController); + var mP = DeviceManager.GetDeviceForKey(props.MicrophonePrivacy.DeviceKey) as MicrophonePrivacyController; // Set this room as the IPrivacy device if (mP == null) { diff --git a/src/PepperDash.Essentials.Core/Room/Config/EssentialsRoomEmergencyConfig.cs b/src/PepperDash.Essentials.Core/Rooms/Config/EssentialsRoomEmergencyConfig.cs similarity index 94% rename from src/PepperDash.Essentials.Core/Room/Config/EssentialsRoomEmergencyConfig.cs rename to src/PepperDash.Essentials.Core/Rooms/Config/EssentialsRoomEmergencyConfig.cs index ff5b0e5a..94b554a0 100644 --- a/src/PepperDash.Essentials.Core/Room/Config/EssentialsRoomEmergencyConfig.cs +++ b/src/PepperDash.Essentials.Core/Rooms/Config/EssentialsRoomEmergencyConfig.cs @@ -1,4 +1,4 @@ -namespace PepperDash.Essentials.Room.Config +namespace PepperDash.Essentials.Core.Rooms.Config { /// /// Represents a EssentialsRoomEmergencyConfig diff --git a/src/PepperDash.Essentials.Core/Room/Config/EssentialsRoomScheduledEventsConfig.cs b/src/PepperDash.Essentials.Core/Rooms/Config/EssentialsRoomScheduledEventsConfig.cs similarity index 94% rename from src/PepperDash.Essentials.Core/Room/Config/EssentialsRoomScheduledEventsConfig.cs rename to src/PepperDash.Essentials.Core/Rooms/Config/EssentialsRoomScheduledEventsConfig.cs index cfc1d55b..df3db2c6 100644 --- a/src/PepperDash.Essentials.Core/Room/Config/EssentialsRoomScheduledEventsConfig.cs +++ b/src/PepperDash.Essentials.Core/Rooms/Config/EssentialsRoomScheduledEventsConfig.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using Crestron.SimplSharp.Scheduler; using Newtonsoft.Json; -using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Devices; -namespace PepperDash.Essentials.Room.Config +namespace PepperDash.Essentials.Core.Rooms.Config { /// /// Represents a EssentialsRoomScheduledEventsConfig diff --git a/src/PepperDash.Essentials.Core/Room/Config/EssentialsTechRoomConfig.cs b/src/PepperDash.Essentials.Core/Rooms/Config/EssentialsTechRoomConfig.cs similarity index 98% rename from src/PepperDash.Essentials.Core/Room/Config/EssentialsTechRoomConfig.cs rename to src/PepperDash.Essentials.Core/Rooms/Config/EssentialsTechRoomConfig.cs index ac99d260..8a1a5fc8 100644 --- a/src/PepperDash.Essentials.Core/Room/Config/EssentialsTechRoomConfig.cs +++ b/src/PepperDash.Essentials.Core/Rooms/Config/EssentialsTechRoomConfig.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using Newtonsoft.Json; -namespace PepperDash.Essentials.Room.Config +namespace PepperDash.Essentials.Core.Rooms.Config { /// /// Represents a EssentialsTechRoomConfig diff --git a/src/PepperDash.Essentials.Core/Room/Config/EssentialsVolumeLevelConfig.cs b/src/PepperDash.Essentials.Core/Rooms/Config/EssentialsVolumeLevelConfig.cs similarity index 97% rename from src/PepperDash.Essentials.Core/Room/Config/EssentialsVolumeLevelConfig.cs rename to src/PepperDash.Essentials.Core/Rooms/Config/EssentialsVolumeLevelConfig.cs index 4e3d502f..33a37551 100644 --- a/src/PepperDash.Essentials.Core/Room/Config/EssentialsVolumeLevelConfig.cs +++ b/src/PepperDash.Essentials.Core/Rooms/Config/EssentialsVolumeLevelConfig.cs @@ -1,7 +1,7 @@ using System; -using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Devices; -namespace PepperDash.Essentials.Room.Config +namespace PepperDash.Essentials.Core.Rooms.Config { /// /// Represents a EssentialsRoomVolumesConfig diff --git a/src/PepperDash.Essentials.Core/Room/Config/SimplRoomPropertiesConfig.cs b/src/PepperDash.Essentials.Core/Rooms/Config/SimplRoomPropertiesConfig.cs similarity index 95% rename from src/PepperDash.Essentials.Core/Room/Config/SimplRoomPropertiesConfig.cs rename to src/PepperDash.Essentials.Core/Rooms/Config/SimplRoomPropertiesConfig.cs index b37335b9..9d1414c9 100644 --- a/src/PepperDash.Essentials.Core/Room/Config/SimplRoomPropertiesConfig.cs +++ b/src/PepperDash.Essentials.Core/Rooms/Config/SimplRoomPropertiesConfig.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Newtonsoft.Json; -namespace PepperDash.Essentials.Room.Config +namespace PepperDash.Essentials.Core.Rooms.Config { /// /// Represents a SimplRoomPropertiesConfig diff --git a/src/PepperDash.Essentials.Core/Room/EsentialsRoomEmergencyContactClosure.cs b/src/PepperDash.Essentials.Core/Rooms/EsentialsRoomEmergencyContactClosure.cs similarity index 97% rename from src/PepperDash.Essentials.Core/Room/EsentialsRoomEmergencyContactClosure.cs rename to src/PepperDash.Essentials.Core/Rooms/EsentialsRoomEmergencyContactClosure.cs index 3a354813..9e2e9289 100644 --- a/src/PepperDash.Essentials.Core/Room/EsentialsRoomEmergencyContactClosure.cs +++ b/src/PepperDash.Essentials.Core/Rooms/EsentialsRoomEmergencyContactClosure.cs @@ -1,8 +1,7 @@ using System; using Crestron.SimplSharpPro; -using PepperDash.Essentials.Room.Config; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Rooms { /// /// Represents a EssentialsRoomEmergencyContactClosure diff --git a/src/PepperDash.Essentials.Core/Room/EssentialsRoomBase.cs b/src/PepperDash.Essentials.Core/Rooms/EssentialsRoomBase.cs similarity index 98% rename from src/PepperDash.Essentials.Core/Room/EssentialsRoomBase.cs rename to src/PepperDash.Essentials.Core/Rooms/EssentialsRoomBase.cs index d025e8ca..52411ea9 100644 --- a/src/PepperDash.Essentials.Core/Room/EssentialsRoomBase.cs +++ b/src/PepperDash.Essentials.Core/Rooms/EssentialsRoomBase.cs @@ -1,13 +1,13 @@ using System; using System.Collections.Generic; - -using PepperDash.Core; using PepperDash.Essentials.Core.Config; using PepperDash.Essentials.Core.Devices; using PepperDash.Essentials.Core.DeviceTypeInterfaces; +using PepperDash.Essentials.Core.Feedbacks; +using PepperDash.Essentials.Core.Timers; using Serilog.Events; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Rooms { /// /// @@ -168,7 +168,7 @@ namespace PepperDash.Essentials.Core public EssentialsRoomEmergencyBase Emergency { get; set; } - public Core.Privacy.MicrophonePrivacyController MicrophonePrivacy { get; set; } + public Privacy.MicrophonePrivacyController MicrophonePrivacy { get; set; } public string LogoUrlLightBkgnd { get; set; } @@ -403,7 +403,7 @@ namespace PepperDash.Essentials.Core Debug.LogMessage(LogEventLevel.Information, this, "Timeout Minutes from Config is: {0}", timeoutMinutes); // If status provider is fusion, set flag to remote - if (statusProvider is Core.Fusion.EssentialsHuddleSpaceFusionSystemControllerBase) + if (statusProvider is Fusion.EssentialsHuddleSpaceFusionSystemControllerBase) OccupancyStatusProviderIsRemote = true; if(timeoutMinutes > 0) diff --git a/src/PepperDash.Essentials.Core/Room/IEssentialsRoom.cs b/src/PepperDash.Essentials.Core/Rooms/IEssentialsRoom.cs similarity index 90% rename from src/PepperDash.Essentials.Core/Room/IEssentialsRoom.cs rename to src/PepperDash.Essentials.Core/Rooms/IEssentialsRoom.cs index 9a32bc5d..0247b730 100644 --- a/src/PepperDash.Essentials.Core/Room/IEssentialsRoom.cs +++ b/src/PepperDash.Essentials.Core/Rooms/IEssentialsRoom.cs @@ -1,9 +1,9 @@ using PepperDash.Essentials.Core.DeviceTypeInterfaces; using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Feedbacks; +using PepperDash.Essentials.Core.Timers; -using PepperDash.Core; - -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Rooms { /// /// Describes the basic functionality of an EssentialsRoom diff --git a/src/PepperDash.Essentials.Core/Room/iOccupancyStatusProvider.cs b/src/PepperDash.Essentials.Core/Rooms/IOccupancyStatusProvider.cs similarity index 69% rename from src/PepperDash.Essentials.Core/Room/iOccupancyStatusProvider.cs rename to src/PepperDash.Essentials.Core/Rooms/IOccupancyStatusProvider.cs index d28fd904..b2faf2fe 100644 --- a/src/PepperDash.Essentials.Core/Room/iOccupancyStatusProvider.cs +++ b/src/PepperDash.Essentials.Core/Rooms/IOccupancyStatusProvider.cs @@ -1,4 +1,6 @@ -namespace PepperDash.Essentials.Core +using PepperDash.Essentials.Core.Feedbacks; + +namespace PepperDash.Essentials.Core.Rooms { /// /// Defines the contract for IOccupancyStatusProvider diff --git a/src/PepperDash.Essentials.Core/Room/IRoomEventSchedule.cs b/src/PepperDash.Essentials.Core/Rooms/IRoomEventSchedule.cs similarity index 88% rename from src/PepperDash.Essentials.Core/Room/IRoomEventSchedule.cs rename to src/PepperDash.Essentials.Core/Rooms/IRoomEventSchedule.cs index 0ddb61fc..a4485ab5 100644 --- a/src/PepperDash.Essentials.Core/Room/IRoomEventSchedule.cs +++ b/src/PepperDash.Essentials.Core/Rooms/IRoomEventSchedule.cs @@ -1,8 +1,8 @@ -using PepperDash.Essentials.Room.Config; +using PepperDash.Essentials.Core.Rooms.Config; using System; using System.Collections.Generic; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Rooms { /// /// Defines the contract for IRoomEventSchedule diff --git a/src/PepperDash.Essentials.Core/Room/Interfaces.cs b/src/PepperDash.Essentials.Core/Rooms/Interfaces.cs similarity index 93% rename from src/PepperDash.Essentials.Core/Room/Interfaces.cs rename to src/PepperDash.Essentials.Core/Rooms/Interfaces.cs index bffb80a3..21c6c494 100644 --- a/src/PepperDash.Essentials.Core/Room/Interfaces.cs +++ b/src/PepperDash.Essentials.Core/Rooms/Interfaces.cs @@ -1,10 +1,12 @@ -using System; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Feedbacks; +using PepperDash.Essentials.Core.Routing; +using PepperDash.Essentials.Core.Timers; +using System; using System.Collections.Generic; -using PepperDash.Core; - -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Rooms { /// /// For rooms with in call feedback @@ -166,7 +168,7 @@ namespace PepperDash.Essentials.Core /// public interface IMicrophonePrivacy { - Core.Privacy.MicrophonePrivacyController MicrophonePrivacy { get; } + Privacy.MicrophonePrivacyController MicrophonePrivacy { get; } } /// diff --git a/src/PepperDash.Essentials.Core/Rooms/Room.cs b/src/PepperDash.Essentials.Core/Rooms/Room.cs new file mode 100644 index 00000000..05a4574a --- /dev/null +++ b/src/PepperDash.Essentials.Core/Rooms/Room.cs @@ -0,0 +1,70 @@ +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Feedbacks; + +namespace PepperDash.Essentials.Core.Rooms +{ + //*************************************************************************************************** + + public abstract class RoomBase : Device, IHasFeedback + { + public abstract BoolFeedback RoomIsOnFeedback { get; protected set; } + public abstract BoolFeedback IsCoolingDownFeedback { get; protected set; } + public abstract BoolFeedback IsWarmingUpFeedback { get; protected set; } + + // In concrete classes, these should be computed from the relevant devices + /// s + /// Gets or sets the CooldownTime + /// + /// + public virtual uint CooldownTime { get { return 10000; } } + /// + /// Gets or sets the WarmupTime + /// + /// + public virtual uint WarmupTime { get { return 5000; } } + + /// + /// Gets or sets the Description + /// + public string Description { get; set; } + /// + /// Gets or sets the HelpMessage + /// + public string HelpMessage { get; set; } + + public RoomBase(string key, string name) + : base(key, name) + { + Description = ""; + HelpMessage = ""; + } + + /// + /// RoomOn method + /// + /// + public virtual void RoomOn() { } + + /// + /// RoomOff method + /// + public virtual void RoomOff() { } + + #region IDeviceWithOutputs Members + + public virtual FeedbackCollection Feedbacks + { + get + { + return new FeedbackCollection + { + RoomIsOnFeedback, + IsCoolingDownFeedback, + IsWarmingUpFeedback + }; + } + } + + #endregion + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Routing/DummyRoutingInputsDevice.cs b/src/PepperDash.Essentials.Core/Routing/DummyRoutingInputsDevice.cs index 4c669fbf..220e1903 100644 --- a/src/PepperDash.Essentials.Core/Routing/DummyRoutingInputsDevice.cs +++ b/src/PepperDash.Essentials.Core/Routing/DummyRoutingInputsDevice.cs @@ -1,6 +1,4 @@ -using PepperDash.Core; - -namespace PepperDash.Essentials.Core.Routing +namespace PepperDash.Essentials.Core.Routing { /// /// Represents a DummyRoutingInputsDevice diff --git a/src/PepperDash.Essentials.Core/Routing/Extensions.cs b/src/PepperDash.Essentials.Core/Routing/Extensions.cs index c963e0fd..dcf56460 100644 --- a/src/PepperDash.Essentials.Core/Routing/Extensions.cs +++ b/src/PepperDash.Essentials.Core/Routing/Extensions.cs @@ -1,14 +1,14 @@ -using PepperDash.Essentials.Core.Queues; -using PepperDash.Essentials.Core.Routing; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; +using PepperDash.Essentials.Core.Queues; using Serilog.Events; using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; -using Debug = PepperDash.Core.Debug; +using Debug = PepperDash.Essentials.Core.Debug; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Routing { /// @@ -203,7 +203,7 @@ namespace PepperDash.Essentials.Core var coolingDevice = destination as IWarmingCooling; //We already have a route request for this device, and it's a cooling device and is cooling - if (RouteRequests.TryGetValue(destination.Key, out RouteRequest existingRouteRequest) && coolingDevice != null && coolingDevice.IsCoolingDownFeedback.BoolValue == true) + if (RouteRequests.TryGetValue(destination.Key, out var existingRouteRequest) && coolingDevice != null && coolingDevice.IsCoolingDownFeedback.BoolValue == true) { coolingDevice.IsCoolingDownFeedback.OutputChange -= existingRouteRequest.HandleCooldown; @@ -289,7 +289,7 @@ namespace PepperDash.Essentials.Core { Debug.LogMessage(LogEventLevel.Information, "Release route for '{destination}':'{inputPortKey}'", destination?.Key ?? null, string.IsNullOrEmpty(inputPortKey) ? "auto" : inputPortKey); - if (RouteRequests.TryGetValue(destination.Key, out RouteRequest existingRequest) && destination is IWarmingCooling) + if (RouteRequests.TryGetValue(destination.Key, out var existingRequest) && destination is IWarmingCooling) { var coolingDevice = destination as IWarmingCooling; @@ -343,7 +343,7 @@ namespace PepperDash.Essentials.Core } else { - destinationTieLines = TieLineCollection.Default.Where(t => t.DestinationPort.ParentDevice.Key == destination.Key && t.DestinationPort.Key == destinationPort.Key && (t.Type.HasFlag(signalType))); + destinationTieLines = TieLineCollection.Default.Where(t => t.DestinationPort.ParentDevice.Key == destination.Key && t.DestinationPort.Key == destinationPort.Key && t.Type.HasFlag(signalType)); } // find the TieLine without a port diff --git a/src/PepperDash.Essentials.Core/Routing/ICurrentSources.cs b/src/PepperDash.Essentials.Core/Routing/ICurrentSources.cs index 8c6323d4..6c38a626 100644 --- a/src/PepperDash.Essentials.Core/Routing/ICurrentSources.cs +++ b/src/PepperDash.Essentials.Core/Routing/ICurrentSources.cs @@ -1,3 +1,4 @@ +using PepperDash.Essentials.Core.Devices; using System.Collections.Generic; namespace PepperDash.Essentials.Core.Routing diff --git a/src/PepperDash.Essentials.Core/Routing/IHasCurrentSourceInfoChange.cs b/src/PepperDash.Essentials.Core/Routing/IHasCurrentSourceInfoChange.cs index a9e13a07..b8ec52dd 100644 --- a/src/PepperDash.Essentials.Core/Routing/IHasCurrentSourceInfoChange.cs +++ b/src/PepperDash.Essentials.Core/Routing/IHasCurrentSourceInfoChange.cs @@ -9,9 +9,10 @@ using PepperDash.Essentials.Core.Routing; using PepperDash.Essentials.Core.Routing; using PepperDash.Essentials.Core.Routing.Interfaces */ +using PepperDash.Essentials.Core.Devices; using System; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Routing { /// /// Delegate for SourceInfoChangeHandler diff --git a/src/PepperDash.Essentials.Core/Routing/IInputSync.cs b/src/PepperDash.Essentials.Core/Routing/IInputSync.cs index 542fe553..d49e61e7 100644 --- a/src/PepperDash.Essentials.Core/Routing/IInputSync.cs +++ b/src/PepperDash.Essentials.Core/Routing/IInputSync.cs @@ -1,5 +1,4 @@ -using PepperDash.Core; -using System; +using System; namespace PepperDash.Essentials.Core.Routing { diff --git a/src/PepperDash.Essentials.Core/Routing/IRmcRouting.cs b/src/PepperDash.Essentials.Core/Routing/IRmcRouting.cs index ec5fe2c4..f85c50bf 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRmcRouting.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRmcRouting.cs @@ -1,4 +1,6 @@ -namespace PepperDash.Essentials.Core +using PepperDash.Essentials.Core.Feedbacks; + +namespace PepperDash.Essentials.Core.Routing { /// /// Defines the contract for IRmcRouting diff --git a/src/PepperDash.Essentials.Core/Routing/IRmcRoutingWithFeedback.cs b/src/PepperDash.Essentials.Core/Routing/IRmcRoutingWithFeedback.cs index ab14d066..8e738a8a 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRmcRoutingWithFeedback.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRmcRoutingWithFeedback.cs @@ -1,4 +1,4 @@ -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Routing { /// /// Defines the contract for IRmcRoutingWithFeedback diff --git a/src/PepperDash.Essentials.Core/Routing/IRouting.cs b/src/PepperDash.Essentials.Core/Routing/IRouting.cs index 9cc4ecff..ccd508f7 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRouting.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRouting.cs @@ -1,4 +1,4 @@ -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Routing { /// /// Defines a midpoint device as have internal routing. Any devices in the middle of the diff --git a/src/PepperDash.Essentials.Core/Routing/IRoutingFeedback.cs b/src/PepperDash.Essentials.Core/Routing/IRoutingFeedback.cs index a76f571b..028a1118 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRoutingFeedback.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRoutingFeedback.cs @@ -1,9 +1,7 @@ using System; -using PepperDash.Core; - -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Routing { /// /// Defines the contract for IRoutingFeedback diff --git a/src/PepperDash.Essentials.Core/Routing/IRoutingHasVideoInputSyncFeedbacks.cs b/src/PepperDash.Essentials.Core/Routing/IRoutingHasVideoInputSyncFeedbacks.cs index 51152656..9bc41652 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRoutingHasVideoInputSyncFeedbacks.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRoutingHasVideoInputSyncFeedbacks.cs @@ -1,4 +1,6 @@ -namespace PepperDash.Essentials.Core +using PepperDash.Essentials.Core.Feedbacks; + +namespace PepperDash.Essentials.Core.Routing { /// diff --git a/src/PepperDash.Essentials.Core/Routing/IRoutingInputSlot.cs b/src/PepperDash.Essentials.Core/Routing/IRoutingInputSlot.cs index 94eddd26..2ecdfe0e 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRoutingInputSlot.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRoutingInputSlot.cs @@ -1,4 +1,6 @@ -namespace PepperDash.Essentials.Core.Routing +using PepperDash.Essentials.Core.Devices; + +namespace PepperDash.Essentials.Core.Routing { /// /// Defines the contract for IRoutingInputSlot diff --git a/src/PepperDash.Essentials.Core/Routing/IRoutingInputs.cs b/src/PepperDash.Essentials.Core/Routing/IRoutingInputs.cs index 102cf5f9..177cf47d 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRoutingInputs.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRoutingInputs.cs @@ -1,7 +1,4 @@ -using PepperDash.Core; - - -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Routing { /// /// Defines the contract for IRoutingInputs diff --git a/src/PepperDash.Essentials.Core/Routing/IRoutingInputsOutputs.cs b/src/PepperDash.Essentials.Core/Routing/IRoutingInputsOutputs.cs index 89e4d031..51d12407 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRoutingInputsOutputs.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRoutingInputsOutputs.cs @@ -1,4 +1,4 @@ -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Routing { /// /// Defines the contract for IRoutingInputsOutputs diff --git a/src/PepperDash.Essentials.Core/Routing/IRoutingNumeric.cs b/src/PepperDash.Essentials.Core/Routing/IRoutingNumeric.cs index ff7e6cd7..b00d4e91 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRoutingNumeric.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRoutingNumeric.cs @@ -1,4 +1,4 @@ -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Routing { /// /// Defines the contract for IRoutingNumeric diff --git a/src/PepperDash.Essentials.Core/Routing/IRoutingNumericWithFeedback.cs b/src/PepperDash.Essentials.Core/Routing/IRoutingNumericWithFeedback.cs index 33a837a8..65a818b5 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRoutingNumericWithFeedback.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRoutingNumericWithFeedback.cs @@ -1,4 +1,4 @@ -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Routing { /// /// Defines the contract for IRoutingNumericWithFeedback diff --git a/src/PepperDash.Essentials.Core/Routing/IRoutingOutputs.cs b/src/PepperDash.Essentials.Core/Routing/IRoutingOutputs.cs index dbfc2916..dbc83492 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRoutingOutputs.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRoutingOutputs.cs @@ -1,7 +1,4 @@ -using PepperDash.Core; - - -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Routing { /// diff --git a/src/PepperDash.Essentials.Core/Routing/IRoutingSink.cs b/src/PepperDash.Essentials.Core/Routing/IRoutingSink.cs index 6e599f29..c051ccd0 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRoutingSink.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRoutingSink.cs @@ -1,6 +1,4 @@ -using PepperDash.Essentials.Core.Routing; - -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Routing { /// /// Defines the contract for IRoutingSink diff --git a/src/PepperDash.Essentials.Core/Routing/IRoutingSinkWithFeedback.cs b/src/PepperDash.Essentials.Core/Routing/IRoutingSinkWithFeedback.cs index f1e14b7b..ecf94ad8 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRoutingSinkWithFeedback.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRoutingSinkWithFeedback.cs @@ -1,4 +1,4 @@ -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Routing { /// diff --git a/src/PepperDash.Essentials.Core/Routing/IRoutingSinkWithSwitching.cs b/src/PepperDash.Essentials.Core/Routing/IRoutingSinkWithSwitching.cs index a45cabc4..c7933ba7 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRoutingSinkWithSwitching.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRoutingSinkWithSwitching.cs @@ -1,4 +1,4 @@ -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Routing { /// /// Delegate for InputChangedEventHandler diff --git a/src/PepperDash.Essentials.Core/Routing/IRoutingSlot.cs b/src/PepperDash.Essentials.Core/Routing/IRoutingSlot.cs index a7b46007..cf670d58 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRoutingSlot.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRoutingSlot.cs @@ -1,6 +1,4 @@ -using PepperDash.Core; - -namespace PepperDash.Essentials.Core.Routing +namespace PepperDash.Essentials.Core.Routing { /// /// Defines the contract for IRoutingSlot diff --git a/src/PepperDash.Essentials.Core/Routing/IRoutingSource.cs b/src/PepperDash.Essentials.Core/Routing/IRoutingSource.cs index 75bf1bfb..02941b78 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRoutingSource.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRoutingSource.cs @@ -1,4 +1,4 @@ -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Routing { /// /// Defines the contract for IRoutingSource diff --git a/src/PepperDash.Essentials.Core/Routing/IRoutingWithClear.cs b/src/PepperDash.Essentials.Core/Routing/IRoutingWithClear.cs index 2a80022d..56cad9a7 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRoutingWithClear.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRoutingWithClear.cs @@ -1,4 +1,4 @@ -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Routing { /// /// Defines the contract for IRoutingWithClear diff --git a/src/PepperDash.Essentials.Core/Routing/IRoutingWithFeedback.cs b/src/PepperDash.Essentials.Core/Routing/IRoutingWithFeedback.cs index 7dcf0095..3136c3a1 100644 --- a/src/PepperDash.Essentials.Core/Routing/IRoutingWithFeedback.cs +++ b/src/PepperDash.Essentials.Core/Routing/IRoutingWithFeedback.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Routing { /// /// Delegate for handling route change events on devices implementing . diff --git a/src/PepperDash.Essentials.Core/Routing/ITxRouting.cs b/src/PepperDash.Essentials.Core/Routing/ITxRouting.cs index 0bd818ac..fece844b 100644 --- a/src/PepperDash.Essentials.Core/Routing/ITxRouting.cs +++ b/src/PepperDash.Essentials.Core/Routing/ITxRouting.cs @@ -1,4 +1,6 @@ -namespace PepperDash.Essentials.Core +using PepperDash.Essentials.Core.Feedbacks; + +namespace PepperDash.Essentials.Core.Routing { /// /// Defines the contract for ITxRouting diff --git a/src/PepperDash.Essentials.Core/Routing/ITxRoutingWithFeedback.cs b/src/PepperDash.Essentials.Core/Routing/ITxRoutingWithFeedback.cs index abfbff7f..c5bfbb62 100644 --- a/src/PepperDash.Essentials.Core/Routing/ITxRoutingWithFeedback.cs +++ b/src/PepperDash.Essentials.Core/Routing/ITxRoutingWithFeedback.cs @@ -1,4 +1,4 @@ -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Routing { /// /// Defines the contract for ITxRoutingWithFeedback diff --git a/src/PepperDash.Essentials.Core/Routing/RouteDescriptor.cs b/src/PepperDash.Essentials.Core/Routing/RouteDescriptor.cs index aab82d38..350f402b 100644 --- a/src/PepperDash.Essentials.Core/Routing/RouteDescriptor.cs +++ b/src/PepperDash.Essentials.Core/Routing/RouteDescriptor.cs @@ -2,12 +2,10 @@ using System.Collections.Generic; using System.Linq; using Crestron.SimplSharpPro; - -using PepperDash.Core; using Serilog.Events; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Routing { /// /// Represents a collection of individual route steps between a Source and a Destination device for a specific signal type. diff --git a/src/PepperDash.Essentials.Core/Routing/RouteDescriptorCollection.cs b/src/PepperDash.Essentials.Core/Routing/RouteDescriptorCollection.cs index f389f719..fd1b7bbe 100644 --- a/src/PepperDash.Essentials.Core/Routing/RouteDescriptorCollection.cs +++ b/src/PepperDash.Essentials.Core/Routing/RouteDescriptorCollection.cs @@ -1,10 +1,9 @@ -using PepperDash.Core; -using Serilog.Events; +using Serilog.Events; using System.Collections.Generic; using System.Linq; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Routing { /// /// A collection of RouteDescriptors - typically the static DefaultCollection is used diff --git a/src/PepperDash.Essentials.Core/Routing/RouteRequest.cs b/src/PepperDash.Essentials.Core/Routing/RouteRequest.cs index 30c0e5f8..37894528 100644 --- a/src/PepperDash.Essentials.Core/Routing/RouteRequest.cs +++ b/src/PepperDash.Essentials.Core/Routing/RouteRequest.cs @@ -1,8 +1,9 @@ -using PepperDash.Core; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; +using PepperDash.Essentials.Core.Feedbacks; using Serilog.Events; using System; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Routing { /// /// Represents a RouteRequest diff --git a/src/PepperDash.Essentials.Core/Routing/RouteRequestQueueItem.cs b/src/PepperDash.Essentials.Core/Routing/RouteRequestQueueItem.cs index 812f1399..61e275b1 100644 --- a/src/PepperDash.Essentials.Core/Routing/RouteRequestQueueItem.cs +++ b/src/PepperDash.Essentials.Core/Routing/RouteRequestQueueItem.cs @@ -1,5 +1,4 @@ -using PepperDash.Core; -using PepperDash.Essentials.Core.Queues; +using PepperDash.Essentials.Core.Queues; using System; using Serilog.Events; diff --git a/src/PepperDash.Essentials.Core/Routing/RouteSwitchDescriptor.cs b/src/PepperDash.Essentials.Core/Routing/RouteSwitchDescriptor.cs index 12aebdcf..046b0751 100644 --- a/src/PepperDash.Essentials.Core/Routing/RouteSwitchDescriptor.cs +++ b/src/PepperDash.Essentials.Core/Routing/RouteSwitchDescriptor.cs @@ -1,4 +1,4 @@ -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Routing { /// /// Represents a RouteSwitchDescriptor diff --git a/src/PepperDash.Essentials.Core/Routing/RoutingFeedbackManager.cs b/src/PepperDash.Essentials.Core/Routing/RoutingFeedbackManager.cs index 9afdb33d..45e91eab 100644 --- a/src/PepperDash.Essentials.Core/Routing/RoutingFeedbackManager.cs +++ b/src/PepperDash.Essentials.Core/Routing/RoutingFeedbackManager.cs @@ -1,5 +1,6 @@ -using PepperDash.Core; -using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Config.Essentials; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Rooms; using System; using System.Linq; diff --git a/src/PepperDash.Essentials.Core/Routing/RoutingInputPort.cs b/src/PepperDash.Essentials.Core/Routing/RoutingInputPort.cs index 08876121..fd526355 100644 --- a/src/PepperDash.Essentials.Core/Routing/RoutingInputPort.cs +++ b/src/PepperDash.Essentials.Core/Routing/RoutingInputPort.cs @@ -2,7 +2,7 @@ using System; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Routing { /// /// Represents a RoutingInputPort diff --git a/src/PepperDash.Essentials.Core/Routing/RoutingInputPortWithVideoStatuses.cs b/src/PepperDash.Essentials.Core/Routing/RoutingInputPortWithVideoStatuses.cs index 2ecf75c4..fde07cc8 100644 --- a/src/PepperDash.Essentials.Core/Routing/RoutingInputPortWithVideoStatuses.cs +++ b/src/PepperDash.Essentials.Core/Routing/RoutingInputPortWithVideoStatuses.cs @@ -1,4 +1,6 @@ -namespace PepperDash.Essentials.Core +using PepperDash.Essentials.Core.VideoStatus; + +namespace PepperDash.Essentials.Core.Routing { /// /// Represents a RoutingInputPortWithVideoStatuses diff --git a/src/PepperDash.Essentials.Core/Routing/RoutingNumericEventArgs.cs b/src/PepperDash.Essentials.Core/Routing/RoutingNumericEventArgs.cs index a2025dad..6d7fcb3a 100644 --- a/src/PepperDash.Essentials.Core/Routing/RoutingNumericEventArgs.cs +++ b/src/PepperDash.Essentials.Core/Routing/RoutingNumericEventArgs.cs @@ -1,7 +1,7 @@ using System; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Routing { /// /// Represents a RoutingNumericEventArgs diff --git a/src/PepperDash.Essentials.Core/Routing/RoutingOutputPort.cs b/src/PepperDash.Essentials.Core/Routing/RoutingOutputPort.cs index c1cadfb1..ab67ca45 100644 --- a/src/PepperDash.Essentials.Core/Routing/RoutingOutputPort.cs +++ b/src/PepperDash.Essentials.Core/Routing/RoutingOutputPort.cs @@ -2,7 +2,7 @@ using System; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Routing { /// /// Represents a RoutingOutputPort diff --git a/src/PepperDash.Essentials.Core/Routing/RoutingPort.cs b/src/PepperDash.Essentials.Core/Routing/RoutingPort.cs index 30440578..9a890e24 100644 --- a/src/PepperDash.Essentials.Core/Routing/RoutingPort.cs +++ b/src/PepperDash.Essentials.Core/Routing/RoutingPort.cs @@ -1,7 +1,4 @@ -using PepperDash.Core; - - -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Routing { /// /// Base class for and . diff --git a/src/PepperDash.Essentials.Core/Routing/RoutingPortCollection.cs b/src/PepperDash.Essentials.Core/Routing/RoutingPortCollection.cs index 7ee349b5..b8dc1b3b 100644 --- a/src/PepperDash.Essentials.Core/Routing/RoutingPortCollection.cs +++ b/src/PepperDash.Essentials.Core/Routing/RoutingPortCollection.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Routing { /// /// Represents a RoutingPortCollection, which is essentially a List with an indexer for case-insensitive lookup of ports by their key names. diff --git a/src/PepperDash.Essentials.Core/Routing/RoutingPortNames.cs b/src/PepperDash.Essentials.Core/Routing/RoutingPortNames.cs index 2a37f5ed..457c6ee2 100644 --- a/src/PepperDash.Essentials.Core/Routing/RoutingPortNames.cs +++ b/src/PepperDash.Essentials.Core/Routing/RoutingPortNames.cs @@ -1,4 +1,4 @@ -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Routing { /// /// Defines constant string values for common routing port keys. diff --git a/src/PepperDash.Essentials.Core/Routing/TieLine.cs b/src/PepperDash.Essentials.Core/Routing/TieLine.cs index 42f024b4..a6db8d9d 100644 --- a/src/PepperDash.Essentials.Core/Routing/TieLine.cs +++ b/src/PepperDash.Essentials.Core/Routing/TieLine.cs @@ -2,7 +2,7 @@ using System; using System.Collections.Generic; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Routing { /// /// Represents a connection between routing ports, linking a source output port to a destination input port. diff --git a/src/PepperDash.Essentials.Core/Routing/TieLineConfig.cs b/src/PepperDash.Essentials.Core/Routing/TieLineConfig.cs index 678671f4..e9cd3040 100644 --- a/src/PepperDash.Essentials.Core/Routing/TieLineConfig.cs +++ b/src/PepperDash.Essentials.Core/Routing/TieLineConfig.cs @@ -1,9 +1,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; -using PepperDash.Core; +using PepperDash.Essentials.Core.Devices; using Serilog.Events; -namespace PepperDash.Essentials.Core.Config +namespace PepperDash.Essentials.Core.Routing { /// /// Represents the configuration data for a single tie line between two routing ports. diff --git a/src/PepperDash.Essentials.Core/Routing/eRoutingPortConnectionType.cs b/src/PepperDash.Essentials.Core/Routing/eRoutingPortConnectionType.cs index 41e8c81b..a360f34b 100644 --- a/src/PepperDash.Essentials.Core/Routing/eRoutingPortConnectionType.cs +++ b/src/PepperDash.Essentials.Core/Routing/eRoutingPortConnectionType.cs @@ -1,4 +1,4 @@ -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Routing { /// /// Enumeration of eRoutingPortConnectionType values diff --git a/src/PepperDash.Essentials.Core/Routing/eRoutingSignalType.cs b/src/PepperDash.Essentials.Core/Routing/eRoutingSignalType.cs index bab815fc..2f9f7f64 100644 --- a/src/PepperDash.Essentials.Core/Routing/eRoutingSignalType.cs +++ b/src/PepperDash.Essentials.Core/Routing/eRoutingSignalType.cs @@ -1,7 +1,7 @@ using System; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Routing { [Flags] /// diff --git a/src/PepperDash.Essentials.Core/Secrets/CrestronGlobalSecretsProvider.cs b/src/PepperDash.Essentials.Core/Secrets/CrestronGlobalSecretsProvider.cs index 83d0a0a8..e6aa50f8 100644 --- a/src/PepperDash.Essentials.Core/Secrets/CrestronGlobalSecretsProvider.cs +++ b/src/PepperDash.Essentials.Core/Secrets/CrestronGlobalSecretsProvider.cs @@ -1,11 +1,10 @@ using System; using Crestron.SimplSharp; using Crestron.SimplSharp.CrestronDataStore; -using PepperDash.Core; using Serilog.Events; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Secrets { /// /// Represents a CrestronGlobalSecretsProvider @@ -25,7 +24,7 @@ namespace PepperDash.Essentials.Core public CrestronGlobalSecretsProvider(string key) { Key = key; - Description = String.Format("Default secret provider serving all local applications"); + Description = string.Format("Default secret provider serving all local applications"); } @@ -51,7 +50,7 @@ namespace PepperDash.Essentials.Core var secret = value as string; CrestronDataStore.CDS_ERROR returnCode; - if (String.IsNullOrEmpty(secret)) + if (string.IsNullOrEmpty(secret)) { returnCode = CrestronDataStoreStatic.clearGlobal(key); if (returnCode == CrestronDataStore.CDS_ERROR.CDS_SUCCESS) diff --git a/src/PepperDash.Essentials.Core/Secrets/CrestronLocalSecretsProvider.cs b/src/PepperDash.Essentials.Core/Secrets/CrestronLocalSecretsProvider.cs index f114faa8..d35585ba 100644 --- a/src/PepperDash.Essentials.Core/Secrets/CrestronLocalSecretsProvider.cs +++ b/src/PepperDash.Essentials.Core/Secrets/CrestronLocalSecretsProvider.cs @@ -1,11 +1,10 @@ using System; using Crestron.SimplSharp; using Crestron.SimplSharp.CrestronDataStore; -using PepperDash.Core; using Serilog.Events; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Secrets { /// /// Represents a CrestronLocalSecretsProvider @@ -26,7 +25,7 @@ namespace PepperDash.Essentials.Core public CrestronLocalSecretsProvider(string key) { Key = key; - Description = String.Format("Default secret provider serving Essentials Application {0}", InitialParametersClass.ApplicationNumber); + Description = string.Format("Default secret provider serving Essentials Application {0}", InitialParametersClass.ApplicationNumber); } static CrestronLocalSecretsProvider() @@ -51,7 +50,7 @@ namespace PepperDash.Essentials.Core var secret = value as string; CrestronDataStore.CDS_ERROR returnCode; - if (String.IsNullOrEmpty(secret)) + if (string.IsNullOrEmpty(secret)) { returnCode = CrestronDataStoreStatic.clearLocal(key); if (returnCode == CrestronDataStore.CDS_ERROR.CDS_SUCCESS) diff --git a/src/PepperDash.Essentials.Core/Secrets/CrestronSecret.cs b/src/PepperDash.Essentials.Core/Secrets/CrestronSecret.cs index 6d96ba59..70c89355 100644 --- a/src/PepperDash.Essentials.Core/Secrets/CrestronSecret.cs +++ b/src/PepperDash.Essentials.Core/Secrets/CrestronSecret.cs @@ -1,4 +1,4 @@ -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Secrets { /// /// Special container class for CrestronSecret provider diff --git a/src/PepperDash.Essentials.Core/Secrets/ISecret.cs b/src/PepperDash.Essentials.Core/Secrets/ISecret.cs new file mode 100644 index 00000000..6d229d4a --- /dev/null +++ b/src/PepperDash.Essentials.Core/Secrets/ISecret.cs @@ -0,0 +1,24 @@ +namespace PepperDash.Essentials.Core.Secrets +{ + + /// + /// interface for delivering secrets in Essentials. + /// + public interface ISecret + { + /// + /// Instance of ISecretProvider that the secret belongs to + /// + ISecretProvider Provider { get; } + + /// + /// Key of the secret in the provider + /// + string Key { get; } + + /// + /// Value of the secret + /// + object Value { get; } + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Secrets/Interfaces.cs b/src/PepperDash.Essentials.Core/Secrets/ISecretProvider.cs similarity index 63% rename from src/PepperDash.Essentials.Core/Secrets/Interfaces.cs rename to src/PepperDash.Essentials.Core/Secrets/ISecretProvider.cs index 55ce5ccc..014154c2 100644 --- a/src/PepperDash.Essentials.Core/Secrets/Interfaces.cs +++ b/src/PepperDash.Essentials.Core/Secrets/ISecretProvider.cs @@ -1,6 +1,4 @@ -using PepperDash.Core; - -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Secrets { /// /// Defines the contract for ISecretProvider @@ -34,25 +32,4 @@ namespace PepperDash.Essentials.Core /// string Description { get; } } - - /// - /// interface for delivering secrets in Essentials. - /// - public interface ISecret - { - /// - /// Instance of ISecretProvider that the secret belongs to - /// - ISecretProvider Provider { get; } - - /// - /// Key of the secret in the provider - /// - string Key { get; } - - /// - /// Value of the secret - /// - object Value { get; } - } } \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Secrets/SecretsManager.cs b/src/PepperDash.Essentials.Core/Secrets/SecretsManager.cs index 6a08f0e2..73eb498b 100644 --- a/src/PepperDash.Essentials.Core/Secrets/SecretsManager.cs +++ b/src/PepperDash.Essentials.Core/Secrets/SecretsManager.cs @@ -2,10 +2,9 @@ using System.Collections.Generic; using System.Linq; using Crestron.SimplSharp; -using PepperDash.Core; using Serilog.Events; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Secrets { public static class SecretsManager { @@ -76,7 +75,7 @@ namespace PepperDash.Essentials.Core string response; var args = cmd.Split(' '); - if (cmd.Length == 0 || (args.Length == 1 && args[0] == "?")) + if (cmd.Length == 0 || args.Length == 1 && args[0] == "?") { response = "Returns data about secrets provider. Format 'secretproviderinfo '"; CrestronConsole.ConsoleCommandResponse(response); @@ -95,7 +94,7 @@ namespace PepperDash.Essentials.Core return; } - response = String.Format("{0} : {1}", provider.Key, provider.Description); + response = string.Format("{0} : {1}", provider.Key, provider.Description); CrestronConsole.ConsoleCommandResponse(response); return; } @@ -115,7 +114,7 @@ namespace PepperDash.Essentials.Core /// public static void ListProviders(string cmd) { - var response = String.Empty; + var response = string.Empty; var args = cmd.Split(' '); if (cmd.Length == 0) @@ -123,7 +122,7 @@ namespace PepperDash.Essentials.Core if (Secrets != null && Secrets.Count > 0) { response = Secrets.Aggregate(response, - (current, secretProvider) => current + (secretProvider.Key + "\n\r")); + (current, secretProvider) => current + secretProvider.Key + "\n\r"); } else { @@ -294,13 +293,13 @@ namespace PepperDash.Essentials.Core if (!secretPresent) return - String.Format( + string.Format( "Unable to update secret for {0}:{1} - Please use the 'SetSecret' command to modify it"); var response = provider.SetSecret(key, secret) - ? String.Format( + ? string.Format( "Secret successfully set for {0}:{1}", provider.Key, key) - : String.Format( + : string.Format( "Unable to set secret for {0}:{1}", provider.Key, key); return response; @@ -314,13 +313,13 @@ namespace PepperDash.Essentials.Core if (secretPresent) return - String.Format( + string.Format( "Unable to set secret for {0}:{1} - Please use the 'UpdateSecret' command to modify it"); var response = provider.SetSecret(key, secret) - ? String.Format( + ? string.Format( "Secret successfully set for {0}:{1}", provider.Key, key) - : String.Format( + : string.Format( "Unable to set secret for {0}:{1}", provider.Key, key); return response; @@ -374,10 +373,10 @@ namespace PepperDash.Essentials.Core provider.SetSecret(key, ""); response = provider.SetSecret(key, "") - ? String.Format( + ? string.Format( "Secret successfully deleted for {0}:{1}", provider.Key, key) - : String.Format( + : string.Format( "Unable to delete secret for {0}:{1}", provider.Key, key); CrestronConsole.ConsoleCommandResponse(response); diff --git a/src/PepperDash.Essentials.Core/Secrets/SecretsPropertiesConfig.cs b/src/PepperDash.Essentials.Core/Secrets/SecretsPropertiesConfig.cs index 3b72def9..ca5c6a09 100644 --- a/src/PepperDash.Essentials.Core/Secrets/SecretsPropertiesConfig.cs +++ b/src/PepperDash.Essentials.Core/Secrets/SecretsPropertiesConfig.cs @@ -1,6 +1,6 @@ using Newtonsoft.Json; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Secrets { /// /// Provide a way to easily deserialize into a secret object from config diff --git a/src/PepperDash.Essentials.Core/Shades/ICrestronBasicShade.cs b/src/PepperDash.Essentials.Core/Shades/ICrestronBasicShade.cs new file mode 100644 index 00000000..6f7dd485 --- /dev/null +++ b/src/PepperDash.Essentials.Core/Shades/ICrestronBasicShade.cs @@ -0,0 +1,9 @@ +namespace PepperDash.Essentials.Core.Shades +{ + + public interface ICrestronBasicShade : IShadesOpenClosedFeedback, + IShadesStopOrMove, IShadesFeedback, IShadesRaiseLowerFeedback + { + + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Shades/ISceneFeedback.cs b/src/PepperDash.Essentials.Core/Shades/ISceneFeedback.cs new file mode 100644 index 00000000..619c2086 --- /dev/null +++ b/src/PepperDash.Essentials.Core/Shades/ISceneFeedback.cs @@ -0,0 +1,13 @@ +using PepperDash.Essentials.Core.Feedbacks; + +namespace PepperDash.Essentials.Core.Shades +{ + /// + /// + /// + public interface ISceneFeedback + { + void Run(); + BoolFeedback AllAreAtSceneFeedback { get; } + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Shades/IShades.cs b/src/PepperDash.Essentials.Core/Shades/IShades.cs new file mode 100644 index 00000000..b2718e34 --- /dev/null +++ b/src/PepperDash.Essentials.Core/Shades/IShades.cs @@ -0,0 +1,12 @@ +using System.Collections.Generic; + +namespace PepperDash.Essentials.Core.Shades +{ + /// + /// Defines the contract for IShades + /// + public interface IShades + { + List Shades { get; } + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Shades/IShadesFeedback.cs b/src/PepperDash.Essentials.Core/Shades/IShadesFeedback.cs new file mode 100644 index 00000000..fa38ee1c --- /dev/null +++ b/src/PepperDash.Essentials.Core/Shades/IShadesFeedback.cs @@ -0,0 +1,12 @@ +using PepperDash.Essentials.Core.Feedbacks; + +namespace PepperDash.Essentials.Core.Shades +{ + /// + /// Basic feedback for shades position + /// + public interface IShadesFeedback: IShadesPosition, IShadesStopFeedback + { + IntFeedback PositionFeedback { get; } + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Shades/IShadesOpenClosePreset.cs b/src/PepperDash.Essentials.Core/Shades/IShadesOpenClosePreset.cs new file mode 100644 index 00000000..dc0020a9 --- /dev/null +++ b/src/PepperDash.Essentials.Core/Shades/IShadesOpenClosePreset.cs @@ -0,0 +1,13 @@ +using System; + +namespace PepperDash.Essentials.Core.Shades +{ + public interface IShadesOpenClosePreset : IShadesOpenCloseStop + { + void RecallPreset(uint presetNumber); + void SavePreset(uint presetNumber); + string StopOrPresetButtonLabel { get; } + + event EventHandler PresetSaved; + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Shades/IShadesOpenCloseStop.cs b/src/PepperDash.Essentials.Core/Shades/IShadesOpenCloseStop.cs new file mode 100644 index 00000000..bcde0162 --- /dev/null +++ b/src/PepperDash.Essentials.Core/Shades/IShadesOpenCloseStop.cs @@ -0,0 +1,12 @@ +namespace PepperDash.Essentials.Core.Shades +{ + /// + /// Requirements for a device that implements basic Open/Close/Stop shade control (Uses 3 relays) + /// + public interface IShadesOpenCloseStop + { + void Open(); + void Close(); + void Stop(); + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Shades/IShadesOpenClosedFeedback.cs b/src/PepperDash.Essentials.Core/Shades/IShadesOpenClosedFeedback.cs new file mode 100644 index 00000000..d48d65c0 --- /dev/null +++ b/src/PepperDash.Essentials.Core/Shades/IShadesOpenClosedFeedback.cs @@ -0,0 +1,13 @@ +using PepperDash.Essentials.Core.Feedbacks; + +namespace PepperDash.Essentials.Core.Shades +{ + /// + /// Requirements for a shade/scene that is open or closed + /// + public interface IShadesOpenClosedFeedback: IShadesOpenCloseStop + { + BoolFeedback ShadeIsOpenFeedback { get; } + BoolFeedback ShadeIsClosedFeedback { get; } + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Shades/IShadesPosition.cs b/src/PepperDash.Essentials.Core/Shades/IShadesPosition.cs new file mode 100644 index 00000000..85b48bd5 --- /dev/null +++ b/src/PepperDash.Essentials.Core/Shades/IShadesPosition.cs @@ -0,0 +1,10 @@ +namespace PepperDash.Essentials.Core.Shades +{ + /// + /// Requirements for position + /// + public interface IShadesPosition + { + void SetPosition(ushort value); + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Shades/IShadesRaiseLowerFeedback.cs b/src/PepperDash.Essentials.Core/Shades/IShadesRaiseLowerFeedback.cs new file mode 100644 index 00000000..b43cf872 --- /dev/null +++ b/src/PepperDash.Essentials.Core/Shades/IShadesRaiseLowerFeedback.cs @@ -0,0 +1,13 @@ +using PepperDash.Essentials.Core.Feedbacks; + +namespace PepperDash.Essentials.Core.Shades +{ + /// + /// Defines the contract for IShadesRaiseLowerFeedback + /// + public interface IShadesRaiseLowerFeedback + { + BoolFeedback ShadeIsLoweringFeedback { get; } + BoolFeedback ShadeIsRaisingFeedback { get; } + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Shades/IShadesStopFeedback.cs b/src/PepperDash.Essentials.Core/Shades/IShadesStopFeedback.cs new file mode 100644 index 00000000..aa512604 --- /dev/null +++ b/src/PepperDash.Essentials.Core/Shades/IShadesStopFeedback.cs @@ -0,0 +1,12 @@ +using PepperDash.Essentials.Core.Feedbacks; + +namespace PepperDash.Essentials.Core.Shades +{ + /// + /// Defines the contract for IShadesStopFeedback + /// + public interface IShadesStopFeedback : IShadesOpenCloseStop + { + BoolFeedback IsStoppedFeedback { get; } + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Shades/IShadesStopOrMove.cs b/src/PepperDash.Essentials.Core/Shades/IShadesStopOrMove.cs new file mode 100644 index 00000000..d34b4d42 --- /dev/null +++ b/src/PepperDash.Essentials.Core/Shades/IShadesStopOrMove.cs @@ -0,0 +1,12 @@ +namespace PepperDash.Essentials.Core.Shades +{ + /// + /// Used to implement raise/stop/lower/stop from single button + /// + public interface IShadesStopOrMove + { + void OpenOrStop(); + void CloseOrStop(); + void OpenCloseOrStop(); + } +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Shades/Shade Interfaces.cs b/src/PepperDash.Essentials.Core/Shades/Shade Interfaces.cs deleted file mode 100644 index 728a5187..00000000 --- a/src/PepperDash.Essentials.Core/Shades/Shade Interfaces.cs +++ /dev/null @@ -1,100 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace PepperDash.Essentials.Core.Shades -{ - /// - /// Defines the contract for IShades - /// - public interface IShades - { - List Shades { get; } - } - - /// - /// Requirements for a device that implements basic Open/Close/Stop shade control (Uses 3 relays) - /// - public interface IShadesOpenCloseStop - { - void Open(); - void Close(); - void Stop(); - } - - public interface IShadesOpenClosePreset : IShadesOpenCloseStop - { - void RecallPreset(uint presetNumber); - void SavePreset(uint presetNumber); - string StopOrPresetButtonLabel { get; } - - event EventHandler PresetSaved; - } - - - /// - /// Defines the contract for IShadesRaiseLowerFeedback - /// - public interface IShadesRaiseLowerFeedback - { - BoolFeedback ShadeIsLoweringFeedback { get; } - BoolFeedback ShadeIsRaisingFeedback { get; } - } - - /// - /// Requirements for a shade/scene that is open or closed - /// - public interface IShadesOpenClosedFeedback: IShadesOpenCloseStop - { - BoolFeedback ShadeIsOpenFeedback { get; } - BoolFeedback ShadeIsClosedFeedback { get; } - } - - /// - /// Used to implement raise/stop/lower/stop from single button - /// - public interface IShadesStopOrMove - { - void OpenOrStop(); - void CloseOrStop(); - void OpenCloseOrStop(); - } - - /// - /// Defines the contract for IShadesStopFeedback - /// - public interface IShadesStopFeedback : IShadesOpenCloseStop - { - BoolFeedback IsStoppedFeedback { get; } - } - - /// - /// Requirements for position - /// - public interface IShadesPosition - { - void SetPosition(ushort value); - } - - /// - /// Basic feedback for shades position - /// - public interface IShadesFeedback: IShadesPosition, IShadesStopFeedback - { - IntFeedback PositionFeedback { get; } - } - - /// - /// - /// - public interface ISceneFeedback - { - void Run(); - BoolFeedback AllAreAtSceneFeedback { get; } - } - - public interface ICrestronBasicShade : IShadesOpenClosedFeedback, - IShadesStopOrMove, IShadesFeedback, IShadesRaiseLowerFeedback - { - - } -} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/Shades/ShadeBase.cs b/src/PepperDash.Essentials.Core/Shades/ShadeBase.cs index fd1bfc21..dd1abbca 100644 --- a/src/PepperDash.Essentials.Core/Shades/ShadeBase.cs +++ b/src/PepperDash.Essentials.Core/Shades/ShadeBase.cs @@ -1,4 +1,5 @@ -using System; +using PepperDash.Essentials.Core.Devices; +using System; namespace PepperDash.Essentials.Core.Shades { diff --git a/src/PepperDash.Essentials.Core/SigHelper.cs b/src/PepperDash.Essentials.Core/SigHelper.cs deleted file mode 100644 index 056f3dc2..00000000 --- a/src/PepperDash.Essentials.Core/SigHelper.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System; -using Crestron.SimplSharpPro; - -namespace PepperDash.Essentials.Core -{ - /// - /// Helper class for various Sig events - /// - public class SigHelper - { - /// - /// Runs action when Sig is pressed - /// - /// - public static void Pressed(Sig sig, Action act) { if (sig.BoolValue) act(); } - - /// - /// Runs action when Sig is released - /// - public static void Released(Sig sig, Action act) { if (!sig.BoolValue) act(); } - - /// - /// SetBoolOutAction method - /// - public static void SetBoolOutAction(BoolOutputSig sig, Action a) - { - if (sig != null) - sig.UserObject = a; - } - - /// - /// Safely clears action of non-null sig. - /// - public static void ClearBoolOutAction(BoolOutputSig sig) - { - if (sig != null) - sig.UserObject = null; - } - - /// - /// Does a timed ramp, where the time is scaled proportional to the - /// remaining range to cover - /// - /// Ushort sig to scale - /// Level to go to - /// In ms (not hundredths like Crestron Sig ramp function) - /// - /// RampTimeScaled method - /// - public static void RampTimeScaled(Sig sig, ushort newLevel, uint time) - { - ushort level = sig.UShortValue; - int diff = Math.Abs(level - newLevel); - uint scaledTime = (uint)(diff * time / 65535); - Ramp(sig, newLevel, scaledTime); - } - - /// - /// Ramps signal - /// - /// - /// - /// In ms (not hundredths like Crestron Sig ramp function) - /// - /// Ramp method - /// - public static void Ramp(Sig sig, ushort level, uint time) - { - sig.CreateRamp(level, time / 10); - } - } -} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/SmartObjects/SmartObjectDynamicList.cs b/src/PepperDash.Essentials.Core/SmartObjects/SmartObjectDynamicList.cs index d62a46d2..2390255a 100644 --- a/src/PepperDash.Essentials.Core/SmartObjects/SmartObjectDynamicList.cs +++ b/src/PepperDash.Essentials.Core/SmartObjects/SmartObjectDynamicList.cs @@ -2,8 +2,6 @@ using System.Linq; using Crestron.SimplSharpPro; using Crestron.SimplSharpPro.DeviceSupport; - -using PepperDash.Core; using Serilog.Events; diff --git a/src/PepperDash.Essentials.Core/SmartObjects/SmartObjectHelperBase.cs b/src/PepperDash.Essentials.Core/SmartObjects/SmartObjectHelperBase.cs index a3118d85..f715648c 100644 --- a/src/PepperDash.Essentials.Core/SmartObjects/SmartObjectHelperBase.cs +++ b/src/PepperDash.Essentials.Core/SmartObjects/SmartObjectHelperBase.cs @@ -1,7 +1,5 @@ using System; using Crestron.SimplSharpPro; - -using PepperDash.Core; using Serilog.Events; namespace PepperDash.Essentials.Core.SmartObjects diff --git a/src/PepperDash.Essentials.Core/SmartObjects/SubpageReferencList/SubpageReferenceList.cs b/src/PepperDash.Essentials.Core/SmartObjects/SubpageReferencList/SubpageReferenceList.cs index a5b0d31e..495a5efb 100644 --- a/src/PepperDash.Essentials.Core/SmartObjects/SubpageReferencList/SubpageReferenceList.cs +++ b/src/PepperDash.Essentials.Core/SmartObjects/SubpageReferencList/SubpageReferenceList.cs @@ -4,12 +4,10 @@ using System.Collections.Generic; using System.Linq; using Crestron.SimplSharpPro; using Crestron.SimplSharpPro.DeviceSupport; - -using PepperDash.Core; using Serilog.Events; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.SmartObjects.SubpageReferencList { ////***************************************************************************** /// @@ -222,37 +220,37 @@ namespace PepperDash.Essentials.Core string GetBoolFeedbackSigName(uint index, uint sigNum) { var num = (index - 1) * BoolIncrement + sigNum; - return String.Format("press{0}", num); + return string.Format("press{0}", num); } string GetUShortOutputSigName(uint index, uint sigNum) { var num = (index - 1) * UShortIncrement + sigNum; - return String.Format("an_act{0}", num); + return string.Format("an_act{0}", num); } string GetStringOutputSigName(uint index, uint sigNum) { var num = (index - 1) * StringIncrement + sigNum; - return String.Format("text-i{0}", num); + return string.Format("text-i{0}", num); } string GetBoolInputSigName(uint index, uint sigNum) { var num = (index - 1) * BoolIncrement + sigNum; - return String.Format("fb{0}", num); + return string.Format("fb{0}", num); } string GetUShortInputSigName(uint index, uint sigNum) { var num = (index - 1) * UShortIncrement + sigNum; - return String.Format("an_fb{0}", num); + return string.Format("an_fb{0}", num); } string GetStringInputSigName(uint index, uint sigNum) { var num = (index - 1) * StringIncrement + sigNum; - return String.Format("text-o{0}", num); + return string.Format("text-o{0}", num); } /// diff --git a/src/PepperDash.Essentials.Core/SmartObjects/SubpageReferencList/SubpageReferenceListItem.cs b/src/PepperDash.Essentials.Core/SmartObjects/SubpageReferencList/SubpageReferenceListItem.cs index 8bbfa9e6..e487617c 100644 --- a/src/PepperDash.Essentials.Core/SmartObjects/SubpageReferencList/SubpageReferenceListItem.cs +++ b/src/PepperDash.Essentials.Core/SmartObjects/SubpageReferencList/SubpageReferenceListItem.cs @@ -1,4 +1,4 @@ -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.SmartObjects.SubpageReferencList { /// /// Represents a SubpageReferenceListItem diff --git a/src/PepperDash.Essentials.Core/Timers/CountdownTimer.cs b/src/PepperDash.Essentials.Core/Timers/CountdownTimer.cs index 48cec62a..b42e7b1f 100644 --- a/src/PepperDash.Essentials.Core/Timers/CountdownTimer.cs +++ b/src/PepperDash.Essentials.Core/Timers/CountdownTimer.cs @@ -1,10 +1,9 @@ using System; using Crestron.SimplSharp; - -using PepperDash.Core; +using PepperDash.Essentials.Core.Feedbacks; using Serilog.Events; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Timers { /// /// Represents a SecondsCountdownTimer @@ -82,12 +81,12 @@ namespace PepperDash.Essentials.Core if (Math.Floor(timeSpan.TotalSeconds) < 60 && Math.Floor(timeSpan.TotalSeconds) >= 0) //ignore milliseconds { - return String.Format("{0:00}", timeSpan.Seconds); + return string.Format("{0:00}", timeSpan.Seconds); } return Math.Floor(timeSpan.TotalSeconds) < 0 ? "00" - : String.Format("{0:00}:{1:00}", timeSpan.Minutes, timeSpan.Seconds); + : string.Format("{0:00}:{1:00}", timeSpan.Minutes, timeSpan.Seconds); }); SecondsRemainingFeedback = new IntFeedback(() => (int)(FinishTime - DateTime.Now).TotalSeconds); diff --git a/src/PepperDash.Essentials.Core/Timers/RetriggerableTimer.cs b/src/PepperDash.Essentials.Core/Timers/RetriggerableTimer.cs index 383d604a..c98706b5 100644 --- a/src/PepperDash.Essentials.Core/Timers/RetriggerableTimer.cs +++ b/src/PepperDash.Essentials.Core/Timers/RetriggerableTimer.cs @@ -3,12 +3,11 @@ using System; using System.Collections.Generic; using Crestron.SimplSharp; - -using PepperDash.Core; using PepperDash.Essentials.Core.Config; using Newtonsoft.Json; using Serilog.Events; +using PepperDash.Essentials.Core.Devices; namespace PepperDash.Essentials.Core.Timers diff --git a/src/PepperDash.Essentials.Core/Touchpanels/CrestronTouchpanelPropertiesConfig.cs b/src/PepperDash.Essentials.Core/Touchpanels/CrestronTouchpanelPropertiesConfig.cs index 1358b1b9..809abcd7 100644 --- a/src/PepperDash.Essentials.Core/Touchpanels/CrestronTouchpanelPropertiesConfig.cs +++ b/src/PepperDash.Essentials.Core/Touchpanels/CrestronTouchpanelPropertiesConfig.cs @@ -1,6 +1,7 @@ using Newtonsoft.Json; +using PepperDash.Essentials.Core.Communications; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Touchpanels { /// /// Represents a CrestronTouchpanelPropertiesConfig diff --git a/src/PepperDash.Essentials.Core/Touchpanels/Interfaces.cs b/src/PepperDash.Essentials.Core/Touchpanels/Interfaces.cs index a9f0600a..0646a14d 100644 --- a/src/PepperDash.Essentials.Core/Touchpanels/Interfaces.cs +++ b/src/PepperDash.Essentials.Core/Touchpanels/Interfaces.cs @@ -1,6 +1,6 @@ using Crestron.SimplSharpPro.DeviceSupport; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Touchpanels { /// /// Defines the contract for IHasBasicTriListWithSmartObject diff --git a/src/PepperDash.Essentials.Core/Touchpanels/Keyboards/HabaneroKeyboardController.cs b/src/PepperDash.Essentials.Core/Touchpanels/Keyboards/HabaneroKeyboardController.cs index dee60152..dcfdf15a 100644 --- a/src/PepperDash.Essentials.Core/Touchpanels/Keyboards/HabaneroKeyboardController.cs +++ b/src/PepperDash.Essentials.Core/Touchpanels/Keyboards/HabaneroKeyboardController.cs @@ -2,6 +2,7 @@ using System.Text; using Crestron.SimplSharp; using Crestron.SimplSharpPro.DeviceSupport; +using PepperDash.Essentials.Core.Feedbacks; namespace PepperDash.Essentials.Core.Touchpanels.Keyboards { diff --git a/src/PepperDash.Essentials.Core/Touchpanels/ModalDialog.cs b/src/PepperDash.Essentials.Core/Touchpanels/ModalDialog.cs index 87d2e701..2ca05531 100644 --- a/src/PepperDash.Essentials.Core/Touchpanels/ModalDialog.cs +++ b/src/PepperDash.Essentials.Core/Touchpanels/ModalDialog.cs @@ -1,9 +1,8 @@ using System; using Crestron.SimplSharpPro.DeviceSupport; -using PepperDash.Core; using Serilog.Events; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Touchpanels { /// /// Represents a ModalDialog diff --git a/src/PepperDash.Essentials.Core/Touchpanels/Mpc3Touchpanel.cs b/src/PepperDash.Essentials.Core/Touchpanels/Mpc3Touchpanel.cs index fa20ca84..8f577a31 100644 --- a/src/PepperDash.Essentials.Core/Touchpanels/Mpc3Touchpanel.cs +++ b/src/PepperDash.Essentials.Core/Touchpanels/Mpc3Touchpanel.cs @@ -3,8 +3,8 @@ using System.Collections.Generic; using System.Globalization; using Crestron.SimplSharpPro; using Newtonsoft.Json; -using PepperDash.Core; -using PepperDash.Core.Logging; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Feedbacks; using Serilog.Events; namespace PepperDash.Essentials.Core.Touchpanels diff --git a/src/PepperDash.Essentials.Core/Touchpanels/TriListExtensions.cs b/src/PepperDash.Essentials.Core/Touchpanels/TriListExtensions.cs index 072e0efe..dfb8a99f 100644 --- a/src/PepperDash.Essentials.Core/Touchpanels/TriListExtensions.cs +++ b/src/PepperDash.Essentials.Core/Touchpanels/TriListExtensions.cs @@ -4,7 +4,7 @@ using Crestron.SimplSharp; using Crestron.SimplSharpPro; using Crestron.SimplSharpPro.DeviceSupport; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Touchpanels { /// /// Extensions used for more-clear attachment of Actions to user objects on sigs @@ -71,7 +71,7 @@ namespace PepperDash.Essentials.Core /// The sig public static BoolOutputSig SetSigHeldAction(this BasicTriList tl, uint sigNum, uint heldMs, Action heldAction) { - return SetSigHeldAction(tl, sigNum, heldMs, heldAction, null); + return tl.SetSigHeldAction(sigNum, heldMs, heldAction, null); } /// @@ -81,7 +81,7 @@ namespace PepperDash.Essentials.Core public static BoolOutputSig SetSigHeldAction(this BoolOutputSig sig, uint heldMs, Action heldAction, Action holdReleasedAction, Action releaseAction) { CTimer heldTimer = null; - bool wasHeld = false; + var wasHeld = false; return sig.SetBoolSigAction(press => { if (press) @@ -212,7 +212,7 @@ namespace PepperDash.Essentials.Core public static BoolOutputSig ClearBoolSigAction(this BasicTriList tl, uint sigNum) { - return ClearSigAction(tl.BooleanOutput[sigNum]) as BoolOutputSig; + return tl.BooleanOutput[sigNum].ClearSigAction() as BoolOutputSig; } /// @@ -220,7 +220,7 @@ namespace PepperDash.Essentials.Core /// public static UShortOutputSig ClearUShortSigAction(this BasicTriList tl, uint sigNum) { - return ClearSigAction(tl.UShortOutput[sigNum]) as UShortOutputSig; + return tl.UShortOutput[sigNum].ClearSigAction() as UShortOutputSig; } /// @@ -228,7 +228,7 @@ namespace PepperDash.Essentials.Core /// public static StringOutputSig ClearStringSigAction(this BasicTriList tl, uint sigNum) { - return ClearSigAction(tl.StringOutput[sigNum]) as StringOutputSig; + return tl.StringOutput[sigNum].ClearSigAction() as StringOutputSig; } /// @@ -238,17 +238,17 @@ namespace PepperDash.Essentials.Core { foreach (var sig in t1.BooleanOutput) { - ClearSigAction(sig); + sig.ClearSigAction(); } foreach (var sig in t1.UShortOutput) { - ClearSigAction(sig); + sig.ClearSigAction(); } foreach (var sig in t1.StringOutput) { - ClearSigAction(sig); + sig.ClearSigAction(); } } diff --git a/src/PepperDash.Essentials.Core/TriListBridges/HandlerBridge.cs b/src/PepperDash.Essentials.Core/TriListBridges/HandlerBridge.cs index 4157fd30..00d666d2 100644 --- a/src/PepperDash.Essentials.Core/TriListBridges/HandlerBridge.cs +++ b/src/PepperDash.Essentials.Core/TriListBridges/HandlerBridge.cs @@ -1,4 +1,4 @@ -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.TriListBridges { public abstract class HandlerBridge { diff --git a/src/PepperDash.Essentials.Core/UI PageManagers/BlurayPageManager.cs b/src/PepperDash.Essentials.Core/UI PageManagers/BlurayPageManager.cs index 2fd346f4..9b591d49 100644 --- a/src/PepperDash.Essentials.Core/UI PageManagers/BlurayPageManager.cs +++ b/src/PepperDash.Essentials.Core/UI PageManagers/BlurayPageManager.cs @@ -1,4 +1,6 @@ using Crestron.SimplSharpPro.DeviceSupport; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; +using PepperDash.Essentials.Core.Touchpanels; namespace PepperDash.Essentials.Core.PageManagers { diff --git a/src/PepperDash.Essentials.Core/UI PageManagers/PageManager.cs b/src/PepperDash.Essentials.Core/UI PageManagers/PageManager.cs index 9d7964e0..657790db 100644 --- a/src/PepperDash.Essentials.Core/UI PageManagers/PageManager.cs +++ b/src/PepperDash.Essentials.Core/UI PageManagers/PageManager.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using Crestron.SimplSharpPro.DeviceSupport; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; namespace PepperDash.Essentials.Core.PageManagers { diff --git a/src/PepperDash.Essentials.Core/UI PageManagers/SetTopBoxThreePanelPageManager.cs b/src/PepperDash.Essentials.Core/UI PageManagers/SetTopBoxThreePanelPageManager.cs index dd4b6041..8f54c238 100644 --- a/src/PepperDash.Essentials.Core/UI PageManagers/SetTopBoxThreePanelPageManager.cs +++ b/src/PepperDash.Essentials.Core/UI PageManagers/SetTopBoxThreePanelPageManager.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using Crestron.SimplSharpPro.DeviceSupport; -using PepperDash.Core; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; using PepperDash.Essentials.Core.Presets; using Serilog.Events; diff --git a/src/PepperDash.Essentials.Core/UI PageManagers/SetTopBoxTwoPanelPageManager.cs b/src/PepperDash.Essentials.Core/UI PageManagers/SetTopBoxTwoPanelPageManager.cs index 865f5c63..64b65ac3 100644 --- a/src/PepperDash.Essentials.Core/UI PageManagers/SetTopBoxTwoPanelPageManager.cs +++ b/src/PepperDash.Essentials.Core/UI PageManagers/SetTopBoxTwoPanelPageManager.cs @@ -1,5 +1,7 @@ using Crestron.SimplSharpPro.DeviceSupport; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; using PepperDash.Essentials.Core.Presets; +using PepperDash.Essentials.Core.Touchpanels; namespace PepperDash.Essentials.Core.PageManagers { diff --git a/src/PepperDash.Essentials.Core/UI/TouchpanelBase.cs b/src/PepperDash.Essentials.Core/UI/TouchpanelBase.cs index 9de7957a..25a8e1f2 100644 --- a/src/PepperDash.Essentials.Core/UI/TouchpanelBase.cs +++ b/src/PepperDash.Essentials.Core/UI/TouchpanelBase.cs @@ -1,10 +1,12 @@ using System; using System.Linq; using Crestron.SimplSharpPro.DeviceSupport; -using PepperDash.Core; using Crestron.SimplSharp.CrestronIO; using Crestron.SimplSharpPro; using Serilog.Events; +using PepperDash.Essentials.Core.Touchpanels; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Rooms.Combining; namespace PepperDash.Essentials.Core.UI { diff --git a/src/PepperDash.Essentials.Core/InUseTracking/IInUseTracking.cs b/src/PepperDash.Essentials.Core/USage/IInUseTracking.cs similarity index 77% rename from src/PepperDash.Essentials.Core/InUseTracking/IInUseTracking.cs rename to src/PepperDash.Essentials.Core/USage/IInUseTracking.cs index 31986bac..aeb4f407 100644 --- a/src/PepperDash.Essentials.Core/InUseTracking/IInUseTracking.cs +++ b/src/PepperDash.Essentials.Core/USage/IInUseTracking.cs @@ -1,4 +1,4 @@ -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Usage { /// /// Defines a class that uses an InUseTracker diff --git a/src/PepperDash.Essentials.Core/InUseTracking/InUseTracking.cs b/src/PepperDash.Essentials.Core/USage/InUseTracking.cs similarity index 95% rename from src/PepperDash.Essentials.Core/InUseTracking/InUseTracking.cs rename to src/PepperDash.Essentials.Core/USage/InUseTracking.cs index f6bd73dc..3b20f7d0 100644 --- a/src/PepperDash.Essentials.Core/InUseTracking/InUseTracking.cs +++ b/src/PepperDash.Essentials.Core/USage/InUseTracking.cs @@ -1,7 +1,8 @@ -using System.Collections.Generic; +using PepperDash.Essentials.Core.Feedbacks; +using System.Collections.Generic; using System.Linq; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Usage { /// /// Provides in use tracking. Objects can register with this. InUseFeedback can provide diff --git a/src/PepperDash.Essentials.Core/Ramps and Increments/ActionIncrementer.cs b/src/PepperDash.Essentials.Core/Utilities/ActionIncrementer.cs similarity index 93% rename from src/PepperDash.Essentials.Core/Ramps and Increments/ActionIncrementer.cs rename to src/PepperDash.Essentials.Core/Utilities/ActionIncrementer.cs index a7933072..bc2fed52 100644 --- a/src/PepperDash.Essentials.Core/Ramps and Increments/ActionIncrementer.cs +++ b/src/PepperDash.Essentials.Core/Utilities/ActionIncrementer.cs @@ -1,7 +1,7 @@ using System; using Crestron.SimplSharp; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Utilities { /// /// An incrementer that can use the values of some other object/primitive value to do its thing. @@ -75,10 +75,10 @@ namespace PepperDash.Essentials.Core /// void Go(int change) { - int currentLevel = GetFunc(); + var currentLevel = GetFunc(); // Fire once then pause - int newLevel = currentLevel + change; - bool atLimit = CheckLevel(newLevel, out newLevel); + var newLevel = currentLevel + change; + var atLimit = CheckLevel(newLevel, out newLevel); SetAction(newLevel); if (atLimit) // Don't go past end @@ -96,7 +96,7 @@ namespace PepperDash.Essentials.Core /// true if new level is at or past bounds bool CheckLevel(int levelIn, out int levelOut) { - bool isAtLimit = false; + var isAtLimit = false; if (levelIn > MaxValue) { levelOut = MaxValue; diff --git a/src/PepperDash.Essentials.Core/Utilities/ActionSequence.cs b/src/PepperDash.Essentials.Core/Utilities/ActionSequence.cs index 5f385668..59ee6b7c 100644 --- a/src/PepperDash.Essentials.Core/Utilities/ActionSequence.cs +++ b/src/PepperDash.Essentials.Core/Utilities/ActionSequence.cs @@ -4,12 +4,11 @@ using System; using System.Collections.Generic; using Crestron.SimplSharp; using Crestron.SimplSharpPro.CrestronThread; - -using PepperDash.Core; using PepperDash.Essentials.Core.Config; using Newtonsoft.Json; using Serilog.Events; +using PepperDash.Essentials.Core.Devices; namespace PepperDash.Essentials.Core.Utilities { diff --git a/src/PepperDash.Essentials.Core/Ramps and Increments/NumericalHelpers.cs b/src/PepperDash.Essentials.Core/Utilities/NumericalHelpers.cs similarity index 83% rename from src/PepperDash.Essentials.Core/Ramps and Increments/NumericalHelpers.cs rename to src/PepperDash.Essentials.Core/Utilities/NumericalHelpers.cs index 3d2b49a6..27d10889 100644 --- a/src/PepperDash.Essentials.Core/Ramps and Increments/NumericalHelpers.cs +++ b/src/PepperDash.Essentials.Core/Utilities/NumericalHelpers.cs @@ -1,6 +1,6 @@ using System; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Utilities { /// /// Represents a NumericalHelpers @@ -20,16 +20,16 @@ namespace PepperDash.Essentials.Core { //Debug.LogMessage(LogEventLevel.Verbose, this, "Scaling (double) input '{0}' with min '{1}'/max '{2}' to output range min '{3}'/max '{4}'", input, inMin, inMax, outMin, outMax); - double inputRange = inMax - inMin; + var inputRange = inMax - inMin; if (inputRange <= 0) { throw new ArithmeticException(string.Format("Invalid Input Range '{0}' for Scaling. Min '{1}' Max '{2}'.", inputRange, inMin, inMax)); } - double outputRange = outMax - outMin; + var outputRange = outMax - outMin; - var output = (((input - inMin) * outputRange) / inputRange) + outMin; + var output = (input - inMin) * outputRange / inputRange + outMin; // Debug.LogMessage(LogEventLevel.Verbose, this, "Scaled output '{0}'", output); diff --git a/src/PepperDash.Essentials.Core/Ramps and Increments/UshortSigIncrementer.cs b/src/PepperDash.Essentials.Core/Utilities/UshortSigIncrementer.cs similarity index 93% rename from src/PepperDash.Essentials.Core/Ramps and Increments/UshortSigIncrementer.cs rename to src/PepperDash.Essentials.Core/Utilities/UshortSigIncrementer.cs index f20d09bc..db98ede6 100644 --- a/src/PepperDash.Essentials.Core/Ramps and Increments/UshortSigIncrementer.cs +++ b/src/PepperDash.Essentials.Core/Utilities/UshortSigIncrementer.cs @@ -1,10 +1,8 @@ using Crestron.SimplSharp; using Crestron.SimplSharpPro; - -using PepperDash.Core; using Serilog.Events; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.Utilities { /// /// Attaches to UShortInputSig and does incremental ramping of the signal @@ -58,8 +56,8 @@ namespace PepperDash.Essentials.Core else level = TheSig.UShortValue; // Fire once then pause - int newLevel = level + change; - bool atLimit = CheckLevel(newLevel, out newLevel); + var newLevel = level + change; + var atLimit = CheckLevel(newLevel, out newLevel); SetValue((ushort)newLevel); @@ -71,7 +69,7 @@ namespace PepperDash.Essentials.Core bool CheckLevel(int levelIn, out int levelOut) { - bool IsAtLimit = false; + var IsAtLimit = false; if (levelIn > MaxValue) { levelOut = MaxValue; diff --git a/src/PepperDash.Essentials.Core/VideoStatus/VideoStatusOutputs.cs b/src/PepperDash.Essentials.Core/VideoStatus/VideoStatusOutputs.cs index 9f8f592b..d9cea955 100644 --- a/src/PepperDash.Essentials.Core/VideoStatus/VideoStatusOutputs.cs +++ b/src/PepperDash.Essentials.Core/VideoStatus/VideoStatusOutputs.cs @@ -1,7 +1,8 @@ -using System; +using PepperDash.Essentials.Core.Feedbacks; +using System; using System.Collections.Generic; -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core.VideoStatus { /// /// Use this class to pass in values to RoutingInputPorts. Unused properties will have default diff --git a/src/PepperDash.Essentials.Core/app.config b/src/PepperDash.Essentials.Core/app.config deleted file mode 100644 index 1e79e7b5..00000000 --- a/src/PepperDash.Essentials.Core/app.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/src/PepperDash.Essentials.Devices.Common/Audio/GenericAudioOut.cs b/src/PepperDash.Essentials.Devices.Common/Audio/GenericAudioOut.cs index 2d6b4721..addd8893 100644 --- a/src/PepperDash.Essentials.Devices.Common/Audio/GenericAudioOut.cs +++ b/src/PepperDash.Essentials.Devices.Common/Audio/GenericAudioOut.cs @@ -3,7 +3,8 @@ using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Config; - +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Routing; using Serilog.Events; namespace PepperDash.Essentials.Devices.Common diff --git a/src/PepperDash.Essentials.Devices.Common/AudioCodec/AudioCodecBase.cs b/src/PepperDash.Essentials.Devices.Common/AudioCodec/AudioCodecBase.cs index 88b12a2f..3e630a84 100644 --- a/src/PepperDash.Essentials.Devices.Common/AudioCodec/AudioCodecBase.cs +++ b/src/PepperDash.Essentials.Devices.Common/AudioCodec/AudioCodecBase.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; -using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Devices; using PepperDash.Essentials.Devices.Common.Codec; namespace PepperDash.Essentials.Devices.Common.AudioCodec diff --git a/src/PepperDash.Essentials.Devices.Common/AudioCodec/Interfaces/IHasAudioCodec.cs b/src/PepperDash.Essentials.Devices.Common/AudioCodec/Interfaces/IHasAudioCodec.cs index 741697a3..c1f348e7 100644 --- a/src/PepperDash.Essentials.Devices.Common/AudioCodec/Interfaces/IHasAudioCodec.cs +++ b/src/PepperDash.Essentials.Devices.Common/AudioCodec/Interfaces/IHasAudioCodec.cs @@ -1,4 +1,4 @@ -using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Rooms; namespace PepperDash.Essentials.Devices.Common.AudioCodec { diff --git a/src/PepperDash.Essentials.Devices.Common/AudioCodec/MockAC/MockAC.cs b/src/PepperDash.Essentials.Devices.Common/AudioCodec/MockAC/MockAC.cs index b38ff52f..2db40fb1 100644 --- a/src/PepperDash.Essentials.Devices.Common/AudioCodec/MockAC/MockAC.cs +++ b/src/PepperDash.Essentials.Devices.Common/AudioCodec/MockAC/MockAC.cs @@ -3,6 +3,7 @@ using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Devices; using PepperDash.Essentials.Devices.Common.Codec; using Serilog.Events; diff --git a/src/PepperDash.Essentials.Devices.Common/Cameras/CameraBase.cs b/src/PepperDash.Essentials.Devices.Common/Cameras/CameraBase.cs index 72437187..5f61f604 100644 --- a/src/PepperDash.Essentials.Devices.Common/Cameras/CameraBase.cs +++ b/src/PepperDash.Essentials.Devices.Common/Cameras/CameraBase.cs @@ -6,7 +6,6 @@ using System.Linq; using System.Text; using Crestron.SimplSharpPro.DeviceSupport; using PepperDash.Core; -using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Devices; using PepperDash.Essentials.Core.Config; using PepperDash.Essentials.Core.Bridges; @@ -14,6 +13,14 @@ using PepperDash.Essentials.Core.Presets; using Newtonsoft.Json; using Serilog.Events; +using PepperDash.Essentials.Core.Routing; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; +using PepperDash.Essentials.Core.JoinMaps; +using PepperDash.Essentials.Core.Monitoring; +using PepperDash.Essentials.Core.Bridges.JoinMaps; +using PepperDash.Essentials.Core.Touchpanels; +using PepperDash.Essentials.Core.Communications; +using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Devices.Common.Cameras { diff --git a/src/PepperDash.Essentials.Devices.Common/Cameras/CameraControl.cs b/src/PepperDash.Essentials.Devices.Common/Cameras/CameraControl.cs index e2120638..062f4315 100644 --- a/src/PepperDash.Essentials.Devices.Common/Cameras/CameraControl.cs +++ b/src/PepperDash.Essentials.Devices.Common/Cameras/CameraControl.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using PepperDash.Core; using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Feedbacks; namespace PepperDash.Essentials.Devices.Common.Cameras { diff --git a/src/PepperDash.Essentials.Devices.Common/Cameras/CameraVisca.cs b/src/PepperDash.Essentials.Devices.Common/Cameras/CameraVisca.cs index 929bcf93..36b9a0e6 100644 --- a/src/PepperDash.Essentials.Devices.Common/Cameras/CameraVisca.cs +++ b/src/PepperDash.Essentials.Devices.Common/Cameras/CameraVisca.cs @@ -6,12 +6,18 @@ using System.Linq; using Crestron.SimplSharp; using Crestron.SimplSharpPro.DeviceSupport; using PepperDash.Core; -using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Bridges; using PepperDash.Essentials.Core.Config; using Newtonsoft.Json; using Serilog.Events; +using PepperDash.Essentials.Core.Communications; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; +using PepperDash.Essentials.Core.Feedbacks; +using PepperDash.Essentials.Core.Routing; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Monitoring; +using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Devices.Common.Cameras { diff --git a/src/PepperDash.Essentials.Devices.Common/Codec/Cisco/IPresenterTrack.cs b/src/PepperDash.Essentials.Devices.Common/Codec/Cisco/IPresenterTrack.cs index 134dc7b5..3c8d2e8b 100644 --- a/src/PepperDash.Essentials.Devices.Common/Codec/Cisco/IPresenterTrack.cs +++ b/src/PepperDash.Essentials.Devices.Common/Codec/Cisco/IPresenterTrack.cs @@ -1,5 +1,6 @@ using PepperDash.Core; using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Feedbacks; namespace PepperDash.Essentials.Devices.Common.Codec.Cisco { diff --git a/src/PepperDash.Essentials.Devices.Common/Codec/Cisco/ISpeakerTrack.cs b/src/PepperDash.Essentials.Devices.Common/Codec/Cisco/ISpeakerTrack.cs index 522e6ad2..a1bd9349 100644 --- a/src/PepperDash.Essentials.Devices.Common/Codec/Cisco/ISpeakerTrack.cs +++ b/src/PepperDash.Essentials.Devices.Common/Codec/Cisco/ISpeakerTrack.cs @@ -1,5 +1,6 @@ using PepperDash.Core; using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Feedbacks; namespace PepperDash.Essentials.Devices.Common.Codec.Cisco { diff --git a/src/PepperDash.Essentials.Devices.Common/Codec/IHasDoNotDisturb.cs b/src/PepperDash.Essentials.Devices.Common/Codec/IHasDoNotDisturb.cs index 66281711..92211d17 100644 --- a/src/PepperDash.Essentials.Devices.Common/Codec/IHasDoNotDisturb.cs +++ b/src/PepperDash.Essentials.Devices.Common/Codec/IHasDoNotDisturb.cs @@ -1,4 +1,4 @@ -using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Feedbacks; namespace PepperDash.Essentials.Devices.Common.Codec { diff --git a/src/PepperDash.Essentials.Devices.Common/Codec/iCodecAudio.cs b/src/PepperDash.Essentials.Devices.Common/Codec/iCodecAudio.cs index eeab2801..0a5d3475 100644 --- a/src/PepperDash.Essentials.Devices.Common/Codec/iCodecAudio.cs +++ b/src/PepperDash.Essentials.Devices.Common/Codec/iCodecAudio.cs @@ -1,4 +1,4 @@ -using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Devices; namespace PepperDash.Essentials.Devices.Common.Codec { diff --git a/src/PepperDash.Essentials.Devices.Common/Codec/iHasContentSharing.cs b/src/PepperDash.Essentials.Devices.Common/Codec/iHasContentSharing.cs index b8361040..43f328d7 100644 --- a/src/PepperDash.Essentials.Devices.Common/Codec/iHasContentSharing.cs +++ b/src/PepperDash.Essentials.Devices.Common/Codec/iHasContentSharing.cs @@ -1,4 +1,4 @@ -using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Feedbacks; namespace PepperDash.Essentials.Devices.Common.Codec diff --git a/src/PepperDash.Essentials.Devices.Common/Codec/iHasDirectory.cs b/src/PepperDash.Essentials.Devices.Common/Codec/iHasDirectory.cs index 1331c88a..7ea54fc4 100644 --- a/src/PepperDash.Essentials.Devices.Common/Codec/iHasDirectory.cs +++ b/src/PepperDash.Essentials.Devices.Common/Codec/iHasDirectory.cs @@ -6,7 +6,7 @@ using System.Linq; using Newtonsoft.Json; using Newtonsoft.Json.Converters; -using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Feedbacks; using PepperDash.Essentials.Devices.Common.VideoCodec; namespace PepperDash.Essentials.Devices.Common.Codec diff --git a/src/PepperDash.Essentials.Devices.Common/Codec/iHasScheduleAwareness.cs b/src/PepperDash.Essentials.Devices.Common/Codec/iHasScheduleAwareness.cs index 861bffe3..24055728 100644 --- a/src/PepperDash.Essentials.Devices.Common/Codec/iHasScheduleAwareness.cs +++ b/src/PepperDash.Essentials.Devices.Common/Codec/iHasScheduleAwareness.cs @@ -8,6 +8,7 @@ using PepperDash.Core; using Newtonsoft.Json; using Serilog.Events; +using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Devices.Common.Codec { diff --git a/src/PepperDash.Essentials.Devices.Common/DSP/DspBase.cs b/src/PepperDash.Essentials.Devices.Common/DSP/DspBase.cs index 420e9adf..f9aab9f7 100644 --- a/src/PepperDash.Essentials.Devices.Common/DSP/DspBase.cs +++ b/src/PepperDash.Essentials.Devices.Common/DSP/DspBase.cs @@ -2,7 +2,9 @@ using System.Collections.Generic; using PepperDash.Core; using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Devices; using PepperDash.Essentials.Core.DeviceTypeInterfaces; +using PepperDash.Essentials.Core.Feedbacks; namespace PepperDash.Essentials.Devices.Common.DSP { diff --git a/src/PepperDash.Essentials.Devices.Common/DeviceFactory.cs b/src/PepperDash.Essentials.Devices.Common/DeviceFactory.cs index 178c53a7..f05f1a2c 100644 --- a/src/PepperDash.Essentials.Devices.Common/DeviceFactory.cs +++ b/src/PepperDash.Essentials.Devices.Common/DeviceFactory.cs @@ -5,6 +5,9 @@ using System.Linq; using System.Reflection; using PepperDash.Core; using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Factory; +using PepperDash.Essentials.Core.Plugins; using Serilog.Events; namespace PepperDash.Essentials.Devices.Common @@ -55,7 +58,7 @@ namespace PepperDash.Essentials.Devices.Common ? descriptionAttribute[0].Description : "No description available"; - Core.DeviceFactory.AddFactoryForType(typeName.ToLower(), description, deviceFactory.FactoryType, deviceFactory.BuildDevice); + Core.Factory.DeviceFactory.AddFactoryForType(typeName.ToLower(), description, deviceFactory.FactoryType, deviceFactory.BuildDevice); } } } diff --git a/src/PepperDash.Essentials.Devices.Common/Displays/BasicIrDisplay.cs b/src/PepperDash.Essentials.Devices.Common/Displays/BasicIrDisplay.cs index 52fc5233..253ebd49 100644 --- a/src/PepperDash.Essentials.Devices.Common/Displays/BasicIrDisplay.cs +++ b/src/PepperDash.Essentials.Devices.Common/Displays/BasicIrDisplay.cs @@ -6,7 +6,11 @@ using Crestron.SimplSharpPro.DeviceSupport; using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Bridges; +using PepperDash.Essentials.Core.Communications; using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Feedbacks; +using PepperDash.Essentials.Core.Routing; using Serilog.Events; namespace PepperDash.Essentials.Devices.Common.Displays diff --git a/src/PepperDash.Essentials.Devices.Common/Displays/DisplayBase.cs b/src/PepperDash.Essentials.Devices.Common/Displays/DisplayBase.cs index 786fc00d..b957095d 100644 --- a/src/PepperDash.Essentials.Devices.Common/Displays/DisplayBase.cs +++ b/src/PepperDash.Essentials.Devices.Common/Displays/DisplayBase.cs @@ -7,10 +7,16 @@ using Newtonsoft.Json; using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Bridges; +using PepperDash.Essentials.Core.Bridges.JoinMaps; +using PepperDash.Essentials.Core.Devices; using PepperDash.Essentials.Core.DeviceTypeInterfaces; +using PepperDash.Essentials.Core.Feedbacks; +using PepperDash.Essentials.Core.JoinMaps; +using PepperDash.Essentials.Core.Monitoring; using PepperDash.Essentials.Core.Routing; +using PepperDash.Essentials.Core.Touchpanels; using Serilog.Events; -using Feedback = PepperDash.Essentials.Core.Feedback; +using Feedback = PepperDash.Essentials.Core.Feedbacks.Feedback; namespace PepperDash.Essentials.Devices.Common.Displays { diff --git a/src/PepperDash.Essentials.Devices.Common/Displays/MockDisplay.cs b/src/PepperDash.Essentials.Devices.Common/Displays/MockDisplay.cs index 976dfdc3..d24760c5 100644 --- a/src/PepperDash.Essentials.Devices.Common/Displays/MockDisplay.cs +++ b/src/PepperDash.Essentials.Devices.Common/Displays/MockDisplay.cs @@ -7,7 +7,10 @@ using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Bridges; using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Devices; using PepperDash.Essentials.Core.DeviceTypeInterfaces; +using PepperDash.Essentials.Core.Feedbacks; +using PepperDash.Essentials.Core.Routing; using Serilog.Events; namespace PepperDash.Essentials.Devices.Common.Displays diff --git a/src/PepperDash.Essentials.Devices.Common/Displays/ScreenLiftController.cs b/src/PepperDash.Essentials.Devices.Common/Displays/ScreenLiftController.cs index a7cb25e3..340ac3f9 100644 --- a/src/PepperDash.Essentials.Devices.Common/Displays/ScreenLiftController.cs +++ b/src/PepperDash.Essentials.Devices.Common/Displays/ScreenLiftController.cs @@ -7,7 +7,9 @@ using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Config; using PepperDash.Essentials.Core.CrestronIO; +using PepperDash.Essentials.Core.Devices; using PepperDash.Essentials.Core.DeviceTypeInterfaces; +using PepperDash.Essentials.Core.Feedbacks; using Serilog.Events; namespace PepperDash.Essentials.Devices.Common.Shades diff --git a/src/PepperDash.Essentials.Devices.Common/Generic/GenericSink.cs b/src/PepperDash.Essentials.Devices.Common/Generic/GenericSink.cs index 8433fab9..68286b85 100644 --- a/src/PepperDash.Essentials.Devices.Common/Generic/GenericSink.cs +++ b/src/PepperDash.Essentials.Devices.Common/Generic/GenericSink.cs @@ -1,6 +1,8 @@ using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Routing; using Serilog.Events; using System.Collections.Generic; diff --git a/src/PepperDash.Essentials.Devices.Common/Generic/GenericSource.cs b/src/PepperDash.Essentials.Devices.Common/Generic/GenericSource.cs index e0bb1bfb..01441e03 100644 --- a/src/PepperDash.Essentials.Devices.Common/Generic/GenericSource.cs +++ b/src/PepperDash.Essentials.Devices.Common/Generic/GenericSource.cs @@ -3,6 +3,9 @@ using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; +using PepperDash.Essentials.Core.Routing; using Serilog.Events; namespace PepperDash.Essentials.Devices.Common diff --git a/src/PepperDash.Essentials.Devices.Common/Lighting/LightingBase.cs b/src/PepperDash.Essentials.Devices.Common/Lighting/LightingBase.cs index 96c58ab0..614af954 100644 --- a/src/PepperDash.Essentials.Devices.Common/Lighting/LightingBase.cs +++ b/src/PepperDash.Essentials.Devices.Common/Lighting/LightingBase.cs @@ -8,7 +8,12 @@ using Newtonsoft.Json; using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Bridges; +using PepperDash.Essentials.Core.Bridges.JoinMaps; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Feedbacks; +using PepperDash.Essentials.Core.JoinMaps; using PepperDash.Essentials.Core.Lighting; +using PepperDash.Essentials.Core.Touchpanels; using Serilog.Events; namespace PepperDash.Essentials.Devices.Common.Lighting diff --git a/src/PepperDash.Essentials.Devices.Common/Room/IEssentialsHuddleSpaceRoom.cs b/src/PepperDash.Essentials.Devices.Common/Room/IEssentialsHuddleSpaceRoom.cs index 6e5e3797..d41eb2ea 100644 --- a/src/PepperDash.Essentials.Devices.Common/Room/IEssentialsHuddleSpaceRoom.cs +++ b/src/PepperDash.Essentials.Devices.Common/Room/IEssentialsHuddleSpaceRoom.cs @@ -1,5 +1,7 @@ -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Room.Config; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Rooms; +using PepperDash.Essentials.Core.Rooms.Config; +using PepperDash.Essentials.Core.Routing; namespace PepperDash.Essentials.Devices.Common.Room { diff --git a/src/PepperDash.Essentials.Devices.Common/Room/IEssentialsHuddleVtc1Room.cs b/src/PepperDash.Essentials.Devices.Common/Room/IEssentialsHuddleVtc1Room.cs index 98d01956..f820f7b5 100644 --- a/src/PepperDash.Essentials.Devices.Common/Room/IEssentialsHuddleVtc1Room.cs +++ b/src/PepperDash.Essentials.Devices.Common/Room/IEssentialsHuddleVtc1Room.cs @@ -1,8 +1,10 @@ -using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Feedbacks; +using PepperDash.Essentials.Core.Rooms; +using PepperDash.Essentials.Core.Routing; using PepperDash.Essentials.Devices.Common.AudioCodec; using PepperDash.Essentials.Devices.Common.Codec; using PepperDash.Essentials.Devices.Common.VideoCodec; -using PepperDash.Essentials.Room.Config; namespace PepperDash.Essentials.Devices.Common.Room { diff --git a/src/PepperDash.Essentials.Devices.Common/Room/IEssentialsRoomPropertiesConfig.cs b/src/PepperDash.Essentials.Devices.Common/Room/IEssentialsRoomPropertiesConfig.cs index bd5ea6fb..2ae8df03 100644 --- a/src/PepperDash.Essentials.Devices.Common/Room/IEssentialsRoomPropertiesConfig.cs +++ b/src/PepperDash.Essentials.Devices.Common/Room/IEssentialsRoomPropertiesConfig.cs @@ -1,4 +1,4 @@ -using PepperDash.Essentials.Room.Config; +using PepperDash.Essentials.Core.Rooms.Config; namespace PepperDash.Essentials.Devices.Common.Room { diff --git a/src/PepperDash.Essentials.Devices.Common/Room/IEssentialsTechRoom.cs b/src/PepperDash.Essentials.Devices.Common/Room/IEssentialsTechRoom.cs index e651011a..b412f764 100644 --- a/src/PepperDash.Essentials.Devices.Common/Room/IEssentialsTechRoom.cs +++ b/src/PepperDash.Essentials.Devices.Common/Room/IEssentialsTechRoom.cs @@ -1,7 +1,7 @@ -using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Bridges; +using PepperDash.Essentials.Core.Bridges; using PepperDash.Essentials.Core.DeviceTypeInterfaces; -using PepperDash.Essentials.Room.Config; +using PepperDash.Essentials.Core.Rooms; +using PepperDash.Essentials.Core.Rooms.Config; using System.Collections.Generic; using TwoWayDisplayBase = PepperDash.Essentials.Devices.Common.Displays.TwoWayDisplayBase; diff --git a/src/PepperDash.Essentials.Devices.Common/SetTopBox/IRSetTopBoxBase.cs b/src/PepperDash.Essentials.Devices.Common/SetTopBox/IRSetTopBoxBase.cs index 9eb14bd7..d8431a56 100644 --- a/src/PepperDash.Essentials.Devices.Common/SetTopBox/IRSetTopBoxBase.cs +++ b/src/PepperDash.Essentials.Devices.Common/SetTopBox/IRSetTopBoxBase.cs @@ -3,12 +3,18 @@ using Crestron.SimplSharpPro; using Crestron.SimplSharpPro.DeviceSupport; using Newtonsoft.Json; using PepperDash.Core; -using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Bridges; using PepperDash.Essentials.Core.Config; using PepperDash.Essentials.Core.Presets; using PepperDash.Essentials.Core.DeviceTypeInterfaces; using Serilog.Events; +using PepperDash.Essentials.Core.Routing; +using PepperDash.Essentials.Core.Bridges.JoinMaps; +using PepperDash.Essentials.Core.JoinMaps; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Communications; +using PepperDash.Essentials.Core.Touchpanels; +using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Devices.Common { diff --git a/src/PepperDash.Essentials.Devices.Common/SetTopBox/SetTopBoxPropertiesConfig.cs b/src/PepperDash.Essentials.Devices.Common/SetTopBox/SetTopBoxPropertiesConfig.cs index 193b41e7..b65959a3 100644 --- a/src/PepperDash.Essentials.Devices.Common/SetTopBox/SetTopBoxPropertiesConfig.cs +++ b/src/PepperDash.Essentials.Devices.Common/SetTopBox/SetTopBoxPropertiesConfig.cs @@ -1,4 +1,5 @@ using PepperDash.Core; +using PepperDash.Essentials.Core.Communications; namespace PepperDash.Essentials.Devices.Common { diff --git a/src/PepperDash.Essentials.Devices.Common/Shades/RelayControlledShade.cs b/src/PepperDash.Essentials.Devices.Common/Shades/RelayControlledShade.cs index ad094703..b245171f 100644 --- a/src/PepperDash.Essentials.Devices.Common/Shades/RelayControlledShade.cs +++ b/src/PepperDash.Essentials.Devices.Common/Shades/RelayControlledShade.cs @@ -4,6 +4,7 @@ using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Config; using PepperDash.Essentials.Core.CrestronIO; +using PepperDash.Essentials.Core.Devices; using PepperDash.Essentials.Core.Shades; using Serilog.Events; diff --git a/src/PepperDash.Essentials.Devices.Common/Shades/ShadeBase.cs b/src/PepperDash.Essentials.Devices.Common/Shades/ShadeBase.cs index 2c506750..09305fe5 100644 --- a/src/PepperDash.Essentials.Devices.Common/Shades/ShadeBase.cs +++ b/src/PepperDash.Essentials.Devices.Common/Shades/ShadeBase.cs @@ -1,5 +1,5 @@ using PepperDash.Essentials.Core.Shades; -using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Devices; namespace PepperDash.Essentials.Devices.Common.Shades { diff --git a/src/PepperDash.Essentials.Devices.Common/Shades/ShadeController.cs b/src/PepperDash.Essentials.Devices.Common/Shades/ShadeController.cs index 9d28fe98..45d235e7 100644 --- a/src/PepperDash.Essentials.Devices.Common/Shades/ShadeController.cs +++ b/src/PepperDash.Essentials.Devices.Common/Shades/ShadeController.cs @@ -2,6 +2,7 @@ using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Devices; using PepperDash.Essentials.Core.Shades; using Serilog.Events; diff --git a/src/PepperDash.Essentials.Devices.Common/SoftCodec/BlueJeansPc.cs b/src/PepperDash.Essentials.Devices.Common/SoftCodec/BlueJeansPc.cs index c96e6f01..a1b0b363 100644 --- a/src/PepperDash.Essentials.Devices.Common/SoftCodec/BlueJeansPc.cs +++ b/src/PepperDash.Essentials.Devices.Common/SoftCodec/BlueJeansPc.cs @@ -5,6 +5,12 @@ using Crestron.SimplSharp; using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Config.Essentials; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; +using PepperDash.Essentials.Core.Rooms; +using PepperDash.Essentials.Core.Routing; +using PepperDash.Essentials.Core.Usage; using PepperDash.Essentials.Devices.Common.Sources; using Serilog.Events; diff --git a/src/PepperDash.Essentials.Devices.Common/SoftCodec/GenericSoftCodec.cs b/src/PepperDash.Essentials.Devices.Common/SoftCodec/GenericSoftCodec.cs index f00fb9ce..064b001d 100644 --- a/src/PepperDash.Essentials.Devices.Common/SoftCodec/GenericSoftCodec.cs +++ b/src/PepperDash.Essentials.Devices.Common/SoftCodec/GenericSoftCodec.cs @@ -2,6 +2,8 @@ using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Routing; using Serilog.Events; using System.Collections.Generic; using System.Linq; diff --git a/src/PepperDash.Essentials.Devices.Common/Sources/InRoomPc.cs b/src/PepperDash.Essentials.Devices.Common/Sources/InRoomPc.cs index 1817fef9..d4dd2f85 100644 --- a/src/PepperDash.Essentials.Devices.Common/Sources/InRoomPc.cs +++ b/src/PepperDash.Essentials.Devices.Common/Sources/InRoomPc.cs @@ -2,6 +2,11 @@ using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; +using PepperDash.Essentials.Core.Feedbacks; +using PepperDash.Essentials.Core.Routing; +using PepperDash.Essentials.Core.VideoStatus; using Serilog.Events; namespace PepperDash.Essentials.Devices.Common.Sources diff --git a/src/PepperDash.Essentials.Devices.Common/Sources/Laptop.cs b/src/PepperDash.Essentials.Devices.Common/Sources/Laptop.cs index ffa1027c..fd79db8b 100644 --- a/src/PepperDash.Essentials.Devices.Common/Sources/Laptop.cs +++ b/src/PepperDash.Essentials.Devices.Common/Sources/Laptop.cs @@ -2,6 +2,11 @@ using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; +using PepperDash.Essentials.Core.Feedbacks; +using PepperDash.Essentials.Core.Routing; +using PepperDash.Essentials.Core.VideoStatus; using Serilog.Events; namespace PepperDash.Essentials.Devices.Common.Sources diff --git a/src/PepperDash.Essentials.Devices.Common/Streaming/AppleTV.cs b/src/PepperDash.Essentials.Devices.Common/Streaming/AppleTV.cs index 8a22b230..8b0a2984 100644 --- a/src/PepperDash.Essentials.Devices.Common/Streaming/AppleTV.cs +++ b/src/PepperDash.Essentials.Devices.Common/Streaming/AppleTV.cs @@ -5,10 +5,17 @@ using Crestron.SimplSharpPro; using Crestron.SimplSharpPro.DeviceSupport; using Newtonsoft.Json; using PepperDash.Core; -using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Config; using PepperDash.Essentials.Core.Bridges; using Serilog.Events; +using PepperDash.Essentials.Core.Routing; +using PepperDash.Essentials.Core.Bridges.JoinMaps; +using PepperDash.Essentials.Core.JoinMaps; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; +using PepperDash.Essentials.Core.Communications; +using PepperDash.Essentials.Core.Touchpanels; +using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Devices.Common { diff --git a/src/PepperDash.Essentials.Devices.Common/Streaming/Roku.cs b/src/PepperDash.Essentials.Devices.Common/Streaming/Roku.cs index c6a0ffaf..fd94e093 100644 --- a/src/PepperDash.Essentials.Devices.Common/Streaming/Roku.cs +++ b/src/PepperDash.Essentials.Devices.Common/Streaming/Roku.cs @@ -3,7 +3,11 @@ using Crestron.SimplSharpPro; using PepperDash.Core; using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Communications; using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; +using PepperDash.Essentials.Core.Routing; using Serilog.Events; namespace PepperDash.Essentials.Devices.Common diff --git a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasCodecLayouts.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasCodecLayouts.cs index 3abf3b6e..350c39cf 100644 --- a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasCodecLayouts.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasCodecLayouts.cs @@ -1,4 +1,4 @@ -using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Feedbacks; namespace PepperDash.Essentials.Devices.Common.VideoCodec { diff --git a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasCodecSelfview.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasCodecSelfview.cs index 0bc35716..735dc9da 100644 --- a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasCodecSelfview.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasCodecSelfview.cs @@ -1,4 +1,4 @@ -using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Feedbacks; namespace PepperDash.Essentials.Devices.Common.VideoCodec { diff --git a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasMeetingLock.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasMeetingLock.cs index 53986671..b6ec9f71 100644 --- a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasMeetingLock.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasMeetingLock.cs @@ -1,4 +1,4 @@ -using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Feedbacks; namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces { diff --git a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasMeetingRecording.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasMeetingRecording.cs index 681afe0c..a20a5d42 100644 --- a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasMeetingRecording.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasMeetingRecording.cs @@ -1,4 +1,4 @@ -using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Feedbacks; namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces { diff --git a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasParticipants.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasParticipants.cs index e10abde9..c1221932 100644 --- a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasParticipants.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasParticipants.cs @@ -1,7 +1,7 @@ using System; using System.Linq; using System.Collections.Generic; -using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Feedbacks; namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces { diff --git a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasSelfviewPosition.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasSelfviewPosition.cs index ec616a71..cf7e703c 100644 --- a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasSelfviewPosition.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasSelfviewPosition.cs @@ -1,4 +1,5 @@ -using PepperDash.Essentials.Devices.Common.VideoCodec; +using PepperDash.Essentials.Core.Feedbacks; +using PepperDash.Essentials.Devices.Common.VideoCodec; namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { diff --git a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasSelfviewSize.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasSelfviewSize.cs index 45365ce1..f2f94fb6 100644 --- a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasSelfviewSize.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasSelfviewSize.cs @@ -1,4 +1,5 @@ -using PepperDash.Essentials.Devices.Common.VideoCodec; +using PepperDash.Essentials.Core.Feedbacks; +using PepperDash.Essentials.Devices.Common.VideoCodec; namespace PepperDash.Essentials.Core.DeviceTypeInterfaces { diff --git a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasStandbyMode.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasStandbyMode.cs index 01595571..b8130219 100644 --- a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasStandbyMode.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasStandbyMode.cs @@ -1,4 +1,4 @@ -using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Feedbacks; namespace PepperDash.Essentials.Devices.Common.VideoCodec { diff --git a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasVideoCodec.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasVideoCodec.cs index 3c54dc5a..86b36d33 100644 --- a/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasVideoCodec.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/Interfaces/IHasVideoCodec.cs @@ -1,4 +1,6 @@ -using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Feedbacks; +using PepperDash.Essentials.Core.Rooms; namespace PepperDash.Essentials.Devices.Common.VideoCodec { diff --git a/src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockVC.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockVC.cs index e3469b8e..0f7ac625 100644 --- a/src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockVC.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockVC.cs @@ -6,7 +6,6 @@ using System.Linq; using Crestron.SimplSharp; using Crestron.SimplSharpPro.DeviceSupport; using PepperDash.Core; -using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Bridges; using PepperDash.Essentials.Core.Config; using PepperDash.Essentials.Core.Routing; @@ -16,6 +15,10 @@ using PepperDash.Essentials.Devices.Common.Cameras; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Serilog.Events; +using PepperDash.Essentials.Core.Feedbacks; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Config.Essentials; +using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Devices.Common.VideoCodec { diff --git a/src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockVCCamera.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockVCCamera.cs index ad1dc988..7b1f6394 100644 --- a/src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockVCCamera.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/MockVC/MockVCCamera.cs @@ -1,5 +1,6 @@ using Crestron.SimplSharpPro.DeviceSupport; using PepperDash.Core; +using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Bridges; using PepperDash.Essentials.Devices.Common.VideoCodec; using Serilog.Events; diff --git a/src/PepperDash.Essentials.Devices.Common/VideoCodec/VideoCodecBase.cs b/src/PepperDash.Essentials.Devices.Common/VideoCodec/VideoCodecBase.cs index f212a9ac..073098e1 100644 --- a/src/PepperDash.Essentials.Devices.Common/VideoCodec/VideoCodecBase.cs +++ b/src/PepperDash.Essentials.Devices.Common/VideoCodec/VideoCodecBase.cs @@ -16,10 +16,16 @@ using PepperDash.Essentials.Devices.Common.Cameras; using PepperDash.Essentials.Devices.Common.Codec; using PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces; using PepperDash.Essentials.Core.Bridges.JoinMaps; -using Feedback = PepperDash.Essentials.Core.Feedback; +using Feedback = PepperDash.Essentials.Core.Feedbacks.Feedback; using Serilog.Events; using PepperDash.Essentials.Core.Routing; using System.Text; +using PepperDash.Essentials.Core.Communications; +using PepperDash.Essentials.Core.Feedbacks; +using PepperDash.Essentials.Core.JoinMaps; +using PepperDash.Essentials.Core.Extensions; +using PepperDash.Essentials.Core.Monitoring; +using PepperDash.Essentials.Core.Touchpanels; namespace PepperDash.Essentials.Devices.Common.VideoCodec { diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/ContentTypes.cs b/src/PepperDash.Essentials.MobileControl.Messengers/ContentTypes.cs index ab60d3f7..4dcba161 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/ContentTypes.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/ContentTypes.cs @@ -1,5 +1,5 @@ using Newtonsoft.Json; -using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Routing; namespace PepperDash.Essentials.AppServer { diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IChannelMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IChannelMessenger.cs index 505fd214..f13d8744 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IChannelMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IChannelMessenger.cs @@ -1,6 +1,7 @@ using PepperDash.Core; using PepperDash.Essentials.AppServer.Messengers; using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; namespace PepperDash.Essentials.Room.MobileControl { diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IColorMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IColorMessenger.cs index cef6111f..089ae888 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IColorMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IColorMessenger.cs @@ -1,6 +1,7 @@ using PepperDash.Core; using PepperDash.Essentials.AppServer.Messengers; using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; namespace PepperDash.Essentials.Room.MobileControl { diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IDPadMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IDPadMessenger.cs index 92c21a0b..a19df490 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IDPadMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IDPadMessenger.cs @@ -1,6 +1,7 @@ using PepperDash.Core; using PepperDash.Essentials.AppServer.Messengers; using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; namespace PepperDash.Essentials.Room.MobileControl { diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IDvrMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IDvrMessenger.cs index f0ae426c..099be31f 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IDvrMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IDvrMessenger.cs @@ -1,6 +1,7 @@ using PepperDash.Core; using PepperDash.Essentials.AppServer.Messengers; using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; namespace PepperDash.Essentials.Room.MobileControl { diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IHasPowerMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IHasPowerMessenger.cs index 864c20bf..40d4897d 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IHasPowerMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/IHasPowerMessenger.cs @@ -1,6 +1,7 @@ using PepperDash.Core; using PepperDash.Essentials.AppServer.Messengers; using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; namespace PepperDash.Essentials.Room.MobileControl { diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/INumericMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/INumericMessenger.cs index d07331d2..144a5e6a 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/INumericMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/INumericMessenger.cs @@ -1,6 +1,7 @@ using PepperDash.Core; using PepperDash.Essentials.AppServer.Messengers; using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; namespace PepperDash.Essentials.Room.MobileControl { diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/ISetTopBoxControlsMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/ISetTopBoxControlsMessenger.cs index f87480bd..0467294f 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/ISetTopBoxControlsMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/ISetTopBoxControlsMessenger.cs @@ -1,6 +1,7 @@ using PepperDash.Core; using PepperDash.Essentials.AppServer.Messengers; using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; namespace PepperDash.Essentials.Room.MobileControl { diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/ITransportMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/ITransportMessenger.cs index 0943fc0b..cbc4f93b 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/ITransportMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/DeviceTypeExtensions/ITransportMessenger.cs @@ -1,6 +1,7 @@ using PepperDash.Core; using PepperDash.Essentials.AppServer.Messengers; using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; namespace PepperDash.Essentials.Room.MobileControl { diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/CameraBaseMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/CameraBaseMessenger.cs index e2e16b3e..54eb8242 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/CameraBaseMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/CameraBaseMessenger.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using Newtonsoft.Json.Linq; -using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; using PepperDash.Essentials.Devices.Common.Cameras; namespace PepperDash.Essentials.AppServer.Messengers diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DeviceInfoMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DeviceInfoMessenger.cs index 6537b143..102ca36a 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DeviceInfoMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DeviceInfoMessenger.cs @@ -1,6 +1,7 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; using PepperDash.Core; +using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.DeviceInfo; using System.Timers; diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DevicePresetsModelMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DevicePresetsModelMessenger.cs index fb8ccef3..1c7569f7 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DevicePresetsModelMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DevicePresetsModelMessenger.cs @@ -2,6 +2,7 @@ using PepperDash.Core; using PepperDash.Core.Logging; using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Devices; using PepperDash.Essentials.Core.DeviceTypeInterfaces; using PepperDash.Essentials.Core.Presets; using System; diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DeviceVolumeMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DeviceVolumeMessenger.cs index b6c9b18e..e2980891 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DeviceVolumeMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/DeviceVolumeMessenger.cs @@ -3,6 +3,7 @@ using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using PepperDash.Core; using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Devices; using System; namespace PepperDash.Essentials.AppServer.Messengers diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/GenericMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/GenericMessenger.cs index eb0611c7..d9392539 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/GenericMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/GenericMessenger.cs @@ -1,4 +1,4 @@ -using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Devices; namespace PepperDash.Essentials.AppServer.Messengers { diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ICommunicationMonitorMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ICommunicationMonitorMessenger.cs index 9399aacb..382eb953 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ICommunicationMonitorMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ICommunicationMonitorMessenger.cs @@ -3,6 +3,7 @@ using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using PepperDash.Core; using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Monitoring; namespace PepperDash.Essentials.AppServer.Messengers { diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IDspPresetsMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IDspPresetsMessenger.cs index 8096c4e9..cabefb8a 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IDspPresetsMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IDspPresetsMessenger.cs @@ -1,6 +1,7 @@ using Newtonsoft.Json; using PepperDash.Core; using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Devices; using System.Collections.Generic; namespace PepperDash.Essentials.AppServer.Messengers diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IEssentialsRoomCombinerMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IEssentialsRoomCombinerMessenger.cs index ab2ff259..2dd8c13d 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IEssentialsRoomCombinerMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IEssentialsRoomCombinerMessenger.cs @@ -3,6 +3,8 @@ using Newtonsoft.Json.Linq; using PepperDash.Core; using PepperDash.Core.Logging; using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.PartitionSensor; +using PepperDash.Essentials.Core.Rooms.Combining; using System; using System.Collections.Generic; diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasCurrentSourceInfoMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasCurrentSourceInfoMessenger.cs index 12a6bfec..ab62c4fb 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasCurrentSourceInfoMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasCurrentSourceInfoMessenger.cs @@ -2,6 +2,8 @@ using Newtonsoft.Json.Linq; using PepperDash.Core; using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Routing; namespace PepperDash.Essentials.AppServer.Messengers { diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasPowerControlWithFeedbackMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasPowerControlWithFeedbackMessenger.cs index 66e97352..efc7ced7 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasPowerControlWithFeedbackMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasPowerControlWithFeedbackMessenger.cs @@ -2,6 +2,8 @@ using Newtonsoft.Json.Linq; using PepperDash.Core; using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.DeviceTypeInterfaces; +using PepperDash.Essentials.Core.Feedbacks; namespace PepperDash.Essentials.AppServer.Messengers { diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasScheduleAwarenessMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasScheduleAwarenessMessenger.cs index 6329a25c..0e5d5189 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasScheduleAwarenessMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHasScheduleAwarenessMessenger.cs @@ -1,6 +1,7 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; using PepperDash.Core; +using PepperDash.Essentials.Core; using PepperDash.Essentials.Devices.Common.Codec; using System; using System.Collections.Generic; diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHumiditySensor.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHumiditySensor.cs index 4b274270..e0e30647 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHumiditySensor.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IHumiditySensor.cs @@ -1,6 +1,8 @@ using Newtonsoft.Json; using PepperDash.Core; +using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.DeviceTypeInterfaces; +using PepperDash.Essentials.Core.Feedbacks; using System; namespace PepperDash.Essentials.AppServer.Messengers @@ -24,7 +26,7 @@ namespace PepperDash.Essentials.AppServer.Messengers AddAction("/fullStatus", (id, content) => SendFullStatus()); - device.HumidityFeedback.OutputChange += new EventHandler((o, a) => SendFullStatus()); + device.HumidityFeedback.OutputChange += new EventHandler((o, a) => SendFullStatus()); } private void SendFullStatus() diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ILevelControlsMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ILevelControlsMessenger.cs index 946c0bfd..bf8be6e3 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ILevelControlsMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ILevelControlsMessenger.cs @@ -1,6 +1,7 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; using PepperDash.Core; +using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.DeviceTypeInterfaces; using System.Collections.Generic; using System.Linq; diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IProjectorScreenLiftControlMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IProjectorScreenLiftControlMessenger.cs index f0840b5f..2c2d5783 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IProjectorScreenLiftControlMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IProjectorScreenLiftControlMessenger.cs @@ -2,6 +2,7 @@ using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using PepperDash.Core; +using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.DeviceTypeInterfaces; using System; diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IRunRouteActionMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IRunRouteActionMessenger.cs index 9bfb8b39..d85a497b 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IRunRouteActionMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IRunRouteActionMessenger.cs @@ -2,6 +2,9 @@ using PepperDash.Core; using PepperDash.Core.Logging; using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Rooms; +using PepperDash.Essentials.Core.Routing; using System; diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ISelectableItemsMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ISelectableItemsMessenger.cs index 54f1e314..c7d5e782 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ISelectableItemsMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ISelectableItemsMessenger.cs @@ -1,6 +1,7 @@ using Newtonsoft.Json; using PepperDash.Core; using PepperDash.Core.Logging; +using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.DeviceTypeInterfaces; using System; using System.Collections.Generic; diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IShutdownPromptTimerMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IShutdownPromptTimerMessenger.cs index 600779f9..4a1876d0 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IShutdownPromptTimerMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/IShutdownPromptTimerMessenger.cs @@ -2,6 +2,7 @@ using Newtonsoft.Json.Linq; using PepperDash.Core; using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Rooms; namespace PepperDash.Essentials.AppServer.Messengers { diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ISwitchedOutputMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ISwitchedOutputMessenger.cs index 6efd182b..19ad1507 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ISwitchedOutputMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ISwitchedOutputMessenger.cs @@ -1,6 +1,8 @@ using Newtonsoft.Json; using PepperDash.Core; +using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.CrestronIO; +using PepperDash.Essentials.Core.Feedbacks; using System; namespace PepperDash.Essentials.AppServer.Messengers @@ -39,7 +41,7 @@ namespace PepperDash.Essentials.AppServer.Messengers }); - device.OutputIsOnFeedback.OutputChange += new EventHandler((o, a) => SendFullStatus()); + device.OutputIsOnFeedback.OutputChange += new EventHandler((o, a) => SendFullStatus()); } private void SendFullStatus() diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ITechPasswordMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ITechPasswordMessenger.cs index 783bee7c..2728cb03 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ITechPasswordMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ITechPasswordMessenger.cs @@ -1,6 +1,7 @@ using Newtonsoft.Json; using PepperDash.Core; using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Rooms; namespace PepperDash.Essentials.AppServer.Messengers { diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ITemperatureSensorMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ITemperatureSensorMessenger.cs index 9f3b56eb..9c8ade29 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ITemperatureSensorMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ITemperatureSensorMessenger.cs @@ -1,6 +1,8 @@ using Newtonsoft.Json; using PepperDash.Core; +using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.DeviceTypeInterfaces; +using PepperDash.Essentials.Core.Feedbacks; using System; namespace PepperDash.Essentials.AppServer.Messengers @@ -34,8 +36,8 @@ namespace PepperDash.Essentials.AppServer.Messengers device.SetTemperatureFormat(false); }); - device.TemperatureFeedback.OutputChange += new EventHandler((o, a) => SendFullStatus()); - device.TemperatureInCFeedback.OutputChange += new EventHandler((o, a) => SendFullStatus()); + device.TemperatureFeedback.OutputChange += new EventHandler((o, a) => SendFullStatus()); + device.TemperatureInCFeedback.OutputChange += new EventHandler((o, a) => SendFullStatus()); } private void SendFullStatus() diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/LightingBaseMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/LightingBaseMessenger.cs index 9c0672fb..db511bb1 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/LightingBaseMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/LightingBaseMessenger.cs @@ -1,5 +1,6 @@ using Newtonsoft.Json; using PepperDash.Core; +using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Lighting; using System; using System.Collections.Generic; diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/MessengerBase.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/MessengerBase.cs index 491ebb67..0d4e3aa3 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/MessengerBase.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/MessengerBase.cs @@ -3,6 +3,7 @@ using Newtonsoft.Json.Linq; using PepperDash.Core; using PepperDash.Core.Logging; using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Devices; using PepperDash.Essentials.Core.DeviceTypeInterfaces; using System; using System.Collections.Generic; diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/PressAndHoldHandler.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/PressAndHoldHandler.cs index 46728dba..7313d2c6 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/PressAndHoldHandler.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/PressAndHoldHandler.cs @@ -1,6 +1,7 @@ using Crestron.SimplSharp; using Newtonsoft.Json.Linq; using PepperDash.Core; +using PepperDash.Essentials.Core; using System; using System.Collections.Generic; diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/RoomEventScheduleMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/RoomEventScheduleMessenger.cs index f5c019d1..a9dc9693 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/RoomEventScheduleMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/RoomEventScheduleMessenger.cs @@ -2,7 +2,6 @@ using PepperDash.Core; using PepperDash.Core.Logging; using PepperDash.Essentials.Core; -using PepperDash.Essentials.Room.Config; using System; using System.Collections.Generic; diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ShadeBaseMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ShadeBaseMessenger.cs index 8a071409..9ee08612 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ShadeBaseMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/ShadeBaseMessenger.cs @@ -1,5 +1,7 @@ using Newtonsoft.Json; using PepperDash.Core; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Feedbacks; using PepperDash.Essentials.Core.Shades; using System; @@ -49,12 +51,12 @@ namespace PepperDash.Essentials.AppServer.Messengers if (device is IShadesOpenClosedFeedback feedbackDevice) { - feedbackDevice.ShadeIsOpenFeedback.OutputChange += new EventHandler(ShadeIsOpenFeedback_OutputChange); - feedbackDevice.ShadeIsClosedFeedback.OutputChange += new EventHandler(ShadeIsClosedFeedback_OutputChange); + feedbackDevice.ShadeIsOpenFeedback.OutputChange += new EventHandler(ShadeIsOpenFeedback_OutputChange); + feedbackDevice.ShadeIsClosedFeedback.OutputChange += new EventHandler(ShadeIsClosedFeedback_OutputChange); } } - private void ShadeIsOpenFeedback_OutputChange(object sender, Core.FeedbackEventArgs e) + private void ShadeIsOpenFeedback_OutputChange(object sender, FeedbackEventArgs e) { var state = new ShadeBaseStateMessage { @@ -64,7 +66,7 @@ namespace PepperDash.Essentials.AppServer.Messengers PostStatusMessage(state); } - private void ShadeIsClosedFeedback_OutputChange(object sender, Core.FeedbackEventArgs e) + private void ShadeIsClosedFeedback_OutputChange(object sender, FeedbackEventArgs e) { var state = new ShadeBaseStateMessage { diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/TwoWayDisplayBaseMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/TwoWayDisplayBaseMessenger.cs index 9bc4c12b..653348e8 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/TwoWayDisplayBaseMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/TwoWayDisplayBaseMessenger.cs @@ -1,6 +1,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Feedbacks; using PepperDash.Essentials.Devices.Common.Displays; namespace PepperDash.Essentials.AppServer.Messengers diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/VideoCodecBaseMessenger.cs b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/VideoCodecBaseMessenger.cs index 58300f55..a4d723fb 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/VideoCodecBaseMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/Messengers/VideoCodecBaseMessenger.cs @@ -3,8 +3,8 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; using PepperDash.Core; using PepperDash.Core.Logging; -using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.DeviceTypeInterfaces; +using PepperDash.Essentials.Core.Feedbacks; using PepperDash.Essentials.Devices.Common.Cameras; using PepperDash.Essentials.Devices.Common.Codec; using PepperDash.Essentials.Devices.Common.VideoCodec; diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/SIMPLJoinMaps/MobileControlSIMPLRoomJoinMap.cs b/src/PepperDash.Essentials.MobileControl.Messengers/SIMPLJoinMaps/MobileControlSIMPLRoomJoinMap.cs index 628a5322..60db2855 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/SIMPLJoinMaps/MobileControlSIMPLRoomJoinMap.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/SIMPLJoinMaps/MobileControlSIMPLRoomJoinMap.cs @@ -1,4 +1,4 @@ -using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.JoinMaps; namespace PepperDash.Essentials.AppServer diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/SIMPLJoinMaps/MobileControlSIMPLRunDirectRouteActionJoinMap.cs b/src/PepperDash.Essentials.MobileControl.Messengers/SIMPLJoinMaps/MobileControlSIMPLRunDirectRouteActionJoinMap.cs index 0c1db58d..eb97479e 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/SIMPLJoinMaps/MobileControlSIMPLRunDirectRouteActionJoinMap.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/SIMPLJoinMaps/MobileControlSIMPLRunDirectRouteActionJoinMap.cs @@ -1,4 +1,4 @@ -using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.JoinMaps; namespace PepperDash.Essentials.AppServer { diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/SIMPLJoinMaps/SIMPLAtcJoinMap.cs b/src/PepperDash.Essentials.MobileControl.Messengers/SIMPLJoinMaps/SIMPLAtcJoinMap.cs index beb1310d..89eb4283 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/SIMPLJoinMaps/SIMPLAtcJoinMap.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/SIMPLJoinMaps/SIMPLAtcJoinMap.cs @@ -1,4 +1,4 @@ -using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.JoinMaps; namespace PepperDash.Essentials.AppServer diff --git a/src/PepperDash.Essentials.MobileControl.Messengers/SIMPLJoinMaps/SIMPLVtcJoinMap.cs b/src/PepperDash.Essentials.MobileControl.Messengers/SIMPLJoinMaps/SIMPLVtcJoinMap.cs index b53424bd..e10f1499 100644 --- a/src/PepperDash.Essentials.MobileControl.Messengers/SIMPLJoinMaps/SIMPLVtcJoinMap.cs +++ b/src/PepperDash.Essentials.MobileControl.Messengers/SIMPLJoinMaps/SIMPLVtcJoinMap.cs @@ -1,4 +1,4 @@ -using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.JoinMaps; namespace PepperDash.Essentials.AppServer diff --git a/src/PepperDash.Essentials.MobileControl/MobileControlDeviceFactory.cs b/src/PepperDash.Essentials.MobileControl/MobileControlDeviceFactory.cs index c4aa673b..7a324936 100644 --- a/src/PepperDash.Essentials.MobileControl/MobileControlDeviceFactory.cs +++ b/src/PepperDash.Essentials.MobileControl/MobileControlDeviceFactory.cs @@ -2,6 +2,7 @@ using PepperDash.Core.Logging; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Devices; using Serilog.Events; using System; using System.Collections.Generic; diff --git a/src/PepperDash.Essentials.MobileControl/MobileControlEssentialsConfig.cs b/src/PepperDash.Essentials.MobileControl/MobileControlEssentialsConfig.cs index d27a8449..de6918d4 100644 --- a/src/PepperDash.Essentials.MobileControl/MobileControlEssentialsConfig.cs +++ b/src/PepperDash.Essentials.MobileControl/MobileControlEssentialsConfig.cs @@ -1,5 +1,7 @@ using Newtonsoft.Json; using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Config.Essentials; +using PepperDash.Essentials.Core.Plugins; using System.Collections.Generic; diff --git a/src/PepperDash.Essentials.MobileControl/MobileControlFactory.cs b/src/PepperDash.Essentials.MobileControl/MobileControlFactory.cs index 393b3385..d1ff90ed 100644 --- a/src/PepperDash.Essentials.MobileControl/MobileControlFactory.cs +++ b/src/PepperDash.Essentials.MobileControl/MobileControlFactory.cs @@ -3,6 +3,9 @@ using System.Linq; using System.Reflection; using PepperDash.Core; using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Factory; +using PepperDash.Essentials.Core.Plugins; namespace PepperDash.Essentials { diff --git a/src/PepperDash.Essentials.MobileControl/MobileControlSystemController.cs b/src/PepperDash.Essentials.MobileControl/MobileControlSystemController.cs index fea28e01..42397ea2 100644 --- a/src/PepperDash.Essentials.MobileControl/MobileControlSystemController.cs +++ b/src/PepperDash.Essentials.MobileControl/MobileControlSystemController.cs @@ -9,13 +9,18 @@ using PepperDash.Core.Logging; using PepperDash.Essentials.AppServer; using PepperDash.Essentials.AppServer.Messengers; using PepperDash.Essentials.Core; -using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Config.Essentials; using PepperDash.Essentials.Core.CrestronIO; using PepperDash.Essentials.Core.DeviceInfo; +using PepperDash.Essentials.Core.Devices; using PepperDash.Essentials.Core.DeviceTypeInterfaces; +using PepperDash.Essentials.Core.Feedbacks; using PepperDash.Essentials.Core.Lighting; using PepperDash.Essentials.Core.Monitoring; +using PepperDash.Essentials.Core.Plugins; using PepperDash.Essentials.Core.Queues; +using PepperDash.Essentials.Core.Rooms; +using PepperDash.Essentials.Core.Rooms.Combining; using PepperDash.Essentials.Core.Routing; using PepperDash.Essentials.Core.Shades; using PepperDash.Essentials.Core.Web; diff --git a/src/PepperDash.Essentials.MobileControl/RoomBridges/MobileControlBridgeBase.cs b/src/PepperDash.Essentials.MobileControl/RoomBridges/MobileControlBridgeBase.cs index ac1a851c..c297a828 100644 --- a/src/PepperDash.Essentials.MobileControl/RoomBridges/MobileControlBridgeBase.cs +++ b/src/PepperDash.Essentials.MobileControl/RoomBridges/MobileControlBridgeBase.cs @@ -1,6 +1,7 @@ using PepperDash.Core; using PepperDash.Core.Logging; using PepperDash.Essentials.AppServer.Messengers; +using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.DeviceTypeInterfaces; using System; diff --git a/src/PepperDash.Essentials.MobileControl/RoomBridges/MobileControlEssentialsRoomBridge.cs b/src/PepperDash.Essentials.MobileControl/RoomBridges/MobileControlEssentialsRoomBridge.cs index a3485aec..8db8c17b 100644 --- a/src/PepperDash.Essentials.MobileControl/RoomBridges/MobileControlEssentialsRoomBridge.cs +++ b/src/PepperDash.Essentials.MobileControl/RoomBridges/MobileControlEssentialsRoomBridge.cs @@ -7,15 +7,21 @@ using PepperDash.Essentials.AppServer; using PepperDash.Essentials.AppServer.Messengers; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Config.Essentials; using PepperDash.Essentials.Core.CrestronIO; +using PepperDash.Essentials.Core.Devices; using PepperDash.Essentials.Core.DeviceTypeInterfaces; +using PepperDash.Essentials.Core.Feedbacks; using PepperDash.Essentials.Core.Lighting; +using PepperDash.Essentials.Core.Rooms; +using PepperDash.Essentials.Core.Rooms.Combining; +using PepperDash.Essentials.Core.Rooms.Config; +using PepperDash.Essentials.Core.Routing; using PepperDash.Essentials.Core.Shades; using PepperDash.Essentials.Devices.Common.AudioCodec; using PepperDash.Essentials.Devices.Common.Cameras; using PepperDash.Essentials.Devices.Common.Room; using PepperDash.Essentials.Devices.Common.VideoCodec; -using PepperDash.Essentials.Room.Config; using PepperDash.Essentials.WebSocketServer; using System; using System.Collections.Generic; diff --git a/src/PepperDash.Essentials.MobileControl/Services/MobileControlApiService.cs b/src/PepperDash.Essentials.MobileControl/Services/MobileControlApiService.cs index 4a84f8f1..f27bfb36 100644 --- a/src/PepperDash.Essentials.MobileControl/Services/MobileControlApiService.cs +++ b/src/PepperDash.Essentials.MobileControl/Services/MobileControlApiService.cs @@ -1,4 +1,5 @@ using PepperDash.Core; +using PepperDash.Essentials.Core; using System; using System.Net.Http; using System.Threading.Tasks; diff --git a/src/PepperDash.Essentials.MobileControl/Touchpanel/ITheme.cs b/src/PepperDash.Essentials.MobileControl/Touchpanel/ITheme.cs index e5ba76cf..474fde7f 100644 --- a/src/PepperDash.Essentials.MobileControl/Touchpanel/ITheme.cs +++ b/src/PepperDash.Essentials.MobileControl/Touchpanel/ITheme.cs @@ -1,4 +1,5 @@ using PepperDash.Core; +using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Touchpanel { diff --git a/src/PepperDash.Essentials.MobileControl/Touchpanel/ITswAppControl.cs b/src/PepperDash.Essentials.MobileControl/Touchpanel/ITswAppControl.cs index 3beb92c5..98476029 100644 --- a/src/PepperDash.Essentials.MobileControl/Touchpanel/ITswAppControl.cs +++ b/src/PepperDash.Essentials.MobileControl/Touchpanel/ITswAppControl.cs @@ -1,5 +1,6 @@ using PepperDash.Core; using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Feedbacks; namespace PepperDash.Essentials.Touchpanel { diff --git a/src/PepperDash.Essentials.MobileControl/Touchpanel/ITswAppControlMessenger.cs b/src/PepperDash.Essentials.MobileControl/Touchpanel/ITswAppControlMessenger.cs index f9581c74..b4ebf4c8 100644 --- a/src/PepperDash.Essentials.MobileControl/Touchpanel/ITswAppControlMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl/Touchpanel/ITswAppControlMessenger.cs @@ -3,6 +3,7 @@ using Newtonsoft.Json.Linq; using PepperDash.Core; using PepperDash.Core.Logging; using PepperDash.Essentials.AppServer.Messengers; +using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Touchpanel { diff --git a/src/PepperDash.Essentials.MobileControl/Touchpanel/ITswZoomControlMessenger.cs b/src/PepperDash.Essentials.MobileControl/Touchpanel/ITswZoomControlMessenger.cs index 48c7fb7f..ce8e1f0c 100644 --- a/src/PepperDash.Essentials.MobileControl/Touchpanel/ITswZoomControlMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl/Touchpanel/ITswZoomControlMessenger.cs @@ -3,6 +3,7 @@ using Newtonsoft.Json.Linq; using PepperDash.Core; using PepperDash.Core.Logging; using PepperDash.Essentials.AppServer.Messengers; +using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Touchpanel diff --git a/src/PepperDash.Essentials.MobileControl/Touchpanel/MobileControlTouchpanelController.cs b/src/PepperDash.Essentials.MobileControl/Touchpanel/MobileControlTouchpanelController.cs index ab059244..e5c207f1 100644 --- a/src/PepperDash.Essentials.MobileControl/Touchpanel/MobileControlTouchpanelController.cs +++ b/src/PepperDash.Essentials.MobileControl/Touchpanel/MobileControlTouchpanelController.cs @@ -10,11 +10,15 @@ using Newtonsoft.Json.Linq; using PepperDash.Core; using PepperDash.Core.Logging; using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Communications; using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Config.Essentials; using PepperDash.Essentials.Core.DeviceInfo; +using PepperDash.Essentials.Core.Devices; using PepperDash.Essentials.Core.DeviceTypeInterfaces; +using PepperDash.Essentials.Core.Feedbacks; using PepperDash.Essentials.Core.UI; -using Feedback = PepperDash.Essentials.Core.Feedback; +using Feedback = PepperDash.Essentials.Core.Feedbacks.Feedback; namespace PepperDash.Essentials.Touchpanel { diff --git a/src/PepperDash.Essentials.MobileControl/Touchpanel/MobileControlTouchpanelProperties.cs b/src/PepperDash.Essentials.MobileControl/Touchpanel/MobileControlTouchpanelProperties.cs index c99abe31..5ef2307c 100644 --- a/src/PepperDash.Essentials.MobileControl/Touchpanel/MobileControlTouchpanelProperties.cs +++ b/src/PepperDash.Essentials.MobileControl/Touchpanel/MobileControlTouchpanelProperties.cs @@ -1,5 +1,5 @@ using Newtonsoft.Json; -using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Touchpanels; namespace PepperDash.Essentials.Touchpanel { diff --git a/src/PepperDash.Essentials.MobileControl/Touchpanel/ThemeMessenger.cs b/src/PepperDash.Essentials.MobileControl/Touchpanel/ThemeMessenger.cs index 133cf0c8..32839046 100644 --- a/src/PepperDash.Essentials.MobileControl/Touchpanel/ThemeMessenger.cs +++ b/src/PepperDash.Essentials.MobileControl/Touchpanel/ThemeMessenger.cs @@ -3,6 +3,7 @@ using Newtonsoft.Json.Linq; using PepperDash.Core; using PepperDash.Essentials.AppServer; using PepperDash.Essentials.AppServer.Messengers; +using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Touchpanel { diff --git a/src/PepperDash.Essentials.MobileControl/TransmitMessage.cs b/src/PepperDash.Essentials.MobileControl/TransmitMessage.cs index 38f7944f..df401568 100644 --- a/src/PepperDash.Essentials.MobileControl/TransmitMessage.cs +++ b/src/PepperDash.Essentials.MobileControl/TransmitMessage.cs @@ -3,6 +3,7 @@ using Newtonsoft.Json.Converters; using PepperDash.Core; using PepperDash.Core.Logging; using PepperDash.Essentials.AppServer.Messengers; +using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Queues; using PepperDash.Essentials.WebSocketServer; using Serilog.Events; diff --git a/src/PepperDash.Essentials.MobileControl/WebApiHandlers/MobileAuthRequestHandler.cs b/src/PepperDash.Essentials.MobileControl/WebApiHandlers/MobileAuthRequestHandler.cs index 352c56e5..c63ce701 100644 --- a/src/PepperDash.Essentials.MobileControl/WebApiHandlers/MobileAuthRequestHandler.cs +++ b/src/PepperDash.Essentials.MobileControl/WebApiHandlers/MobileAuthRequestHandler.cs @@ -2,6 +2,7 @@ using Newtonsoft.Json; using PepperDash.Core; using PepperDash.Core.Web.RequestHandlers; +using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Web; using System; using System.Threading.Tasks; diff --git a/src/PepperDash.Essentials.MobileControl/WebApiHandlers/MobileInfoHandler.cs b/src/PepperDash.Essentials.MobileControl/WebApiHandlers/MobileInfoHandler.cs index d123dbcd..355f4384 100644 --- a/src/PepperDash.Essentials.MobileControl/WebApiHandlers/MobileInfoHandler.cs +++ b/src/PepperDash.Essentials.MobileControl/WebApiHandlers/MobileInfoHandler.cs @@ -2,7 +2,8 @@ using Newtonsoft.Json; using PepperDash.Core; using PepperDash.Core.Web.RequestHandlers; -using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Config.Essentials; using PepperDash.Essentials.WebSocketServer; using System; using System.Collections.Generic; diff --git a/src/PepperDash.Essentials.MobileControl/WebApiHandlers/UiClientHandler.cs b/src/PepperDash.Essentials.MobileControl/WebApiHandlers/UiClientHandler.cs index 6826092b..e6cdf47c 100644 --- a/src/PepperDash.Essentials.MobileControl/WebApiHandlers/UiClientHandler.cs +++ b/src/PepperDash.Essentials.MobileControl/WebApiHandlers/UiClientHandler.cs @@ -2,6 +2,7 @@ using Newtonsoft.Json; using PepperDash.Core; using PepperDash.Core.Web.RequestHandlers; +using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Web; using PepperDash.Essentials.WebSocketServer; using Serilog.Events; diff --git a/src/PepperDash.Essentials.MobileControl/WebSocketServer/MobileControlWebsocketServer.cs b/src/PepperDash.Essentials.MobileControl/WebSocketServer/MobileControlWebsocketServer.cs index bc7ae141..9af70071 100644 --- a/src/PepperDash.Essentials.MobileControl/WebSocketServer/MobileControlWebsocketServer.cs +++ b/src/PepperDash.Essentials.MobileControl/WebSocketServer/MobileControlWebsocketServer.cs @@ -10,6 +10,7 @@ using Newtonsoft.Json; using PepperDash.Core; using PepperDash.Core.Logging; using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Devices; using PepperDash.Essentials.Core.DeviceTypeInterfaces; using PepperDash.Essentials.Core.Web; using PepperDash.Essentials.RoomBridges; diff --git a/src/PepperDash.Essentials.MobileControl/WebSocketServer/UiClient.cs b/src/PepperDash.Essentials.MobileControl/WebSocketServer/UiClient.cs index eb1cf7a1..8681334e 100644 --- a/src/PepperDash.Essentials.MobileControl/WebSocketServer/UiClient.cs +++ b/src/PepperDash.Essentials.MobileControl/WebSocketServer/UiClient.cs @@ -2,6 +2,7 @@ using Newtonsoft.Json.Linq; using PepperDash.Core; using PepperDash.Essentials.AppServer.Messengers; +using PepperDash.Essentials.Core; using PepperDash.Essentials.RoomBridges; using Serilog.Events; using System; diff --git a/src/PepperDash.Essentials.MobileControl/WebSocketServer/WebSocketServerSecretProvider.cs b/src/PepperDash.Essentials.MobileControl/WebSocketServer/WebSocketServerSecretProvider.cs index cf125d29..d0931321 100644 --- a/src/PepperDash.Essentials.MobileControl/WebSocketServer/WebSocketServerSecretProvider.cs +++ b/src/PepperDash.Essentials.MobileControl/WebSocketServer/WebSocketServerSecretProvider.cs @@ -1,5 +1,5 @@ using Newtonsoft.Json; -using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Secrets; namespace PepperDash.Essentials.WebSocketServer { diff --git a/src/PepperDash.Essentials/ControlSystem.cs b/src/PepperDash.Essentials/ControlSystem.cs index 3da56d8b..fdf9c604 100644 --- a/src/PepperDash.Essentials/ControlSystem.cs +++ b/src/PepperDash.Essentials/ControlSystem.cs @@ -11,7 +11,11 @@ using PepperDash.Core; using PepperDash.Essentials.Core; using PepperDash.Essentials.Core.Bridges; using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Config.Essentials; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Plugins; using PepperDash.Essentials.Core.Routing; +using PepperDash.Essentials.Core.Secrets; using PepperDash.Essentials.Core.Web; using Serilog.Events; @@ -110,7 +114,7 @@ namespace PepperDash.Essentials CrestronConsole.AddNewConsoleCommand(PluginLoader.ReportAssemblyVersions, "reportversions", "Reports the versions of the loaded assemblies", ConsoleAccessLevelEnum.AccessOperator); - CrestronConsole.AddNewConsoleCommand(Core.DeviceFactory.GetDeviceFactoryTypes, "gettypes", "Gets the device types that can be built. Accepts a filter string.", ConsoleAccessLevelEnum.AccessOperator); + CrestronConsole.AddNewConsoleCommand(Core.Factory.DeviceFactory.GetDeviceFactoryTypes, "gettypes", "Gets the device types that can be built. Accepts a filter string.", ConsoleAccessLevelEnum.AccessOperator); CrestronConsole.AddNewConsoleCommand(BridgeHelper.PrintJoinMap, "getjoinmap", "map(s) for bridge or device on bridge [brKey [devKey]]", ConsoleAccessLevelEnum.AccessOperator); @@ -427,7 +431,7 @@ namespace PepperDash.Essentials if (newDev == null) - newDev = Core.DeviceFactory.GetDevice(devConf); + newDev = Core.Factory.DeviceFactory.GetDevice(devConf); if (newDev != null) DeviceManager.AddDevice(newDev); @@ -485,7 +489,7 @@ namespace PepperDash.Essentials { try { - var room = Core.DeviceFactory.GetDevice(roomConfig); + var room = Core.Factory.DeviceFactory.GetDevice(roomConfig); if (room == null) { diff --git a/src/PepperDash.Essentials/Factory/DeviceFactory.cs b/src/PepperDash.Essentials/Factory/DeviceFactory.cs index e60b3fa4..ba8e3708 100644 --- a/src/PepperDash.Essentials/Factory/DeviceFactory.cs +++ b/src/PepperDash.Essentials/Factory/DeviceFactory.cs @@ -6,6 +6,9 @@ using System.Reflection; using PepperDash.Core; using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Factory; +using PepperDash.Essentials.Core.Plugins; namespace PepperDash.Essentials { @@ -57,7 +60,7 @@ namespace PepperDash.Essentials ? descriptionAttribute[0].Description : "No description available"; - Core.DeviceFactory.AddFactoryForType(typeName.ToLower(), description, deviceFactory.FactoryType, deviceFactory.BuildDevice); + Core.Factory.DeviceFactory.AddFactoryForType(typeName.ToLower(), description, deviceFactory.FactoryType, deviceFactory.BuildDevice); } } } diff --git a/src/PepperDash.Essentials/HttpLogoServer.cs b/src/PepperDash.Essentials/HttpLogoServer.cs index d5d133e6..50b34400 100644 --- a/src/PepperDash.Essentials/HttpLogoServer.cs +++ b/src/PepperDash.Essentials/HttpLogoServer.cs @@ -5,6 +5,7 @@ using Crestron.SimplSharp.CrestronIO; using Crestron.SimplSharp.Net.Http; using PepperDash.Core; +using PepperDash.Essentials.Core; using Serilog.Events; namespace PepperDash.Essentials diff --git a/src/PepperDash.Essentials.Core/Web/EssentialsWebApi.cs b/src/PepperDash.Essentials/Web/EssentialsWebApi.cs similarity index 99% rename from src/PepperDash.Essentials.Core/Web/EssentialsWebApi.cs rename to src/PepperDash.Essentials/Web/EssentialsWebApi.cs index 3d197db1..59bfecda 100644 --- a/src/PepperDash.Essentials.Core/Web/EssentialsWebApi.cs +++ b/src/PepperDash.Essentials/Web/EssentialsWebApi.cs @@ -1,8 +1,7 @@ using System.Collections.Generic; using Crestron.SimplSharp; using Crestron.SimplSharp.WebScripting; -using PepperDash.Core; -using PepperDash.Core.Web; +using PepperDash.Essentials.Core.Devices; using PepperDash.Essentials.Core.Web.RequestHandlers; using Serilog.Events; diff --git a/src/PepperDash.Essentials.Core/Web/EssentialsWebApiFactory.cs b/src/PepperDash.Essentials/Web/EssentialsWebApiFactory.cs similarity index 95% rename from src/PepperDash.Essentials.Core/Web/EssentialsWebApiFactory.cs rename to src/PepperDash.Essentials/Web/EssentialsWebApiFactory.cs index 49a7eb80..24865fe4 100644 --- a/src/PepperDash.Essentials.Core/Web/EssentialsWebApiFactory.cs +++ b/src/PepperDash.Essentials/Web/EssentialsWebApiFactory.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -using PepperDash.Core; using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Devices; using Serilog.Events; namespace PepperDash.Essentials.Core.Web diff --git a/src/PepperDash.Essentials.Core/Web/EssentialsWebApiHelpers.cs b/src/PepperDash.Essentials/Web/EssentialsWebApiHelpers.cs similarity index 95% rename from src/PepperDash.Essentials.Core/Web/EssentialsWebApiHelpers.cs rename to src/PepperDash.Essentials/Web/EssentialsWebApiHelpers.cs index c57f9109..a5e89e52 100644 --- a/src/PepperDash.Essentials.Core/Web/EssentialsWebApiHelpers.cs +++ b/src/PepperDash.Essentials/Web/EssentialsWebApiHelpers.cs @@ -2,7 +2,9 @@ using System.Linq; using System.Text; using Crestron.SimplSharp.WebScripting; -using PepperDash.Core; +using PepperDash.Essentials.Core.Factory; +using PepperDash.Essentials.Core.JoinMaps; +using PepperDash.Essentials.Core.Plugins; namespace PepperDash.Essentials.Core.Web { diff --git a/src/PepperDash.Essentials.Core/Web/EssentialsWebApiPropertiesConfig.cs b/src/PepperDash.Essentials/Web/EssentialsWebApiPropertiesConfig.cs similarity index 100% rename from src/PepperDash.Essentials.Core/Web/EssentialsWebApiPropertiesConfig.cs rename to src/PepperDash.Essentials/Web/EssentialsWebApiPropertiesConfig.cs diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/AppDebugRequestHandler.cs b/src/PepperDash.Essentials/Web/RequestHandlers/AppDebugRequestHandler.cs similarity index 97% rename from src/PepperDash.Essentials.Core/Web/RequestHandlers/AppDebugRequestHandler.cs rename to src/PepperDash.Essentials/Web/RequestHandlers/AppDebugRequestHandler.cs index 702b5bcf..531f6db4 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/AppDebugRequestHandler.cs +++ b/src/PepperDash.Essentials/Web/RequestHandlers/AppDebugRequestHandler.cs @@ -1,7 +1,5 @@ using Crestron.SimplSharp.WebScripting; using Newtonsoft.Json; -using PepperDash.Core; -using PepperDash.Core.Web.RequestHandlers; using Serilog.Events; using Newtonsoft.Json.Converters; diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/DebugSessionRequestHandler.cs b/src/PepperDash.Essentials/Web/RequestHandlers/DebugSessionRequestHandler.cs similarity index 97% rename from src/PepperDash.Essentials.Core/Web/RequestHandlers/DebugSessionRequestHandler.cs rename to src/PepperDash.Essentials/Web/RequestHandlers/DebugSessionRequestHandler.cs index b9d8a7e5..c1135d3b 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/DebugSessionRequestHandler.cs +++ b/src/PepperDash.Essentials/Web/RequestHandlers/DebugSessionRequestHandler.cs @@ -1,8 +1,6 @@ using Crestron.SimplSharp; using Crestron.SimplSharp.WebScripting; using Newtonsoft.Json; -using PepperDash.Core; -using PepperDash.Core.Web.RequestHandlers; using Serilog.Events; using System; using System.Text; diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/DefaultRequestHandler.cs b/src/PepperDash.Essentials/Web/RequestHandlers/DefaultRequestHandler.cs similarity index 98% rename from src/PepperDash.Essentials.Core/Web/RequestHandlers/DefaultRequestHandler.cs rename to src/PepperDash.Essentials/Web/RequestHandlers/DefaultRequestHandler.cs index c0fec253..9f221dcd 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/DefaultRequestHandler.cs +++ b/src/PepperDash.Essentials/Web/RequestHandlers/DefaultRequestHandler.cs @@ -1,5 +1,4 @@ using Crestron.SimplSharp.WebScripting; -using PepperDash.Core.Web.RequestHandlers; namespace PepperDash.Essentials.Core.Web.RequestHandlers { diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/DevJsonRequestHandler.cs b/src/PepperDash.Essentials/Web/RequestHandlers/DevJsonRequestHandler.cs similarity index 97% rename from src/PepperDash.Essentials.Core/Web/RequestHandlers/DevJsonRequestHandler.cs rename to src/PepperDash.Essentials/Web/RequestHandlers/DevJsonRequestHandler.cs index 51b261fe..27164f93 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/DevJsonRequestHandler.cs +++ b/src/PepperDash.Essentials/Web/RequestHandlers/DevJsonRequestHandler.cs @@ -1,8 +1,7 @@ using System; using Crestron.SimplSharp.WebScripting; using Newtonsoft.Json; -using PepperDash.Core; -using PepperDash.Core.Web.RequestHandlers; +using PepperDash.Essentials.Core.Devices; using Serilog.Events; namespace PepperDash.Essentials.Core.Web.RequestHandlers diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/DevListRequestHandler.cs b/src/PepperDash.Essentials/Web/RequestHandlers/DevListRequestHandler.cs similarity index 97% rename from src/PepperDash.Essentials.Core/Web/RequestHandlers/DevListRequestHandler.cs rename to src/PepperDash.Essentials/Web/RequestHandlers/DevListRequestHandler.cs index 31bfd6f9..a45dac9b 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/DevListRequestHandler.cs +++ b/src/PepperDash.Essentials/Web/RequestHandlers/DevListRequestHandler.cs @@ -1,7 +1,7 @@ using System.Linq; using Crestron.SimplSharp.WebScripting; using Newtonsoft.Json; -using PepperDash.Core.Web.RequestHandlers; +using PepperDash.Essentials.Core.Devices; namespace PepperDash.Essentials.Core.Web.RequestHandlers { diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/DevMethodsRequestHandler.cs b/src/PepperDash.Essentials/Web/RequestHandlers/DevMethodsRequestHandler.cs similarity index 97% rename from src/PepperDash.Essentials.Core/Web/RequestHandlers/DevMethodsRequestHandler.cs rename to src/PepperDash.Essentials/Web/RequestHandlers/DevMethodsRequestHandler.cs index 695fd3c9..b3784734 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/DevMethodsRequestHandler.cs +++ b/src/PepperDash.Essentials/Web/RequestHandlers/DevMethodsRequestHandler.cs @@ -1,7 +1,6 @@ using System.Text; using Crestron.SimplSharp.WebScripting; -using PepperDash.Core; -using PepperDash.Core.Web.RequestHandlers; +using PepperDash.Essentials.Core.Devices; namespace PepperDash.Essentials.Core.Web.RequestHandlers { diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/DevPropsRequestHandler.cs b/src/PepperDash.Essentials/Web/RequestHandlers/DevPropsRequestHandler.cs similarity index 98% rename from src/PepperDash.Essentials.Core/Web/RequestHandlers/DevPropsRequestHandler.cs rename to src/PepperDash.Essentials/Web/RequestHandlers/DevPropsRequestHandler.cs index 4ed3712c..205f7c64 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/DevPropsRequestHandler.cs +++ b/src/PepperDash.Essentials/Web/RequestHandlers/DevPropsRequestHandler.cs @@ -1,6 +1,6 @@ using System.Text; using Crestron.SimplSharp.WebScripting; -using PepperDash.Core.Web.RequestHandlers; +using PepperDash.Essentials.Core.Devices; namespace PepperDash.Essentials.Core.Web.RequestHandlers { diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/DisableAllStreamDebugRequestHandler.cs b/src/PepperDash.Essentials/Web/RequestHandlers/DisableAllStreamDebugRequestHandler.cs similarity index 94% rename from src/PepperDash.Essentials.Core/Web/RequestHandlers/DisableAllStreamDebugRequestHandler.cs rename to src/PepperDash.Essentials/Web/RequestHandlers/DisableAllStreamDebugRequestHandler.cs index 172b8c4d..7ab1988a 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/DisableAllStreamDebugRequestHandler.cs +++ b/src/PepperDash.Essentials/Web/RequestHandlers/DisableAllStreamDebugRequestHandler.cs @@ -1,5 +1,5 @@ using Crestron.SimplSharp.WebScripting; -using PepperDash.Core.Web.RequestHandlers; +using PepperDash.Essentials.Core.Devices; namespace PepperDash.Essentials.Core.Web.RequestHandlers { diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/DoNotLoadConfigOnNextBootRequestHandler.cs b/src/PepperDash.Essentials/Web/RequestHandlers/DoNotLoadConfigOnNextBootRequestHandler.cs similarity index 97% rename from src/PepperDash.Essentials.Core/Web/RequestHandlers/DoNotLoadConfigOnNextBootRequestHandler.cs rename to src/PepperDash.Essentials/Web/RequestHandlers/DoNotLoadConfigOnNextBootRequestHandler.cs index 5c17e342..f859817d 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/DoNotLoadConfigOnNextBootRequestHandler.cs +++ b/src/PepperDash.Essentials/Web/RequestHandlers/DoNotLoadConfigOnNextBootRequestHandler.cs @@ -1,7 +1,5 @@ using Crestron.SimplSharp.WebScripting; using Newtonsoft.Json; -using PepperDash.Core; -using PepperDash.Core.Web.RequestHandlers; namespace PepperDash.Essentials.Core.Web.RequestHandlers { diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetFeedbacksForDeviceRequestHandler.cs b/src/PepperDash.Essentials/Web/RequestHandlers/GetFeedbacksForDeviceRequestHandler.cs similarity index 96% rename from src/PepperDash.Essentials.Core/Web/RequestHandlers/GetFeedbacksForDeviceRequestHandler.cs rename to src/PepperDash.Essentials/Web/RequestHandlers/GetFeedbacksForDeviceRequestHandler.cs index ca9eeb81..e6bb1c1e 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetFeedbacksForDeviceRequestHandler.cs +++ b/src/PepperDash.Essentials/Web/RequestHandlers/GetFeedbacksForDeviceRequestHandler.cs @@ -1,7 +1,8 @@ using System.Linq; using Crestron.SimplSharp.WebScripting; using Newtonsoft.Json; -using PepperDash.Core.Web.RequestHandlers; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Feedbacks; namespace PepperDash.Essentials.Core.Web.RequestHandlers { diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetJoinMapForBridgeKeyRequestHandler.cs b/src/PepperDash.Essentials/Web/RequestHandlers/GetJoinMapForBridgeKeyRequestHandler.cs similarity index 97% rename from src/PepperDash.Essentials.Core/Web/RequestHandlers/GetJoinMapForBridgeKeyRequestHandler.cs rename to src/PepperDash.Essentials/Web/RequestHandlers/GetJoinMapForBridgeKeyRequestHandler.cs index 436215ca..9996b328 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetJoinMapForBridgeKeyRequestHandler.cs +++ b/src/PepperDash.Essentials/Web/RequestHandlers/GetJoinMapForBridgeKeyRequestHandler.cs @@ -1,8 +1,8 @@ using System.Linq; using Crestron.SimplSharp.WebScripting; using Newtonsoft.Json; -using PepperDash.Core.Web.RequestHandlers; using PepperDash.Essentials.Core.Bridges; +using PepperDash.Essentials.Core.Devices; namespace PepperDash.Essentials.Core.Web.RequestHandlers { diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetJoinMapForDeviceKeyRequestHandler.cs b/src/PepperDash.Essentials/Web/RequestHandlers/GetJoinMapForDeviceKeyRequestHandler.cs similarity index 96% rename from src/PepperDash.Essentials.Core/Web/RequestHandlers/GetJoinMapForDeviceKeyRequestHandler.cs rename to src/PepperDash.Essentials/Web/RequestHandlers/GetJoinMapForDeviceKeyRequestHandler.cs index 0cb81d38..10a060ce 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetJoinMapForDeviceKeyRequestHandler.cs +++ b/src/PepperDash.Essentials/Web/RequestHandlers/GetJoinMapForDeviceKeyRequestHandler.cs @@ -1,7 +1,8 @@ using Crestron.SimplSharp.WebScripting; using Newtonsoft.Json; -using PepperDash.Core.Web.RequestHandlers; using PepperDash.Essentials.Core.Bridges; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.JoinMaps; namespace PepperDash.Essentials.Core.Web.RequestHandlers { diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetRoutesHandler.cs b/src/PepperDash.Essentials/Web/RequestHandlers/GetRoutesHandler.cs similarity index 98% rename from src/PepperDash.Essentials.Core/Web/RequestHandlers/GetRoutesHandler.cs rename to src/PepperDash.Essentials/Web/RequestHandlers/GetRoutesHandler.cs index cc450e11..4b2da45d 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetRoutesHandler.cs +++ b/src/PepperDash.Essentials/Web/RequestHandlers/GetRoutesHandler.cs @@ -1,7 +1,6 @@ using Crestron.SimplSharp; using Crestron.SimplSharp.WebScripting; using Newtonsoft.Json; -using PepperDash.Core.Web.RequestHandlers; namespace PepperDash.Essentials.Core.Web.RequestHandlers { diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetRoutingPortsHandler.cs b/src/PepperDash.Essentials/Web/RequestHandlers/GetRoutingPortsHandler.cs similarity index 96% rename from src/PepperDash.Essentials.Core/Web/RequestHandlers/GetRoutingPortsHandler.cs rename to src/PepperDash.Essentials/Web/RequestHandlers/GetRoutingPortsHandler.cs index f11e6dd2..bc8d13ba 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetRoutingPortsHandler.cs +++ b/src/PepperDash.Essentials/Web/RequestHandlers/GetRoutingPortsHandler.cs @@ -1,6 +1,7 @@ using Crestron.SimplSharp.WebScripting; using Newtonsoft.Json; -using PepperDash.Core.Web.RequestHandlers; +using PepperDash.Essentials.Core.Devices; +using PepperDash.Essentials.Core.Routing; using System.Collections.Generic; using System.Linq; using System.Text; diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetTieLinesRequestHandler.cs b/src/PepperDash.Essentials/Web/RequestHandlers/GetTieLinesRequestHandler.cs similarity index 96% rename from src/PepperDash.Essentials.Core/Web/RequestHandlers/GetTieLinesRequestHandler.cs rename to src/PepperDash.Essentials/Web/RequestHandlers/GetTieLinesRequestHandler.cs index bc6fb623..7e72c6db 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetTieLinesRequestHandler.cs +++ b/src/PepperDash.Essentials/Web/RequestHandlers/GetTieLinesRequestHandler.cs @@ -1,6 +1,6 @@ using Crestron.SimplSharp.WebScripting; using Newtonsoft.Json; -using PepperDash.Core.Web.RequestHandlers; +using PepperDash.Essentials.Core.Routing; using System.Linq; using System.Text; diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetTypesByFilterRequestHandler.cs b/src/PepperDash.Essentials/Web/RequestHandlers/GetTypesByFilterRequestHandler.cs similarity index 97% rename from src/PepperDash.Essentials.Core/Web/RequestHandlers/GetTypesByFilterRequestHandler.cs rename to src/PepperDash.Essentials/Web/RequestHandlers/GetTypesByFilterRequestHandler.cs index 2cabeb5e..564d49f4 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetTypesByFilterRequestHandler.cs +++ b/src/PepperDash.Essentials/Web/RequestHandlers/GetTypesByFilterRequestHandler.cs @@ -1,7 +1,7 @@ using System.Linq; using Crestron.SimplSharp.WebScripting; using Newtonsoft.Json; -using PepperDash.Core.Web.RequestHandlers; +using PepperDash.Essentials.Core.Factory; namespace PepperDash.Essentials.Core.Web.RequestHandlers { diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetTypesRequestHandler.cs b/src/PepperDash.Essentials/Web/RequestHandlers/GetTypesRequestHandler.cs similarity index 97% rename from src/PepperDash.Essentials.Core/Web/RequestHandlers/GetTypesRequestHandler.cs rename to src/PepperDash.Essentials/Web/RequestHandlers/GetTypesRequestHandler.cs index 6d011d23..9d80c65e 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/GetTypesRequestHandler.cs +++ b/src/PepperDash.Essentials/Web/RequestHandlers/GetTypesRequestHandler.cs @@ -1,7 +1,7 @@ using System.Linq; using Crestron.SimplSharp.WebScripting; using Newtonsoft.Json; -using PepperDash.Core.Web.RequestHandlers; +using PepperDash.Essentials.Core.Factory; namespace PepperDash.Essentials.Core.Web.RequestHandlers { diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/LoadConfigRequestHandler.cs b/src/PepperDash.Essentials/Web/RequestHandlers/LoadConfigRequestHandler.cs similarity index 95% rename from src/PepperDash.Essentials.Core/Web/RequestHandlers/LoadConfigRequestHandler.cs rename to src/PepperDash.Essentials/Web/RequestHandlers/LoadConfigRequestHandler.cs index e1eafbca..d319e9dd 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/LoadConfigRequestHandler.cs +++ b/src/PepperDash.Essentials/Web/RequestHandlers/LoadConfigRequestHandler.cs @@ -1,5 +1,5 @@ using Crestron.SimplSharp.WebScripting; -using PepperDash.Core.Web.RequestHandlers; +using PepperDash.Essentials.Core.Config; namespace PepperDash.Essentials.Core.Web.RequestHandlers { diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/ReportVersionsRequestHandler.cs b/src/PepperDash.Essentials/Web/RequestHandlers/ReportVersionsRequestHandler.cs similarity index 96% rename from src/PepperDash.Essentials.Core/Web/RequestHandlers/ReportVersionsRequestHandler.cs rename to src/PepperDash.Essentials/Web/RequestHandlers/ReportVersionsRequestHandler.cs index ace863ab..509fff1f 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/ReportVersionsRequestHandler.cs +++ b/src/PepperDash.Essentials/Web/RequestHandlers/ReportVersionsRequestHandler.cs @@ -1,7 +1,7 @@ using System.Linq; using Crestron.SimplSharp.WebScripting; using Newtonsoft.Json; -using PepperDash.Core.Web.RequestHandlers; +using PepperDash.Essentials.Core.Plugins; namespace PepperDash.Essentials.Core.Web.RequestHandlers { diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/RestartProgramRequestHandler.cs b/src/PepperDash.Essentials/Web/RequestHandlers/RestartProgramRequestHandler.cs similarity index 96% rename from src/PepperDash.Essentials.Core/Web/RequestHandlers/RestartProgramRequestHandler.cs rename to src/PepperDash.Essentials/Web/RequestHandlers/RestartProgramRequestHandler.cs index b4ab5515..9dbcc8de 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/RestartProgramRequestHandler.cs +++ b/src/PepperDash.Essentials/Web/RequestHandlers/RestartProgramRequestHandler.cs @@ -1,6 +1,5 @@ using Crestron.SimplSharp; using Crestron.SimplSharp.WebScripting; -using PepperDash.Core.Web.RequestHandlers; namespace PepperDash.Essentials.Core.Web.RequestHandlers { diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/SetDeviceStreamDebugRequestHandler.cs b/src/PepperDash.Essentials/Web/RequestHandlers/SetDeviceStreamDebugRequestHandler.cs similarity index 98% rename from src/PepperDash.Essentials.Core/Web/RequestHandlers/SetDeviceStreamDebugRequestHandler.cs rename to src/PepperDash.Essentials/Web/RequestHandlers/SetDeviceStreamDebugRequestHandler.cs index 72758b0e..9d7d09c2 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/SetDeviceStreamDebugRequestHandler.cs +++ b/src/PepperDash.Essentials/Web/RequestHandlers/SetDeviceStreamDebugRequestHandler.cs @@ -1,8 +1,7 @@ using System; using Crestron.SimplSharp.WebScripting; using Newtonsoft.Json; -using PepperDash.Core; -using PepperDash.Core.Web.RequestHandlers; +using PepperDash.Essentials.Core.Devices; namespace PepperDash.Essentials.Core.Web.RequestHandlers { diff --git a/src/PepperDash.Essentials.Core/Web/RequestHandlers/ShowConfigRequestHandler.cs b/src/PepperDash.Essentials/Web/RequestHandlers/ShowConfigRequestHandler.cs similarity index 92% rename from src/PepperDash.Essentials.Core/Web/RequestHandlers/ShowConfigRequestHandler.cs rename to src/PepperDash.Essentials/Web/RequestHandlers/ShowConfigRequestHandler.cs index 4964822e..48676b1e 100644 --- a/src/PepperDash.Essentials.Core/Web/RequestHandlers/ShowConfigRequestHandler.cs +++ b/src/PepperDash.Essentials/Web/RequestHandlers/ShowConfigRequestHandler.cs @@ -1,7 +1,6 @@ using Crestron.SimplSharp.WebScripting; using Newtonsoft.Json; -using PepperDash.Core.Web.RequestHandlers; -using PepperDash.Essentials.Core.Config; +using PepperDash.Essentials.Core.Config.Essentials; namespace PepperDash.Essentials.Core.Web.RequestHandlers {