For your previous explanation I'm afraid you didn't see my problem
I don't quite understand your explanation .
Step 1: I set up a Device Interface and set up a method;
Step 2: I directly call this new defined function.
Question:Why is my result not equal to the correct answer ?Did I do something wrong ?