Hi,
I'm writing an [Incr Tcl] extension to an API that uses quite a lot of
Set/Get calls:
PMDCFunc PMDSetProfileMode (PMDAxisInterface axis_intf,
PMDuint16 mode);
PMDCFunc PMDGetProfileMode (PMDAxisInterface axis_intf,
PMDuint16* mode);
PMDCFunc PMDSetPosition (PMDAxisInterface axis_intf,
PMDint32 position);
PMDCFunc PMDGetPosition (PMDAxisInterface axis_intf,
PMDint32* position);
PMDCFunc PMDSetVelocity (PMDAxisInterface axis_intf,
PMDint32 velocity);
PMDCFunc PMDGetVelocity (PMDAxisInterface axis_intf,
PMDint32* velocity);
...etc.
The hooks are currently set as this sourced from the pkgIndex:
load [file join [file dirname [info script]] CMoTcl10.[info sharedlibextension]]
itcl::class ::pmd::cmotion {
constructor {} { _init }
destructor { _destroy }
public {
method GetCMotionVersion {} @CMo-GetCMotionVersion
# Profile Generation
method SetProfileMode {} @CMo-SetProfileMode
method GetProfileMode {} @CMo-GetProfileMode
method SetPosition {} @CMo-SetPosition
method GetPosition {} @CMo-GetPosition
method SetVelocity {} @CMo-SetVelocity
method GetVelocity {} @CMo-GetVelocity
...
Is there a way to use configbody to differentiate the [G|S]et calls? IOW,
$instance config -ProfileMode
routes to PMDGetProfileMode() for returning the value and
$instance config -ProfileMode <somevalue>
routes to PMDSetProfileMode() for setting it? Thanks in advance.
https://github.com/davygrvy/CMoTcl
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)