Documentation
¶
Overview ¶
* @Author: Keven * @version: v1.0.1 * @Date: 2021-09-28 13:31:03 * @LastEditors: Keven * @LastEditTime: 2021-09-28 13:31:03
* @Author: Feng * @version: v1.0.0 * @Date: 2020-07-10 15:56:51 * @LastEditors: Keven * @LastEditTime: 2021-09-28 13:36:37
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CRC16MODBUS = &crc.Parameters{Width: 16, Polynomial: 0x8005, Init: 0xFFFF, ReflectIn: true, ReflectOut: true, FinalXor: 0x0}
CRC16MODBUS crc 校验参数
Functions ¶
func SerialSend ¶
func SerialSend(cmd, serName, serBaud string, checkCrc, crcLH bool, crcType *crc.Parameters) (res string, err error)
SerialSend 发送 串口命令,返回数据
- @params: cmd 命令字串,checkCrc 是否检查crc, crcType检查的crc 类型,crcLH 是否大端开头
- @return:res 返回数据,err 错误
Types ¶
type Cabinet2Cmd ¶
type Cabinet2Cmd struct {
}
func (*Cabinet2Cmd) OpenDoorCmd ¶
func (c2 *Cabinet2Cmd) OpenDoorCmd(cno, doorno int) (err error)
func (*Cabinet2Cmd) StatusCmd ¶
func (c2 *Cabinet2Cmd) StatusCmd(cno int) (doors []string, errs []ErrAll, err error)
func (*Cabinet2Cmd) UnsetDayCmd ¶
func (c2 *Cabinet2Cmd) UnsetDayCmd(cno int) (unsetDay UnSetDay, err error)
func (*Cabinet2Cmd) YqdatasCmd ¶
func (c2 *Cabinet2Cmd) YqdatasCmd(cno int) (yqdata YqData, err error)
type ErrAll ¶
type PositionData ¶
Click to show internal directories.
Click to hide internal directories.