Reply To: Eclipsys SCM Acknowledgements

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Eclipsys SCM Acknowledgements Reply To: Eclipsys SCM Acknowledgements

#56835
Richard Hart
Participant

Kathy,

Below is the ‘original’ tcp_acknak.pdl code.  We use this between Cloverleaf sites and have nevere lost a message (yet!)

The ‘echo’ commnds have been added as we print the RCS ID for all code at startup.

/* $Id: tcp_acknak.pdl,v 1.3 2001/02/14 00:22:35 he00387 Exp $ */

/*

*

*/

define driver tcp_acknak;

   version: “1.0”;

end driver;

/* This driver manages the transmission of messages using the tcpip

* with a 4-byte length encoded structure.  The length placed in the

* encoding is EXCLUSIVE of the encoding bytes.

*

*   – Upon receiving an IB data message, a one character OB message is

*    sent.  The message is the ASCII value ACK (0x06).

*

*  – Upon sending an OB data message, a one character message is

*    expected in return.  The IB reply message is the ASCII value ACK

*    (0x06).  The current driver does nothing with NAKs other than to

*    print a message saying that a “Negative ack received.”

*

* The phrase basic-msg recognizes this message format.  Once recognized,

* the message data will be available from the ‘data’ field.

*/

define phrase basic-msg;

   field msglen = fixed-array( 4, any );

   length-encoded { encoding:network(bytes:4), store-in: msglen } =

begin

   field data = variable-array( any );

end;

end phrase;

define phrase ack-msg;

   ;

end phrase;

define phrase nak-msg;

   ;

end phrase;

/**********************************************************************

* End of declarative section, TCL management functions start here.   *

**********************************************************************/

#{#

# This is a standard ack/nak protocol; use the acknak style.

hci_pd_msg_style acknak phrase:basic-msg

field:data

ackphrase:ack-msg

nakphrase:nak-msg

timeout:600000

######################################################################

# hci_pd.open – Setup driver config during open phase

# Args:

#       config  = keyed list of config data from netconfig

# Notes:

#       It is our job to create hci_pd.device.  This variable is used

#       by hci_pd_open_device to properly open and connect the underlying

#       communication device.

#

proc hci_pd.open { config } {

   global hci_pd.device

   set hci_pd.device $config           ;# Just use it all

}

######################################################################

# hci_pd.initialize – Initialize the driver for use, open the device

# Args:

#       info    = currently unused

# Notes:

#       This function will cause the communication device to be opened.

#

proc hci_pd.initialize { info } {

global HciConnName

# construct a string that is in the same format as the rest of the

# logging and display this to the log file.

set my_ThreadName “[fmtclock [getclock] %X] $HciConnName tcp_acknak:INFO: RCS Info $Id: tcp_acknak.pdl,v 1.3 2001/02/14 00:22:35 he00387 Exp $”

echo $my_ThreadName

   hci_pd_open_device

}

#}#

Forum Statistics

Registered Users
5,116
Forums
28
Topics
9,292
Replies
34,432
Topic Tags
286
Empty Topic Tags
10