📄 distlib.html
字号:
By default, the panic hook writes the panic message to standard output. The <b>panic( )</b> routine must not return. The prototype of the <b>panic( )</b> routine should look like this:<pre> void panic (char *panicMsg);</pre><dt><b>DIST_CTL_RETRY_TIMEOUT</b><dd>This function sets the initial send retry timeout in clock ticks. If no ACK is received within a timeout period, the packet is resent. The defaultvalue and granularity of <b>DIST_CTL_RETRY_TIMEOUT</b> is system dependent.<table><tr valign=top><th align=left>vxWorks Version </th><th align=left> Default Value </th><th align=left> Granularity</tr><tr><td colspan="3"><hr></tr><tr valign=top><td align=left>5.4 and below </td><td align=left> 1000ms </td><td align=left> 500ms</tr><tr valign=top><td align=left>5.5 and AE </td><td align=left> 200ms </td><td align=left> 100ms</tr><tr valign=top><td align=left></tr></tr></table><b>DIST_CTL_RETRY_TIMEOUT</b> is designated in ticks, but rounded down to a multipleof the system's granularity. The timeout period for the <i>n</i>th send is: <p> <i>n</i> * <b>DIST_CTL_RETRY_TIMEOUT</b><p><dt><b>DIST_CTL_MAX_RETRIES</b><dd>This function sets a limit for the number of retries when sending fails.The default value is system dependent, but is set to 5 for all currentversions of vxWorks.<p><dt><b>DIST_CTL_NACK_SUPPORT</b><dd>This function enables or disables the sending of negative acknowledgments (NACKs). NACKs are used to request a resend of a singlemissing fragment from a packet. They are sent immediately after a fragmentis found to be missing. If <i>arg</i> is FALSE (0), the sending of negativeacknowledgments is disabled. If <i>arg</i> is TRUE (1), the sending of NACKsis enabled. By default, NACKs are enabled.<p><dt><b>DIST_CTL_PGGYBAK_UNICST_SUPPORT</b><dd>This function enables or disables unicast piggy-backing. When unicast piggy-backing is enabled, the system waits some time until it sends an acknowledgment for a previously received packet. In the meantime, if adata packet is sent to a host already awaiting an acknowledgment, theacknowledgment is delivered (that is, piggy-backed) with the data packet.Enabling piggy-backing is useful for reducing the number of packets sent;however, it increases latency if no data packets are sent while the system waits. When unicast piggy-backing is disabled, an acknowledgment is delivered immediately in its own packet. This function turns piggy-backing on and off for unicast communication only. If <i>arg</i> is FALSE (0), unicast piggy-backing is disabled. If <i>arg</i> is TRUE (1), unicast piggy-backing is enabled. By default, piggy-backing is disabled for unicast communication.<p><dt><b>DIST_CTL_PGGYBAK_BRDCST_SUPPORT</b><dd>This function enables or disables broadcast piggy-backing. When broadcastpiggy-backing is enabled, the system waits some time until it sends an acknowledgment for a previously received packet. In the meantime,if a data packet is sent to a host already awaiting an acknowledgment, theacknowledgment is delivered (that is, piggy-backed)with the data packet.Enabling piggy-backing is useful for reducing the number of packets sent;however, it increases latency if no broadcast data packets are sent while thesystem waits. When broadcast piggy-backing is disabled, an acknowledgment is delivered immediately in its own packet. This function turns piggy-backing on and off for broadcast communication only. If <i>arg</i> is FALSE (0), broadcast piggy-backing is disabled. If <i>arg</i> is TRUE (1), broadcast piggy-backing is enabled. By default, piggy-backing is disabled for broadcast communication.<p><dt><b>DIST_CTL_OPERATIONAL_HOOK</b><dd>This function adds a routine to a list of routines to be called each time a node shifts to the operational state. A maximum of 8 routines can be added tothe list. The prototype of each <b>operational( )</b> routine should look as follows:<pre> void operational (DIST_NODE_ID nodeStateChanged);</pre><dt><b>DIST_CTL_CRASHED_HOOK</b><dd>This function adds a routine to a list of routines to be called each time a node shifts to the crashed state. A node shifts to the crashed state when it does not acknowledge a message within the maximum number of retries. The list can contain a maximum of 8 routines; however VxFusion supplies one routine, leaving room for only 7 user-supplied routines. The prototype of each <b>crashed( )</b> routine should look as follows:<pre> void crashed (DIST_NODE_ID nodeStateChanged);</pre><dt><b>DIST_CTL_GET_LOCAL_ID</b><dd>This function returns the local node ID.<p><dt><b>DIST_CTL_GET_LOCAL_STATE</b><dd>This function returns the state of the local node.<p><dt><b>DIST_CTL_SERVICE_HOOK</b><dd>This function sets a routine to be called each time a service fails, for a service invoked by a remote node. The <i>argument</i> parameter is a pointer toa <b>servError( )</b> routine. The prototype of the <b>servError( )</b> routine shouldlook as follows:<pre> void servError (int servId, int status);</pre>The system is aware of the following services:<pre>DIST_ID_MSG_Q_SERV (0) /* message queue service */DIST_ID_MSG_Q_GRP_SERV (1) /* message queue group service */DIST_ID_DNDB_SERV (2) /* distributed name database */DIST_ID_DGDB_SERV (3) /* distributed group database */DIST_ID_INCO_SERV (4) /* incorporation protocol */DIST_ID_GAP_SERV (5) /* group agreement protocol */</pre><dt><b>DIST_CTL_SERVICE_CONF</b><dd>This function configures a specified service. The <i>argument</i> parameter isa pointer to a <b>DIST_SERV_CONF</b> structure which holds the service ID and itsconfiguration to be set. <b>DIST_SERV_CONF</b> is defined as follows:<pre>typedef struct { int servId; /* ID of service to configure */ int taskPrio; /* priority of service task */ int netPrio; /* network priority of service */ } DIST_SERV_CONF;</pre>The system is aware of the following services:<pre>DIST_ID_MSG_Q_SERV (0) /* message queue service */DIST_ID_MSG_Q_GRP_SERV (1) /* message queue group service */DIST_ID_DNDB_SERV (2) /* distributed name database */DIST_ID_DGDB_SERV (3) /* distributed group database */DIST_ID_INCO_SERV (4) /* incorporation protocol */DIST_ID_GAP_SERV (5) /* group agreement protocol */</pre>If one of the configuration parameters is -1, it remains unchanged.The parameter <i>taskPrio</i> can range from 0 to 255; <i>netPrio</i> can range from 0 to 7.<p>A service's configuration can be changed at any time.</dl></blockquote><h4>AVAILABILITY</h4><blockquote><p>This routine is distributed as a component of the unbundled distributedmessage queues option, VxFusion.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or the value requested if <i>function</i> is known;ERROR if <i>function</i> is unknown or the argument is invalid.<p></blockquote><h4>ERRNO</h4><blockquote><p><dl><dt><b>S_distLib_UNKNOWN_REQUEST</b><dd>The control function is unknown.</dl></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./distLib.html#top">distLib</a></b></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -