cml_io.h
来自「美国COPLEY驱动器,程序开发工具之一.」· C头文件 代码 · 共 1,236 行 · 第 1/5 页
H
1,236 行
/// @param id Identifies the digital input.
/// @param value The new interrupt mask setting.
/// @return A pointer to an error object, or NULL on success
virtual const Error *DinSetMaskHigh2Low( uint16 id, bool value ){
return BitDnld( IOOBJID_DIN_1_MASK_H2L, id, value );
}
/// Return the number of 8-bit groups of inputs available on this device.
/// @param ct The count is returned here. Zero is returned on error.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Din8GetCt( uint8 &ct ){
ct = 0;
return sdo.Upld8( IOOBJID_DIN_8_VALUE, 0, ct );
}
virtual const Error *Din8Read( uint8 id, uint8 &value, bool viaSDO=false );
/// Get the current polarity settings for a group of 8 digital inputs.
/// For each input in the group, a value of 1 enables inversion and 0 disables.
/// @param id Identifies which group of 8 inputs to read.
/// @param value The current polarity setting of the 8 input lines is returned here.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Din8GetPol( uint8 id, uint8 &value ){
return sdo.Upld8( IOOBJID_DIN_8_POL, id+1, value );
}
/// Set the current polarity setting for a group of 8 digital inputs.
/// For each input in the group, a value of 1 enables inversion and 0 disables.
/// @param id Identifies which group of 8 inputs to effect.
/// @param value The new polarity setting of the 8 input lines.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Din8SetPol( uint8 id, uint8 value ){
return sdo.Dnld8( IOOBJID_DIN_8_POL, id+1, value );
}
/// Get the current filter constant settings for a group of 8 digital inputs.
/// For each input in the group, a value of 1 enables the filter, 0 disables.
/// @param id Identifies which group of 8 inputs to read.
/// @param value The current filter setting of the 8 input lines is returned here.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Din8GetFilt( uint8 id, uint8 &value ){
return sdo.Upld8( IOOBJID_DIN_8_FILT, id+1, value );
}
/// Set the current filter constant setting for a group of 8 digital inputs.
/// For each input in the group, a value of 1 enables the filter, 0 disables.
/// @param id Identifies which group of 8 inputs to effect.
/// @param value The new filter setting of the 8 input lines.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Din8SetFilt( uint8 id, uint8 value ){
return sdo.Dnld8( IOOBJID_DIN_8_FILT, id+1, value );
}
/// Get the 'any transition' interrupt mask settings for a group of 8 digital inputs.
/// For each input in the group, a value of 1 enables interrupts on any change,
/// and a value of 0 disables the interrupt.
/// @param id Identifies which group of 8 inputs to read.
/// @param value The current interrupt mask setting of the 8 input lines.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Din8GetMaskAny( uint8 id, uint8 &value ){
return sdo.Upld8( IOOBJID_DIN_8_MASK_ANY, id+1, value );
}
/// Set the 'any transition' interrupt mask settings for a group of 8 digital inputs.
/// For each input in the group, a value of 1 enables interrupts on any transition,
/// and a value of 0 disables.
/// @param id Identifies which group of 8 inputs to effect.
/// @param value The new interrupt mask value.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Din8SetMaskAny( uint8 id, uint8 value ){
return sdo.Dnld8( IOOBJID_DIN_8_MASK_ANY, id+1, value );
}
/// Get the 'low to high' interrupt mask settings for a group of 8 digital inputs.
/// For each input in the group, a value of 1 enables interrupts on a low to high
/// transition, and a value of 0 disables the interrupt.
/// @param id Identifies which group of 8 inputs to read.
/// @param value The current interrupt mask setting of the 8 input lines.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Din8GetMaskLow2High( uint8 id, uint8 &value ){
return sdo.Upld8( IOOBJID_DIN_8_MASK_L2H, id+1, value );
}
/// Set the 'low to high' interrupt mask settings for a group of 8 digital inputs.
/// For each input in the group, a value of 1 enables interrupts on low to high
/// transitions, and a value of 0 disables.
/// @param id Identifies which group of 8 inputs to effect.
/// @param value The new interrupt mask value.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Din8SetMaskLow2High( uint8 id, uint8 value ){
return sdo.Dnld8( IOOBJID_DIN_8_MASK_L2H, id+1, value );
}
/// Get the 'high to low' interrupt mask settings for a group of 8 digital inputs.
/// For each input in the group, a value of 1 enables interrupts on a high to low
/// transition, and a value of 0 disables the interrupt.
/// @param id Identifies which group of 8 inputs to read.
/// @param value The current interrupt mask setting of the 8 input lines.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Din8GetMaskHigh2Low( uint8 id, uint8 &value ){
return sdo.Upld8( IOOBJID_DIN_8_MASK_H2L, id+1, value );
}
/// Set the 'high to low' interrupt mask settings for a group of 8 digital inputs.
/// For each input in the group, a value of 1 enables interrupts on high to low
/// transitions, and a value of 0 disables.
/// @param id Identifies which group of 8 inputs to effect.
/// @param value The new interrupt mask value.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Din8SetMaskHigh2Low( uint8 id, uint8 value ){
return sdo.Dnld8( IOOBJID_DIN_8_MASK_H2L, id+1, value );
}
/// Return the number of 16-bit groups of inputs available on this device.
/// @param ct The count is returned here. Zero is returned on error.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Din16GetCt( uint8 &ct ){
ct = 0;
return sdo.Upld8( IOOBJID_DIN_16_VALUE, 0, ct );
}
virtual const Error *Din16Read( uint8 id, uint16 &value, bool viaSDO=false );
/// Get the current polarity settings for a group of 16 digital inputs.
/// For each input in the group, a value of 1 enables inversion and 0 disables.
/// @param id Identifies which group of inputs to read.
/// @param value The current polarity setting of the input lines is returned here.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Din16GetPol( uint8 id, uint16 &value ){
return sdo.Upld16( IOOBJID_DIN_16_POL, id+1, value );
}
/// Set the current polarity setting for a group of 16 digital inputs.
/// For each input in the group, a value of 1 enables inversion and 0 disables.
/// @param id Identifies which group of inputs to effect.
/// @param value The new polarity setting of the input lines.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Din16SetPol( uint8 id, uint16 value ){
return sdo.Dnld16( IOOBJID_DIN_16_POL, id+1, value );
}
/// Get the current filter constant settings for a group of 16 digital inputs.
/// For each input in the group, a value of 1 enables the filter, 0 disables.
/// @param id Identifies which group of inputs to read.
/// @param value The current filter setting of the input lines is returned here.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Din16GetFilt( uint8 id, uint16 &value ){
return sdo.Upld16( IOOBJID_DIN_16_FILT, id+1, value );
}
/// Set the current filter constant setting for a group of 16 digital inputs.
/// For each input in the group, a value of 1 enables the filter, 0 disables.
/// @param id Identifies which group of inputs to effect.
/// @param value The new filter setting of the input lines.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Din16SetFilt( uint8 id, uint16 value ){
return sdo.Dnld16( IOOBJID_DIN_16_FILT, id+1, value );
}
/// Get the 'any transition' interrupt mask settings for a group of 16 digital inputs.
/// For each input in the group, a value of 1 enables interrupts on any change,
/// and a value of 0 disables the interrupt.
/// @param id Identifies which group of inputs to read.
/// @param value The current interrupt mask setting of the input lines.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Din16GetMaskAny( uint8 id, uint16 &value ){
return sdo.Upld16( IOOBJID_DIN_16_MASK_ANY, id+1, value );
}
/// Set the 'any transition' interrupt mask settings for a group of 16 digital inputs.
/// For each input in the group, a value of 1 enables interrupts on any transition,
/// and a value of 0 disables.
/// @param id Identifies which group of inputs to effect.
/// @param value The new interrupt mask value.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Din16SetMaskAny( uint8 id, uint16 value ){
return sdo.Dnld16( IOOBJID_DIN_16_MASK_ANY, id+1, value );
}
/// Get the 'low to high' interrupt mask settings for a group of 16 digital inputs.
/// For each input in the group, a value of 1 enables interrupts on a low to high
/// transition, and a value of 0 disables the interrupt.
/// @param id Identifies which group of inputs to read.
/// @param value The current interrupt mask setting of the input lines.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Din16GetMaskLow2High( uint8 id, uint16 &value ){
return sdo.Upld16( IOOBJID_DIN_16_MASK_L2H, id+1, value );
}
/// Set the 'low to high' interrupt mask settings for a group of 16 digital inputs.
/// For each input in the group, a value of 1 enables interrupts on low to high
/// transitions, and a value of 0 disables.
/// @param id Identifies which group of inputs to effect.
/// @param value The new interrupt mask value.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Din16SetMaskLow2High( uint8 id, uint16 value ){
return sdo.Dnld16( IOOBJID_DIN_16_MASK_L2H, id+1, value );
}
/// Get the 'high to low' interrupt mask settings for a group of 16 digital inputs.
/// For each input in the group, a value of 1 enables interrupts on a high to low
/// transition, and a value of 0 disables the interrupt.
/// @param id Identifies which group of inputs to read.
/// @param value The current interrupt mask setting of the input lines.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Din16GetMaskHigh2Low( uint8 id, uint16 &value ){
return sdo.Upld16( IOOBJID_DIN_16_MASK_H2L, id+1, value );
}
/// Set the 'high to low' interrupt mask settings for a group of 16 digital inputs.
/// For each input in the group, a value of 1 enables interrupts on high to low
/// transitions, and a value of 0 disables.
/// @param id Identifies which group of inputs to effect.
/// @param value The new interrupt mask value.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Din16SetMaskHigh2Low( uint8 id, uint16 value ){
return sdo.Dnld16( IOOBJID_DIN_16_MASK_H2L, id+1, value );
}
/// Return the number of 32-bit groups of inputs available on this device.
/// @param ct The count is returned here. Zero is returned on error.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Din32GetCt( uint8 &ct ){
ct = 0;
return sdo.Upld8( IOOBJID_DIN_32_VALUE, 0, ct );
}
virtual const Error *Din32Read( uint8 id, uint32 &value, bool viaSDO=false );
/// Get the current polarity settings for a group of 32 digital inputs.
/// For each input in the group, a value of 1 enables inversion and 0 disables.
/// @param id Identifies which group of inputs to read.
/// @param value The current polarity setting of the input lines is returned here.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Din32GetPol( uint8 id, uint32 &value ){
return sdo.Upld32( IOOBJID_DIN_32_POL, id+1, value );
}
/// Set the current polarity setting for a group of 32 digital inputs.
/// For each input in the group, a value of 1 enables inversion and 0 disables.
/// @param id Identifies which group of inputs to effect.
/// @param value The new polarity setting of the input lines.
/// @return A pointer to an error object, or NULL on success
virtual const Error *Din32SetPol( uint8 id, uint32 value ){
return sdo.Dnld32( IOOBJID_DIN_32_POL, id+1, value );
}
/// Get the current filter constant settings for a group of 32 digital inputs.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?