Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Overloading built-in functions - actxserver?
Replies: 4   Last Post: Jun 20, 2013 2:12 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Geoffrey Akien

Posts: 16
Registered: 5/26/09
Overloading built-in functions - actxserver?
Posted: Jun 8, 2013 4:36 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi folks,

I'm trying to overload the built-in fread, fscanf etc. etc. for serial objects, using the 3rd-party application Realterm, which is generally a bit more robust than the native MATLAB implementation for extended data acquisition.

I open an ActiveX handle first with:

h = actxserver('realterm.realtermintf')

The class() is 'COM.realterm_realtermintf', so according to http://www.mathworks.co.uk/support/solutions/en/data/1-18T0R/index.html?product=SL&solution=1-18T0R, all I need to do is create a folder on the path with the name '@myClass', which in this case would be '@COM.realterm_realtermintf', and put my new fread function files in that folder. This doesn't work, and MATLAB just calls the fread built-in for file reading instead (i.e. it "sees" the class as being double).

However, if I create another folder of @double then I can overload for the double class just fine (e.g. fread(0)), but if I call using h, then it falls right back on to the built-in fread for files.

From this it suggests I'm just not overloading the right class - how do I find out which class I should be overloading?



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.