wukong-m2m / wukong-darjeeling

Darjeeling for WuKong
Other
20 stars 17 forks source link

LED is handled as Virtual WuClass #120

Open wycc opened 10 years ago

wycc commented 10 years ago

I deploy a LED component to a network which every devices are native device. In this case, the mapper should complain that the LED can not be mapped. However, it does try to put the LED as a virtual wuobject and put on a native device.

So, we need to check two issues.

Firstly, the LED do not support JAVA. It looks like the mapper do not handle the virtual wuobject creation correctly. It should check the flag in the wuclass before it select it as the target to deploy virtual wuobject.

Secondly, we should not select the native device to deploy anything.

compile-java: [echo] classpath base/build/base.jar wkpf_virtual/build/wkpf_virtual.jar [mkdir] Created dir: /home/wycc/devel/wukong-darjeeling/src/app/wkdeploy/build/class [javac] Compiling 1 source file to /home/wycc/devel/wukong-darjeeling/src/app/wkdeploy/build/class [javac] /home/wycc/devel/wukong-darjeeling/src/app/wkdeploy/java/WKDeploy.java:17: cannot find symbol [javac] symbol : variable GENERATEDVirtualLEDWuObject [javac] location: class WKDeploy [javac] WKPF.registerWuClass((short)9, GENERATEDVirtualLEDWuObject.properties); [javac] ^ [javac] /home/wycc/devel/wukong-darjeeling/src/app/wkdeploy/java/WKDeploy.java:43: cannot find symbol [javac] symbol : class VirtualLEDWuObject [javac] location: class WKDeploy [javac] VirtualWuObject wuclassInstanceLED = new VirtualLEDWuObject(); [javac] ^ [javac] 2 errors

senatorjo commented 10 years ago

related #121. Need to check if #121 can solve this.

wycc commented 10 years ago

121 can not solved it. This issue will happen when we have no device with LED wuclass in it. We do not check if the JAVA implementation of the WuClass is available or not. We should respect the virtual flag in the XML and repport the usage of LED as an error.