|
应用于端口设置
应用示例可查看_MATRIX 和_AUDIO方法,可自行修改相关方法属性及添加方法属性。有任何问题建议可在下方留言,功能持续改进更新
附:
function _PORT(vPort,fnGetData)
{
this.modPrj = _SUBPROJECT_;
this.callButton = function(btnName)
{
CallObject(this.modPrj,btnName);
}
this.port = vPort;
if(vPort.indexOf('MOD')!=-1)
{
this.port = GetCurrentIOName();
}
sendCodeString(this.port,"?\r\n");
this.setBaud = function(vsB,vsN,vsD,vsS)
{
setComBaud(this.port,vsB,vsN,vsD,vsS)
}
this.sendCodeString = function(vString)
{
sendCodeString(this.port,vString);
}
this.delayCodeString = function(vSec,vString)
{
delayCodeString(vSec,this.port,vString);
}
this.sendCodeName = function(vString)
{
sendCodeName(this.port,vString);
}
this.delayCodeName = function(vSec,vString)
{
delayCodeName(vSec,this.port,vString);
}
this.getRev = function(vData)
{
fnGetData(vData);
}
if(arguments.length>=2)
{
setStringReceive(this.port,this.getRev);
}
}
|
|