コード例 #1
0
        public void DeviceStateChangedHandler()
        {
            var doc         = new APLDocument();
            var smartMotion = new SmartMotionExtension("SmartMotion");

            smartMotion.OnDeviceStateChanged(doc, null);
            Assert.True(doc.Handlers.ContainsKey("SmartMotion:OnDeviceStateChanged"));
        }
コード例 #2
0
        public void SmartMotion()
        {
            var smartMotion = new SmartMotionExtension("SmartMotion");
            var doc         = new APLDocument(APLDocumentVersion.V1_4);

            doc.Extensions.Value.Add(smartMotion);
            doc.Settings = new APLDocumentSettings();
            doc.Settings.Add(smartMotion.Name, new SmartMotionSettings
            {
                DeviceStateName  = "MyDeviceState",
                WakeWordResponse = WakeWordResponse.FollowOnWakeWord
            });
            Assert.True(Utility.CompareJson(doc, "ExtensionSmartMotion.json"));
        }
コード例 #3
0
 public static GoToCenterCommand For(SmartMotionExtension extension)
 {
     return(new GoToCenterCommand(extension.Name));
 }
コード例 #4
0
 public static StopMotionCommand For(SmartMotionExtension extension)
 {
     return(new StopMotionCommand(extension.Name));
 }
コード例 #5
0
 public static TurnToPrimaryUserCommand For(SmartMotionExtension extension)
 {
     return(new TurnToPrimaryUserCommand(extension.Name));
 }