$DaemonParentNumber: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
Line 2: Line 2:
<span class="pageSubtitle"><section begin="desc" />Get user number of parent thread<section end="desc" /></span>
<span class="pageSubtitle"><section begin="desc" />Get user number of parent thread<section end="desc" /></span>


<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $DaemonParentNumber function is [[to be entered]].</p>
<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $DaemonParentNumber function is the [[ParentNumber (Daemon property)]].  The OO APIs emphasize the use of the [[List of Daemon methods|Daemon methods]]; users are strongly urged to use the new Daemon API instead of the old $functions.</p>


This function can be used to get the user number of an sdaemon's parent thread.  
This function can be used to get the user number of an sdaemon's parent thread.  
Line 13: Line 13:
</p>
</p>
<p class="caption">%USERN is set to parent's user number, or to -1 if not called from a daemon</p>
<p class="caption">%USERN is set to parent's user number, or to -1 if not called from a daemon</p>


The $DaemonParentNumber function returns the user number of the thread that created the daemon thread, whether the daemon is associated with a Daemon object or with a $COMMxx function.  
The $DaemonParentNumber function returns the user number of the thread that created the daemon thread, whether the daemon is associated with a Daemon object or with a $COMMxx function.  
Line 21: Line 20:
<p class="code"> audit 'My parent''s user number is ' $DaemonParentNumber
<p class="code"> audit 'My parent''s user number is ' $DaemonParentNumber
</p>
</p>
The $DaemonParentNumber method has a Daemon class method equivalent: ParentNumber (see the ''Janus SOAP Reference Manual''). The $function and method can be used interchangeably, whether the daemon was created with a $COMMxx function or a Daemon object, so the decision of which to use is largely a matter of taste.
For more information about sdaemons,


This $function is new in Version 6.8 of the ''[[Sirius Mods]]''.<p>
This $function is new in Version 6.8 of the ''[[Sirius Mods]]''.<p>
<ul>
<li>&SFUNC
</ul>
</p>
<p class="caption">Products authorizing $DaemonParentNumber
</p>


[[Category:$Functions|$DaemonParentNumber]]
[[Category:$Functions|$DaemonParentNumber]]

Revision as of 20:34, 31 January 2011

<section begin="desc" />Get user number of parent thread<section end="desc" />

Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $DaemonParentNumber function is the ParentNumber (Daemon property). The OO APIs emphasize the use of the Daemon methods; users are strongly urged to use the new Daemon API instead of the old $functions.

This function can be used to get the user number of an sdaemon's parent thread.

The $DaemonParentNumber function accepts no arguments.

Syntax

<section begin="syntax" /> %USERN = $DaemonParentNumber <section end="syntax" />

$DaemonParentNumber Function

%USERN is set to parent's user number, or to -1 if not called from a daemon

The $DaemonParentNumber function returns the user number of the thread that created the daemon thread, whether the daemon is associated with a Daemon object or with a $COMMxx function.

If the thread issuing $DaemonParentNumber is not an sdaemon, or is an sdaemon but is not performing work for another thread via a Daemon object or a $COMMxx function, or is an asynchronous daemon, the $DaemonParentNumber function returns a -1 value. The following code audits a thread's parent user number:

audit 'My parents user number is ' $DaemonParentNumber

This $function is new in Version 6.8 of the Sirius Mods.