本文整理汇总了Java中org.dsa.iot.dslink.serializer.Serializer类的典型用法代码示例。如果您正苦于以下问题:Java Serializer类的具体用法?Java Serializer怎么用?Java Serializer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Serializer类属于org.dsa.iot.dslink.serializer包,在下文中一共展示了Serializer类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onResponderInitialized
import org.dsa.iot.dslink.serializer.Serializer; //导入依赖的package包/类
@Override
public void onResponderInitialized(DSLink link) {
LOGGER.info("Initialized");
NodeManager manager = link.getNodeManager();
Node superRoot = manager.getNode("/").getNode();
Serializer copyser = new Serializer(manager);
Deserializer copydeser = new Deserializer(manager);
// NodeBuilder b = superRoot.createChild("defs");
// b.setSerializable(false);
// b.setHidden(true);
// Node node = b.build();
//
// b = node.createChild("profile");
// node = b.build();
//
// b = node.createChild("getHistory_");
// Action act = new Action(Permission.READ, null);
// GetHistory.initProfile(act);
// b.setAction(act);
// b.build();
DnpLink.start(superRoot, copyser, copydeser);
}
示例2: handleExport
import org.dsa.iot.dslink.serializer.Serializer; //导入依赖的package包/类
private void handleExport(Node fnode, ActionResult event) {
try {
Method serMethod = Serializer.class.getDeclaredMethod("serializeChildren", JsonObject.class, Node.class);
serMethod.setAccessible(true);
JsonObject childOut = new JsonObject();
serMethod.invoke(conn.link.serializer, childOut, fnode);
String retval = childOut.toString();
event.getTable().addRow(Row.make(new Value(retval)));
} catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
LOGGER.debug("", e);
}
}
示例3: onResponderInitialized
import org.dsa.iot.dslink.serializer.Serializer; //导入依赖的package包/类
@Override
public void onResponderInitialized(DSLink link) {
LOGGER.info("Initialized");
NodeManager manager = link.getNodeManager();
Serializer copyser = new Serializer(manager);
Deserializer copydeser = new Deserializer(manager);
Node superRoot = manager.getNode("/").getNode();
ModbusLink.start(superRoot, copyser, copydeser);
}
示例4: handleExport
import org.dsa.iot.dslink.serializer.Serializer; //导入依赖的package包/类
private void handleExport(ActionResult event) {
try {
Method serMethod = Serializer.class.getDeclaredMethod("serializeChildren", JsonObject.class, Node.class);
serMethod.setAccessible(true);
JsonObject childOut = new JsonObject();
serMethod.invoke(link.serializer, childOut, node);
String retval = childOut.toString();
event.getTable().addRow(Row.make(new Value(retval)));
} catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
LOGGER.debug("", e);
}
}
示例5: ModbusLink
import org.dsa.iot.dslink.serializer.Serializer; //导入依赖的package包/类
private ModbusLink(Node node, Serializer ser, Deserializer deser) {
this.node = node;
this.serializer = ser;
this.deserializer = deser;
this.futures = new ConcurrentHashMap<>();
this.connections = new HashSet<ModbusConnection>();
this.masters = new HashSet<ModbusMaster>();
this.tcpListeners = new HashMap<Integer, ModbusSlaveSet>();
this.udpListeners = new HashMap<Integer, ModbusSlaveSet>();
this.hostToConnection = new HashMap<String, IpConnectionWithDevice>();
}
示例6: DnpLink
import org.dsa.iot.dslink.serializer.Serializer; //导入依赖的package包/类
private DnpLink(Node node, Serializer copyser, Deserializer copydeser) {
this.node = node;
this.copySerializer = copyser;
this.copyDeserializer = copydeser;
}
示例7: start
import org.dsa.iot.dslink.serializer.Serializer; //导入依赖的package包/类
public static void start(Node node, Serializer copyser, Deserializer copydeser) {
DnpLink dl = new DnpLink(node, copyser, copydeser);
dl.init();
}
示例8: start
import org.dsa.iot.dslink.serializer.Serializer; //导入依赖的package包/类
public static void start(Node parent, Serializer copyser, Deserializer copydeser) {
Node node = parent;
final ModbusLink link = new ModbusLink(node, copyser, copydeser);
singleton = link;
link.init();
}