84 lines
7.1 KiB
C
84 lines
7.1 KiB
C
|
#pragma once
|
|||
|
#include "Command.h"
|
|||
|
|
|||
|
class YLRCommand :public Command
|
|||
|
{
|
|||
|
public:
|
|||
|
YLRCommand(std::string strcom);
|
|||
|
~YLRCommand();
|
|||
|
virtual int GetRequestSequence(unsigned char* bseq);
|
|||
|
virtual bool Verify(unsigned char* rseq, int dlength) { return false; }
|
|||
|
|
|||
|
protected:
|
|||
|
string m_Command;
|
|||
|
|
|||
|
public:
|
|||
|
/* static const string COMMAND_YLR_ABF; //Aiming Beam OFF – 关闭红光
|
|||
|
static const string COMMAND_YLR_ABN; //Aiming Beam ON – 开启红光
|
|||
|
static const string COMMAND_YLR_DEABC; //Disable External Aiming Beam Control – 关闭外部红光控制
|
|||
|
static const string COMMAND_YLR_DEC; //Disable External Control – 关闭外部控制模式
|
|||
|
static const string COMMAND_YLR_DGM; //Disable Gate Mode – 关闭内部脉冲发生器
|
|||
|
static const string COMMAND_YLR_DLE; //Disable Hardware Emission Control – 关闭从控制接口控制激光使能
|
|||
|
static const string COMMAND_YLR_DMOD; //Disable Modulation – 关闭调制模式
|
|||
|
static const string COMMAND_YLR_DPM; //Disable Pulse Mode – 关闭脉冲模式
|
|||
|
static const string COMMAND_YLR_DWPM; //Disable Waveform Pulse Mode – 关闭内部任意波形发生器
|
|||
|
static const string COMMAND_YLR_EEABC; //Enable External Aiming Beam Control – 切换到外部红光控制
|
|||
|
static const string COMMAND_YLR_EEC; //Enable External Control – 切换到外部控制模式
|
|||
|
static const string COMMAND_YLR_EGM; //Enable Gate Mode – 切换到Gate模式,允许从调制控制接口触发内部脉冲发生器。
|
|||
|
static const string COMMAND_YLR_ELE; //Enable Hardware Emission Control – 允许从控制接口控制激光使能
|
|||
|
static const string COMMAND_YLR_EMOD; //Enable Modulation – 切换到调制模式
|
|||
|
static const string COMMAND_YLR_EMOFF; //Stop Emission – 关闭激光
|
|||
|
static const string COMMAND_YLR_EMON; //Start Emission – 开启激光(或使能)注意:“任意波形”模式下,需要波形配置信息,波形配置会在开启激光(或使能)前执行并发送相应返回值//
|
|||
|
static const string COMMAND_YLR_EPM; //Enable Pulse Mode – 切换到脉冲模式
|
|||
|
static const string COMMAND_YLR_EWPM; //Enable Waveform Pulse Mode – 切换到内部任意波形模式(Pulse shaping-脉冲波形)。注意:如果当前选择的模式内没有脉冲波形或脉冲序列,则无法切换到脉冲模式。//
|
|||
|
static const string COMMAND_YLR_LFP; //Lock Front Panel – 锁定触摸显示屏
|
|||
|
static const string COMMAND_YLR_PCFG; //Configure Waveform Mode – 配置波形模式,预先准备以便执行选择的脉冲波形或脉冲序列。
|
|||
|
static const string COMMAND_YLR_PRLS; //Profile List – 显示库存储器内的可用脉冲波形文件列表。
|
|||
|
static const string COMMAND_YLR_PRSEL; //Select Profile – 选择“单脉冲”模式和脉冲文件ID,如果命令后没有附带ID号或ID无效时,则使用当前选择。注意:如果钥匙开关选择“REM-远程控制”,会在响应前自动执行波形配置。//
|
|||
|
static const string COMMAND_YLR_RBAUD; //Read Baud Rate – 读取波特率
|
|||
|
static const string COMMAND_YLR_RCS; //Read Current Setpoint – 读取激光二极管电流设置(单位:%)。
|
|||
|
static const string COMMAND_YLR_RCT; //Read Laser Temperature – 读取内部实际温度(单位:℃)。
|
|||
|
static const string COMMAND_YLR_RERR; //Reset Errors –复位所有可复位的报警信息
|
|||
|
static const string COMMAND_YLR_RET; //Read Elapsed Time – 读取累计出光时间(单位:分钟)。
|
|||
|
static const string COMMAND_YLR_RFV; //Read current software revision – 读取当前软体版本
|
|||
|
static const string COMMAND_YLR_RIP; //Read IP – 读取当前的IP地址
|
|||
|
static const string COMMAND_YLR_RMASK; //Read Subnet Mask – 读取当前的子网掩码地址
|
|||
|
static const string COMMAND_YLR_RMEC; //Read Module Error Code – 读取模块错误代码。读取内部激光模块的错误代码,如正常返回“0” 则表示激光模块正常
|
|||
|
static const string COMMAND_YLR_RNC; //Read Minimum Current Setpoint – 读取最小可设定电流(单位:%)
|
|||
|
static const string COMMAND_YLR_ROP; //Read Output Power – 读取输出功率(单位:W)。当激光为关闭状态时,返回值为“Off”,而“Low”则表示功率低于最低测量阈值。
|
|||
|
static const string COMMAND_YLR_RPP; //Read Peak Power – 读取输出峰值功率(单位:W)。当激光为关闭状态时,返回值为“Off”,而“Low”则表示功率低于最低测量阈值。
|
|||
|
static const string COMMAND_YLR_RPRR; //Read Pulse Repetition Rate – 读取脉冲重复频率(单位:Hz)
|
|||
|
static const string COMMAND_YLR_RPW; //Read Pulse Width – 读取脉冲宽度(单位:ms)
|
|||
|
static const string COMMAND_YLR_RSN; //Read Serial Number – 读取产品的序列号。
|
|||
|
static const string COMMAND_YLR_SBAUD; //Set Baud Rate – 设置波特率,需附加代码2~8(对应波特率从1200 到57600)
|
|||
|
static const string COMMAND_YLR_SDC; //Set Diode Current – 设定激光二极管电流(单位:%)。Setpoint最大设定值为100%,最低值参考“RNC”,可以设为0。如果设定值超出允许范围,则会返回“ERR:Out of Range”信息。//
|
|||
|
static const string COMMAND_YLR_SMASK; //Set Subnet Mask – 设置子网掩码,需附加一串带有“.”的十进制数字
|
|||
|
static const string COMMAND_YLR_SPRR; /*Set Pulse Repetition Rate – 设置脉冲重复频率(单位:Hz),设定的脉冲宽度与周期(取决于脉冲宽度与频率)必须要在规格范围内。当设定值超出允许范围时,则会返回 “ERR: Duty cycle too high“信息 //
|
|||
|
static const string COMMAND_YLR_SPW; /*Set Pulse Width – 设置脉冲宽度(单位:ms),设定的脉冲宽度与周期(取决于脉冲宽度与频率)必须要在规格范围内。当设定值超出允许范围时,则会返回“ERR: Out of Range” 或“ERR: Duty cycle too high“信息。//
|
|||
|
static const string COMMAND_YLR_SQLS; //Sequence List – 显示库存储器内可用的脉冲序列程序列表
|
|||
|
static const string COMMAND_YLR_SQSEL; //Select Sequence –选择脉冲序列模式和脉冲序列ID。如果命令后没有附带ID号或ID无效时,则使用当前(或上一个)选择。注意:如果波形模式已开启或无可用的脉冲序列,则无法切换到脉冲序列模式,同时会返回错误信息。如果钥匙开关选择“REM-远程控制”,会在响应前自动执行波形配置。//
|
|||
|
static const string COMMAND_YLR_STA; //Read device status – 读取产品状态。返回值为32 Bit数字信息。各Bit的含义如下(未定义的或“保留”的Bit可忽略)
|
|||
|
static const string COMMAND_YLR_SIP; //Set IP – 设置IP地址,需附加一串带“.”的十进制数字
|
|||
|
static const string COMMAND_YLR_UFP; //UUnlock Front Panel – 触摸显示屏解除锁定*/
|
|||
|
};
|
|||
|
|
|||
|
|
|||
|
class YLRReadCommand:public YLRCommand
|
|||
|
{
|
|||
|
public:
|
|||
|
YLRReadCommand(string command);
|
|||
|
~YLRReadCommand();
|
|||
|
bool Verify(unsigned char* rseq, int dlength);
|
|||
|
string GetValue() { return m_Value; }
|
|||
|
private:
|
|||
|
string m_Value;
|
|||
|
};
|
|||
|
|
|||
|
class YLREchoCommand :public YLRCommand
|
|||
|
{
|
|||
|
public:
|
|||
|
YLREchoCommand(string command);
|
|||
|
~YLREchoCommand();
|
|||
|
bool Verify(unsigned char* rseq, int dlength);
|
|||
|
|
|||
|
};
|