=================================================================== RCS file: /home/cvs/OpenXM/doc/OpenXM-specs/control.tex,v retrieving revision 1.8 retrieving revision 1.12 diff -u -p -r1.8 -r1.12 --- OpenXM/doc/OpenXM-specs/control.tex 2000/11/30 02:41:36 1.8 +++ OpenXM/doc/OpenXM-specs/control.tex 2016/08/27 02:11:01 1.12 @@ -1,4 +1,4 @@ -%% $OpenXM: OpenXM/doc/OpenXM-specs/control.tex,v 1.7 2000/11/17 02:50:04 takayama Exp $ +%% $OpenXM: OpenXM/doc/OpenXM-specs/control.tex,v 1.11 2016/08/22 09:23:31 takayama Exp $ \section{Session Management} \subsection{Control server} @@ -181,11 +181,32 @@ Request: {\tt int32 OX\_COMMAND} & {\tt int32 SM\_control\_reset\_connection} \\ \hline \end{tabular} -Result: +Result: none. \\ +/*&jp + ¤¹¤Ù¤Æ¥¨¥ó¥¸¥ó¤Ï reset protocol ¤ò¼ÂÁõ¤¹¤ë¤³¤È¤¬¿ä¾©¤µ¤ì¤ë¤¬, +¼ÂÁõ¤·¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï, mathcap ¤ÎÂ裴°ú¿ô¤Î option list ¤Ç +{\tt no\_ox\_reset} ¤òÁ÷¿®¤¹¤Ù¤­¤Ç¤¢¤ë (»²¾È: oxpari). \\ +*/ +/*&eg + All engines are encouraged to install the reset protocol, +but when it is not implemented, +{\tt no\_ox\_reset} option should be included in the fourth argument +(option list) of the mathcap (ref: oxpari). \\ +*/ +/*&jp +Ãí°Õ: ¸Å¤¤¼ÂÁõ(2000ǯ°ÊÁ°)¤Î control server, client ¤Ç¤Ï, +¼¡¤Î·Á¼°¤Î result code ¤¬Ìá¤ë¤³¤È¤ò²¾Äꤷ¤Æ¤¤¤ë¾ì¹ç¤¬¤¢¤ë. +¤³¤ì¤é¸Å¤¤¼ÂÁõ¤Ï¹¹¿·¤¹¤ë¤³¤È¤¬É¬ÍפǤ¢¤ë. \\ +*/ +/*&eg +Note: Some old implementations of control servers and clients (before 2000) +assume the result code of the following format. +These obsolete implementations should be updated.\\ +*/ \begin{tabular}{|c|c|} \hline {\tt int32 OX\_DATA} & {\tt CMO\_INT32} {\rm result} \\ \hline -\end{tabular} +\end{tabular}\\ \item \begin{verbatim} @@ -220,13 +241,13 @@ Result: none. 0 0 4 06 (SM_control_reset_connection) \end{verbatim} -//&jp Reset ¤ËÂФ¹¤ëÊÖ»ö. -//&eg Reply to the reset request -\begin{verbatim} -0 0 2 02 (OX_DATA) -0 0 0 2 (CMO_INT32) -0 0 0 0 ( 0 ) -\end{verbatim} +%//&jp Reset ¤ËÂФ¹¤ëÊÖ»ö. +%//&eg Reply to the reset request +%\begin{verbatim} +%0 0 2 02 (OX_DATA) +%0 0 0 2 (CMO_INT32) +%0 0 0 0 ( 0 ) +%\end{verbatim} //&jp Âè1¤Î¥Á¥ã¥ó¥Í¥ë¤Ç¤Ï¼¡¤Î {\tt OX\_SYNC\_BALL} ¤¬¸ò´¹¤µ¤ì¤ÆƱ´ü¤¬¼è¤é¤ì¤ë. @@ -245,7 +266,7 @@ OpenXM ¥µ¡¼¥Ð¤Ï, ²Äǽ¤Ç¤¢¤ë¤«¤®¤ê²ÉÌۤǤ¢¤ë. ¤«¤®¤ê²¿¤âÁ÷¿®¤·¤Ê¤¤. */ /*&eg -OpenXM servers try to be quiet as far as possible. +OpenXM servers try to be as quiet as possible. For example, engine errors of a server are only put on the engine stack and the engine does not send error packets unless the client sends the message {\tt pop\_cmo}. @@ -259,9 +280,9 @@ OpenXM ¤Ï¤³¤Î¸¶Â§¤ò¤ä¤Ö¤ëÎ㳰Ū¤ÊÊýË¡¤ò°ì¤ÄÍÑ°Õ¤·¤Æ¤¤¤ ¤³¤Îµ¡Ç½¤Ï mathcap ¤Ç¶Ø»ß¤¹¤ë¤³¤È¤â²Äǽ¤Ç¤¢¤ë. */ /*&eg -OpenXM provides a method to break this principle. +OpenXM provides a method to notify events. Control server may send {\tt OX\_NOTIFY} header and an {\tt OX\_DATA} packet. -This transmission can be prohibited by mathcap. +This transmission may be prohibited by mathcap. */ /*&jp @@ -274,7 +295,7 @@ quit ¥Ü¥¿¥ó¤¬¤ª¤µ¤ì¤ë¤È canvas ¤¬¾ÃÌǤ¹¤ë¤¬, ¥¨¥ó¥¸¥ó¼ {\tt OX\_NOTIFY} ¤òÍѤ¤¤ë. */ /*&eg -Let us explain how to use {\tt OX\_NOTIFY}. +Let us explain how to use {\tt OX\_NOTIFY} by an example. The {\tt ox\_plot} server of {\tt asir} has a quit button. If the quit button is pressed, the canvas dissappears, but the engine does not terminate. @@ -290,9 +311,10 @@ the {\tt OX\_NOTIFY} message should be used. ¤¢¤ë¤³¤È¤ËÃí°Õ¤·¤è¤¦. ¤·¤¿¤¬¤Ã¤Æ¥¨¥ó¥¸¥ó¤Ï¤Ê¤ó¤é¤«¤ÎÊýË¡¤Ç, ¥³¥ó¥È¥í¡¼¥ë¥µ¡¼¥Ð¤Ë {\tt OX\_NOTIFY} ¤ò¤ª¤¯¤ë¤³¤È¤ò°ÍÍꤷ¤Ê¤¤¤È¤¤¤±¤Ê¤¤. -OpenXM ¤Îµ¬³Ê¤Ç¤Ï, -¥Õ¥¡¥¤¥ë {\tt /tmp/.ox\_notify.pid} ¤Ë touch ¤¹¤ë¤³¤È¤Ç¤³¤ì¤Î -°ì¤Ä¤Î¼Â¸½ÊýË¡¤òÍ¿¤¨¤Æ¤¤¤ë. +¤³¤ÎÊýË¡¤Ï, OS ¤Ë¤è¤ê¤¤¤í¤¤¤í¤ÊÊýË¡¤¬²Äǽ¤À¤«, +¤¿¤È¤¨¤Ð, unix ¤Ç¤Ï +¥Õ¥¡¥¤¥ë {\tt /tmp/.ox\_notify.pid} ¤Ë touch ¤¹¤ë¤³¤È¤Ç¤³¤ì¤ò +°ì¤Ä¤Î¼Â¸½¤¹¤ë¤³¤È¤¬²Äǽ¤Ç¤¢¤ë. ¤³¤³¤Ç {\tt pid} ¤Ï¥¨¥ó¥¸¥ó¤Î¥×¥í¥»¥¹ÈÖ¹æ¤Ç¤¢¤ë. ¥³¥ó¥È¥í¡¼¥ë¥µ¡¼¥Ð¤Ï¥Õ¥¡¥¤¥ë {\tt /tmp/.ox\_notify.pid} ¤¬ touch ¤µ¤ì¤¿¤³¤È¤ò¸¡½Ð¤·¤¿¤é, ¥¯¥é¥¤¥¢¥ó¥È¤Ë @@ -301,14 +323,18 @@ touch ¤µ¤ì¤¿¤³¤È¤ò¸¡½Ð¤·¤¿¤é, ¥¯¥é¥¤¥¢¥ó¥È¤Ë ¶¦Í­¥á¥â¥ê¤ä¥·¥°¥Ê¥ë¤òÍѤ¤¤Æ¤·¤é¤»¤Æ¤â¤è¤¤. */ /*&eg -Let us note that it is the control process that sends {\tt OX\_NOTIFY}. +Let us note that only the control process is allowed to send {\tt OX\_NOTIFY}. Therefore, the engine must ask the control server to send {\tt OX\_NOTIFY}. -In the OpenXM, if the engine touches the file +Methods to ask the control process from the engine +depends on operating system. +In case of unix, one method is the use of a file; +for instance, +if the engine touches the file {\tt /tmp/.ox\_notify.pid}, then the control server sends the {\tt OX\_NOTIFY} header and the {\tt OX\_DATA} packet of {\tt cmo\_null}. Here, {\tt pid} is the process id of the engine. Engines and control processes may use a shared memory or a signal -instead of the file {\tt /tmp.ox\_notify.pid}. +instead of the file {\tt /tmp/.ox\_notify.pid}. */