📄 comacrsrvr.tli
字号:
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}
inline long IConfig::GetnDimDef ( ) {
long _result;
HRESULT _hr = get_nDimDef(&_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _result;
}
inline void IConfig::PutnDimDef ( long pVal ) {
HRESULT _hr = put_nDimDef(pVal);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}
inline VARIANT_BOOL IConfig::GetbOnConnectTest ( ) {
VARIANT_BOOL _result;
HRESULT _hr = get_bOnConnectTest(&_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _result;
}
inline void IConfig::PutbOnConnectTest ( VARIANT_BOOL pVal ) {
HRESULT _hr = put_bOnConnectTest(pVal);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}
inline long IConfig::GetnCard ( ) {
long _result;
HRESULT _hr = get_nCard(&_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _result;
}
inline HRESULT IConfig::Disconnect ( ) {
HRESULT _hr = raw_Disconnect();
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
inline long IConfig::GetDimProg ( long nIndex ) {
long _result;
HRESULT _hr = raw_GetDimProg(nIndex, &_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _result;
}
inline long IConfig::GetDimProgDefault ( long nIndex ) {
long _result;
HRESULT _hr = raw_GetDimProgDefault(nIndex, &_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _result;
}
inline HRESULT IConfig::PutDimProgDefault ( long nIndex, long nMemory ) {
HRESULT _hr = raw_PutDimProgDefault(nIndex, nMemory);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
inline long IConfig::GetDimPLC ( long nIndex ) {
long _result;
HRESULT _hr = raw_GetDimPLC(nIndex, &_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _result;
}
inline long IConfig::GetDimPLCDefault ( long nIndex ) {
long _result;
HRESULT _hr = raw_GetDimPLCDefault(nIndex, &_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _result;
}
inline HRESULT IConfig::PutDimPLCDefault ( long nIndex, long nMemory ) {
HRESULT _hr = raw_PutDimPLCDefault(nIndex, nMemory);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
inline HRESULT IConfig::GetSetupHW ( long * nCard, long * nEncoder, long * nServo1, long * nStepper1, long * nServo2, long * nStepper2, long * nAnalog, long * nAnalogMode, long * nIOMode, long * nExpandedIO ) {
HRESULT _hr = raw_GetSetupHW(nCard, nEncoder, nServo1, nStepper1, nServo2, nStepper2, nAnalog, nAnalogMode, nIOMode, nExpandedIO);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
inline HRESULT IConfig::PutSetupHW ( long nCard, long nEncoder, long nServo1, long nStepper1, long nServo2, long nStepper2, long nAnalog, long nAnalogMode, long nIOMode, long nExpandedIO ) {
HRESULT _hr = raw_PutSetupHW(nCard, nEncoder, nServo1, nStepper1, nServo2, nStepper2, nAnalog, nAnalogMode, nIOMode, nExpandedIO);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
inline HRESULT IConfig::GetSetupHWex ( long * nEncoder, long * nServo1, long * nStepper1, long * nServo2, long * nStepper2, long * nAnalog, long * nAnalogMode ) {
HRESULT _hr = raw_GetSetupHWex(nEncoder, nServo1, nStepper1, nServo2, nStepper2, nAnalog, nAnalogMode);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
inline HRESULT IConfig::PutSetupHWex ( long nEncoder, long nServo1, long nStepper1, long nServo2, long nStepper2, long nAnalog, long nAnalogMode ) {
HRESULT _hr = raw_PutSetupHWex(nEncoder, nServo1, nStepper1, nServo2, nStepper2, nAnalog, nAnalogMode);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
inline HRESULT IConfig::GetAxisFeedback ( long nAxis, long * nPosnType, long * nPosnIndex, long * nPosnQuad, long * nPosnSrc, long * nPosnPkg, float * fPosnRes, float * nPosSmper, float * nNegSmper, long * nVelType, long * nVelIndex, long * nVelQuad, long * nVelSrc, long * nVelPkg, float * fVelRes ) {
HRESULT _hr = raw_GetAxisFeedback(nAxis, nPosnType, nPosnIndex, nPosnQuad, nPosnSrc, nPosnPkg, fPosnRes, nPosSmper, nNegSmper, nVelType, nVelIndex, nVelQuad, nVelSrc, nVelPkg, fVelRes);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
inline HRESULT IConfig::PutAxisFeedback ( long nAxis, long nPosnType, long nPosnIndex, long nPosnQuad, long nPosnSrc, long nPosnPkg, float fPosnRes, float nPosSmper, float nNegSmper, long nVelType, long nVelIndex, long nVelQuad, long nVelSrc, long nVelPkg, float fVelRes ) {
HRESULT _hr = raw_PutAxisFeedback(nAxis, nPosnType, nPosnIndex, nPosnQuad, nPosnSrc, nPosnPkg, fPosnRes, nPosSmper, nNegSmper, nVelType, nVelIndex, nVelQuad, nVelSrc, nVelPkg, fVelRes);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
inline HRESULT IConfig::GetAxisIO ( long nAxis, long * nHwPosLimit, long * nHwPosLimitLevel, long * nHwNegLimit, long * nHwNegLimitLevel, long * nDriveFault, long * nDriveFaultLevel, long * nDriveEnable, long * nDriveEnableLevel, long * nDriveReset, long * nDriveResetLevel, VARIANT_BOOL * bOnKill ) {
HRESULT _hr = raw_GetAxisIO(nAxis, nHwPosLimit, nHwPosLimitLevel, nHwNegLimit, nHwNegLimitLevel, nDriveFault, nDriveFaultLevel, nDriveEnable, nDriveEnableLevel, nDriveReset, nDriveResetLevel, bOnKill);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
inline HRESULT IConfig::PutAxisIO ( long nAxis, long nHwPosLimit, long nHwPosLimitLevel, long nHwNegLimit, long nHwNegLimitLevel, long nDriveFault, long nDriveFaultLevel, long nDriveEnable, long nDriveEnableLevel, long nDriveReset, long nDriveResetLevel, VARIANT_BOOL bOnKill ) {
HRESULT _hr = raw_PutAxisIO(nAxis, nHwPosLimit, nHwPosLimitLevel, nHwNegLimit, nHwNegLimitLevel, nDriveFault, nDriveFaultLevel, nDriveEnable, nDriveEnableLevel, nDriveReset, nDriveResetLevel, bOnKill);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
inline HRESULT IConfig::GetAxisLimits ( long nAxis, VARIANT_BOOL * bHwPos, VARIANT_BOOL * bHwNeg, VARIANT_BOOL * bSwPos, float * fSwPosValue, VARIANT_BOOL * bSwNeg, float * fSwNegValue, float * fVelLimit ) {
HRESULT _hr = raw_GetAxisLimits(nAxis, bHwPos, bHwNeg, bSwPos, fSwPosValue, bSwNeg, fSwNegValue, fVelLimit);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
inline HRESULT IConfig::PutAxisLimits ( long nAxis, VARIANT_BOOL bHwPos, VARIANT_BOOL bHwNeg, VARIANT_BOOL bSwPos, float fSwPosValue, VARIANT_BOOL bSwNeg, float fSwNegValue, float fVelLimit ) {
HRESULT _hr = raw_PutAxisLimits(nAxis, bHwPos, bHwNeg, bSwPos, fSwPosValue, bSwNeg, fSwNegValue, fVelLimit);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
inline HRESULT IConfig::GetAxisProfile ( long nAxis, long * nProfile, BSTR * bstrName ) {
HRESULT _hr = raw_GetAxisProfile(nAxis, nProfile, bstrName);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
inline HRESULT IConfig::PutAxisProfile ( long nAxis, long nProfile, _bstr_t bstrName ) {
HRESULT _hr = raw_PutAxisProfile(nAxis, nProfile, bstrName);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
inline HRESULT IConfig::GetSetupProfile ( long nProfile, float * fVecVel, float * fVecAcc, float * fRampSTP, float * fRampDEC, VARIANT_BOOL * bSCurve, VARIANT_BOOL * bEstopHWLimit, VARIANT_BOOL * bEstopSWLimit ) {
HRESULT _hr = raw_GetSetupProfile(nProfile, fVecVel, fVecAcc, fRampSTP, fRampDEC, bSCurve, bEstopHWLimit, bEstopSWLimit);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
inline HRESULT IConfig::PutSetupProfile ( long nProfile, float fVecVel, float fVecAcc, float fRampSTP, float fRampDEC, VARIANT_BOOL bSCurve, VARIANT_BOOL bEstopHWLimit, VARIANT_BOOL bEstopSWLimit ) {
HRESULT _hr = raw_PutSetupProfile(nProfile, fVecVel, fVecAcc, fRampSTP, fRampDEC, bSCurve, bEstopHWLimit, bEstopSWLimit);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
inline HRESULT IConfig::SaveConfig ( VARIANT_BOOL bController, _bstr_t bstrPath ) {
HRESULT _hr = raw_SaveConfig(bController, bstrPath);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
inline HRESULT IConfig::LoadConfig ( _bstr_t bstrPath ) {
HRESULT _hr = raw_LoadConfig(bstrPath);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
inline HRESULT IConfig::GetAxisScale ( long nAxis, long * nUnits, BSTR * bstrUnitsName, long * nTrans, float * fTransFactor, long * nReducer, float * fRedFactor1, float * fRedFactor2, float * fRedFactor3, float * fRedFactor4, float * fSclFactor, float * fPPU ) {
HRESULT _hr = raw_GetAxisScale(nAxis, nUnits, bstrUnitsName, nTrans, fTransFactor, nReducer, fRedFactor1, fRedFactor2, fRedFactor3, fRedFactor4, fSclFactor, fPPU);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
inline HRESULT IConfig::PutAxisScale ( long nAxis, long nUnits, _bstr_t bstrUnitsName, long nTrans, float fTransFactor, long nReducer, float fRedFactor1, float fRedFactor2, float fRedFactor3, float fRedFactor4, float fSclFactor, float fPPU ) {
HRESULT _hr = raw_PutAxisScale(nAxis, nUnits, bstrUnitsName, nTrans, fTransFactor, nReducer, fRedFactor1, fRedFactor2, fRedFactor3, fRedFactor4, fSclFactor, fPPU);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
inline HRESULT IConfig::GetAxisSignal ( long nAxis, long * nSignalType, long * nSignalIndex, long * nStepMode, long * nDrive, long * nDriveRes, long * nMotor, long * nMotorPkg, long * nGearHead ) {
HRESULT _hr = raw_GetAxisSignal(nAxis, nSignalType, nSignalIndex, nStepMode, nDrive, nDriveRes, nMotor, nMotorPkg, nGearHead);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
inline HRESULT IConfig::PutAxisSignal ( long nAxis, long nSignalType, long nSignalIndex, long nStepMode, long nDrive, long nDriveRes, long nMotor, long nMotorPkg, long nGearHead ) {
HRESULT _hr = raw_PutAxisSignal(nAxis, nSignalType, nSignalIndex, nStepMode, nDrive, nDriveRes, nMotor, nMotorPkg, nGearHead);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
inline HRESULT IConfig::GetCANopen ( long * nMaster, long * nBitRate, long * nPeriod, long * nNodes ) {
HRESULT _hr = raw_GetCANopen(nMaster, nBitRate, nPeriod, nNodes);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
inline HRESULT IConfig::PutCANopen ( long nMaster, long nBitRate, long nPeriod, long nNodes ) {
HRESULT _hr = raw_PutCANopen(nMaster, nBitRate, nPeriod, nNodes);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
inline HRESULT IConfig::Connect ( long nTransport, long nIndex ) {
HRESULT _hr = raw_Connect(nTransport, nIndex);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
inline VARIANT_BOOL IConfig::TestConnect ( ) {
VARIANT_BOOL _result;
HRESULT _hr = raw_TestConnect(&_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _result;
}
inline HRESULT IConfig::GetCANnode ( long nNode, long * nNodeID, long * nDInput, long * nDOutput, long * nAInput, long * nAOutput, long * nType, long * nTimeBase, long * nTimeDPoint, long * nTimeAPoint ) {
HRESULT _hr = raw_GetCANnode(nNode, nNodeID, nDInput, nDOutput, nAInput, nAOutput, nType, nTimeBase, nTimeDPoint, nTimeAPoint);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
inline HRESULT IConfig::PutCANnode ( long nNode, long nNodeID, long nDInput, long nDOutput, long nAInput, long nAOutput, long nType, long nTimeBase, long nTimeDPoint, long nTimeAPoint ) {
HRESULT _hr = raw_PutCANnode(nNode, nNodeID, nDInput, nDOutput, nAInput, nAOutput, nType, nTimeBase, nTimeDPoint, nTimeAPoint);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
inline HRESULT IConfig::SetWatchdog ( long nInterval, long nRetries ) {
HRESULT _hr = raw_SetWatchdog(nInterval, nRetries);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
//
// dispinterface _IStatusEvents wrapper method implementations
//
inline HRESULT _IStatusEvents::StatusWaiting ( long msgID, long error ) {
HRESULT _result;
_com_dispatch_method(this, 0x1, DISPATCH_METHOD, VT_ERROR, (void*)&_result,
L"\x0003\x0003", msgID, error);
return _result;
}
//
// interface IStatus wrapper method implementations
//
inline _bstr_t IStatus::GetbstrVersion ( ) {
BSTR _result;
HRESULT _hr = get_bstrVersion(&_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _bstr_t(_result, false);
}
inline long IStatus::GetnPort ( ) {
long _result;
HRESULT _hr = get_nPort(&_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _result;
}
inline void IStatus::PutnPort ( long pVal ) {
HRESULT _hr = put_nPort(pVal);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}
inline long IStatus::GetnBPS ( ) {
long _result;
HRESULT _hr = get_nBPS(&_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _result;
}
inline void IStatus::PutnBPS ( long pVal ) {
HRESULT _hr = put_nBPS(pVal);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}
inline _bstr_t IStatus::GetbstrIP ( ) {
BSTR _result;
HRESULT _hr = get_bstrIP(&_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _bstr_t(_result, false);
}
inline void IStatus::PutbstrIP ( _bstr_t pVal ) {
HRESULT _hr = put_bstrIP(pVal);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}
inline long IStatus::GetnBus ( ) {
long _result;
HRESULT _hr = get_nBus(&_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _result;
}
inline void IStatus::PutnBus ( long pVal ) {
HRESULT _hr = put_nBus(pVal);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}
inline VARIANT_BOOL IStatus::GetisOffline ( ) {
VARIANT_BOOL _result;
HRESULT _hr = get_isOffline(&_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _result;
}
inline long IStatus::GetnStatusWaitRate ( ) {
long _result;
HRESULT _hr = get_nStatusWaitRate(&_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _result;
}
inline void IStatus::PutnStatusWaitRate ( long pVal ) {
HRESULT _hr = put_nStatusWaitRate(pVal);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}
inline VARIANT_BOOL IStatus::GetbOnConnectTest ( ) {
VARIANT_BOOL _result;
HRESULT _hr = get_bOnConnectTest(&_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _result;
}
inline void IStatus::PutbOnConnectTest ( VARIANT_BOOL pVal ) {
HRESULT _hr = put_bOnConnectTest(pVal);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}
inline long IStatus::GetnCard ( ) {
long _result;
HRESULT _hr = get_nCard(&_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _result;
}
inline HRESULT IStatus::Disconnect ( ) {
HRESULT _hr = raw_Disconnect();
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
inline HRESULT IStatus::Connect ( long nTransport, long nIndex ) {
HRESULT _hr = raw_Connect(nTransport, nIndex);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
inline _variant_t IStatus::GetACRGroup ( _bstr_t bstrRequest ) {
VARIANT _result;
VariantInit(&_result);
HRESULT _hr = raw_GetACRGroup(bstrRequest, &_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _variant_t(_result, false);
}
inline _variant_t IStatus::GetACRCustom ( _bstr_t bstrRequest ) {
VARIANT _result;
VariantInit(&_result);
HRESULT _hr = raw_GetACRCustom(bstrRequest, &_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _variant_t(_result, false);
}
inline _variant_t IStatus::GetACRMemory ( long nType, long nAddress, long nCount ) {
VARIANT _result;
VariantInit(&_result);
HRESULT _hr = raw_GetACRMemory(nType, nAddress, nCount, &_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _variant_t(_result, false);
}
inline long IStatus::AddACRGroup ( _bstr_t bstrRequest ) {
long _result;
HRESULT _hr = raw_AddACRGroup(bstrRequest, &_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _result;
}
inline long IStatus::AddACRCustom ( _bstr_t bstrRequest ) {
long _result;
HRESULT _hr = raw_AddACRCustom(bstrRequest, &_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _result;
}
inline long IStatus::AddACRMemory ( long nType, long nAddress, long nCount ) {
long _result;
HRESULT _hr = raw_AddACRMemory(nType, nAddress, nCount, &_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _result;
}
inline _variant_t IStatus::GetStatus ( long nMsgid ) {
VARIANT _result;
VariantInit(&_result);
HRESULT _hr = raw_GetStatus(nMsgid, &_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _variant_t(_result, false);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -