Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
statusCallBack - handle status output in OpenMaple
Calling Sequence
statusCallBack(data, kilobytesUsed, kilobytesAlloc, cpuTime)
Parameters
data
-
user_data pointer passed to StartMaple (long)
kilobytesUsed
total kilobytes used (long)
kilobytesAlloc
total kilobytes allocated (long)
cpuTime
total CPU time used (double)
Description
This OpenMaple function is part of the MapleCallBack structure passed as an argument to StartMaple.
The statusCallBack function is called when Maple reports resource usage information (equivalent to the "bytes used" messages in stand-alone Maple). This usually happens after every sweep of the garbage collector.
The prototype for the function you can assign to the entry in the MapleCallBack must look like the following.
Sub StatusCallBack(ByVal data As Long,
ByVal kilobytesUsed As Long,
ByVal kilobytesAlloc As Long,
ByVal CPUTime As Double)
The cpuTime parameter is the number of seconds of CPU time consumed since the Maple kernel was started. This includes time spent in any callback functions.
The kilobytesUsed parameter indicates the number of kilobytes of storage allocated by the Maple internal storage manager.
The kilobytesAlloc parameter indicates the number of kilobytes of storage allocated by the operating system by the Maple internal storage manager.
If no statusCallBack function is specified, status information is sent to the textCallBack function in the form "bytes used=%ld, alloc=%ld, time=%1.2f", with the MAPLE_TEXT_STATUS tag.
The data parameter contains the same data as passed to StartMaple in the user_data parameter.
Examples
Public Sub StatusCallBack(ByVal data As Long, ByVal kilobytesUsed As Long, _
ByVal kilobytesAlloc As Long, ByVal CPUTime As Double)
MainForm.BytesUsed.Text = kilobytesUsed
MainForm.BytesAlloc.Text = kilobytesAlloc
MainForm.CPUTime.Text = CPUTime
End Sub
' assignment to MapleCallback entry
cb.lpStatusCallBack = GetProc(AddressOf StatusCallBack)
' test statement that will invoke the CallBackCallBack
EvalMapleStatement kv, "gc();"
See Also
callBackCallBack, errorCallBack, OpenMaple, OpenMaple/VB/API, OpenMaple/VB/Examples, queryInterrupt, readLineCallBack, redirectCallBack, StartMaple, streamCallBack, textCallBack
Download Help Document