All Downloads are FREE. Search and download functionalities are using the official Maven repository.

HslCommunication.Core.IMessage.FanucRobotMessage Maven / Gradle / Ivy

Go to download

一个工业物联网的底层架构框架,专注于底层的技术通信及跨平台,跨语言通信功能,实现各种主流的PLC数据读写,实现modbus的各种协议读写等等

There is a newer version: 3.7.0
Show newest version
package HslCommunication.Core.IMessage;

import HslCommunication.Utilities;

public class FanucRobotMessage implements INetMessage {

    public int ProtocolHeadBytesLength(){
        return 56;
    }

    public int GetContentLengthByHeadBytes() {
        if (HeadBytes == null) return 0;
        return Utilities.getShort(HeadBytes, 4);
    }

    public boolean CheckHeadBytesLegal(byte[] token)
    {
        return true;
    }

    public int GetHeadBytesIdentity(){
        return 0;
    }

    public byte[] getHeadBytes() {
        return HeadBytes;
    }

    public byte[] getContentBytes() {
        return ContentBytes;
    }

    public byte[] getSendBytes() {
        return SendBytes;
    }

    public void setHeadBytes(byte[] headBytes){
        HeadBytes = headBytes;
    }

    public void setContentBytes(byte[] contentBytes){
        ContentBytes = contentBytes;
    }

    public void setSendBytes(byte[] sendBytes){
        SendBytes = sendBytes;
    }

    private byte[] HeadBytes = null;

    private byte[] ContentBytes = null;

    private byte[] SendBytes = null;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy