| | |
| | | try { |
| | | Class<?> clazz = Class.forName("com.jcdm.main.da.opcuaconfig.cert.MethodName"); |
| | | Method method = clazz.getMethod(daOpcuaConfig.getrFunction(), new Class[] { String.class, String.class }); |
| | | if (value.isNull()){ |
| | | method.invoke(clazz.newInstance(),new Object[] { |
| | | new String(id.getIdentifier().toString()), new String("") }); |
| | | }else{ |
| | | method.invoke(clazz.newInstance(),new Object[] { |
| | | new String(id.getIdentifier().toString()), new String(value.getValue().toString()) }); |
| | | } |
| | | } catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException | InstantiationException | |
| | | InvocationTargetException e) { |
| | | e.printStackTrace(); |
| | |
| | | log.info("Value={}", value); |
| | | |
| | | Variant variant = value.getValue(); |
| | | log.info("Variant={}", variant.getValue()); |
| | | |
| | | log.info("BackingClass={}", BuiltinDataType.getBackingClass(variant.getDataType().get())); |
| | | |
| | | if(null == variant.getValue()) |
| | | { |
| | | return null; |
| | | }else{ |
| | | return variant.getValue().toString(); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 方法描述: 写入多个节点的值 |