Error Creating Device

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Error Creating Device

r4jiv
Hello ,

I am developing a remote control application for android  which will send keyEvents to a remote service running on another device (OTT device) , i am following the sample app and workbench code to do so.

I am getting this exception :-
" Creating demo device failed Related state variable not found for output argument: ResultStatus "

i have defined a KeyVals class which is analogous to SwithPower class :-


@UpnpService(serviceId = @UpnpServiceId("KeyVals"), serviceType = @UpnpServiceType(value = "KeyVals", version = 1))
public class KeyVals {

        private final PropertyChangeSupport propertyChangeSupport;

        public KeyVals() {
                this.propertyChangeSupport = new PropertyChangeSupport(this);
        }

        public PropertyChangeSupport getPropertyChangeSupport() {
                return propertyChangeSupport;
        }

        @UpnpStateVariable(defaultValue = "0", sendEvents = false)
        private int target = 0;

        @UpnpStateVariable(defaultValue = "0")
        private int key = 0;

        @UpnpAction
        public void setTarget(
                        @UpnpInputArgument(name = "NewTargetValue") int KeyCode) {

                int targetOldValue = target;
                target = KeyCode;
                int OldeKeyValue = key;
                key = KeyCode;

                // These have no effect on the UPnP monitoring but it's JavaBean
                // compliant
                getPropertyChangeSupport().firePropertyChange("target", targetOldValue,
                                target);
                getPropertyChangeSupport().firePropertyChange("status", OldeKeyValue,
                                key);

                // This will send a UPnP event, it's the name of a state variable that
                // sends events
                getPropertyChangeSupport().firePropertyChange("Status", OldeKeyValue,
                                key);
        }

        @UpnpAction(out = @UpnpOutputArgument(name = "RetTargetValue"))
        public int getTarget() {
                return target;
        }

        @UpnpAction(out = @UpnpOutputArgument(name = "ResultStatus"))
        public int getKeyCode() {
                return key;
        }

}

can anyone please help me figuring out the bug !!
Thanks
Rajiv