当前位置: 首页>>代码示例>>Java>>正文


Java Serializer类代码示例

本文整理汇总了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);
	}
 
开发者ID:IOT-DSA,项目名称:dslink-java-dnp3,代码行数:26,代码来源:Main.java

示例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);
    }
}
 
开发者ID:IOT-DSA,项目名称:dslink-java-modbus,代码行数:13,代码来源:SlaveFolder.java

示例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);
}
 
开发者ID:IOT-DSA,项目名称:dslink-java-modbus,代码行数:11,代码来源:Main.java

示例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);
    }
}
 
开发者ID:IOT-DSA,项目名称:dslink-java-modbus,代码行数:13,代码来源:ModbusConnection.java

示例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>();
}
 
开发者ID:IOT-DSA,项目名称:dslink-java-modbus,代码行数:14,代码来源:ModbusLink.java

示例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;
}
 
开发者ID:IOT-DSA,项目名称:dslink-java-dnp3,代码行数:6,代码来源:DnpLink.java

示例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();
}
 
开发者ID:IOT-DSA,项目名称:dslink-java-dnp3,代码行数:5,代码来源:DnpLink.java

示例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();
}
 
开发者ID:IOT-DSA,项目名称:dslink-java-modbus,代码行数:7,代码来源:ModbusLink.java


注:本文中的org.dsa.iot.dslink.serializer.Serializer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。