1 Star 0 Fork 1

cxyrfg/基于Java语言的光伏监控系统+光伏发电系统+光伏软件系统+光伏监控系统源码+光伏发电系统源码-智电云

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
wmp_ctrol_info_stub.java 2.10 KB
一键复制 编辑 原始数据 按行查看 历史
智电云 提交于 2024-09-02 15:27 . Add files via upload
package com.zhengbangnet.commu.wm.message;
/*
* 根据消息定义类、利用Java反射机制,由工具类MakeStubFile自动生成
* 浙江爱充网络, 2020-07-03
* */
import com.zhengbangnet.commu.wm.pack.PackException;
import com.zhengbangnet.commu.wm.pack.PackStubIF;
import com.zhengbangnet.commu.wm.pack.PackUtil;
public class wmp_ctrol_info_stub implements PackStubIF {
@Override
public void pack(PackUtil.Buf buf, Object o) throws PackException {
wmp_ctrol_info wmp_ctrol_info = (wmp_ctrol_info)o;
PackUtil.putProtocolStr(buf, wmp_ctrol_info.hw_desc);
PackUtil.putByte(buf, wmp_ctrol_info.ctrl_type);
PackUtil.putByte(buf, wmp_ctrol_info.serial_num);
PackUtil.putByte(buf, wmp_ctrol_info.res);
PackUtil.putByte(buf, wmp_ctrol_info.hw_ver_major.getByte());
PackUtil.putByte(buf, wmp_ctrol_info.hw_ver_minor.getByte());
PackUtil.putProtocolStr(buf, wmp_ctrol_info.fw_desc);
PackUtil.putByte(buf, wmp_ctrol_info.fw_ver_major.getByte());
PackUtil.putByte(buf, wmp_ctrol_info.fw_ver_minor.getByte());
PackUtil.putByte(buf, wmp_ctrol_info.fw_ver_inner.getByte());
PackUtil.putByte(buf, wmp_ctrol_info.res2);
}
@Override
public Object unpack(PackUtil.Buf buf) throws PackException {
wmp_ctrol_info wmp_ctrol_info = new wmp_ctrol_info();
PackUtil.parseProtocolStr(buf, wmp_ctrol_info.hw_desc);
wmp_ctrol_info.ctrl_type = PackUtil.getByte(buf);
wmp_ctrol_info.serial_num = PackUtil.getByte(buf);
wmp_ctrol_info.res = PackUtil.getByte(buf);
wmp_ctrol_info.hw_ver_major.setByte(PackUtil.getByte(buf));
wmp_ctrol_info.hw_ver_minor.setByte(PackUtil.getByte(buf));
PackUtil.parseProtocolStr(buf, wmp_ctrol_info.fw_desc);
wmp_ctrol_info.fw_ver_major.setByte(PackUtil.getByte(buf));
wmp_ctrol_info.fw_ver_minor.setByte(PackUtil.getByte(buf));
wmp_ctrol_info.fw_ver_inner.setByte(PackUtil.getByte(buf));
wmp_ctrol_info.res2 = PackUtil.getByte(buf);
return wmp_ctrol_info;
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/cxyrfg/Photovoltaic-Monitoring-System-Based-on-Java-Language009.git
git@gitee.com:cxyrfg/Photovoltaic-Monitoring-System-Based-on-Java-Language009.git
cxyrfg
Photovoltaic-Monitoring-System-Based-on-Java-Language009
基于Java语言的光伏监控系统+光伏发电系统+光伏软件系统+光伏监控系统源码+光伏发电系统源码-智电云
main

搜索帮助