S1F1RAre You Online? Sent by Host and Equipment

    // S1F1R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 1, 1, new SecsMsgReceiveDelegate(recv_S1F1R));

// receive method 
void recv_S1F1R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // no data expected
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(1, 2, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S1F1R

S1F2On Line Data Different Host and Equipment Use

    // S1F2 C# Parse Equipment reply 
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(1, 1, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 MDLN SOFTREV
        // variables for data items and parsing
        string MDLN;  	// A:20 (always)  equipment model type
        string SOFTREV;  	// A:20 (always)  software revision
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { MDLN = list1[1];} else { MDLN = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { SOFTREV = list1[1];} else { SOFTREV = ""; }
        return;  // parsed ok
        } // end while(ok)
    // S1F2 C# Parse Host reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(1, 1, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:0
        // variables for data items and parsing
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length != 1 || list0[0] != "L:0") { ok = false; break; }
        // single token data such as L:0 or U4:0 has been received as expected
        return;  // parsed ok
        } // end while(ok)

S1F3RSelected Equipment Status Request Sent by Host Only

    // S1F3R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 1, 3, new SecsMsgReceiveDelegate(recv_S1F3R));

// receive method 
void recv_S1F3R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:n SVID
        // variables for data items and parsing
        string SVID;  	// U4:1 (varies)  status variable ID
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list0.Length; n++) {
            string [] list1;
            list1 = sp.ListSplit(list0[n]);
            if (list1.Length < 1) { ok = false; break; }
            if ( list1.Length == 2) { SVID = list1[1];} else { SVID = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(1, 4, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S1F3R

S1F4Selected Equipment Status Data Sent by Equipment Only

    // S1F4 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(1, 3, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:n SV
        // variables for data items and parsing
        string SV;  	// A:n (varies)  status variable value
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list0.Length; n++) {
            string [] list1;
            list1 = sp.ListSplit(list0[n]);
            if (list1.Length < 1) { ok = false; break; }
            if ( list1.Length == 2) { SV = list1[1];} else { SV = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S1F5RFormatted Status Request Sent by Host Only

    // S1F5R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 1, 5, new SecsMsgReceiveDelegate(recv_S1F5R));

// receive method 
void recv_S1F5R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect SFCD
        // variables for data items and parsing
        int SFCD;  	// B:1 (always)  status form code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        SFCD = sp.BinToInt(list0[1]);
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(1, 6, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S1F5R

S1F6Formatted Status Data Sent by Equipment Only

    // S1F6 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(1, 5, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:n SV
        // variables for data items and parsing
        string SV;  	// A:n (varies)  status variable value
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list0.Length; n++) {
            string [] list1;
            list1 = sp.ListSplit(list0[n]);
            if (list1.Length < 1) { ok = false; break; }
            if ( list1.Length == 2) { SV = list1[1];} else { SV = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S1F7Fixed Form Request Sent by Host Only

    // S1F7 C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 1, 7, new SecsMsgReceiveDelegate(recv_S1F7));

// receive method 
void recv_S1F7(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect SFCD
        // variables for data items and parsing
        int SFCD;  	// B:1 (always)  status form code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        SFCD = sp.BinToInt(list0[1]);
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(1, 8, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S1F7

S1F8Fixed Form Data Sent by Equipment Only

    // S1F8 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(1, 7, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:n {L:2 SVNAME SV0}
        // variables for data items and parsing
        string SVNAME;  	// A:n (always)  status variable name
        string SV0;  	// A:0 (varies)  Zero length value used to convey format type
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list0.Length; n++) {
            string [] list1;
            list1 = sp.ListSplit(list0[n]);
            if ( list1.Length != 3 ) { ok=false; break; }
            string [] list2;
            list2 = sp.ListSplit(list1[1]);
            if (list2.Length < 1) { ok = false; break; }
            if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
            if ( list2.Length == 2) { SVNAME = list2[1];} else { SVNAME = ""; }
            list2 = sp.ListSplit(list1[2]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { SV0 = list2[1];} else { SV0 = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S1F9RMaterial Transfer Status Request Sent by Host Only

    // S1F9R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 1, 9, new SecsMsgReceiveDelegate(recv_S1F9R));

// receive method 
void recv_S1F9R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // no data expected
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(1, 10, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S1F9R

S1F10Material Transfer Status Data Sent by Equipment Only

    // S1F10 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(1, 9, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 TSIP TSOP
        // variables for data items and parsing
        int [] TSIP;  	// B:n (always)  transfer status of input ports
        int [] TSOP;  	// B:n (always)  transfer status of output ports
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("B:") ) { ok = false; break; }
        TSIP = new int[list1.Length-1];
        for(int i=0; i < TSIP.Length; i++) {
            TSIP[i] = sp.BinToInt(list1[1+i]);
            }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("B:") ) { ok = false; break; }
        TSOP = new int[list1.Length-1];
        for(int i=0; i < TSOP.Length; i++) {
            TSOP[i] = sp.BinToInt(list1[1+i]);
            }
        return;  // parsed ok
        } // end while(ok)

S1F11RStatus Variable Namelist Request Sent by Host Only

    // S1F11R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 1, 11, new SecsMsgReceiveDelegate(recv_S1F11R));

// receive method 
void recv_S1F11R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:n SVID
        // variables for data items and parsing
        string SVID;  	// U4:1 (varies)  status variable ID
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list0.Length; n++) {
            string [] list1;
            list1 = sp.ListSplit(list0[n]);
            if (list1.Length < 1) { ok = false; break; }
            if ( list1.Length == 2) { SVID = list1[1];} else { SVID = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(1, 12, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S1F11R

S1F12Status Variable Namelist Reply Sent by Equipment Only

    // S1F12 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(1, 11, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:n {L:3 SVID SVNAME UNITS}
        // variables for data items and parsing
        string SVID;  	// U4:1 (varies)  status variable ID
        string SVNAME;  	// A:n (always)  status variable name
        string UNITS;  	// A:n (always)  units identifier (see E5 Section 9)
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list0.Length; n++) {
            string [] list1;
            list1 = sp.ListSplit(list0[n]);
            if ( list1.Length != 4 ) { ok=false; break; }
            string [] list2;
            list2 = sp.ListSplit(list1[1]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { SVID = list2[1];} else { SVID = ""; }
            list2 = sp.ListSplit(list1[2]);
            if (list2.Length < 1) { ok = false; break; }
            if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
            if ( list2.Length == 2) { SVNAME = list2[1];} else { SVNAME = ""; }
            list2 = sp.ListSplit(list1[3]);
            if (list2.Length < 1) { ok = false; break; }
            if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
            if ( list2.Length == 2) { UNITS = list2[1];} else { UNITS = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S1F13REstablish Communications Request Different Host and Equipment Use

    // S1F13R C# Receive Equipment message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 1, 13, new SecsMsgReceiveDelegate(recv_S1F13R));

// receive method 
void recv_S1F13R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 MDLN SOFTREV
        // variables for data items and parsing
        string MDLN;  	// A:20 (always)  equipment model type
        string SOFTREV;  	// A:20 (always)  software revision
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { MDLN = list1[1];} else { MDLN = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { SOFTREV = list1[1];} else { SOFTREV = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(1, 14, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S1F13R
    // S1F13R C# Receive Host message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 1, 13, new SecsMsgReceiveDelegate(recv_S1F13R));

// receive method 
void recv_S1F13R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:0
        // variables for data items and parsing
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length != 1 || list0[0] != "L:0") { ok = false; break; }
        // single token data such as L:0 or U4:0 has been received as expected
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(1, 14, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S1F13R

S1F14Establish Communications Request Acknowledge Different Host and Equipment Use

    // S1F14 C# Parse Equipment reply 
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(1, 13, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 COMMACK {L:2 MDLN SOFTREV}
        // variables for data items and parsing
        int COMMACK;  	// B:1 (always)  establish communications acknowledgement code
        string MDLN;  	// A:20 (always)  equipment model type
        string SOFTREV;  	// A:20 (always)  software revision
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        COMMACK = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
        if ( list2.Length == 2) { MDLN = list2[1];} else { MDLN = ""; }
        list2 = sp.ListSplit(list1[2]);
        if (list2.Length < 1) { ok = false; break; }
        if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
        if ( list2.Length == 2) { SOFTREV = list2[1];} else { SOFTREV = ""; }
        return;  // parsed ok
        } // end while(ok)
    // S1F14 C# Parse Host reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(1, 13, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 COMMACK L:0
        // variables for data items and parsing
        int COMMACK;  	// B:1 (always)  establish communications acknowledgement code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        COMMACK = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length != 1 || list1[0] != "L:0") { ok = false; break; }
        // single token data such as L:0 or U4:0 has been received as expected
        return;  // parsed ok
        } // end while(ok)

S1F15RRequest OFF-LINE Sent by Host Only

    // S1F15R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 1, 15, new SecsMsgReceiveDelegate(recv_S1F15R));

// receive method 
void recv_S1F15R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // no data expected
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(1, 16, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S1F15R

S1F16OFF-LINE Acknowledge Sent by Equipment Only

    // S1F16 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(1, 15, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect OFLACK
        // variables for data items and parsing
        int OFLACK;  	// B:1 (always)  offline acknowledge, 0 ok
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        OFLACK = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S1F17RRequest ON-LINE Sent by Host Only

    // S1F17R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 1, 17, new SecsMsgReceiveDelegate(recv_S1F17R));

// receive method 
void recv_S1F17R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // no data expected
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(1, 18, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S1F17R

S1F18ON-LINE Acknowledge Sent by Equipment Only

    // S1F18 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(1, 17, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect ONLACK
        // variables for data items and parsing
        int ONLACK;  	// B:1 (always)  online acknowledge, 0 ok
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        ONLACK = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S1F19RGet Attribute Sent by Host and Equipment

    // S1F19R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 1, 19, new SecsMsgReceiveDelegate(recv_S1F19R));

// receive method 
void recv_S1F19R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:3 OBJTYPE {L:m OBJID} {L:n ATTRID}
        // variables for data items and parsing
        string OBJTYPE;  	// A:40 (varies)  object class name, chars 0x20-0x7e but not >, ?, *, or ~.  Does not begin or end with space.
        string OBJID;  	// A:80 (varies)  E39 object identifier 1-80 chars 0x20-0x7e but not >, ?, *, or ~.  Does not begin or end with space.
        string ATTRID;  	// A:40 (varies)  identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~.  Does not begin or end with space.
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { OBJTYPE = list1[1];} else { OBJTYPE = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list1.Length; m++) {
            string [] list2;
            list2 = sp.ListSplit(list1[m]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { OBJID = list2[1];} else { OBJID = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { ATTRID = list2[1];} else { ATTRID = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(1, 20, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S1F19R

S1F20Attribute Data Sent by Host and Equipment

    // S1F20 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(1, 19, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 {L:m {L:n ATTRDATA}} {L:p {L:2 ERRCODE ERRTEXT}}
        // variables for data items and parsing
        string ATTRDATA;  	// A:n (varies)  a specific attribute value of any data type
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if ( list1.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list1.Length; m++) {
            string [] list2;
            list2 = sp.ListSplit(list1[m]);
            if ( list2.Length < 1) { ok=false; break; }
            int n;
            for(n=1; n < list2.Length; n++) {
                string [] list3;
                list3 = sp.ListSplit(list2[n]);
                if (list3.Length < 1) { ok = false; break; }
                if ( list3.Length == 2) { ATTRDATA = list3[1];} else { ATTRDATA = ""; }
                }
            if (!ok) break;
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list1.Length; p++) {
            string [] list2;
            list2 = sp.ListSplit(list1[p]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ERRCODE = list3[1];} else { ERRCODE = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { ERRTEXT = list3[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S1F21RData Variable Namelist Request Sent by Host Only

    // S1F21R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 1, 21, new SecsMsgReceiveDelegate(recv_S1F21R));

// receive method 
void recv_S1F21R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:n VID
        // variables for data items and parsing
        string VID;  	// A:n (varies)  A variable ID
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list0.Length; n++) {
            string [] list1;
            list1 = sp.ListSplit(list0[n]);
            if (list1.Length < 1) { ok = false; break; }
            if ( list1.Length == 2) { VID = list1[1];} else { VID = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(1, 22, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S1F21R

S1F22Data Variable Namelist Reply Sent by Equipment Only

    // S1F22 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(1, 21, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:n {L:3 VID DVVALNAME UNITS}
        // variables for data items and parsing
        string VID;  	// A:n (varies)  A variable ID
        string DVVALNAME;  	// A:n (always)  a descriptive name for a Data Value variable (DVVAL)
        string UNITS;  	// A:n (always)  units identifier (see E5 Section 9)
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list0.Length; n++) {
            string [] list1;
            list1 = sp.ListSplit(list0[n]);
            if ( list1.Length != 4 ) { ok=false; break; }
            string [] list2;
            list2 = sp.ListSplit(list1[1]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { VID = list2[1];} else { VID = ""; }
            list2 = sp.ListSplit(list1[2]);
            if (list2.Length < 1) { ok = false; break; }
            if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
            if ( list2.Length == 2) { DVVALNAME = list2[1];} else { DVVALNAME = ""; }
            list2 = sp.ListSplit(list1[3]);
            if (list2.Length < 1) { ok = false; break; }
            if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
            if ( list2.Length == 2) { UNITS = list2[1];} else { UNITS = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S1F23RCollection Event Namelist Request Sent by Host Only

    // S1F23R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 1, 23, new SecsMsgReceiveDelegate(recv_S1F23R));

// receive method 
void recv_S1F23R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:n CEID
        // variables for data items and parsing
        string CEID;  	// U4:1 (varies)  collection event identifier, GEM requires type Un
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list0.Length; n++) {
            string [] list1;
            list1 = sp.ListSplit(list0[n]);
            if (list1.Length < 1) { ok = false; break; }
            if ( list1.Length == 2) { CEID = list1[1];} else { CEID = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(1, 24, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S1F23R

S1F24Collection Event Namelist Reply Sent by Equipment Only

    // S1F24 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(1, 23, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:n {L:3 CEID CENAME {L:a VID}}
        // variables for data items and parsing
        string CEID;  	// U4:1 (varies)  collection event identifier, GEM requires type Un
        string CENAME;  	// A:n (always)  a descriptive name for a Data Collection Event
        string VID;  	// A:n (varies)  A variable ID
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list0.Length; n++) {
            string [] list1;
            list1 = sp.ListSplit(list0[n]);
            if ( list1.Length != 4 ) { ok=false; break; }
            string [] list2;
            list2 = sp.ListSplit(list1[1]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { CEID = list2[1];} else { CEID = ""; }
            list2 = sp.ListSplit(list1[2]);
            if (list2.Length < 1) { ok = false; break; }
            if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
            if ( list2.Length == 2) { CENAME = list2[1];} else { CENAME = ""; }
            list2 = sp.ListSplit(list1[3]);
            if ( list2.Length < 1) { ok=false; break; }
            int a;
            for(a=1; a < list2.Length; a++) {
                string [] list3;
                list3 = sp.ListSplit(list2[a]);
                if (list3.Length < 1) { ok = false; break; }
                if ( list3.Length == 2) { VID = list3[1];} else { VID = ""; }
                }
            if (!ok) break;
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S2F13REquipment Constant Request Sent by Host Only

    // S2F13R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 2, 13, new SecsMsgReceiveDelegate(recv_S2F13R));

// receive method 
void recv_S2F13R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:n ECID
        // variables for data items and parsing
        string ECID;  	// U4:1 (varies)  equipment constant ID, GEM requires U4
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list0.Length; n++) {
            string [] list1;
            list1 = sp.ListSplit(list0[n]);
            if (list1.Length < 1) { ok = false; break; }
            if ( list1.Length == 2) { ECID = list1[1];} else { ECID = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(2, 14, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S2F13R

S2F14Equipment Constant Data Sent by Equipment Only

    // S2F14 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(2, 13, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:n ECV
        // variables for data items and parsing
        string ECV;  	// A:n (varies)  equipment constant value, any scalar type (constant is a misnomer)
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list0.Length; n++) {
            string [] list1;
            list1 = sp.ListSplit(list0[n]);
            if (list1.Length < 1) { ok = false; break; }
            if ( list1.Length == 2) { ECV = list1[1];} else { ECV = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S2F15RNew Equipment Constant Send Sent by Host Only

    // S2F15R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 2, 15, new SecsMsgReceiveDelegate(recv_S2F15R));

// receive method 
void recv_S2F15R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:n {L:2 ECID ECV}
        // variables for data items and parsing
        string ECID;  	// U4:1 (varies)  equipment constant ID, GEM requires U4
        string ECV;  	// A:n (varies)  equipment constant value, any scalar type (constant is a misnomer)
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list0.Length; n++) {
            string [] list1;
            list1 = sp.ListSplit(list0[n]);
            if ( list1.Length != 3 ) { ok=false; break; }
            string [] list2;
            list2 = sp.ListSplit(list1[1]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { ECID = list2[1];} else { ECID = ""; }
            list2 = sp.ListSplit(list1[2]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { ECV = list2[1];} else { ECV = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(2, 16, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S2F15R

S2F16New Equipment Constant Ack Sent by Equipment Only

    // S2F16 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(2, 15, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect EAC
        // variables for data items and parsing
        int EAC;  	// B:1 (always)  equipment acknowledge code, 0 ok
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        EAC = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S2F17RDate and Time Request Sent by Host and Equipment

    // S2F17R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 2, 17, new SecsMsgReceiveDelegate(recv_S2F17R));

// receive method 
void recv_S2F17R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // no data expected
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(2, 18, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S2F17R

S2F18Date and Time Data Sent by Host and Equipment

    // S2F18 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(2, 17, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect TIME
        // variables for data items and parsing
        string TIME;  	// A:32 (always)  ECV TimeFormat controls format, 0=A:12 YYMMDDHHMMSS, 1=A:16 YYYYMMDDHHMMSScc,2=YYYY-MM-DDTHH:MM:SS.s[s]*{Z|+hh:mm|-hh:mm}
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( !list0[0].StartsWith("A:") ) { ok = false; break; }
        if ( list0.Length == 2) { TIME = list0[1];} else { TIME = ""; }
        return;  // parsed ok
        } // end while(ok)

S2F19RReset/Initialize Send Sent by Host Only

    // S2F19R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 2, 19, new SecsMsgReceiveDelegate(recv_S2F19R));

// receive method 
void recv_S2F19R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect RIC
        // variables for data items and parsing
        string RIC;  	// U1:1 (varies)  reset code, 1 means power up reset
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0.Length == 2) { RIC = list0[1];} else { RIC = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(2, 20, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S2F19R

S2F20Reset Acknowledge Sent by Equipment Only

    // S2F20 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(2, 19, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect RAC
        // variables for data items and parsing
        string RAC;  	// U1:1 (varies)  reset acknowledge
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0.Length == 2) { RAC = list0[1];} else { RAC = ""; }
        return;  // parsed ok
        } // end while(ok)

S2F21[R]Remote Command Send Sent by Host Only

    // S2F21 C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 2, 21, new SecsMsgReceiveDelegate(recv_S2F21));

// receive method 
void recv_S2F21(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect RCMD
        // variables for data items and parsing
        string RCMD;  	// A:n (varies)  remote command, GEM requires a maximum length of 20 printable characters, taken from hex 21-7E (no spaces)
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0.Length == 2) { RCMD = list0[1];} else { RCMD = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(2, 22, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S2F21

S2F22Remote Command Acknowledge Sent by Equipment Only

    // S2F22 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(2, 21, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect CMDA
        // variables for data items and parsing
        int CMDA;  	// B:1 (always)  command acknowledge code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        CMDA = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S2F23RTrace Initialize Send Sent by Host Only

    // S2F23R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 2, 23, new SecsMsgReceiveDelegate(recv_S2F23R));

// receive method 
void recv_S2F23R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:5 TRID DSPER TOTSMP REPGSZ {L:n SVID}
        // variables for data items and parsing
        string TRID;  	// A:n (varies)  trace request ID
        string DSPER;  	// A:6 (varies)  data sample period, hhmmss is always supported, A:8 hhmmsscc may be supported
        string TOTSMP;  	// U4:1 (varies)  total samples to be made, should be an even multiple of REPGSZ
        string REPGSZ;  	// U4:1 (varies)  reporting group size, TOTSMP modulo REPGSZ should be 0
        string SVID;  	// U4:1 (varies)  status variable ID
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 6 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { TRID = list1[1];} else { TRID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DSPER = list1[1];} else { DSPER = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { TOTSMP = list1[1];} else { TOTSMP = ""; }
        list1 = sp.ListSplit(list0[4]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { REPGSZ = list1[1];} else { REPGSZ = ""; }
        list1 = sp.ListSplit(list0[5]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { SVID = list2[1];} else { SVID = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(2, 24, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S2F23R

S2F24Trace Initialize Acknowledge Sent by Equipment Only

    // S2F24 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(2, 23, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect TIAACK
        // variables for data items and parsing
        int TIAACK;  	// B:1 (always)  trace acknowledgement code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        TIAACK = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S2F25RLoopback Diagnostic Request Sent by Host and Equipment

    // S2F25R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 2, 25, new SecsMsgReceiveDelegate(recv_S2F25R));

// receive method 
void recv_S2F25R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect ABS
        // variables for data items and parsing
        int [] ABS;  	// B:n (always)  any binary string 
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( !list0[0].StartsWith("B:") ) { ok = false; break; }
        ABS = new int[list0.Length-1];
        for(int i=0; i < ABS.Length; i++) {
            ABS[i] = sp.BinToInt(list0[1+i]);
            }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(2, 26, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S2F25R

S2F26Loopback Diagnostic Data Sent by Host and Equipment

    // S2F26 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(2, 25, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect ABS
        // variables for data items and parsing
        int [] ABS;  	// B:n (always)  any binary string 
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( !list0[0].StartsWith("B:") ) { ok = false; break; }
        ABS = new int[list0.Length-1];
        for(int i=0; i < ABS.Length; i++) {
            ABS[i] = sp.BinToInt(list0[1+i]);
            }
        return;  // parsed ok
        } // end while(ok)

S2F27RInitiate Processing Request Sent by Host Only

    // S2F27R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 2, 27, new SecsMsgReceiveDelegate(recv_S2F27R));

// receive method 
void recv_S2F27R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:3 LOC PPID {L:n MID}
        // variables for data items and parsing
        int LOC;  	// B:1 (always)  material location code
        string PPID;  	// A:80 (varies)  process program ID
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        LOC = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { PPID = list1[1];} else { PPID = ""; }
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { MID = list2[1];} else { MID = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(2, 28, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S2F27R

S2F28Initiate Processing Acknowledge Sent by Equipment Only

    // S2F28 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(2, 27, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect CMDA
        // variables for data items and parsing
        int CMDA;  	// B:1 (always)  command acknowledge code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        CMDA = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S2F29REquipment Constant Namelist Request Sent by Host Only

    // S2F29R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 2, 29, new SecsMsgReceiveDelegate(recv_S2F29R));

// receive method 
void recv_S2F29R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:n ECID
        // variables for data items and parsing
        string ECID;  	// U4:1 (varies)  equipment constant ID, GEM requires U4
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list0.Length; n++) {
            string [] list1;
            list1 = sp.ListSplit(list0[n]);
            if (list1.Length < 1) { ok = false; break; }
            if ( list1.Length == 2) { ECID = list1[1];} else { ECID = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(2, 30, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S2F29R

S2F30Equipment Constant Namelist Sent by Equipment Only

    // S2F30 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(2, 29, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:n {L:6 ECID ECNAME ECMIN ECMAX ECDEF UNITS}
        // variables for data items and parsing
        string ECID;  	// U4:1 (varies)  equipment constant ID, GEM requires U4
        string ECNAME;  	// A:n (always)  equipment constant name
        string ECMIN;  	// A:n (varies)  equipment constant minimum value, any scalar type
        string ECMAX;  	// A:n (varies)  equipment constant maximum value, any scalar type
        string ECDEF;  	// A:n (varies)  equipment constant default value
        string UNITS;  	// A:n (always)  units identifier (see E5 Section 9)
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list0.Length; n++) {
            string [] list1;
            list1 = sp.ListSplit(list0[n]);
            if ( list1.Length != 7 ) { ok=false; break; }
            string [] list2;
            list2 = sp.ListSplit(list1[1]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { ECID = list2[1];} else { ECID = ""; }
            list2 = sp.ListSplit(list1[2]);
            if (list2.Length < 1) { ok = false; break; }
            if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
            if ( list2.Length == 2) { ECNAME = list2[1];} else { ECNAME = ""; }
            list2 = sp.ListSplit(list1[3]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { ECMIN = list2[1];} else { ECMIN = ""; }
            list2 = sp.ListSplit(list1[4]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { ECMAX = list2[1];} else { ECMAX = ""; }
            list2 = sp.ListSplit(list1[5]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { ECDEF = list2[1];} else { ECDEF = ""; }
            list2 = sp.ListSplit(list1[6]);
            if (list2.Length < 1) { ok = false; break; }
            if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
            if ( list2.Length == 2) { UNITS = list2[1];} else { UNITS = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S2F31RDate and Time Set Request Sent by Host Only

    // S2F31R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 2, 31, new SecsMsgReceiveDelegate(recv_S2F31R));

// receive method 
void recv_S2F31R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect TIME
        // variables for data items and parsing
        string TIME;  	// A:32 (always)  ECV TimeFormat controls format, 0=A:12 YYMMDDHHMMSS, 1=A:16 YYYYMMDDHHMMSScc,2=YYYY-MM-DDTHH:MM:SS.s[s]*{Z|+hh:mm|-hh:mm}
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( !list0[0].StartsWith("A:") ) { ok = false; break; }
        if ( list0.Length == 2) { TIME = list0[1];} else { TIME = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(2, 32, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S2F31R

S2F32Date and Time Set Acknowledge Sent by Equipment Only

    // S2F32 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(2, 31, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect TIACK
        // variables for data items and parsing
        int TIACK;  	// B:1 (always)  time set acknowledge
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        TIACK = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S2F33RDefine Report Sent by Host Only

    // S2F33R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 2, 33, new SecsMsgReceiveDelegate(recv_S2F33R));

// receive method 
void recv_S2F33R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 DATAID {L:a {L:2 RPTID {L:b VID}}}
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string RPTID;  	// U4:1 (varies)  report ID
        string VID;  	// A:n (varies)  A variable ID
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int a;
        for(a=1; a < list1.Length; a++) {
            string [] list2;
            list2 = sp.ListSplit(list1[a]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { RPTID = list3[1];} else { RPTID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if ( list3.Length < 1) { ok=false; break; }
            int b;
            for(b=1; b < list3.Length; b++) {
                string [] list4;
                list4 = sp.ListSplit(list3[b]);
                if (list4.Length < 1) { ok = false; break; }
                if ( list4.Length == 2) { VID = list4[1];} else { VID = ""; }
                }
            if (!ok) break;
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(2, 34, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S2F33R

S2F34Define Report Acknowledge Sent by Equipment Only

    // S2F34 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(2, 33, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect DRACK
        // variables for data items and parsing
        int DRACK;  	// B:1 (always)  define report acknowledge
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        DRACK = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S2F35RLink Event Report Sent by Host Only

    // S2F35R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 2, 35, new SecsMsgReceiveDelegate(recv_S2F35R));

// receive method 
void recv_S2F35R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 DATAID {L:a {L:2 CEID {L:b RPTID}}}
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string CEID;  	// U4:1 (varies)  collection event identifier, GEM requires type Un
        string RPTID;  	// U4:1 (varies)  report ID
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int a;
        for(a=1; a < list1.Length; a++) {
            string [] list2;
            list2 = sp.ListSplit(list1[a]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { CEID = list3[1];} else { CEID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if ( list3.Length < 1) { ok=false; break; }
            int b;
            for(b=1; b < list3.Length; b++) {
                string [] list4;
                list4 = sp.ListSplit(list3[b]);
                if (list4.Length < 1) { ok = false; break; }
                if ( list4.Length == 2) { RPTID = list4[1];} else { RPTID = ""; }
                }
            if (!ok) break;
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(2, 36, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S2F35R

S2F36Link Event Report Acknowledge Sent by Equipment Only

    // S2F36 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(2, 35, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect LRACK
        // variables for data items and parsing
        int LRACK;  	// B:1 (always)  link report acknowledge
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        LRACK = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S2F37REnable/Disable Event Report Sent by Host Only

    // S2F37R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 2, 37, new SecsMsgReceiveDelegate(recv_S2F37R));

// receive method 
void recv_S2F37R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 CEED {L:n CEID}
        // variables for data items and parsing
        int CEED;  	// TF:1 (always)  collection event or trace enablement, true is enabled
        string CEID;  	// U4:1 (varies)  collection event identifier, GEM requires type Un
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "TF:1" ) { ok = false; break; }
        CEED = int.Parse(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { CEID = list2[1];} else { CEID = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(2, 38, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S2F37R

S2F38Enable/Disable Event Report Acknowledge Sent by Equipment Only

    // S2F38 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(2, 37, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect ERACK
        // variables for data items and parsing
        int ERACK;  	// B:1 (always)  enable/disable event report acknowledge
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        ERACK = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S2F39RMulti-block Inquire Sent by Host Only

    // S2F39R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 2, 39, new SecsMsgReceiveDelegate(recv_S2F39R));

// receive method 
void recv_S2F39R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 DATAID DATALENGTH
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string DATALENGTH;  	// U4:1 (varies)  total bytes of the message body 
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATALENGTH = list1[1];} else { DATALENGTH = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(2, 40, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S2F39R

S2F40Multi-block Grant Sent by Equipment Only

    // S2F40 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(2, 39, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect GRANT
        // variables for data items and parsing
        int GRANT;  	// B:1 (always)  multiblock grant code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        GRANT = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S2F41RHost Command Send Sent by Host Only

    // S2F41R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 2, 41, new SecsMsgReceiveDelegate(recv_S2F41R));

// receive method 
void recv_S2F41R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 RCMD {L:n {L:2 CPNAME CPVAL}}
        // variables for data items and parsing
        string RCMD;  	// A:n (varies)  remote command, GEM requires a maximum length of 20 printable characters, taken from hex 21-7E (no spaces)
        string CPNAME;  	// A:n (varies)  command parameter name
        string CPVAL;  	// A:n (varies)  command parameter value, any scalar type
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { RCMD = list1[1];} else { RCMD = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { CPNAME = list3[1];} else { CPNAME = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { CPVAL = list3[1];} else { CPVAL = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(2, 42, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S2F41R

S2F42Host Command Acknowledge Sent by Equipment Only

    // S2F42 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(2, 41, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 HCACK {L:n {L:2 CPNAME CPACK}}
        // variables for data items and parsing
        int HCACK;  	// B:1 (always)  remote command acknowledge
        string CPNAME;  	// A:n (varies)  command parameter name
        int CPACK;  	// B:1 (always)  remote command parameter acknowledge, only received if error
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        HCACK = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { CPNAME = list3[1];} else { CPNAME = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3[0] != "B:1" ) { ok = false; break; }
            CPACK = sp.BinToInt(list3[1]);
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S2F43RConfigure Spooling Sent by Host Only

    // S2F43R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 2, 43, new SecsMsgReceiveDelegate(recv_S2F43R));

// receive method 
void recv_S2F43R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:m {L:2 STRID {L:n FCNID}}
        // variables for data items and parsing
        uint STRID;  	// U1:1 (always)  stream value
        uint FCNID;  	// U1:1 (always)  message type function value
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list0.Length; m++) {
            string [] list1;
            list1 = sp.ListSplit(list0[m]);
            if ( list1.Length != 3 ) { ok=false; break; }
            string [] list2;
            list2 = sp.ListSplit(list1[1]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2[0] != "U1:1" ) { ok = false; break; }
            STRID = uint.Parse(list2[1]);
            list2 = sp.ListSplit(list1[2]);
            if ( list2.Length < 1) { ok=false; break; }
            int n;
            for(n=1; n < list2.Length; n++) {
                string [] list3;
                list3 = sp.ListSplit(list2[n]);
                if (list3.Length < 1) { ok = false; break; }
                if ( list3[0] != "U1:1" ) { ok = false; break; }
                FCNID = uint.Parse(list3[1]);
                }
            if (!ok) break;
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(2, 44, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S2F43R

S2F44Configure Spooling Acknowledge Sent by Equipment Only

    // S2F44 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(2, 43, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 RSPACK {L:m {L:3 STRID STRACK {L:n FCNID}}}
        // variables for data items and parsing
        int RSPACK;  	// B:1 (always)  spooling response
        uint STRID;  	// U1:1 (always)  stream value
        int STRACK;  	// B:1 (always)  spooling stream acknowledge
        uint FCNID;  	// U1:1 (always)  message type function value
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        RSPACK = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list1.Length; m++) {
            string [] list2;
            list2 = sp.ListSplit(list1[m]);
            if ( list2.Length != 4 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3[0] != "U1:1" ) { ok = false; break; }
            STRID = uint.Parse(list3[1]);
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3[0] != "B:1" ) { ok = false; break; }
            STRACK = sp.BinToInt(list3[1]);
            list3 = sp.ListSplit(list2[3]);
            if ( list3.Length < 1) { ok=false; break; }
            int n;
            for(n=1; n < list3.Length; n++) {
                string [] list4;
                list4 = sp.ListSplit(list3[n]);
                if (list4.Length < 1) { ok = false; break; }
                if ( list4[0] != "U1:1" ) { ok = false; break; }
                FCNID = uint.Parse(list4[1]);
                }
            if (!ok) break;
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S2F45RDefine Variable Limit Attributes Sent by Host Only

    // S2F45R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 2, 45, new SecsMsgReceiveDelegate(recv_S2F45R));

// receive method 
void recv_S2F45R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 DATAID {L:m {L:2 VID {L:n {L:2 LIMITID {L:2* UPPERDB LOWERDB}}}}}
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string VID;  	// A:n (varies)  A variable ID
        int LIMITID;  	// B:1 (always)  identifies a specific limit
        string UPPERDB;  	// F4:1 (varies)  the upper bound of a deadband limit
        string LOWERDB;  	// F4:1 (varies)  the lower bound of a deadband limit
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list1.Length; m++) {
            string [] list2;
            list2 = sp.ListSplit(list1[m]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { VID = list3[1];} else { VID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if ( list3.Length < 1) { ok=false; break; }
            int n;
            for(n=1; n < list3.Length; n++) {
                string [] list4;
                list4 = sp.ListSplit(list3[n]);
                if ( list4.Length != 3 ) { ok=false; break; }
                string [] list5;
                list5 = sp.ListSplit(list4[1]);
                if (list5.Length < 1) { ok = false; break; }
                if ( list5[0] != "B:1" ) { ok = false; break; }
                LIMITID = sp.BinToInt(list5[1]);
                list5 = sp.ListSplit(list4[2]);
                if ( list5.Length == 3 ) {  // 2 optional items found
                    string [] list6;
                    list6 = sp.ListSplit(list5[1]);
                    if (list6.Length < 1) { ok = false; break; }
                    if ( list6.Length == 2) { UPPERDB = list6[1];} else { UPPERDB = ""; }
                    list6 = sp.ListSplit(list5[2]);
                    if (list6.Length < 1) { ok = false; break; }
                    if ( list6.Length == 2) { LOWERDB = list6[1];} else { LOWERDB = ""; }
                    }
                }
            if (!ok) break;
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(2, 46, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S2F45R

S2F46Define Variable Limit Attributes Acknowledge Sent by Equipment Only

    // S2F46 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(2, 45, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 VLAACK {L:m {L:3 VID LVACK {L:2* LIMITID LIMITACK}}}
        // variables for data items and parsing
        int VLAACK;  	// B:1 (always)  variable limit attribute acknowledge
        string VID;  	// A:n (varies)  A variable ID
        int LVACK;  	// B:1 (always)  variable limit error code
        int LIMITID;  	// B:1 (always)  identifies a specific limit
        int LIMITACK;  	// B:1 (always)  variable limit value error code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        VLAACK = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list1.Length; m++) {
            string [] list2;
            list2 = sp.ListSplit(list1[m]);
            if ( list2.Length != 4 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { VID = list3[1];} else { VID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3[0] != "B:1" ) { ok = false; break; }
            LVACK = sp.BinToInt(list3[1]);
            list3 = sp.ListSplit(list2[3]);
            if ( list3.Length == 3 ) {  // 2 optional items found
                string [] list4;
                list4 = sp.ListSplit(list3[1]);
                if (list4.Length < 1) { ok = false; break; }
                if ( list4[0] != "B:1" ) { ok = false; break; }
                LIMITID = sp.BinToInt(list4[1]);
                list4 = sp.ListSplit(list3[2]);
                if (list4.Length < 1) { ok = false; break; }
                if ( list4[0] != "B:1" ) { ok = false; break; }
                LIMITACK = sp.BinToInt(list4[1]);
                }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S2F47RVariable Limit Attribute Request Sent by Host Only

    // S2F47R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 2, 47, new SecsMsgReceiveDelegate(recv_S2F47R));

// receive method 
void recv_S2F47R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:m VID
        // variables for data items and parsing
        string VID;  	// A:n (varies)  A variable ID
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list0.Length; m++) {
            string [] list1;
            list1 = sp.ListSplit(list0[m]);
            if (list1.Length < 1) { ok = false; break; }
            if ( list1.Length == 2) { VID = list1[1];} else { VID = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(2, 48, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S2F47R

S2F48Variable Limit Attribute Send Sent by Equipment Only

    // S2F48 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(2, 47, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:m {L:2 VID {L:4* UNITS LIMITMIN LIMITMAX {L:n {L:3 LIMITID UPPERDB LOWERDB}}}}
        // variables for data items and parsing
        string VID;  	// A:n (varies)  A variable ID
        string UNITS;  	// A:n (always)  units identifier (see E5 Section 9)
        string LIMITMIN;  	// F4:1 (varies)  The minimum value allowed for the lower dead band limit
        string LIMITMAX;  	// F4:1 (varies)  The maximum value allowed for the upper dead band limit
        int LIMITID;  	// B:1 (always)  identifies a specific limit
        string UPPERDB;  	// F4:1 (varies)  the upper bound of a deadband limit
        string LOWERDB;  	// F4:1 (varies)  the lower bound of a deadband limit
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list0.Length; m++) {
            string [] list1;
            list1 = sp.ListSplit(list0[m]);
            if ( list1.Length != 3 ) { ok=false; break; }
            string [] list2;
            list2 = sp.ListSplit(list1[1]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { VID = list2[1];} else { VID = ""; }
            list2 = sp.ListSplit(list1[2]);
            if ( list2.Length == 5 ) {  // 4 optional items found
                string [] list3;
                list3 = sp.ListSplit(list2[1]);
                if (list3.Length < 1) { ok = false; break; }
                if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
                if ( list3.Length == 2) { UNITS = list3[1];} else { UNITS = ""; }
                list3 = sp.ListSplit(list2[2]);
                if (list3.Length < 1) { ok = false; break; }
                if ( list3.Length == 2) { LIMITMIN = list3[1];} else { LIMITMIN = ""; }
                list3 = sp.ListSplit(list2[3]);
                if (list3.Length < 1) { ok = false; break; }
                if ( list3.Length == 2) { LIMITMAX = list3[1];} else { LIMITMAX = ""; }
                list3 = sp.ListSplit(list2[4]);
                if ( list3.Length < 1) { ok=false; break; }
                int n;
                for(n=1; n < list3.Length; n++) {
                    string [] list4;
                    list4 = sp.ListSplit(list3[n]);
                    if ( list4.Length != 4 ) { ok=false; break; }
                    string [] list5;
                    list5 = sp.ListSplit(list4[1]);
                    if (list5.Length < 1) { ok = false; break; }
                    if ( list5[0] != "B:1" ) { ok = false; break; }
                    LIMITID = sp.BinToInt(list5[1]);
                    list5 = sp.ListSplit(list4[2]);
                    if (list5.Length < 1) { ok = false; break; }
                    if ( list5.Length == 2) { UPPERDB = list5[1];} else { UPPERDB = ""; }
                    list5 = sp.ListSplit(list4[3]);
                    if (list5.Length < 1) { ok = false; break; }
                    if ( list5.Length == 2) { LOWERDB = list5[1];} else { LOWERDB = ""; }
                    }
                if (!ok) break;
                }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S2F49REnhanced Remote Command Sent by Host Only

    // S2F49R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 2, 49, new SecsMsgReceiveDelegate(recv_S2F49R));

// receive method 
void recv_S2F49R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:4 DATAID OBJSPEC RCMD {L:m {L:2 CPNAME CEPVAL}}
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string OBJSPEC;  	// A:n (varies)  E39 structured text identifying an object, [object type:object id>]+
        string RCMD;  	// A:n (varies)  remote command, GEM requires a maximum length of 20 printable characters, taken from hex 21-7E (no spaces)
        string CPNAME;  	// A:n (varies)  command parameter name
        string CEPVAL;  	// A:n (varies)  an enhanced parameter value, may be a scalar of any type, a list of values of the same type, or a list of possibly nested {L:2 CPNAME CEPVAL}
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { OBJSPEC = list1[1];} else { OBJSPEC = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { RCMD = list1[1];} else { RCMD = ""; }
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list1.Length; m++) {
            string [] list2;
            list2 = sp.ListSplit(list1[m]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { CPNAME = list3[1];} else { CPNAME = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { CEPVAL = list3[1];} else { CEPVAL = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(2, 50, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S2F49R

S2F50Enhanced Remote Command Acknowledge Sent by Equipment Only

    // S2F50 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(2, 49, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 HCACK {L:n {L:2 CPNAME CEPACK}}
        // variables for data items and parsing
        int HCACK;  	// B:1 (always)  remote command acknowledge
        string CPNAME;  	// A:n (varies)  command parameter name
        int CEPACK;  	// B:1 (always)  command enhanced parameter acknowledge, may be a list or nested list structure to mirror the input structure of a CEPVAL
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        HCACK = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { CPNAME = list3[1];} else { CPNAME = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3[0] != "B:1" ) { ok = false; break; }
            CEPACK = sp.BinToInt(list3[1]);
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S3F1RMaterial Status Request Sent by Host Only

    // S3F1R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 3, 1, new SecsMsgReceiveDelegate(recv_S3F1R));

// receive method 
void recv_S3F1R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // no data expected
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(3, 2, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S3F1R

S3F2Material Status Data Sent by Equipment Only

    // S3F2 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(3, 1, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 MF {L:m {L:3 LOC QUA MID}} 
        // variables for data items and parsing
        string MF;  	// B:1 (varies)  material format code, ASCII indicates generic units, E40 restricts to B:1
        int LOC;  	// B:1 (always)  material location code
        int QUA;  	// B:1 (always)  quantity (format limits max to 255!)
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MF = list1[1];} else { MF = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list1.Length; m++) {
            string [] list2;
            list2 = sp.ListSplit(list1[m]);
            if ( list2.Length != 4 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3[0] != "B:1" ) { ok = false; break; }
            LOC = sp.BinToInt(list3[1]);
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3[0] != "B:1" ) { ok = false; break; }
            QUA = sp.BinToInt(list3[1]);
            list3 = sp.ListSplit(list2[3]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { MID = list3[1];} else { MID = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S3F3RTime to Completion Data Sent by Host Only

    // S3F3R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 3, 3, new SecsMsgReceiveDelegate(recv_S3F3R));

// receive method 
void recv_S3F3R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // no data expected
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(3, 4, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S3F3R

S3F4Time to Completion Data Sent by Equipment Only

    // S3F4 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(3, 3, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 MF {L:m {L:3 TTC QUA MID}}
        // variables for data items and parsing
        string MF;  	// B:1 (varies)  material format code, ASCII indicates generic units, E40 restricts to B:1
        string TTC;  	// U4:1 (varies)  time to completion, standard does not specify units, in seconds??
        int QUA;  	// B:1 (always)  quantity (format limits max to 255!)
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MF = list1[1];} else { MF = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list1.Length; m++) {
            string [] list2;
            list2 = sp.ListSplit(list1[m]);
            if ( list2.Length != 4 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { TTC = list3[1];} else { TTC = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3[0] != "B:1" ) { ok = false; break; }
            QUA = sp.BinToInt(list3[1]);
            list3 = sp.ListSplit(list2[3]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { MID = list3[1];} else { MID = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S3F5[R]Material Found Send Sent by Equipment Only

    // S3F5 C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 3, 5, new SecsMsgReceiveDelegate(recv_S3F5));

// receive method 
void recv_S3F5(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 MF QUA
        // variables for data items and parsing
        string MF;  	// B:1 (varies)  material format code, ASCII indicates generic units, E40 restricts to B:1
        int QUA;  	// B:1 (always)  quantity (format limits max to 255!)
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MF = list1[1];} else { MF = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        QUA = sp.BinToInt(list1[1]);
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(3, 6, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S3F5

S3F6Material Found Acknowledge Sent by Host Only

    // S3F6 C# Parse reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(3, 5, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect ACKC3
        // variables for data items and parsing
        int ACKC3;  	// B:1 (always)  acknowledge code, 0 ok 
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        ACKC3 = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S3F7[R]Material Lost Send Sent by Equipment Only

    // S3F7 C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 3, 7, new SecsMsgReceiveDelegate(recv_S3F7));

// receive method 
void recv_S3F7(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:3 MF QUA MID
        // variables for data items and parsing
        string MF;  	// B:1 (varies)  material format code, ASCII indicates generic units, E40 restricts to B:1
        int QUA;  	// B:1 (always)  quantity (format limits max to 255!)
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MF = list1[1];} else { MF = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        QUA = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MID = list1[1];} else { MID = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(3, 8, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S3F7

S3F8Material Lost Ack Sent by Host Only

    // S3F8 C# Parse reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(3, 7, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect ACKC3
        // variables for data items and parsing
        int ACKC3;  	// B:1 (always)  acknowledge code, 0 ok 
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        ACKC3 = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S3F9RMatl ID Equate Send Sent by Equipment Only

    // S3F9R C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 3, 9, new SecsMsgReceiveDelegate(recv_S3F9R));

// receive method 
void recv_S3F9R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 MID EMID
        // variables for data items and parsing
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        string EMID;  	// A:16 (varies)  equivalent material ID
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MID = list1[1];} else { MID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { EMID = list1[1];} else { EMID = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(3, 10, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S3F9R

S3F10Matl ID Equate Ack Sent by Host Only

    // S3F10 C# Parse reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(3, 9, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect ACKC3
        // variables for data items and parsing
        int ACKC3;  	// B:1 (always)  acknowledge code, 0 ok 
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        ACKC3 = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S3F11RMatl ID Request Sent by Equipment Only

    // S3F11R C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 3, 11, new SecsMsgReceiveDelegate(recv_S3F11R));

// receive method 
void recv_S3F11R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect PTN
        // variables for data items and parsing
        string PTN;  	// U1:1 (varies)  material port number, E87 shows type U1:1 with data 1-255
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0.Length == 2) { PTN = list0[1];} else { PTN = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(3, 12, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S3F11R

S3F12Matl ID Request Ack Sent by Host Only

    // S3F12 C# Parse reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(3, 11, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:3 PTN MIDRA MID
        // variables for data items and parsing
        string PTN;  	// U1:1 (varies)  material port number, E87 shows type U1:1 with data 1-255
        int MIDRA;  	// B:1 (always)  material ID Ack code
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { PTN = list1[1];} else { PTN = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        MIDRA = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MID = list1[1];} else { MID = ""; }
        return;  // parsed ok
        } // end while(ok)

S3F13RMatl ID Send Sent by Host Only

    // S3F13R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 3, 13, new SecsMsgReceiveDelegate(recv_S3F13R));

// receive method 
void recv_S3F13R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 PTN MID
        // variables for data items and parsing
        string PTN;  	// U1:1 (varies)  material port number, E87 shows type U1:1 with data 1-255
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { PTN = list1[1];} else { PTN = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MID = list1[1];} else { MID = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(3, 14, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S3F13R

S3F14Matl ID Ack Sent by Equipment Only

    // S3F14 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(3, 13, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect MIDAC
        // variables for data items and parsing
        int MIDAC;  	// B:1 (always)  material ID ack
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        MIDAC = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S3F15RMatls Multi-block Inquire Sent by Host Only

    // S3F15R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 3, 15, new SecsMsgReceiveDelegate(recv_S3F15R));

// receive method 
void recv_S3F15R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 DATAID DATALENGTH
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string DATALENGTH;  	// U4:1 (varies)  total bytes of the message body 
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATALENGTH = list1[1];} else { DATALENGTH = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(3, 16, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S3F15R

S3F16Matls Multi-block Grant Sent by Equipment Only

    // S3F16 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(3, 15, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect GRANT
        // variables for data items and parsing
        int GRANT;  	// B:1 (always)  multiblock grant code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        GRANT = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S3F17RCarrier Action Request Sent by Host Only

    // S3F17R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 3, 17, new SecsMsgReceiveDelegate(recv_S3F17R));

// receive method 
void recv_S3F17R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:5 DATAID CARRIERACTION CARRIERID PTN {L:n {L:2 CATTRID CATTRDATA}}
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string CARRIERACTION;  	// A:n (always)  carrier action request
        string CARRIERID;  	// A:n (always)  carrier ID
        string PTN;  	// U1:1 (varies)  material port number, E87 shows type U1:1 with data 1-255
        string CATTRID;  	// A:n (varies)  carrier attribute identifier, E87 requires text per E39.1, Sec 6
        string CATTRDATA;  	// A:n (varies)  carrier attribute value (any data type)
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 6 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { CARRIERACTION = list1[1];} else { CARRIERACTION = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { CARRIERID = list1[1];} else { CARRIERID = ""; }
        list1 = sp.ListSplit(list0[4]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { PTN = list1[1];} else { PTN = ""; }
        list1 = sp.ListSplit(list0[5]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { CATTRID = list3[1];} else { CATTRID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { CATTRDATA = list3[1];} else { CATTRDATA = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(3, 18, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S3F17R

S3F18Carrier Action Ack Sent by Equipment Only

    // S3F18 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(3, 17, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 CAACK {L:n {L:2 ERRCODE ERRTEXT}}
        // variables for data items and parsing
        uint CAACK;  	// U1:1 (always)  carrier action acknowledge 
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        CAACK = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ERRCODE = list3[1];} else { ERRCODE = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { ERRTEXT = list3[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S3F19RCancel All Carrier Out Req Sent by Host Only

    // S3F19R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 3, 19, new SecsMsgReceiveDelegate(recv_S3F19R));

// receive method 
void recv_S3F19R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // no data expected
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(3, 20, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S3F19R

S3F20Cancel All Carrier Out Ack Sent by Equipment Only

    // S3F20 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(3, 19, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 CAACK {L:n {L:2 ERRCODE ERRTEXT}}
        // variables for data items and parsing
        uint CAACK;  	// U1:1 (always)  carrier action acknowledge 
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        CAACK = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ERRCODE = list3[1];} else { ERRCODE = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { ERRTEXT = list3[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S3F21RPort Group Defn Sent by Host Only

    // S3F21R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 3, 21, new SecsMsgReceiveDelegate(recv_S3F21R));

// receive method 
void recv_S3F21R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:3 PORTGRPNAME ACCESSMODE {L:n PTN}
        // variables for data items and parsing
        string PORTGRPNAME;  	// A:n (always)  name of a group of ports
        uint ACCESSMODE;  	// U1:1 (always)  load port access mode
        string PTN;  	// U1:1 (varies)  material port number, E87 shows type U1:1 with data 1-255
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { PORTGRPNAME = list1[1];} else { PORTGRPNAME = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        ACCESSMODE = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { PTN = list2[1];} else { PTN = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(3, 22, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S3F21R

S3F22Port Group Defn Ack Sent by Equipment Only

    // S3F22 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(3, 21, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 CAACK {L:n {L:2 ERRCODE ERRTEXT}}
        // variables for data items and parsing
        uint CAACK;  	// U1:1 (always)  carrier action acknowledge 
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        CAACK = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ERRCODE = list3[1];} else { ERRCODE = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { ERRTEXT = list3[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S3F23RPort Group Action Req Sent by Host Only

    // S3F23R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 3, 23, new SecsMsgReceiveDelegate(recv_S3F23R));

// receive method 
void recv_S3F23R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:3 PGRPACTION PORTGRPNAME {L:m {L:2 PARAMNAME PARAMVAL}}
        // variables for data items and parsing
        string PGRPACTION;  	// A:n (always)  port group command
        string PORTGRPNAME;  	// A:n (always)  name of a group of ports
        string PARAMNAME;  	// A:n (always)  argument name
        string PARAMVAL;  	// A:n (varies)  argument value, can be a list of single type
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { PGRPACTION = list1[1];} else { PGRPACTION = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { PORTGRPNAME = list1[1];} else { PORTGRPNAME = ""; }
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list1.Length; m++) {
            string [] list2;
            list2 = sp.ListSplit(list1[m]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { PARAMNAME = list3[1];} else { PARAMNAME = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { PARAMVAL = list3[1];} else { PARAMVAL = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(3, 24, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S3F23R

S3F24Port Group Action Ack Sent by Equipment Only

    // S3F24 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(3, 23, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 CAACK {L:n {L:2 ERRCODE ERRTEXT}}
        // variables for data items and parsing
        uint CAACK;  	// U1:1 (always)  carrier action acknowledge 
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        CAACK = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ERRCODE = list3[1];} else { ERRCODE = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { ERRTEXT = list3[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S3F25RPort Action Req Sent by Host Only

    // S3F25R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 3, 25, new SecsMsgReceiveDelegate(recv_S3F25R));

// receive method 
void recv_S3F25R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:3 PORTACTION PTN {L:m {L:2 PARAMNAME PARAMVAL}}
        // variables for data items and parsing
        string PORTACTION;  	// A:n (always)  action command for a port
        string PTN;  	// U1:1 (varies)  material port number, E87 shows type U1:1 with data 1-255
        string PARAMNAME;  	// A:n (always)  argument name
        string PARAMVAL;  	// A:n (varies)  argument value, can be a list of single type
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { PORTACTION = list1[1];} else { PORTACTION = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { PTN = list1[1];} else { PTN = ""; }
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list1.Length; m++) {
            string [] list2;
            list2 = sp.ListSplit(list1[m]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { PARAMNAME = list3[1];} else { PARAMNAME = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { PARAMVAL = list3[1];} else { PARAMVAL = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(3, 26, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S3F25R

S3F26Port Action Ack Sent by Equipment Only

    // S3F26 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(3, 25, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 CAACK {L:n {L:2 ERRCODE ERRTEXT}}
        // variables for data items and parsing
        uint CAACK;  	// U1:1 (always)  carrier action acknowledge 
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        CAACK = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ERRCODE = list3[1];} else { ERRCODE = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { ERRTEXT = list3[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S3F27RChange Access Sent by Host Only

    // S3F27R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 3, 27, new SecsMsgReceiveDelegate(recv_S3F27R));

// receive method 
void recv_S3F27R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 ACCESSMODE {L:n PTN}
        // variables for data items and parsing
        uint ACCESSMODE;  	// U1:1 (always)  load port access mode
        string PTN;  	// U1:1 (varies)  material port number, E87 shows type U1:1 with data 1-255
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        ACCESSMODE = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { PTN = list2[1];} else { PTN = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(3, 28, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S3F27R

S3F28Change Access Ack Sent by Equipment Only

    // S3F28 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(3, 27, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 CAACK {L:n {L:3 PTN ERRCODE ERRTEXT}}
        // variables for data items and parsing
        uint CAACK;  	// U1:1 (always)  carrier action acknowledge 
        string PTN;  	// U1:1 (varies)  material port number, E87 shows type U1:1 with data 1-255
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        CAACK = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 4 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { PTN = list3[1];} else { PTN = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ERRCODE = list3[1];} else { ERRCODE = ""; }
            list3 = sp.ListSplit(list2[3]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { ERRTEXT = list3[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S3F29RCarrier Tag Read Req Sent by Host Only

    // S3F29R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 3, 29, new SecsMsgReceiveDelegate(recv_S3F29R));

// receive method 
void recv_S3F29R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:4 LOCID CARRIERSPEC DATASEG DATALENGTH
        // variables for data items and parsing
        string LOCID;  	// A:n (varies)  logical ID of carrier location, E87 requires text
        string CARRIERSPEC;  	// A:n (always)  carrier object specifier (OBJSPEC)
        string DATASEG;  	// A:n (varies)  identifies data requested, E87 requires text
        string DATALENGTH;  	// U4:1 (varies)  total bytes of the message body 
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { LOCID = list1[1];} else { LOCID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { CARRIERSPEC = list1[1];} else { CARRIERSPEC = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATASEG = list1[1];} else { DATASEG = ""; }
        list1 = sp.ListSplit(list0[4]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATALENGTH = list1[1];} else { DATALENGTH = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(3, 30, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S3F29R

S3F30Carrier Tag Read Data Sent by Equipment Only

    // S3F30 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(3, 29, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 DATA {L:2 CAACK {L:s {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        string DATA;  	// A:n (varies)  unformatted data
        uint CAACK;  	// U1:1 (always)  carrier action acknowledge 
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATA = list1[1];} else { DATA = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "U1:1" ) { ok = false; break; }
        CAACK = uint.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int s;
        for(s=1; s < list2.Length; s++) {
            string [] list3;
            list3 = sp.ListSplit(list2[s]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S3F31RCarrier Tag Write Data Sent by Host Only

    // S3F31R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 3, 31, new SecsMsgReceiveDelegate(recv_S3F31R));

// receive method 
void recv_S3F31R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:5 LOCID CARRIERSPEC DATASEG DATALENGTH DATA
        // variables for data items and parsing
        string LOCID;  	// A:n (varies)  logical ID of carrier location, E87 requires text
        string CARRIERSPEC;  	// A:n (always)  carrier object specifier (OBJSPEC)
        string DATASEG;  	// A:n (varies)  identifies data requested, E87 requires text
        string DATALENGTH;  	// U4:1 (varies)  total bytes of the message body 
        string DATA;  	// A:n (varies)  unformatted data
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 6 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { LOCID = list1[1];} else { LOCID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { CARRIERSPEC = list1[1];} else { CARRIERSPEC = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATASEG = list1[1];} else { DATASEG = ""; }
        list1 = sp.ListSplit(list0[4]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATALENGTH = list1[1];} else { DATALENGTH = ""; }
        list1 = sp.ListSplit(list0[5]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATA = list1[1];} else { DATA = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(3, 32, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S3F31R

S3F32Carrier Tag Write Ack Sent by Equipment Only

    // S3F32 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(3, 31, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 CAACK {L:s {L:2 ERRCODE ERRTEXT}}
        // variables for data items and parsing
        uint CAACK;  	// U1:1 (always)  carrier action acknowledge 
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        CAACK = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int s;
        for(s=1; s < list1.Length; s++) {
            string [] list2;
            list2 = sp.ListSplit(list1[s]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ERRCODE = list3[1];} else { ERRCODE = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { ERRTEXT = list3[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S3F33Cancel All Pod Out Req Sent by Host and Equipment

    // S3F33 C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 3, 33, new SecsMsgReceiveDelegate(recv_S3F33));

// receive method 
void recv_S3F33(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // no data expected
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(3, 34, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S3F33

S3F34Cancel All Pod Out Ack Sent by Host and Equipment

    // S3F34 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(3, 33, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 CAACK {L:n {L:2 ERRCODE ERRTEXT}}
        // variables for data items and parsing
        uint CAACK;  	// U1:1 (always)  carrier action acknowledge 
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        CAACK = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ERRCODE = list3[1];} else { ERRCODE = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { ERRTEXT = list3[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S3F35Reticle Transfer Job Req Sent by Host and Equipment

    // S3F35 C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 3, 35, new SecsMsgReceiveDelegate(recv_S3F35));

// receive method 
void recv_S3F35(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:7 JOBACTION PODID INPTN OUTPTN {L:n {L:2 ATTRID ATTRDATA}} {L:m {L:3 RETICLEID RETREMOVEINSTR {L:r {L:2 ATTRID ATTRDATA}}}} {L:k {L:2 RETICLEID2 RETPLACEINSTR}}
        // variables for data items and parsing
        string JOBACTION;  	// A:n (always)  reticle transfer command
        string PODID;  	// A:n (always)  OBJSPEC for a Pod instance
        int INPTN;  	// B:1 (always)  input material port number
        string OUTPTN;  	// B:1 (varies)  output port (PTN)
        string ATTRID;  	// A:40 (varies)  identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~.  Does not begin or end with space.
        string ATTRDATA;  	// A:n (varies)  a specific attribute value of any data type
        string RETICLEID;  	// A:n (always)  OBJSPEC value for a reticle
        uint RETREMOVEINSTR;  	// U1:1 (always)  pod slot reticle remove instruction
        string ATTRID;  	// A:40 (varies)  identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~.  Does not begin or end with space.
        string ATTRDATA;  	// A:n (varies)  a specific attribute value of any data type
        string RETICLEID2;  	// A:n (always)  OBJSPEC value for a second reticle
        uint RETPLACEINSTR;  	// U1:1 (always)  pod slot reticle place instruction
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 8 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { JOBACTION = list1[1];} else { JOBACTION = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { PODID = list1[1];} else { PODID = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        INPTN = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[4]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { OUTPTN = list1[1];} else { OUTPTN = ""; }
        list1 = sp.ListSplit(list0[5]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ATTRID = list3[1];} else { ATTRID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ATTRDATA = list3[1];} else { ATTRDATA = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[6]);
        if ( list1.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list1.Length; m++) {
            string [] list2;
            list2 = sp.ListSplit(list1[m]);
            if ( list2.Length != 4 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { RETICLEID = list3[1];} else { RETICLEID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3[0] != "U1:1" ) { ok = false; break; }
            RETREMOVEINSTR = uint.Parse(list3[1]);
            list3 = sp.ListSplit(list2[3]);
            if ( list3.Length < 1) { ok=false; break; }
            int r;
            for(r=1; r < list3.Length; r++) {
                string [] list4;
                list4 = sp.ListSplit(list3[r]);
                if ( list4.Length != 3 ) { ok=false; break; }
                string [] list5;
                list5 = sp.ListSplit(list4[1]);
                if (list5.Length < 1) { ok = false; break; }
                if ( list5.Length == 2) { ATTRID = list5[1];} else { ATTRID = ""; }
                list5 = sp.ListSplit(list4[2]);
                if (list5.Length < 1) { ok = false; break; }
                if ( list5.Length == 2) { ATTRDATA = list5[1];} else { ATTRDATA = ""; }
                }
            if (!ok) break;
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[7]);
        if ( list1.Length < 1) { ok=false; break; }
        int k;
        for(k=1; k < list1.Length; k++) {
            string [] list2;
            list2 = sp.ListSplit(list1[k]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { RETICLEID2 = list3[1];} else { RETICLEID2 = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3[0] != "U1:1" ) { ok = false; break; }
            RETPLACEINSTR = uint.Parse(list3[1]);
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(3, 36, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S3F35

S3F36Reticle Transfer Job Ack Sent by Host and Equipment

    // S3F36 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(3, 35, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 RPMACK {L:n {L:2 ERRCODE ERRTEXT}}
        // variables for data items and parsing
        uint RPMACK;  	// U1:1 (always)  reticle pod management ack code
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        RPMACK = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ERRCODE = list3[1];} else { ERRCODE = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { ERRTEXT = list3[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S4F1RReady to Send Materials Sent by Host and Equipment

    // S4F1R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 4, 1, new SecsMsgReceiveDelegate(recv_S4F1R));

// receive method 
void recv_S4F1R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 PTN MID
        // variables for data items and parsing
        string PTN;  	// U1:1 (varies)  material port number, E87 shows type U1:1 with data 1-255
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { PTN = list1[1];} else { PTN = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MID = list1[1];} else { MID = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(4, 2, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S4F1R

S4F2Ready to Send Ack Sent by Host and Equipment

    // S4F2 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(4, 1, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect RSACK
        // variables for data items and parsing
        int RSACK;  	// B:1 (always)  ready to send acknowledge
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        RSACK = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S4F3Send Material Sent by Host and Equipment

    // S4F3 C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 4, 3, new SecsMsgReceiveDelegate(recv_S4F3));

// receive method 
void recv_S4F3(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 PTN MID
        // variables for data items and parsing
        string PTN;  	// U1:1 (varies)  material port number, E87 shows type U1:1 with data 1-255
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { PTN = list1[1];} else { PTN = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MID = list1[1];} else { MID = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(4, 4, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S4F3

S4F5Handshake Complete Sent by Host and Equipment

    // S4F5 C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 4, 5, new SecsMsgReceiveDelegate(recv_S4F5));

// receive method 
void recv_S4F5(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 PTN MID
        // variables for data items and parsing
        string PTN;  	// U1:1 (varies)  material port number, E87 shows type U1:1 with data 1-255
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { PTN = list1[1];} else { PTN = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MID = list1[1];} else { MID = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(4, 6, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S4F5

S4F7Not Ready to Send Sent by Host and Equipment

    // S4F7 C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 4, 7, new SecsMsgReceiveDelegate(recv_S4F7));

// receive method 
void recv_S4F7(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 PTN MID
        // variables for data items and parsing
        string PTN;  	// U1:1 (varies)  material port number, E87 shows type U1:1 with data 1-255
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { PTN = list1[1];} else { PTN = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MID = list1[1];} else { MID = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(4, 8, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S4F7

S4F9Stuck in Sender Sent by Host and Equipment

    // S4F9 C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 4, 9, new SecsMsgReceiveDelegate(recv_S4F9));

// receive method 
void recv_S4F9(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 PTN MID
        // variables for data items and parsing
        string PTN;  	// U1:1 (varies)  material port number, E87 shows type U1:1 with data 1-255
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { PTN = list1[1];} else { PTN = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MID = list1[1];} else { MID = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(4, 10, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S4F9

S4F11Stuck in Receiver Sent by Host and Equipment

    // S4F11 C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 4, 11, new SecsMsgReceiveDelegate(recv_S4F11));

// receive method 
void recv_S4F11(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 PTN MID
        // variables for data items and parsing
        string PTN;  	// U1:1 (varies)  material port number, E87 shows type U1:1 with data 1-255
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { PTN = list1[1];} else { PTN = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MID = list1[1];} else { MID = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(4, 12, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S4F11

S4F13Send Incomplete Timeout Sent by Host and Equipment

    // S4F13 C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 4, 13, new SecsMsgReceiveDelegate(recv_S4F13));

// receive method 
void recv_S4F13(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 PTN MID
        // variables for data items and parsing
        string PTN;  	// U1:1 (varies)  material port number, E87 shows type U1:1 with data 1-255
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { PTN = list1[1];} else { PTN = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MID = list1[1];} else { MID = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(4, 14, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S4F13

S4F15Material Received Sent by Host and Equipment

    // S4F15 C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 4, 15, new SecsMsgReceiveDelegate(recv_S4F15));

// receive method 
void recv_S4F15(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 PTN MID
        // variables for data items and parsing
        string PTN;  	// U1:1 (varies)  material port number, E87 shows type U1:1 with data 1-255
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { PTN = list1[1];} else { PTN = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MID = list1[1];} else { MID = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(4, 16, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S4F15

S4F17RRequest to Receive Sent by Host and Equipment

    // S4F17R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 4, 17, new SecsMsgReceiveDelegate(recv_S4F17R));

// receive method 
void recv_S4F17R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 PTN MID
        // variables for data items and parsing
        string PTN;  	// U1:1 (varies)  material port number, E87 shows type U1:1 with data 1-255
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { PTN = list1[1];} else { PTN = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MID = list1[1];} else { MID = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(4, 18, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S4F17R

S4F18Request to Receive Ack Sent by Host and Equipment

    // S4F18 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(4, 17, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect RRACK
        // variables for data items and parsing
        int RRACK;  	// B:1 (always)  request to receive acknowledge
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        RRACK = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S4F19RTransfer Job Create Sent by Host Only

    // S4F19R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 4, 19, new SecsMsgReceiveDelegate(recv_S4F19R));

// receive method 
void recv_S4F19R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 DATAID {L:2 TRJOBNAME {L:n {L:12 TRLINK TRPORT TROBJNAME TROBJTYPE TRROLE TRRCP TRPTNR TRPTPORT TRDIR TRTYPE TRLOCATION TRAUTOSTART}}}
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string TRJOBNAME;  	// A:80 (always)  host assigned id for transfer job
        string TRLINK;  	// U4:1 (varies)  task identifier correlation value
        string TRPORT;  	// U4:1 (varies)  port identifier
        string TROBJNAME;  	// A:n (varies)  identifies material to be transferred
        string TROBJTYPE;  	// U4:1 (varies)  identifies type of object to be transferred
        uint TRROLE;  	// U1:1 (always)  indicates equipment transfer role
        string TRRCP;  	// A:80 (always)  name of transfer recipe for this handoff
        string TRPTNR;  	// A:n (always)  EQNAME of transfer partner equipment
        string TRPTPORT;  	// U4:1 (varies)  transfer partner port
        uint TRDIR;  	// U1:1 (always)  transfer direction
        uint TRTYPE;  	// U1:1 (always)  equipment is active or passive transfer participant
        string TRLOCATION;  	// U4:1 (varies)  material transfer location
        int TRAUTOSTART;  	// TF:1 (always)  if true material transfer is initiated by the primary when ready
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
        if ( list2.Length == 2) { TRJOBNAME = list2[1];} else { TRJOBNAME = ""; }
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list2.Length; n++) {
            string [] list3;
            list3 = sp.ListSplit(list2[n]);
            if ( list3.Length != 13 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { TRLINK = list4[1];} else { TRLINK = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { TRPORT = list4[1];} else { TRPORT = ""; }
            list4 = sp.ListSplit(list3[3]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { TROBJNAME = list4[1];} else { TROBJNAME = ""; }
            list4 = sp.ListSplit(list3[4]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { TROBJTYPE = list4[1];} else { TROBJTYPE = ""; }
            list4 = sp.ListSplit(list3[5]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4[0] != "U1:1" ) { ok = false; break; }
            TRROLE = uint.Parse(list4[1]);
            list4 = sp.ListSplit(list3[6]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { TRRCP = list4[1];} else { TRRCP = ""; }
            list4 = sp.ListSplit(list3[7]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { TRPTNR = list4[1];} else { TRPTNR = ""; }
            list4 = sp.ListSplit(list3[8]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { TRPTPORT = list4[1];} else { TRPTPORT = ""; }
            list4 = sp.ListSplit(list3[9]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4[0] != "U1:1" ) { ok = false; break; }
            TRDIR = uint.Parse(list4[1]);
            list4 = sp.ListSplit(list3[10]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4[0] != "U1:1" ) { ok = false; break; }
            TRTYPE = uint.Parse(list4[1]);
            list4 = sp.ListSplit(list3[11]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { TRLOCATION = list4[1];} else { TRLOCATION = ""; }
            list4 = sp.ListSplit(list3[12]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4[0] != "TF:1" ) { ok = false; break; }
            TRAUTOSTART = int.Parse(list4[1]);
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(4, 20, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S4F19R

S4F20Transfer Job Acknowledge Sent by Equipment Only

    // S4F20 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(4, 19, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:3 TRJOBID {L:m TRATOMCID} {L:2 TRACK {L:n {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        int TRJOBID;  	// B:1 (always)  assigned identifier for transfer job
        string TRATOMCID;  	// U4:1 (varies)  assigned identifier for atomic transfer
        int TRACK;  	// TF:1 (always)  transfer activity success flag
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        TRJOBID = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list1.Length; m++) {
            string [] list2;
            list2 = sp.ListSplit(list1[m]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { TRATOMCID = list2[1];} else { TRATOMCID = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "TF:1" ) { ok = false; break; }
        TRACK = int.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list2.Length; n++) {
            string [] list3;
            list3 = sp.ListSplit(list2[n]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S4F21RTransfer Job Command Sent by Host Only

    // S4F21R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 4, 21, new SecsMsgReceiveDelegate(recv_S4F21R));

// receive method 
void recv_S4F21R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:3 TRJOBID TRCMDNAME {L:n {L:2 CPNAME CPVAL}}
        // variables for data items and parsing
        int TRJOBID;  	// B:1 (always)  assigned identifier for transfer job
        string TRCMDNAME;  	// A:n (always)  text enum, CANCEL, PAUSE, RESUME, ABORT, STOP, STARTHANDOFF
        string CPNAME;  	// A:n (varies)  command parameter name
        string CPVAL;  	// A:n (varies)  command parameter value, any scalar type
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        TRJOBID = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { TRCMDNAME = list1[1];} else { TRCMDNAME = ""; }
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { CPNAME = list3[1];} else { CPNAME = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { CPVAL = list3[1];} else { CPVAL = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(4, 22, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S4F21R

S4F22Transfer Job Command Ack Sent by Equipment Only

    // S4F22 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(4, 21, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 TRACK {L:n {L:2 ERRCODE ERRTEXT}}
        // variables for data items and parsing
        int TRACK;  	// TF:1 (always)  transfer activity success flag
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "TF:1" ) { ok = false; break; }
        TRACK = int.Parse(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ERRCODE = list3[1];} else { ERRCODE = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { ERRTEXT = list3[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S4F23[R]Transfer Command Alert Sent by Equipment Only

    // S4F23 C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 4, 23, new SecsMsgReceiveDelegate(recv_S4F23));

// receive method 
void recv_S4F23(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:4 TRJOBID TRJOBNAME TRJOBMS {L:2 TRACK {L:n {L:2 ERRCODE  ERRTEXT}}}
        // variables for data items and parsing
        int TRJOBID;  	// B:1 (always)  assigned identifier for transfer job
        string TRJOBNAME;  	// A:80 (always)  host assigned id for transfer job
        uint TRJOBMS;  	// U1:1 (always)  transfer job milestone
        int TRACK;  	// TF:1 (always)  transfer activity success flag
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        TRJOBID = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { TRJOBNAME = list1[1];} else { TRJOBNAME = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        TRJOBMS = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "TF:1" ) { ok = false; break; }
        TRACK = int.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list2.Length; n++) {
            string [] list3;
            list3 = sp.ListSplit(list2[n]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(4, 24, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S4F23

S4F24Transfer Alert Ack Sent by Host Only

    // S4F24 C# Parse reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(4, 23, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // no data expected
        return;  // parsed ok
        } // end while(ok)

S4F25RMulti-block Inquire Sent by Host Only

    // S4F25R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 4, 25, new SecsMsgReceiveDelegate(recv_S4F25R));

// receive method 
void recv_S4F25R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 DATAID DATALENGTH
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string DATALENGTH;  	// U4:1 (varies)  total bytes of the message body 
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATALENGTH = list1[1];} else { DATALENGTH = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(4, 26, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S4F25R

S4F26Multi-block Grant Sent by Equipment Only

    // S4F26 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(4, 25, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect GRANT
        // variables for data items and parsing
        int GRANT;  	// B:1 (always)  multiblock grant code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        GRANT = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S4F27Handoff Ready Sent by Host and Equipment

    // S4F27 C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 4, 27, new SecsMsgReceiveDelegate(recv_S4F27));

// receive method 
void recv_S4F27(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 EQNAME {L:11 TRLINK TRPORT TROBJNAME TROBJTYPE TRROLE TRPTNR TRPTPORT TRDIR TRTYPE TRLOCATION}
        // variables for data items and parsing
        string EQNAME;  	// A:80 (always)  factory assigned equipment identifier
        string TRLINK;  	// U4:1 (varies)  task identifier correlation value
        string TRPORT;  	// U4:1 (varies)  port identifier
        string TROBJNAME;  	// A:n (varies)  identifies material to be transferred
        string TROBJTYPE;  	// U4:1 (varies)  identifies type of object to be transferred
        uint TRROLE;  	// U1:1 (always)  indicates equipment transfer role
        string TRPTNR;  	// A:n (always)  EQNAME of transfer partner equipment
        string TRPTPORT;  	// U4:1 (varies)  transfer partner port
        uint TRDIR;  	// U1:1 (always)  transfer direction
        uint TRTYPE;  	// U1:1 (always)  equipment is active or passive transfer participant
        string TRLOCATION;  	// U4:1 (varies)  material transfer location
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { EQNAME = list1[1];} else { EQNAME = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length != 12 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2.Length == 2) { TRLINK = list2[1];} else { TRLINK = ""; }
        list2 = sp.ListSplit(list1[2]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2.Length == 2) { TRPORT = list2[1];} else { TRPORT = ""; }
        list2 = sp.ListSplit(list1[3]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2.Length == 2) { TROBJNAME = list2[1];} else { TROBJNAME = ""; }
        list2 = sp.ListSplit(list1[4]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2.Length == 2) { TROBJTYPE = list2[1];} else { TROBJTYPE = ""; }
        list2 = sp.ListSplit(list1[5]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "U1:1" ) { ok = false; break; }
        TRROLE = uint.Parse(list2[1]);
        list2 = sp.ListSplit(list1[6]);
        if (list2.Length < 1) { ok = false; break; }
        if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
        if ( list2.Length == 2) { TRPTNR = list2[1];} else { TRPTNR = ""; }
        list2 = sp.ListSplit(list1[7]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2.Length == 2) { TRPTPORT = list2[1];} else { TRPTPORT = ""; }
        list2 = sp.ListSplit(list1[8]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "U1:1" ) { ok = false; break; }
        TRDIR = uint.Parse(list2[1]);
        list2 = sp.ListSplit(list1[9]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "U1:1" ) { ok = false; break; }
        TRTYPE = uint.Parse(list2[1]);
        list2 = sp.ListSplit(list1[10]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2.Length == 2) { TRLOCATION = list2[1];} else { TRLOCATION = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(4, 28, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S4F27

S4F29Handoff Command Sent by Host and Equipment

    // S4F29 C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 4, 29, new SecsMsgReceiveDelegate(recv_S4F29));

// receive method 
void recv_S4F29(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:4 TRLINK MCINDEX HOCMDNAME {L:n {L:2 CPNAME CPVAL}}
        // variables for data items and parsing
        string TRLINK;  	// U4:1 (varies)  task identifier correlation value
        string MCINDEX;  	// U4:1 (varies)  correlation value for handoff command 
        string HOCMDNAME;  	// A:n (varies)  handoff command identifier
        string CPNAME;  	// A:n (varies)  command parameter name
        string CPVAL;  	// A:n (varies)  command parameter value, any scalar type
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { TRLINK = list1[1];} else { TRLINK = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MCINDEX = list1[1];} else { MCINDEX = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { HOCMDNAME = list1[1];} else { HOCMDNAME = ""; }
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { CPNAME = list3[1];} else { CPNAME = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { CPVAL = list3[1];} else { CPVAL = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(4, 30, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S4F29

S4F31Handoff Command Complete Sent by Host and Equipment

    // S4F31 C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 4, 31, new SecsMsgReceiveDelegate(recv_S4F31));

// receive method 
void recv_S4F31(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:3 TRLINK MCINDEX {L:2 HOACK {L:n {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        string TRLINK;  	// U4:1 (varies)  task identifier correlation value
        string MCINDEX;  	// U4:1 (varies)  correlation value for handoff command 
        int HOACK;  	// TF:1 (always)  handoff success flag
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { TRLINK = list1[1];} else { TRLINK = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MCINDEX = list1[1];} else { MCINDEX = ""; }
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "TF:1" ) { ok = false; break; }
        HOACK = int.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list2.Length; n++) {
            string [] list3;
            list3 = sp.ListSplit(list2[n]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(4, 32, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S4F31

S4F33Handoff Verified Sent by Host and Equipment

    // S4F33 C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 4, 33, new SecsMsgReceiveDelegate(recv_S4F33));

// receive method 
void recv_S4F33(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 TRLINK {L:2 HOACK {L:n ERRCODE ERRTEXT}} 
        // variables for data items and parsing
        string TRLINK;  	// U4:1 (varies)  task identifier correlation value
        int HOACK;  	// TF:1 (always)  handoff success flag
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { TRLINK = list1[1];} else { TRLINK = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "TF:1" ) { ok = false; break; }
        HOACK = int.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list2.Length; n++) {
            string [] list3;
            list3 = sp.ListSplit(list2[n]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ERRCODE = list3[1];} else { ERRCODE = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(4, 34, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S4F33

S4F35Handoff Cancel Ready Sent by Host and Equipment

    // S4F35 C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 4, 35, new SecsMsgReceiveDelegate(recv_S4F35));

// receive method 
void recv_S4F35(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect TRLINK
        // variables for data items and parsing
        string TRLINK;  	// U4:1 (varies)  task identifier correlation value
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0.Length == 2) { TRLINK = list0[1];} else { TRLINK = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(4, 36, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S4F35

S4F37Handoff Cancel Ready Ack Sent by Host and Equipment

    // S4F37 C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 4, 37, new SecsMsgReceiveDelegate(recv_S4F37));

// receive method 
void recv_S4F37(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 TRLINK HOCANCELACK
        // variables for data items and parsing
        string TRLINK;  	// U4:1 (varies)  task identifier correlation value
        uint HOCANCELACK;  	// U1:1 (always)  hand off cancel ack
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { TRLINK = list1[1];} else { TRLINK = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        HOCANCELACK = uint.Parse(list1[1]);
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(4, 38, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S4F37

S4F39Handoff Halt Sent by Host and Equipment

    // S4F39 C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 4, 39, new SecsMsgReceiveDelegate(recv_S4F39));

// receive method 
void recv_S4F39(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect TRLINK
        // variables for data items and parsing
        string TRLINK;  	// U4:1 (varies)  task identifier correlation value
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0.Length == 2) { TRLINK = list0[1];} else { TRLINK = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(4, 40, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S4F39

S4F41Handoff Halt Ack Sent by Host and Equipment

    // S4F41 C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 4, 41, new SecsMsgReceiveDelegate(recv_S4F41));

// receive method 
void recv_S4F41(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 TRLINK HOHALTACK
        // variables for data items and parsing
        string TRLINK;  	// U4:1 (varies)  task identifier correlation value
        uint HOHALTACK;  	// U1:1 (always)  hand off halt ack
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { TRLINK = list1[1];} else { TRLINK = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        HOHALTACK = uint.Parse(list1[1]);
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(4, 42, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S4F41

S5F1[R]Alarm Report Send Sent by Equipment Only

    // S5F1 C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 5, 1, new SecsMsgReceiveDelegate(recv_S5F1));

// receive method 
void recv_S5F1(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:3 ALCD ALID ALTX
        // variables for data items and parsing
        int ALCD;  	// B:1 (always)  alarm code byte, >= 128 alarm is set, bit field use is deprecated
        string ALID;  	// U4:1 (varies)  Alarm type ID
        string ALTX;  	// A:120 (always)  alarm text, the length limit was recently raised from 40
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        ALCD = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { ALID = list1[1];} else { ALID = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { ALTX = list1[1];} else { ALTX = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(5, 2, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S5F1

S5F2Alarm Report Ack Sent by Host Only

    // S5F2 C# Parse reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(5, 1, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect ACKC5
        // variables for data items and parsing
        int ACKC5;  	// B:1 (always)  acknowledge code, 0 ok
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        ACKC5 = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S5F3[R]Enable/Disable Alarm Send Sent by Host Only

    // S5F3 C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 5, 3, new SecsMsgReceiveDelegate(recv_S5F3));

// receive method 
void recv_S5F3(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 ALED ALID
        // variables for data items and parsing
        int ALED;  	// B:1 (always)  enable/disable alarm, 128 means enable, 0 disable
        string ALID;  	// U4:1 (varies)  Alarm type ID
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        ALED = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { ALID = list1[1];} else { ALID = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(5, 4, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S5F3

S5F4Enable/Disable Alarm Ack Sent by Equipment Only

    // S5F4 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(5, 3, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect ACKC5
        // variables for data items and parsing
        int ACKC5;  	// B:1 (always)  acknowledge code, 0 ok
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        ACKC5 = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S5F5RList Alarms Request Sent by Host Only

    // S5F5R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 5, 5, new SecsMsgReceiveDelegate(recv_S5F5R));

// receive method 
void recv_S5F5R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect ALIDVECTOR
        // variables for data items and parsing
        uint [] ALIDVECTOR;  	// U4:n (varies)  alarm ID vector
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        ALIDVECTOR = new uint[list0.Length-1];
        for(int i=0; i < ALIDVECTOR.Length; i++) {
            ALIDVECTOR[i] = uint.Parse(list0[1+i]);
            }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(5, 6, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S5F5R

S5F6List Alarm Data Sent by Equipment Only

    // S5F6 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(5, 5, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:n {L:3 ALCD ALID ALTX}
        // variables for data items and parsing
        int ALCD;  	// B:1 (always)  alarm code byte, >= 128 alarm is set, bit field use is deprecated
        string ALID;  	// U4:1 (varies)  Alarm type ID
        string ALTX;  	// A:120 (always)  alarm text, the length limit was recently raised from 40
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list0.Length; n++) {
            string [] list1;
            list1 = sp.ListSplit(list0[n]);
            if ( list1.Length != 4 ) { ok=false; break; }
            string [] list2;
            list2 = sp.ListSplit(list1[1]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2[0] != "B:1" ) { ok = false; break; }
            ALCD = sp.BinToInt(list2[1]);
            list2 = sp.ListSplit(list1[2]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { ALID = list2[1];} else { ALID = ""; }
            list2 = sp.ListSplit(list1[3]);
            if (list2.Length < 1) { ok = false; break; }
            if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
            if ( list2.Length == 2) { ALTX = list2[1];} else { ALTX = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S5F7RList Enabled Alarm Request Sent by Host Only

    // S5F7R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 5, 7, new SecsMsgReceiveDelegate(recv_S5F7R));

// receive method 
void recv_S5F7R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // no data expected
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(5, 8, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S5F7R

S5F8List Enabled Alarm Data Sent by Equipment Only

    // S5F8 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(5, 7, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:n {L:3 ALCD ALID ALTX}
        // variables for data items and parsing
        int ALCD;  	// B:1 (always)  alarm code byte, >= 128 alarm is set, bit field use is deprecated
        string ALID;  	// U4:1 (varies)  Alarm type ID
        string ALTX;  	// A:120 (always)  alarm text, the length limit was recently raised from 40
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list0.Length; n++) {
            string [] list1;
            list1 = sp.ListSplit(list0[n]);
            if ( list1.Length != 4 ) { ok=false; break; }
            string [] list2;
            list2 = sp.ListSplit(list1[1]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2[0] != "B:1" ) { ok = false; break; }
            ALCD = sp.BinToInt(list2[1]);
            list2 = sp.ListSplit(list1[2]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { ALID = list2[1];} else { ALID = ""; }
            list2 = sp.ListSplit(list1[3]);
            if (list2.Length < 1) { ok = false; break; }
            if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
            if ( list2.Length == 2) { ALTX = list2[1];} else { ALTX = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S5F9[R]Exception Post Notify Sent by Equipment Only

    // S5F9 C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 5, 9, new SecsMsgReceiveDelegate(recv_S5F9));

// receive method 
void recv_S5F9(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:5 TIMESTAMP EXID EXTYPE EXMESSAGE {L:n EXRECVRA}
        // variables for data items and parsing
        string TIMESTAMP;  	// A:32 (always)  ECV TimeFormat controls format, 0=A:12 YYMMDDHHMMSS, 1=A:16 YYYYMMDDHHMMSScc,2=YYYY-MM-DDTHH:MM:SS.s[s]*{Z|+hh:mm|-hh:mm}
        string EXID;  	// A:20 (always)  exception identifier
        string EXTYPE;  	// A:5 (always)  exception type, "ALARM" or "ERROR"
        string EXMESSAGE;  	// A:n (always)  exception description
        string EXRECVRA;  	// A:40 (always)  exception recovery action description
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 6 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { TIMESTAMP = list1[1];} else { TIMESTAMP = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { EXID = list1[1];} else { EXID = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { EXTYPE = list1[1];} else { EXTYPE = ""; }
        list1 = sp.ListSplit(list0[4]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { EXMESSAGE = list1[1];} else { EXMESSAGE = ""; }
        list1 = sp.ListSplit(list0[5]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if (list2.Length < 1) { ok = false; break; }
            if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
            if ( list2.Length == 2) { EXRECVRA = list2[1];} else { EXRECVRA = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(5, 10, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S5F9

S5F10Exception Post Confirm Sent by Host Only

    // S5F10 C# Parse reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(5, 9, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // no data expected
        return;  // parsed ok
        } // end while(ok)

S5F11[R]Exception Clear Notify Sent by Equipment Only

    // S5F11 C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 5, 11, new SecsMsgReceiveDelegate(recv_S5F11));

// receive method 
void recv_S5F11(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:4 TIMESTAMP EXID EXTYPE EXMESSAGE
        // variables for data items and parsing
        string TIMESTAMP;  	// A:32 (always)  ECV TimeFormat controls format, 0=A:12 YYMMDDHHMMSS, 1=A:16 YYYYMMDDHHMMSScc,2=YYYY-MM-DDTHH:MM:SS.s[s]*{Z|+hh:mm|-hh:mm}
        string EXID;  	// A:20 (always)  exception identifier
        string EXTYPE;  	// A:5 (always)  exception type, "ALARM" or "ERROR"
        string EXMESSAGE;  	// A:n (always)  exception description
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { TIMESTAMP = list1[1];} else { TIMESTAMP = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { EXID = list1[1];} else { EXID = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { EXTYPE = list1[1];} else { EXTYPE = ""; }
        list1 = sp.ListSplit(list0[4]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { EXMESSAGE = list1[1];} else { EXMESSAGE = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(5, 12, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S5F11

S5F12Exception Clear Confirm Sent by Host Only

    // S5F12 C# Parse reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(5, 11, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // no data expected
        return;  // parsed ok
        } // end while(ok)

S5F13RException Recover Request Sent by Host Only

    // S5F13R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 5, 13, new SecsMsgReceiveDelegate(recv_S5F13R));

// receive method 
void recv_S5F13R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 EXID EXRECVRA
        // variables for data items and parsing
        string EXID;  	// A:20 (always)  exception identifier
        string EXRECVRA;  	// A:40 (always)  exception recovery action description
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { EXID = list1[1];} else { EXID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { EXRECVRA = list1[1];} else { EXRECVRA = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(5, 14, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S5F13R

S5F14Exception Recover Acknowledge Sent by Equipment Only

    // S5F14 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(5, 13, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 EXID {L:2 ACKA {L:2* ERRCODE ERRTEXT}}
        // variables for data items and parsing
        string EXID;  	// A:20 (always)  exception identifier
        int ACKA;  	// TF:1 (always)  request success
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { EXID = list1[1];} else { EXID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "TF:1" ) { ok = false; break; }
        ACKA = int.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length == 3 ) {  // 2 optional items found
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ERRCODE = list3[1];} else { ERRCODE = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { ERRTEXT = list3[1];} else { ERRTEXT = ""; }
            }
        return;  // parsed ok
        } // end while(ok)

S5F15[R]Exception Recovery Complete Notify Sent by Equipment Only

    // S5F15 C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 5, 15, new SecsMsgReceiveDelegate(recv_S5F15));

// receive method 
void recv_S5F15(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:3 TIMESTAMP EXID {L:2 ACKA {L:2* ERRCODE ERRTEXT}}
        // variables for data items and parsing
        string TIMESTAMP;  	// A:32 (always)  ECV TimeFormat controls format, 0=A:12 YYMMDDHHMMSS, 1=A:16 YYYYMMDDHHMMSScc,2=YYYY-MM-DDTHH:MM:SS.s[s]*{Z|+hh:mm|-hh:mm}
        string EXID;  	// A:20 (always)  exception identifier
        int ACKA;  	// TF:1 (always)  request success
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { TIMESTAMP = list1[1];} else { TIMESTAMP = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { EXID = list1[1];} else { EXID = ""; }
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "TF:1" ) { ok = false; break; }
        ACKA = int.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length == 3 ) {  // 2 optional items found
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ERRCODE = list3[1];} else { ERRCODE = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { ERRTEXT = list3[1];} else { ERRTEXT = ""; }
            }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(5, 16, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S5F15

S5F16Exception Recovery Complete Confirm Sent by Host Only

    // S5F16 C# Parse reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(5, 15, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // no data expected
        return;  // parsed ok
        } // end while(ok)

S5F17RException Recovery Abort Request Sent by Host Only

    // S5F17R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 5, 17, new SecsMsgReceiveDelegate(recv_S5F17R));

// receive method 
void recv_S5F17R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect EXID
        // variables for data items and parsing
        string EXID;  	// A:20 (always)  exception identifier
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( !list0[0].StartsWith("A:") ) { ok = false; break; }
        if ( list0.Length == 2) { EXID = list0[1];} else { EXID = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(5, 18, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S5F17R

S5F18Exception Recovery Abort Ack Sent by Equipment Only

    // S5F18 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(5, 17, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 EXID {L:2 ACKA {L:2* ERRCODE ERRTEXT}}
        // variables for data items and parsing
        string EXID;  	// A:20 (always)  exception identifier
        int ACKA;  	// TF:1 (always)  request success
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { EXID = list1[1];} else { EXID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "TF:1" ) { ok = false; break; }
        ACKA = int.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length == 3 ) {  // 2 optional items found
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ERRCODE = list3[1];} else { ERRCODE = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { ERRTEXT = list3[1];} else { ERRTEXT = ""; }
            }
        return;  // parsed ok
        } // end while(ok)

S6F1[R]Trace Data Send Sent by Equipment Only

    // S6F1 C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 6, 1, new SecsMsgReceiveDelegate(recv_S6F1));

// receive method 
void recv_S6F1(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:4 TRID SMPLN STIME {L:n SV}
        // variables for data items and parsing
        string TRID;  	// A:n (varies)  trace request ID
        string SMPLN;  	// U4:1 (varies)  sample number
        string STIME;  	// A:32 (always)  ECV TimeFormat controls format, 0=A:12 YYMMDDHHMMSS, 1=A:16 YYYYMMDDHHMMSScc,2=YYYY-MM-DDTHH:MM:SS.s[s]*{Z|+hh:mm|-hh:mm}
        string SV;  	// A:n (varies)  status variable value
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { TRID = list1[1];} else { TRID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { SMPLN = list1[1];} else { SMPLN = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { STIME = list1[1];} else { STIME = ""; }
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { SV = list2[1];} else { SV = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(6, 2, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S6F1

S6F2Trace Data Ack Sent by Host Only

    // S6F2 C# Parse reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(6, 1, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect ACKC6
        // variables for data items and parsing
        int ACKC6;  	// B:1 (always)  acknowledge code, 0 ok
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        ACKC6 = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S6F3[R]Discrete Variable Data Send Sent by Equipment Only

    // S6F3 C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 6, 3, new SecsMsgReceiveDelegate(recv_S6F3));

// receive method 
void recv_S6F3(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:3 DATAID CEID {L:n DSID {L:m {L:2 DVNAME DVVAL}}}
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string CEID;  	// U4:1 (varies)  collection event identifier, GEM requires type Un
        string DSID;  	// A:n (varies)  data set ID, akin to a report type
        string DVNAME;  	// U4:1 (varies)  data value name, generically a VID, therefore GEM requires Un type
        string DVVAL;  	// A:n (varies)  data value, any format including list
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { CEID = list1[1];} else { CEID = ""; }
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { DSID = list2[1];} else { DSID = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(6, 4, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S6F3

S6F4Discrete Variable Data Send Ack Sent by Host Only

    // S6F4 C# Parse reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(6, 3, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect ACKC6
        // variables for data items and parsing
        int ACKC6;  	// B:1 (always)  acknowledge code, 0 ok
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        ACKC6 = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S6F5RMulti-block Data Send Inquire Sent by Equipment Only

    // S6F5R C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 6, 5, new SecsMsgReceiveDelegate(recv_S6F5R));

// receive method 
void recv_S6F5R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 DATAID DATALENGTH
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string DATALENGTH;  	// U4:1 (varies)  total bytes of the message body 
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATALENGTH = list1[1];} else { DATALENGTH = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(6, 6, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S6F5R

S6F6Multi-block Grant Sent by Host Only

    // S6F6 C# Parse reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(6, 5, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect GRANT6
        // variables for data items and parsing
        int GRANT6;  	// B:1 (always)  multblock permission grant
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        GRANT6 = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S6F7RData Transfer Request Sent by Host Only

    // S6F7R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 6, 7, new SecsMsgReceiveDelegate(recv_S6F7R));

// receive method 
void recv_S6F7R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect DATAID
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0.Length == 2) { DATAID = list0[1];} else { DATAID = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(6, 8, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S6F7R

S6F8Data Transfer Data Sent by Equipment Only

    // S6F8 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(6, 7, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:3 DATAID CEID {L:n DSID {L:m {L:2 DVNAME DVVAL}}}
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string CEID;  	// U4:1 (varies)  collection event identifier, GEM requires type Un
        string DSID;  	// A:n (varies)  data set ID, akin to a report type
        string DVNAME;  	// U4:1 (varies)  data value name, generically a VID, therefore GEM requires Un type
        string DVVAL;  	// A:n (varies)  data value, any format including list
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { CEID = list1[1];} else { CEID = ""; }
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { DSID = list2[1];} else { DSID = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S6F9[R]Formatted Variable Send Sent by Equipment Only

    // S6F9 C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 6, 9, new SecsMsgReceiveDelegate(recv_S6F9));

// receive method 
void recv_S6F9(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:4 PFCD DATAID CEID {L:n {L:2 DSID {L:m DVVAL}}}
        // variables for data items and parsing
        int PFCD;  	// B:1 (always)  predefined form selector
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string CEID;  	// U4:1 (varies)  collection event identifier, GEM requires type Un
        string DSID;  	// A:n (varies)  data set ID, akin to a report type
        string DVVAL;  	// A:n (varies)  data value, any format including list
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        PFCD = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { CEID = list1[1];} else { CEID = ""; }
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { DSID = list3[1];} else { DSID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if ( list3.Length < 1) { ok=false; break; }
            int m;
            for(m=1; m < list3.Length; m++) {
                string [] list4;
                list4 = sp.ListSplit(list3[m]);
                if (list4.Length < 1) { ok = false; break; }
                if ( list4.Length == 2) { DVVAL = list4[1];} else { DVVAL = ""; }
                }
            if (!ok) break;
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(6, 10, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S6F9

S6F10Formatted Variable Ack Sent by Host Only

    // S6F10 C# Parse reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(6, 9, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect ACKC6
        // variables for data items and parsing
        int ACKC6;  	// B:1 (always)  acknowledge code, 0 ok
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        ACKC6 = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S6F11REvent Report Send Sent by Equipment Only

    // S6F11R C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 6, 11, new SecsMsgReceiveDelegate(recv_S6F11R));

// receive method 
void recv_S6F11R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:3 DATAID CEID {L:a {L:2 RPTID {L:b V}}}
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string CEID;  	// U4:1 (varies)  collection event identifier, GEM requires type Un
        string RPTID;  	// U4:1 (varies)  report ID
        string V;  	// A:n (varies)  variable value, any type including list
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { CEID = list1[1];} else { CEID = ""; }
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length < 1) { ok=false; break; }
        int a;
        for(a=1; a < list1.Length; a++) {
            string [] list2;
            list2 = sp.ListSplit(list1[a]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { RPTID = list3[1];} else { RPTID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if ( list3.Length < 1) { ok=false; break; }
            int b;
            for(b=1; b < list3.Length; b++) {
                string [] list4;
                list4 = sp.ListSplit(list3[b]);
                if (list4.Length < 1) { ok = false; break; }
                if ( list4.Length == 2) { V = list4[1];} else { V = ""; }
                }
            if (!ok) break;
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(6, 12, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S6F11R

S6F12Event Report Ack Sent by Host Only

    // S6F12 C# Parse reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(6, 11, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect ACKC6
        // variables for data items and parsing
        int ACKC6;  	// B:1 (always)  acknowledge code, 0 ok
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        ACKC6 = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S6F13RAnnotated Event Report Send Sent by Equipment Only

    // S6F13R C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 6, 13, new SecsMsgReceiveDelegate(recv_S6F13R));

// receive method 
void recv_S6F13R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:3 DATAID CEID {L:a {L:2 RPTID {L:b {L:2 VID V}}}}
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string CEID;  	// U4:1 (varies)  collection event identifier, GEM requires type Un
        string RPTID;  	// U4:1 (varies)  report ID
        string VID;  	// A:n (varies)  A variable ID
        string V;  	// A:n (varies)  variable value, any type including list
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { CEID = list1[1];} else { CEID = ""; }
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length < 1) { ok=false; break; }
        int a;
        for(a=1; a < list1.Length; a++) {
            string [] list2;
            list2 = sp.ListSplit(list1[a]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { RPTID = list3[1];} else { RPTID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if ( list3.Length < 1) { ok=false; break; }
            int b;
            for(b=1; b < list3.Length; b++) {
                string [] list4;
                list4 = sp.ListSplit(list3[b]);
                if ( list4.Length != 3 ) { ok=false; break; }
                string [] list5;
                list5 = sp.ListSplit(list4[1]);
                if (list5.Length < 1) { ok = false; break; }
                if ( list5.Length == 2) { VID = list5[1];} else { VID = ""; }
                list5 = sp.ListSplit(list4[2]);
                if (list5.Length < 1) { ok = false; break; }
                if ( list5.Length == 2) { V = list5[1];} else { V = ""; }
                }
            if (!ok) break;
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(6, 14, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S6F13R

S6F14Annotated Event Report Ack Sent by Host Only

    // S6F14 C# Parse reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(6, 13, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect ACKC6
        // variables for data items and parsing
        int ACKC6;  	// B:1 (always)  acknowledge code, 0 ok
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        ACKC6 = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S6F15REvent Report Request Sent by Host Only

    // S6F15R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 6, 15, new SecsMsgReceiveDelegate(recv_S6F15R));

// receive method 
void recv_S6F15R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect CEID
        // variables for data items and parsing
        string CEID;  	// U4:1 (varies)  collection event identifier, GEM requires type Un
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0.Length == 2) { CEID = list0[1];} else { CEID = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(6, 16, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S6F15R

S6F16Event Report Data Sent by Equipment Only

    // S6F16 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(6, 15, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:3 DATAID CEID {L:a {L:2 RPTID {L:b V}}}
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string CEID;  	// U4:1 (varies)  collection event identifier, GEM requires type Un
        string RPTID;  	// U4:1 (varies)  report ID
        string V;  	// A:n (varies)  variable value, any type including list
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { CEID = list1[1];} else { CEID = ""; }
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length < 1) { ok=false; break; }
        int a;
        for(a=1; a < list1.Length; a++) {
            string [] list2;
            list2 = sp.ListSplit(list1[a]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { RPTID = list3[1];} else { RPTID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if ( list3.Length < 1) { ok=false; break; }
            int b;
            for(b=1; b < list3.Length; b++) {
                string [] list4;
                list4 = sp.ListSplit(list3[b]);
                if (list4.Length < 1) { ok = false; break; }
                if ( list4.Length == 2) { V = list4[1];} else { V = ""; }
                }
            if (!ok) break;
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S6F17RAnnotated Event Report Request Sent by Host Only

    // S6F17R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 6, 17, new SecsMsgReceiveDelegate(recv_S6F17R));

// receive method 
void recv_S6F17R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect CEID
        // variables for data items and parsing
        string CEID;  	// U4:1 (varies)  collection event identifier, GEM requires type Un
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0.Length == 2) { CEID = list0[1];} else { CEID = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(6, 18, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S6F17R

S6F18Annotated Event Report Data Sent by Equipment Only

    // S6F18 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(6, 17, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:3 DATAID CEID {L:a {L:2 RPTID {L:b {L:2 VID V}}}}
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string CEID;  	// U4:1 (varies)  collection event identifier, GEM requires type Un
        string RPTID;  	// U4:1 (varies)  report ID
        string VID;  	// A:n (varies)  A variable ID
        string V;  	// A:n (varies)  variable value, any type including list
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { CEID = list1[1];} else { CEID = ""; }
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length < 1) { ok=false; break; }
        int a;
        for(a=1; a < list1.Length; a++) {
            string [] list2;
            list2 = sp.ListSplit(list1[a]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { RPTID = list3[1];} else { RPTID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if ( list3.Length < 1) { ok=false; break; }
            int b;
            for(b=1; b < list3.Length; b++) {
                string [] list4;
                list4 = sp.ListSplit(list3[b]);
                if ( list4.Length != 3 ) { ok=false; break; }
                string [] list5;
                list5 = sp.ListSplit(list4[1]);
                if (list5.Length < 1) { ok = false; break; }
                if ( list5.Length == 2) { VID = list5[1];} else { VID = ""; }
                list5 = sp.ListSplit(list4[2]);
                if (list5.Length < 1) { ok = false; break; }
                if ( list5.Length == 2) { V = list5[1];} else { V = ""; }
                }
            if (!ok) break;
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S6F19RIndividual Report Request Sent by Host Only

    // S6F19R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 6, 19, new SecsMsgReceiveDelegate(recv_S6F19R));

// receive method 
void recv_S6F19R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect RPTID
        // variables for data items and parsing
        string RPTID;  	// U4:1 (varies)  report ID
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0.Length == 2) { RPTID = list0[1];} else { RPTID = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(6, 20, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S6F19R

S6F20Individual Report Data Sent by Equipment Only

    // S6F20 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(6, 19, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:n V
        // variables for data items and parsing
        string V;  	// A:n (varies)  variable value, any type including list
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list0.Length; n++) {
            string [] list1;
            list1 = sp.ListSplit(list0[n]);
            if (list1.Length < 1) { ok = false; break; }
            if ( list1.Length == 2) { V = list1[1];} else { V = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S6F21RAnnotated Individual Report Request Sent by Host Only

    // S6F21R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 6, 21, new SecsMsgReceiveDelegate(recv_S6F21R));

// receive method 
void recv_S6F21R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect RPTID
        // variables for data items and parsing
        string RPTID;  	// U4:1 (varies)  report ID
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0.Length == 2) { RPTID = list0[1];} else { RPTID = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(6, 22, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S6F21R

S6F22Annotated Individual Report Data Sent by Equipment Only

    // S6F22 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(6, 21, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:n {L:2 VID V}
        // variables for data items and parsing
        string VID;  	// A:n (varies)  A variable ID
        string V;  	// A:n (varies)  variable value, any type including list
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list0.Length; n++) {
            string [] list1;
            list1 = sp.ListSplit(list0[n]);
            if ( list1.Length != 3 ) { ok=false; break; }
            string [] list2;
            list2 = sp.ListSplit(list1[1]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { VID = list2[1];} else { VID = ""; }
            list2 = sp.ListSplit(list1[2]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { V = list2[1];} else { V = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S6F23RRequest or Purge Spooled Data Sent by Host Only

    // S6F23R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 6, 23, new SecsMsgReceiveDelegate(recv_S6F23R));

// receive method 
void recv_S6F23R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect RSDC
        // variables for data items and parsing
        uint RSDC;  	// U1:1 (always)  spool request code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "U1:1" ) { ok = false; break; }
        RSDC = uint.Parse(list0[1]);
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(6, 24, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S6F23R

S6F24Request or Purge Spooled Data Ack Sent by Equipment Only

    // S6F24 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(6, 23, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect RSDA
        // variables for data items and parsing
        int RSDA;  	// B:1 (always)  spool request reply
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        RSDA = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S6F25[R]Notification Report Send Sent by Host and Equipment

    // S6F25 C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 6, 25, new SecsMsgReceiveDelegate(recv_S6F25));

// receive method 
void recv_S6F25(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:7 DATAID OPID LINKID RCPSPEC RMCHGSTAT {L:m {L:2 RCPATTRID RCPATTRDATA}} {L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string OPID;  	// U4:1 (varies)  operation identifier
        uint LINKID;  	// U4:1 (always)  correlates the RMOPID value in a request to a completion report
        string RCPSPEC;  	// A:n (always)  recipe specifier
        string RMCHGSTAT;  	// U4:1 (varies)  object change type
        string RCPATTRID;  	// A:n (always)  the name of a recipe attribute, but not used to indicate the recipe identifier
        string RCPATTRDATA;  	// A:n (varies)  the value of a recipe attribute, any type of data including list
        uint RMACK;  	// U1:1 (always)  recipe managment completion code
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 8 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { OPID = list1[1];} else { OPID = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U4:1" ) { ok = false; break; }
        LINKID = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[4]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RCPSPEC = list1[1];} else { RCPSPEC = ""; }
        list1 = sp.ListSplit(list0[5]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { RMCHGSTAT = list1[1];} else { RMCHGSTAT = ""; }
        list1 = sp.ListSplit(list0[6]);
        if ( list1.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list1.Length; m++) {
            string [] list2;
            list2 = sp.ListSplit(list1[m]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { RCPATTRID = list3[1];} else { RCPATTRID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { RCPATTRDATA = list3[1];} else { RCPATTRDATA = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[7]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "U1:1" ) { ok = false; break; }
        RMACK = uint.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list2.Length; p++) {
            string [] list3;
            list3 = sp.ListSplit(list2[p]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(6, 26, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S6F25

S6F26Notification Report Send Ack Sent by Host and Equipment

    // S6F26 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(6, 25, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect ACKC6
        // variables for data items and parsing
        int ACKC6;  	// B:1 (always)  acknowledge code, 0 ok
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        ACKC6 = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S6F27[R]Trace Report Send Sent by Equipment Only

    // S6F27 C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 6, 27, new SecsMsgReceiveDelegate(recv_S6F27));

// receive method 
void recv_S6F27(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:3 DATAID TRID {L:n {L:p {L:2 RPTID {L:m V}}}}
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string TRID;  	// A:n (varies)  trace request ID
        string RPTID;  	// U4:1 (varies)  report ID
        string V;  	// A:n (varies)  variable value, any type including list
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { TRID = list1[1];} else { TRID = ""; }
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length < 1) { ok=false; break; }
            int p;
            for(p=1; p < list2.Length; p++) {
                string [] list3;
                list3 = sp.ListSplit(list2[p]);
                if ( list3.Length != 3 ) { ok=false; break; }
                string [] list4;
                list4 = sp.ListSplit(list3[1]);
                if (list4.Length < 1) { ok = false; break; }
                if ( list4.Length == 2) { RPTID = list4[1];} else { RPTID = ""; }
                list4 = sp.ListSplit(list3[2]);
                if ( list4.Length < 1) { ok=false; break; }
                int m;
                for(m=1; m < list4.Length; m++) {
                    string [] list5;
                    list5 = sp.ListSplit(list4[m]);
                    if (list5.Length < 1) { ok = false; break; }
                    if ( list5.Length == 2) { V = list5[1];} else { V = ""; }
                    }
                if (!ok) break;
                }
            if (!ok) break;
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(6, 28, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S6F27

S6F28Trace Report Send Ack Sent by Host Only

    // S6F28 C# Parse reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(6, 27, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect TRID
        // variables for data items and parsing
        string TRID;  	// A:n (varies)  trace request ID
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0.Length == 2) { TRID = list0[1];} else { TRID = ""; }
        return;  // parsed ok
        } // end while(ok)

S6F29RTrace Report Request Sent by Host Only

    // S6F29R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 6, 29, new SecsMsgReceiveDelegate(recv_S6F29R));

// receive method 
void recv_S6F29R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect TRID
        // variables for data items and parsing
        string TRID;  	// A:n (varies)  trace request ID
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0.Length == 2) { TRID = list0[1];} else { TRID = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(6, 30, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S6F29R

S6F30Trace Report Data Sent by Equipment Only

    // S6F30 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(6, 29, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:3 TRID {L:n {L:2 RPTID {L:m V}}}
        // variables for data items and parsing
        string TRID;  	// A:n (varies)  trace request ID
        string RPTID;  	// U4:1 (varies)  report ID
        string V;  	// A:n (varies)  variable value, any type including list
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { TRID = list1[1];} else { TRID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { RPTID = list3[1];} else { RPTID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if ( list3.Length < 1) { ok=false; break; }
            int m;
            for(m=1; m < list3.Length; m++) {
                string [] list4;
                list4 = sp.ListSplit(list3[m]);
                if (list4.Length < 1) { ok = false; break; }
                if ( list4.Length == 2) { V = list4[1];} else { V = ""; }
                }
            if (!ok) break;
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S7F1RProcess Program Load Inquire Sent by Host and Equipment

    // S7F1R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 7, 1, new SecsMsgReceiveDelegate(recv_S7F1R));

// receive method 
void recv_S7F1R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 PPID LENGTH
        // variables for data items and parsing
        string PPID;  	// A:80 (varies)  process program ID
        uint LENGTH;  	// U4:1 (always)  program length in bytes
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { PPID = list1[1];} else { PPID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U4:1" ) { ok = false; break; }
        LENGTH = uint.Parse(list1[1]);
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(7, 2, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S7F1R

S7F2Process Program Load Grant Sent by Host and Equipment

    // S7F2 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(7, 1, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect PPGNT
        // variables for data items and parsing
        int PPGNT;  	// B:1 (always)  process program transfer grant status
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        PPGNT = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S7F3RProcess Program Send Sent by Host and Equipment

    // S7F3R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 7, 3, new SecsMsgReceiveDelegate(recv_S7F3R));

// receive method 
void recv_S7F3R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 PPID PPBODY
        // variables for data items and parsing
        string PPID;  	// A:80 (varies)  process program ID
        int [] PPBODY;  	// B:n (varies)  process program data, any non-list type
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { PPID = list1[1];} else { PPID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        PPBODY = new int[list1.Length-1];
        for(int i=0; i < PPBODY.Length; i++) {
            PPBODY[i] = sp.BinToInt(list1[1+i]);
            }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(7, 4, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S7F3R

S7F4Process Program Send Acknowledge Sent by Host and Equipment

    // S7F4 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(7, 3, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect ACKC7
        // variables for data items and parsing
        int ACKC7;  	// B:1 (always)  S7 acknowledge code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        ACKC7 = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S7F5RProcess Program Request Sent by Host and Equipment

    // S7F5R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 7, 5, new SecsMsgReceiveDelegate(recv_S7F5R));

// receive method 
void recv_S7F5R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect PPID
        // variables for data items and parsing
        string PPID;  	// A:80 (varies)  process program ID
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0.Length == 2) { PPID = list0[1];} else { PPID = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(7, 6, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S7F5R

S7F6Process Program Data Sent by Host and Equipment

    // S7F6 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(7, 5, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 PPID PPBODY
        // variables for data items and parsing
        string PPID;  	// A:80 (varies)  process program ID
        int [] PPBODY;  	// B:n (varies)  process program data, any non-list type
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { PPID = list1[1];} else { PPID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        PPBODY = new int[list1.Length-1];
        for(int i=0; i < PPBODY.Length; i++) {
            PPBODY[i] = sp.BinToInt(list1[1+i]);
            }
        return;  // parsed ok
        } // end while(ok)

S7F7RProcess Program ID Request Sent by Equipment Only

    // S7F7R C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 7, 7, new SecsMsgReceiveDelegate(recv_S7F7R));

// receive method 
void recv_S7F7R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect MID
        // variables for data items and parsing
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0.Length == 2) { MID = list0[1];} else { MID = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(7, 8, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S7F7R

S7F8Process Program ID Data Sent by Host Only

    // S7F8 C# Parse reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(7, 7, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 PPID MID
        // variables for data items and parsing
        string PPID;  	// A:80 (varies)  process program ID
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { PPID = list1[1];} else { PPID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MID = list1[1];} else { MID = ""; }
        return;  // parsed ok
        } // end while(ok)

S7F9RMatl/Process Matrix Request Sent by Host and Equipment

    // S7F9R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 7, 9, new SecsMsgReceiveDelegate(recv_S7F9R));

// receive method 
void recv_S7F9R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // no data expected
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(7, 10, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S7F9R

S7F10Matl/Process Matrix Data Sent by Host and Equipment

    // S7F10 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(7, 9, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:n {L:2 PPID {L:a MID}}
        // variables for data items and parsing
        string PPID;  	// A:80 (varies)  process program ID
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list0.Length; n++) {
            string [] list1;
            list1 = sp.ListSplit(list0[n]);
            if ( list1.Length != 3 ) { ok=false; break; }
            string [] list2;
            list2 = sp.ListSplit(list1[1]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { PPID = list2[1];} else { PPID = ""; }
            list2 = sp.ListSplit(list1[2]);
            if ( list2.Length < 1) { ok=false; break; }
            int a;
            for(a=1; a < list2.Length; a++) {
                string [] list3;
                list3 = sp.ListSplit(list2[a]);
                if (list3.Length < 1) { ok = false; break; }
                if ( list3.Length == 2) { MID = list3[1];} else { MID = ""; }
                }
            if (!ok) break;
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S7F11[R]Matl/Process Matrix Update Send Sent by Host Only

    // S7F11 C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 7, 11, new SecsMsgReceiveDelegate(recv_S7F11));

// receive method 
void recv_S7F11(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:n {L:2 PPID {L:a MID}}
        // variables for data items and parsing
        string PPID;  	// A:80 (varies)  process program ID
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list0.Length; n++) {
            string [] list1;
            list1 = sp.ListSplit(list0[n]);
            if ( list1.Length != 3 ) { ok=false; break; }
            string [] list2;
            list2 = sp.ListSplit(list1[1]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { PPID = list2[1];} else { PPID = ""; }
            list2 = sp.ListSplit(list1[2]);
            if ( list2.Length < 1) { ok=false; break; }
            int a;
            for(a=1; a < list2.Length; a++) {
                string [] list3;
                list3 = sp.ListSplit(list2[a]);
                if (list3.Length < 1) { ok = false; break; }
                if ( list3.Length == 2) { MID = list3[1];} else { MID = ""; }
                }
            if (!ok) break;
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(7, 12, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S7F11

S7F12Matl/Process Matrix Update Ack Sent by Equipment Only

    // S7F12 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(7, 11, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect ACKC7
        // variables for data items and parsing
        int ACKC7;  	// B:1 (always)  S7 acknowledge code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        ACKC7 = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S7F13[R]Matl/Process Matrix Delete Entry Send Sent by Host Only

    // S7F13 C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 7, 13, new SecsMsgReceiveDelegate(recv_S7F13));

// receive method 
void recv_S7F13(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:n {L:2 PPID {L:a MID}}
        // variables for data items and parsing
        string PPID;  	// A:80 (varies)  process program ID
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list0.Length; n++) {
            string [] list1;
            list1 = sp.ListSplit(list0[n]);
            if ( list1.Length != 3 ) { ok=false; break; }
            string [] list2;
            list2 = sp.ListSplit(list1[1]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { PPID = list2[1];} else { PPID = ""; }
            list2 = sp.ListSplit(list1[2]);
            if ( list2.Length < 1) { ok=false; break; }
            int a;
            for(a=1; a < list2.Length; a++) {
                string [] list3;
                list3 = sp.ListSplit(list2[a]);
                if (list3.Length < 1) { ok = false; break; }
                if ( list3.Length == 2) { MID = list3[1];} else { MID = ""; }
                }
            if (!ok) break;
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(7, 14, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S7F13

S7F14Delete Matl/Process Matrix Entry Acknowledge Sent by Equipment Only

    // S7F14 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(7, 13, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect ACKC7
        // variables for data items and parsing
        int ACKC7;  	// B:1 (always)  S7 acknowledge code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        ACKC7 = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S7F15RMatrix Mode Select Send Sent by Host Only

    // S7F15R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 7, 15, new SecsMsgReceiveDelegate(recv_S7F15R));

// receive method 
void recv_S7F15R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect MMODE
        // variables for data items and parsing
        int MMODE;  	// B:1 (always)  matrix mode selection
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        MMODE = sp.BinToInt(list0[1]);
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(7, 16, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S7F15R

S7F16Matrix Mode Select Ack Sent by Equipment Only

    // S7F16 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(7, 15, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect ACKC7
        // variables for data items and parsing
        int ACKC7;  	// B:1 (always)  S7 acknowledge code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        ACKC7 = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S7F17RDelete Process Program Send Sent by Host Only

    // S7F17R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 7, 17, new SecsMsgReceiveDelegate(recv_S7F17R));

// receive method 
void recv_S7F17R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:n PPID
        // variables for data items and parsing
        string PPID;  	// A:80 (varies)  process program ID
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list0.Length; n++) {
            string [] list1;
            list1 = sp.ListSplit(list0[n]);
            if (list1.Length < 1) { ok = false; break; }
            if ( list1.Length == 2) { PPID = list1[1];} else { PPID = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(7, 18, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S7F17R

S7F18Delete Process Program Acknowledge Sent by Equipment Only

    // S7F18 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(7, 17, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect ACKC7
        // variables for data items and parsing
        int ACKC7;  	// B:1 (always)  S7 acknowledge code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        ACKC7 = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S7F19RCurrent Process Program Dir Request Sent by Host Only

    // S7F19R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 7, 19, new SecsMsgReceiveDelegate(recv_S7F19R));

// receive method 
void recv_S7F19R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // no data expected
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(7, 20, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S7F19R

S7F20Current Process Program Data Sent by Equipment Only

    // S7F20 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(7, 19, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:n PPID
        // variables for data items and parsing
        string PPID;  	// A:80 (varies)  process program ID
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list0.Length; n++) {
            string [] list1;
            list1 = sp.ListSplit(list0[n]);
            if (list1.Length < 1) { ok = false; break; }
            if ( list1.Length == 2) { PPID = list1[1];} else { PPID = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S7F21Process Capabilities Request Sent by Host Only

    // S7F21 C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 7, 21, new SecsMsgReceiveDelegate(recv_S7F21));

// receive method 
void recv_S7F21(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // no data expected
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(7, 22, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S7F21

S7F22Process Capabilities Data Sent by Equipment Only

    // S7F22 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(7, 21, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:5 MDLN SOFTREV CMDMAX BYTMAX {L:c {L:11 CCODE CNAME RQCMD BLKDEF BCDS IBCDS NBCDS ACDS IACDS NACDS {L:p L:x}}}
        // variables for data items and parsing
        string MDLN;  	// A:20 (always)  equipment model type
        string SOFTREV;  	// A:20 (always)  software revision
        string CMDMAX;  	// U1:1 (varies)  maximum number of commands allowed, 0=unlimited
        string BYTMAX;  	// U4:1 (varies)  process program maximum byte length, 0 means no limit
        string CCODE;  	// A:n (varies)  process operation command code
        string CNAME;  	// A:16 (always)  text name for a CCODE
        int RQCMD;  	// TF:1 (always)  flag that command is required
        int BLKDEF;  	// I1:1 (always)  command definition block relationship, standard incorrectly says type U1 is possible
        uint [] BCDS;  	// U2:n (varies)  before command code vector
        uint [] IBCDS;  	// U2:n (varies)  vector of immediately before command codes
        uint [] NBCDS;  	// U2:n (varies)  vector of not before command codes
        string ACDS;  	// U2:1 (varies)  after command codes
        uint [] IACDS;  	// U2:n (varies)  vector of immediately after command codes
        uint [] NACDS;  	// U2:n (varies)  vector of not after command codes
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 6 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { MDLN = list1[1];} else { MDLN = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { SOFTREV = list1[1];} else { SOFTREV = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { CMDMAX = list1[1];} else { CMDMAX = ""; }
        list1 = sp.ListSplit(list0[4]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { BYTMAX = list1[1];} else { BYTMAX = ""; }
        list1 = sp.ListSplit(list0[5]);
        if ( list1.Length < 1) { ok=false; break; }
        int c;
        for(c=1; c < list1.Length; c++) {
            string [] list2;
            list2 = sp.ListSplit(list1[c]);
            if ( list2.Length != 12 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { CCODE = list3[1];} else { CCODE = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { CNAME = list3[1];} else { CNAME = ""; }
            list3 = sp.ListSplit(list2[3]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3[0] != "TF:1" ) { ok = false; break; }
            RQCMD = int.Parse(list3[1]);
            list3 = sp.ListSplit(list2[4]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3[0] != "I1:1" ) { ok = false; break; }
            BLKDEF = int.Parse(list3[1]);
            list3 = sp.ListSplit(list2[5]);
            if (list3.Length < 1) { ok = false; break; }
            BCDS = new uint[list3.Length-1];
            for(int i=0; i < BCDS.Length; i++) {
                BCDS[i] = uint.Parse(list3[1+i]);
                }
            list3 = sp.ListSplit(list2[6]);
            if (list3.Length < 1) { ok = false; break; }
            IBCDS = new uint[list3.Length-1];
            for(int i=0; i < IBCDS.Length; i++) {
                IBCDS[i] = uint.Parse(list3[1+i]);
                }
            list3 = sp.ListSplit(list2[7]);
            if (list3.Length < 1) { ok = false; break; }
            NBCDS = new uint[list3.Length-1];
            for(int i=0; i < NBCDS.Length; i++) {
                NBCDS[i] = uint.Parse(list3[1+i]);
                }
            list3 = sp.ListSplit(list2[8]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ACDS = list3[1];} else { ACDS = ""; }
            list3 = sp.ListSplit(list2[9]);
            if (list3.Length < 1) { ok = false; break; }
            IACDS = new uint[list3.Length-1];
            for(int i=0; i < IACDS.Length; i++) {
                IACDS[i] = uint.Parse(list3[1+i]);
                }
            list3 = sp.ListSplit(list2[10]);
            if (list3.Length < 1) { ok = false; break; }
            NACDS = new uint[list3.Length-1];
            for(int i=0; i < NACDS.Length; i++) {
                NACDS[i] = uint.Parse(list3[1+i]);
                }
            list3 = sp.ListSplit(list2[11]);
            if ( list3.Length < 1) { ok=false; break; }
            int p;
            for(p=1; p < list3.Length; p++) {
                string [] list4;
                list4 = sp.ListSplit(list3[p]);
                if (list4.Length != 1 || list4[0] != "L:x") { ok = false; break; }
                // single token data such as L:0 or U4:0 has been received as expected
                }
            if (!ok) break;
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S7F23RFormatted Process Program Send Sent by Host and Equipment

    // S7F23R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 7, 23, new SecsMsgReceiveDelegate(recv_S7F23R));

// receive method 
void recv_S7F23R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:4 PPID MDLN SOFTREV {L:c {L:2 CCODE {L:p PPARM}}}
        // variables for data items and parsing
        string PPID;  	// A:80 (varies)  process program ID
        string MDLN;  	// A:20 (always)  equipment model type
        string SOFTREV;  	// A:20 (always)  software revision
        string CCODE;  	// A:n (varies)  process operation command code
        string PPARM;  	// A:n (varies)  process parameter, any scalar or vector
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { PPID = list1[1];} else { PPID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { MDLN = list1[1];} else { MDLN = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { SOFTREV = list1[1];} else { SOFTREV = ""; }
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length < 1) { ok=false; break; }
        int c;
        for(c=1; c < list1.Length; c++) {
            string [] list2;
            list2 = sp.ListSplit(list1[c]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { CCODE = list3[1];} else { CCODE = ""; }
            list3 = sp.ListSplit(list2[2]);
            if ( list3.Length < 1) { ok=false; break; }
            int p;
            for(p=1; p < list3.Length; p++) {
                string [] list4;
                list4 = sp.ListSplit(list3[p]);
                if (list4.Length < 1) { ok = false; break; }
                if ( list4.Length == 2) { PPARM = list4[1];} else { PPARM = ""; }
                }
            if (!ok) break;
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(7, 24, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S7F23R

S7F24Formatted Process Program Acknowledge Sent by Host and Equipment

    // S7F24 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(7, 23, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect ACKC7
        // variables for data items and parsing
        int ACKC7;  	// B:1 (always)  S7 acknowledge code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        ACKC7 = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S7F25RFormatted Process Program Request Sent by Host and Equipment

    // S7F25R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 7, 25, new SecsMsgReceiveDelegate(recv_S7F25R));

// receive method 
void recv_S7F25R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect PPID
        // variables for data items and parsing
        string PPID;  	// A:80 (varies)  process program ID
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0.Length == 2) { PPID = list0[1];} else { PPID = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(7, 26, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S7F25R

S7F26Formatted Process Program Data Sent by Host and Equipment

    // S7F26 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(7, 25, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:4 PPID MDLN SOFTREV {L:c {L:2 CCODE {L:p PPARM}}}
        // variables for data items and parsing
        string PPID;  	// A:80 (varies)  process program ID
        string MDLN;  	// A:20 (always)  equipment model type
        string SOFTREV;  	// A:20 (always)  software revision
        string CCODE;  	// A:n (varies)  process operation command code
        string PPARM;  	// A:n (varies)  process parameter, any scalar or vector
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { PPID = list1[1];} else { PPID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { MDLN = list1[1];} else { MDLN = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { SOFTREV = list1[1];} else { SOFTREV = ""; }
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length < 1) { ok=false; break; }
        int c;
        for(c=1; c < list1.Length; c++) {
            string [] list2;
            list2 = sp.ListSplit(list1[c]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { CCODE = list3[1];} else { CCODE = ""; }
            list3 = sp.ListSplit(list2[2]);
            if ( list3.Length < 1) { ok=false; break; }
            int p;
            for(p=1; p < list3.Length; p++) {
                string [] list4;
                list4 = sp.ListSplit(list3[p]);
                if (list4.Length < 1) { ok = false; break; }
                if ( list4.Length == 2) { PPARM = list4[1];} else { PPARM = ""; }
                }
            if (!ok) break;
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S7F27RProcess Program Verification Send Sent by Equipment Only

    // S7F27R C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 7, 27, new SecsMsgReceiveDelegate(recv_S7F27R));

// receive method 
void recv_S7F27R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 PPID {L:n {L:3 ACKC7A SEQNUM ERRW7}}
        // variables for data items and parsing
        string PPID;  	// A:80 (varies)  process program ID
        string ACKC7A;  	// U4:1 (varies)  process program check code
        string SEQNUM;  	// U4:1 (varies)  process program command number
        string ERRW7;  	// A:n (varies)  process program error description
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { PPID = list1[1];} else { PPID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 4 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ACKC7A = list3[1];} else { ACKC7A = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { SEQNUM = list3[1];} else { SEQNUM = ""; }
            list3 = sp.ListSplit(list2[3]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ERRW7 = list3[1];} else { ERRW7 = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(7, 28, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S7F27R

S7F28Process Program Verification Acknowledge Sent by Host Only

    // S7F28 C# Parse reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(7, 27, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // no data expected
        return;  // parsed ok
        } // end while(ok)

S7F29RProcess Program Verification Inquire Sent by Equipment Only

    // S7F29R C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 7, 29, new SecsMsgReceiveDelegate(recv_S7F29R));

// receive method 
void recv_S7F29R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect LENGTH
        // variables for data items and parsing
        uint LENGTH;  	// U4:1 (always)  program length in bytes
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "U4:1" ) { ok = false; break; }
        LENGTH = uint.Parse(list0[1]);
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(7, 30, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S7F29R

S7F30Process Program Verification Grant Sent by Host Only

    // S7F30 C# Parse reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(7, 29, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect PPGNT
        // variables for data items and parsing
        int PPGNT;  	// B:1 (always)  process program transfer grant status
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        PPGNT = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S7F31RVerification Request Send Sent by Host Only

    // S7F31R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 7, 31, new SecsMsgReceiveDelegate(recv_S7F31R));

// receive method 
void recv_S7F31R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:4 PPID MDLN SOFTREV {L:c {L:2 CCODE {L:p PPARM}}}
        // variables for data items and parsing
        string PPID;  	// A:80 (varies)  process program ID
        string MDLN;  	// A:20 (always)  equipment model type
        string SOFTREV;  	// A:20 (always)  software revision
        string CCODE;  	// A:n (varies)  process operation command code
        string PPARM;  	// A:n (varies)  process parameter, any scalar or vector
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { PPID = list1[1];} else { PPID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { MDLN = list1[1];} else { MDLN = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { SOFTREV = list1[1];} else { SOFTREV = ""; }
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length < 1) { ok=false; break; }
        int c;
        for(c=1; c < list1.Length; c++) {
            string [] list2;
            list2 = sp.ListSplit(list1[c]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { CCODE = list3[1];} else { CCODE = ""; }
            list3 = sp.ListSplit(list2[2]);
            if ( list3.Length < 1) { ok=false; break; }
            int p;
            for(p=1; p < list3.Length; p++) {
                string [] list4;
                list4 = sp.ListSplit(list3[p]);
                if (list4.Length < 1) { ok = false; break; }
                if ( list4.Length == 2) { PPARM = list4[1];} else { PPARM = ""; }
                }
            if (!ok) break;
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(7, 32, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S7F31R

S7F32Verification Request Acknowledge Sent by Equipment Only

    // S7F32 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(7, 31, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect ACKC7
        // variables for data items and parsing
        int ACKC7;  	// B:1 (always)  S7 acknowledge code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        ACKC7 = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S7F33RProcess Program Available Request Sent by Host and Equipment

    // S7F33R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 7, 33, new SecsMsgReceiveDelegate(recv_S7F33R));

// receive method 
void recv_S7F33R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect PPID
        // variables for data items and parsing
        string PPID;  	// A:80 (varies)  process program ID
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0.Length == 2) { PPID = list0[1];} else { PPID = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(7, 34, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S7F33R

S7F34Process Program Availability Data Sent by Host and Equipment

    // S7F34 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(7, 33, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:3 PPID UNFLEN FRMLEN
        // variables for data items and parsing
        string PPID;  	// A:80 (varies)  process program ID
        string UNFLEN;  	// U4:1 (varies)  unformatted process program length if available, else 0
        string FRMLEN;  	// U4:1 (varies)  formatted process program length if available, else 0
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { PPID = list1[1];} else { PPID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { UNFLEN = list1[1];} else { UNFLEN = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { FRMLEN = list1[1];} else { FRMLEN = ""; }
        return;  // parsed ok
        } // end while(ok)

S7F35RProcess Program for MID Request Sent by Host and Equipment

    // S7F35R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 7, 35, new SecsMsgReceiveDelegate(recv_S7F35R));

// receive method 
void recv_S7F35R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect MID
        // variables for data items and parsing
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0.Length == 2) { MID = list0[1];} else { MID = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(7, 36, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S7F35R

S7F36Process Program for MID Data Sent by Host and Equipment

    // S7F36 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(7, 35, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:3 MID PPID PPBODY
        // variables for data items and parsing
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        string PPID;  	// A:80 (varies)  process program ID
        int [] PPBODY;  	// B:n (varies)  process program data, any non-list type
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MID = list1[1];} else { MID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { PPID = list1[1];} else { PPID = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        PPBODY = new int[list1.Length-1];
        for(int i=0; i < PPBODY.Length; i++) {
            PPBODY[i] = sp.BinToInt(list1[1+i]);
            }
        return;  // parsed ok
        } // end while(ok)

S7F37RLarge PP Send Sent by Host and Equipment

    // S7F37R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 7, 37, new SecsMsgReceiveDelegate(recv_S7F37R));

// receive method 
void recv_S7F37R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect DSNAME
        // variables for data items and parsing
        string DSNAME;  	// A:50 (varies)  the name of a dataset such as a PPID
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0.Length == 2) { DSNAME = list0[1];} else { DSNAME = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(7, 38, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S7F37R

S7F38Large PP Send Ack Sent by Host and Equipment

    // S7F38 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(7, 37, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect ACKC7
        // variables for data items and parsing
        int ACKC7;  	// B:1 (always)  S7 acknowledge code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        ACKC7 = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S7F39RLarge Formatted PP Send Sent by Host and Equipment

    // S7F39R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 7, 39, new SecsMsgReceiveDelegate(recv_S7F39R));

// receive method 
void recv_S7F39R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect DSNAME
        // variables for data items and parsing
        string DSNAME;  	// A:50 (varies)  the name of a dataset such as a PPID
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0.Length == 2) { DSNAME = list0[1];} else { DSNAME = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(7, 40, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S7F39R

S7F40Large Formatted PP Ack Sent by Host and Equipment

    // S7F40 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(7, 39, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect ACKC7
        // variables for data items and parsing
        int ACKC7;  	// B:1 (always)  S7 acknowledge code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        ACKC7 = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S7F41RLarge PP Req Sent by Host and Equipment

    // S7F41R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 7, 41, new SecsMsgReceiveDelegate(recv_S7F41R));

// receive method 
void recv_S7F41R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect DSNAME
        // variables for data items and parsing
        string DSNAME;  	// A:50 (varies)  the name of a dataset such as a PPID
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0.Length == 2) { DSNAME = list0[1];} else { DSNAME = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(7, 42, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S7F41R

S7F42Large PP Req Ack Sent by Host and Equipment

    // S7F42 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(7, 41, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect ACKC7
        // variables for data items and parsing
        int ACKC7;  	// B:1 (always)  S7 acknowledge code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        ACKC7 = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S7F43RLarge Formatted PP Req Sent by Host and Equipment

    // S7F43R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 7, 43, new SecsMsgReceiveDelegate(recv_S7F43R));

// receive method 
void recv_S7F43R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect DSNAME
        // variables for data items and parsing
        string DSNAME;  	// A:50 (varies)  the name of a dataset such as a PPID
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0.Length == 2) { DSNAME = list0[1];} else { DSNAME = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(7, 44, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S7F43R

S7F44Large Formatted PP Req Ack Sent by Host and Equipment

    // S7F44 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(7, 43, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect ACKC7
        // variables for data items and parsing
        int ACKC7;  	// B:1 (always)  S7 acknowledge code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        ACKC7 = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S9F1Unknown Device ID Sent by Equipment Only

    // S9F1 C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 9, 1, new SecsMsgReceiveDelegate(recv_S9F1));

// receive method 
void recv_S9F1(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect MHEAD
        // variables for data items and parsing
        int [] MHEAD;  	// B:10 (always)  message header of received block
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( !list0[0].StartsWith("B:") ) { ok = false; break; }
        MHEAD = new int[list0.Length-1];
        for(int i=0; i < MHEAD.Length; i++) {
            MHEAD[i] = sp.BinToInt(list0[1+i]);
            }
        } // end while(ok)
    } // end recv_S9F1

S9F3Unknown Stream Sent by Equipment Only

    // S9F3 C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 9, 3, new SecsMsgReceiveDelegate(recv_S9F3));

// receive method 
void recv_S9F3(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect MHEAD
        // variables for data items and parsing
        int [] MHEAD;  	// B:10 (always)  message header of received block
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( !list0[0].StartsWith("B:") ) { ok = false; break; }
        MHEAD = new int[list0.Length-1];
        for(int i=0; i < MHEAD.Length; i++) {
            MHEAD[i] = sp.BinToInt(list0[1+i]);
            }
        } // end while(ok)
    } // end recv_S9F3

S9F5Unknown Function Sent by Equipment Only

    // S9F5 C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 9, 5, new SecsMsgReceiveDelegate(recv_S9F5));

// receive method 
void recv_S9F5(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect MHEAD
        // variables for data items and parsing
        int [] MHEAD;  	// B:10 (always)  message header of received block
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( !list0[0].StartsWith("B:") ) { ok = false; break; }
        MHEAD = new int[list0.Length-1];
        for(int i=0; i < MHEAD.Length; i++) {
            MHEAD[i] = sp.BinToInt(list0[1+i]);
            }
        } // end while(ok)
    } // end recv_S9F5

S9F7Illegal Data Sent by Equipment Only

    // S9F7 C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 9, 7, new SecsMsgReceiveDelegate(recv_S9F7));

// receive method 
void recv_S9F7(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect MHEAD
        // variables for data items and parsing
        int [] MHEAD;  	// B:10 (always)  message header of received block
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( !list0[0].StartsWith("B:") ) { ok = false; break; }
        MHEAD = new int[list0.Length-1];
        for(int i=0; i < MHEAD.Length; i++) {
            MHEAD[i] = sp.BinToInt(list0[1+i]);
            }
        } // end while(ok)
    } // end recv_S9F7

S9F9Transaction Timeout Sent by Equipment Only

    // S9F9 C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 9, 9, new SecsMsgReceiveDelegate(recv_S9F9));

// receive method 
void recv_S9F9(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect SHEAD
        // variables for data items and parsing
        int [] SHEAD;  	// B:10 (always)  message header of sent block
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( !list0[0].StartsWith("B:") ) { ok = false; break; }
        SHEAD = new int[list0.Length-1];
        for(int i=0; i < SHEAD.Length; i++) {
            SHEAD[i] = sp.BinToInt(list0[1+i]);
            }
        } // end while(ok)
    } // end recv_S9F9

S9F11Data Too Long Sent by Equipment Only

    // S9F11 C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 9, 11, new SecsMsgReceiveDelegate(recv_S9F11));

// receive method 
void recv_S9F11(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect MHEAD
        // variables for data items and parsing
        int [] MHEAD;  	// B:10 (always)  message header of received block
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( !list0[0].StartsWith("B:") ) { ok = false; break; }
        MHEAD = new int[list0.Length-1];
        for(int i=0; i < MHEAD.Length; i++) {
            MHEAD[i] = sp.BinToInt(list0[1+i]);
            }
        } // end while(ok)
    } // end recv_S9F11

S9F13Conversation Timeout Sent by Equipment Only

    // S9F13 C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 9, 13, new SecsMsgReceiveDelegate(recv_S9F13));

// receive method 
void recv_S9F13(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 MEXP EDID
        // variables for data items and parsing
        string MEXP;  	// A:6 (always)  message expected in form of SxxFyy
        string EDID;  	// A:80 (varies)  expected data identification, PPID or SPID or PTN
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { MEXP = list1[1];} else { MEXP = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { EDID = list1[1];} else { EDID = ""; }
        } // end while(ok)
    } // end recv_S9F13

S10F1[R]Terminal Request Sent by Equipment Only

    // S10F1 C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 10, 1, new SecsMsgReceiveDelegate(recv_S10F1));

// receive method 
void recv_S10F1(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 TID TEXT
        // variables for data items and parsing
        int TID;  	// B:1 (always)  terminal ID
        string TEXT;  	// A:120 (varies)  line of text for display, no standard max size
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        TID = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { TEXT = list1[1];} else { TEXT = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(10, 2, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S10F1

S10F2Terminal Request Acknowledge Sent by Host Only

    // S10F2 C# Parse reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(10, 1, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect ACKC10
        // variables for data items and parsing
        int ACKC10;  	// B:1 (always)  acknowledge code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        ACKC10 = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S10F3[R]Terminal Display, Single Sent by Host Only

    // S10F3 C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 10, 3, new SecsMsgReceiveDelegate(recv_S10F3));

// receive method 
void recv_S10F3(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 TID TEXT
        // variables for data items and parsing
        int TID;  	// B:1 (always)  terminal ID
        string TEXT;  	// A:120 (varies)  line of text for display, no standard max size
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        TID = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { TEXT = list1[1];} else { TEXT = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(10, 4, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S10F3

S10F4Terminal Display, Single Acknowledge Sent by Equipment Only

    // S10F4 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(10, 3, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect ACKC10
        // variables for data items and parsing
        int ACKC10;  	// B:1 (always)  acknowledge code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        ACKC10 = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S10F5[R]Terminal Display, Multi-Block Sent by Host Only

    // S10F5 C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 10, 5, new SecsMsgReceiveDelegate(recv_S10F5));

// receive method 
void recv_S10F5(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 TID {L:n TEXT}
        // variables for data items and parsing
        int TID;  	// B:1 (always)  terminal ID
        string TEXT;  	// A:120 (varies)  line of text for display, no standard max size
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        TID = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { TEXT = list2[1];} else { TEXT = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(10, 6, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S10F5

S10F6Terminal Display, Multi-Block Acknowledge Sent by Equipment Only

    // S10F6 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(10, 5, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect ACKC10
        // variables for data items and parsing
        int ACKC10;  	// B:1 (always)  acknowledge code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        ACKC10 = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S10F7Multi-block Not Allowed Sent by Equipment Only

    // S10F7 C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 10, 7, new SecsMsgReceiveDelegate(recv_S10F7));

// receive method 
void recv_S10F7(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect TID
        // variables for data items and parsing
        int TID;  	// B:1 (always)  terminal ID
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        TID = sp.BinToInt(list0[1]);
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(10, 8, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S10F7

S10F9Broadcast Sent by Host Only

    // S10F9 C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 10, 9, new SecsMsgReceiveDelegate(recv_S10F9));

// receive method 
void recv_S10F9(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect TEXT
        // variables for data items and parsing
        string TEXT;  	// A:120 (varies)  line of text for display, no standard max size
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0.Length == 2) { TEXT = list0[1];} else { TEXT = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(10, 10, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S10F9

S10F10Broadcast Acknowledge Sent by Equipment Only

    // S10F10 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(10, 9, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect ACKC10
        // variables for data items and parsing
        int ACKC10;  	// B:1 (always)  acknowledge code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        ACKC10 = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S12F1RMap Setup Data Send Sent by Equipment Only

    // S12F1R C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 12, 1, new SecsMsgReceiveDelegate(recv_S12F1R));

// receive method 
void recv_S12F1R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:15 MID IDTYP FNLOC FFROT ORLOC RPSEL {L:n REFP} DUTMS XDIES YDIES ROWCT COLCT NULBC PRDCT PRAXI
        // variables for data items and parsing
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        int IDTYP;  	// B:1 (always)  ID type
        uint FNLOC;  	// U2:1 (always)  flat/notch location in degrees clockwise from bottom
        uint FFROT;  	// U2:1 (always)  film frame location in degrees clockwise from bottom
        int ORLOC;  	// B:1 (always)  origin location
        uint RPSEL;  	// U1:1 (always)  reference point select 
        int [] REFP;  	// I4:2 (varies)  x y reference point
        string DUTMS;  	// A:n (always)  die units of measure
        string XDIES;  	// F4:1 (varies)  X-axis die size
        string YDIES;  	// F4:1 (varies)  Y-axis die size
        string ROWCT;  	// U4:1 (varies)  row count in die increments
        string COLCT;  	// U4:1 (varies)  column count in die increments
        string NULBC;  	// A:n (varies)  null bin code value
        string PRDCT;  	// U4:1 (varies)  process die count
        int PRAXI;  	// B:1 (always)  process access
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 16 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MID = list1[1];} else { MID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        IDTYP = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U2:1" ) { ok = false; break; }
        FNLOC = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[4]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U2:1" ) { ok = false; break; }
        FFROT = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[5]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        ORLOC = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[6]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        RPSEL = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[7]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if (list2.Length < 1) { ok = false; break; }
            REFP = new int[list2.Length-1];
            for(int i=0; i < REFP.Length; i++) {
                REFP[i] = int.Parse(list2[1+i]);
                }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[8]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { DUTMS = list1[1];} else { DUTMS = ""; }
        list1 = sp.ListSplit(list0[9]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { XDIES = list1[1];} else { XDIES = ""; }
        list1 = sp.ListSplit(list0[10]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { YDIES = list1[1];} else { YDIES = ""; }
        list1 = sp.ListSplit(list0[11]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { ROWCT = list1[1];} else { ROWCT = ""; }
        list1 = sp.ListSplit(list0[12]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { COLCT = list1[1];} else { COLCT = ""; }
        list1 = sp.ListSplit(list0[13]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { NULBC = list1[1];} else { NULBC = ""; }
        list1 = sp.ListSplit(list0[14]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { PRDCT = list1[1];} else { PRDCT = ""; }
        list1 = sp.ListSplit(list0[15]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        PRAXI = sp.BinToInt(list1[1]);
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(12, 2, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S12F1R

S12F2Map Setup Data Acknowledge Sent by Host Only

    // S12F2 C# Parse reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(12, 1, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect SDACK
        // variables for data items and parsing
        int SDACK;  	// B:1 (always)  setup data ack, 0 ok
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        SDACK = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S12F3RMap Setup Data Request Sent by Equipment Only

    // S12F3R C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 12, 3, new SecsMsgReceiveDelegate(recv_S12F3R));

// receive method 
void recv_S12F3R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:9 MID IDTYP MAPFT FNLOC FFROT ORLOC PRAXI BCEQU NULBC
        // variables for data items and parsing
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        int IDTYP;  	// B:1 (always)  ID type
        int MAPFT;  	// B:1 (always)  map data format type
        uint FNLOC;  	// U2:1 (always)  flat/notch location in degrees clockwise from bottom
        uint FFROT;  	// U2:1 (always)  film frame location in degrees clockwise from bottom
        int ORLOC;  	// B:1 (always)  origin location
        int PRAXI;  	// B:1 (always)  process access
        uint [] BCEQU;  	// U1:n (varies)  array of bin code equivalents
        string NULBC;  	// A:n (varies)  null bin code value
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 10 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MID = list1[1];} else { MID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        IDTYP = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        MAPFT = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[4]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U2:1" ) { ok = false; break; }
        FNLOC = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[5]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U2:1" ) { ok = false; break; }
        FFROT = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[6]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        ORLOC = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[7]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        PRAXI = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[8]);
        if (list1.Length < 1) { ok = false; break; }
        BCEQU = new uint[list1.Length-1];
        for(int i=0; i < BCEQU.Length; i++) {
            BCEQU[i] = uint.Parse(list1[1+i]);
            }
        list1 = sp.ListSplit(list0[9]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { NULBC = list1[1];} else { NULBC = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(12, 4, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S12F3R

S12F4Map Setup Data Sent by Host Only

    // S12F4 C# Parse reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(12, 3, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:15 MID IDTYP FNLOC ORLOC RPSEL {L:n REFP} DUTMS XDIES YDIES ROWCT COLCT PRDCT BCEQU NULBC MLCL
        // variables for data items and parsing
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        int IDTYP;  	// B:1 (always)  ID type
        uint FNLOC;  	// U2:1 (always)  flat/notch location in degrees clockwise from bottom
        int ORLOC;  	// B:1 (always)  origin location
        uint RPSEL;  	// U1:1 (always)  reference point select 
        int [] REFP;  	// I4:2 (varies)  x y reference point
        string DUTMS;  	// A:n (always)  die units of measure
        string XDIES;  	// F4:1 (varies)  X-axis die size
        string YDIES;  	// F4:1 (varies)  Y-axis die size
        string ROWCT;  	// U4:1 (varies)  row count in die increments
        string COLCT;  	// U4:1 (varies)  column count in die increments
        string PRDCT;  	// U4:1 (varies)  process die count
        uint [] BCEQU;  	// U1:n (varies)  array of bin code equivalents
        string NULBC;  	// A:n (varies)  null bin code value
        string MLCL;  	// U4:1 (varies)  message length in bytes
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 16 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MID = list1[1];} else { MID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        IDTYP = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U2:1" ) { ok = false; break; }
        FNLOC = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[4]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        ORLOC = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[5]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        RPSEL = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[6]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if (list2.Length < 1) { ok = false; break; }
            REFP = new int[list2.Length-1];
            for(int i=0; i < REFP.Length; i++) {
                REFP[i] = int.Parse(list2[1+i]);
                }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[7]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { DUTMS = list1[1];} else { DUTMS = ""; }
        list1 = sp.ListSplit(list0[8]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { XDIES = list1[1];} else { XDIES = ""; }
        list1 = sp.ListSplit(list0[9]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { YDIES = list1[1];} else { YDIES = ""; }
        list1 = sp.ListSplit(list0[10]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { ROWCT = list1[1];} else { ROWCT = ""; }
        list1 = sp.ListSplit(list0[11]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { COLCT = list1[1];} else { COLCT = ""; }
        list1 = sp.ListSplit(list0[12]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { PRDCT = list1[1];} else { PRDCT = ""; }
        list1 = sp.ListSplit(list0[13]);
        if (list1.Length < 1) { ok = false; break; }
        BCEQU = new uint[list1.Length-1];
        for(int i=0; i < BCEQU.Length; i++) {
            BCEQU[i] = uint.Parse(list1[1+i]);
            }
        list1 = sp.ListSplit(list0[14]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { NULBC = list1[1];} else { NULBC = ""; }
        list1 = sp.ListSplit(list0[15]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MLCL = list1[1];} else { MLCL = ""; }
        return;  // parsed ok
        } // end while(ok)

S12F5RMap Transmit Inquire Sent by Equipment Only

    // S12F5R C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 12, 5, new SecsMsgReceiveDelegate(recv_S12F5R));

// receive method 
void recv_S12F5R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:4 MID IDTYP MAPFT MLCL
        // variables for data items and parsing
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        int IDTYP;  	// B:1 (always)  ID type
        int MAPFT;  	// B:1 (always)  map data format type
        string MLCL;  	// U4:1 (varies)  message length in bytes
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MID = list1[1];} else { MID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        IDTYP = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        MAPFT = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[4]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MLCL = list1[1];} else { MLCL = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(12, 6, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S12F5R

S12F6Map Transmit Grant Sent by Host Only

    // S12F6 C# Parse reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(12, 5, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect GRNT1
        // variables for data items and parsing
        int GRNT1;  	// B:1 (always)  grant code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        GRNT1 = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S12F7RMap Data Send Type 1 Sent by Equipment Only

    // S12F7R C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 12, 7, new SecsMsgReceiveDelegate(recv_S12F7R));

// receive method 
void recv_S12F7R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:3 MID IDTYP {L:n {L:2 RSINF BINLT}}
        // variables for data items and parsing
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        int IDTYP;  	// B:1 (always)  ID type
        int [] RSINF;  	// I4:3 (varies)  starting location for row or column, x,y,direction triplet
        uint [] BINLT;  	// U1:n (varies)  array of bin values, text or U1 array
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MID = list1[1];} else { MID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        IDTYP = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            RSINF = new int[list3.Length-1];
            for(int i=0; i < RSINF.Length; i++) {
                RSINF[i] = int.Parse(list3[1+i]);
                }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            BINLT = new uint[list3.Length-1];
            for(int i=0; i < BINLT.Length; i++) {
                BINLT[i] = uint.Parse(list3[1+i]);
                }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(12, 8, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S12F7R

S12F8Map Data Ack Type 1 Sent by Host Only

    // S12F8 C# Parse reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(12, 7, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect MDACK
        // variables for data items and parsing
        int MDACK;  	// B:1 (always)  map data ack
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        MDACK = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S12F9RMap Data Send Type 2 Sent by Equipment Only

    // S12F9R C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 12, 9, new SecsMsgReceiveDelegate(recv_S12F9R));

// receive method 
void recv_S12F9R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:4 MID IDTYP STRP BINLT
        // variables for data items and parsing
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        int IDTYP;  	// B:1 (always)  ID type
        int [] STRP;  	// I2:2 (varies)  x y die coordinate starting position
        uint [] BINLT;  	// U1:n (varies)  array of bin values, text or U1 array
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MID = list1[1];} else { MID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        IDTYP = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        STRP = new int[list1.Length-1];
        for(int i=0; i < STRP.Length; i++) {
            STRP[i] = int.Parse(list1[1+i]);
            }
        list1 = sp.ListSplit(list0[4]);
        if (list1.Length < 1) { ok = false; break; }
        BINLT = new uint[list1.Length-1];
        for(int i=0; i < BINLT.Length; i++) {
            BINLT[i] = uint.Parse(list1[1+i]);
            }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(12, 10, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S12F9R

S12F10Map Data Ack Type 2 Sent by Host Only

    // S12F10 C# Parse reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(12, 9, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect MDACK
        // variables for data items and parsing
        int MDACK;  	// B:1 (always)  map data ack
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        MDACK = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S12F11RMap Data Send Type 3 Sent by Equipment Only

    // S12F11R C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 12, 11, new SecsMsgReceiveDelegate(recv_S12F11R));

// receive method 
void recv_S12F11R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:3 MID IDTYP {L:n {L:2 XYPOS BINLT}}
        // variables for data items and parsing
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        int IDTYP;  	// B:1 (always)  ID type
        int [] XYPOS;  	// I2:2 (varies)  x y coordinate position
        uint [] BINLT;  	// U1:n (varies)  array of bin values, text or U1 array
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MID = list1[1];} else { MID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        IDTYP = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            XYPOS = new int[list3.Length-1];
            for(int i=0; i < XYPOS.Length; i++) {
                XYPOS[i] = int.Parse(list3[1+i]);
                }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            BINLT = new uint[list3.Length-1];
            for(int i=0; i < BINLT.Length; i++) {
                BINLT[i] = uint.Parse(list3[1+i]);
                }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(12, 12, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S12F11R

S12F12Map Data Ack Type 3 Sent by Host Only

    // S12F12 C# Parse reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(12, 11, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect MDACK
        // variables for data items and parsing
        int MDACK;  	// B:1 (always)  map data ack
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        MDACK = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S12F13RMap Data Request Type 1 Sent by Equipment Only

    // S12F13R C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 12, 13, new SecsMsgReceiveDelegate(recv_S12F13R));

// receive method 
void recv_S12F13R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 MID IDTYP
        // variables for data items and parsing
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        int IDTYP;  	// B:1 (always)  ID type
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MID = list1[1];} else { MID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        IDTYP = sp.BinToInt(list1[1]);
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(12, 14, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S12F13R

S12F14Map Data Type 1 Sent by Host Only

    // S12F14 C# Parse reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(12, 13, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:3 MID IDTYP {L:n {L:2 RSINF BINLT}}
        // variables for data items and parsing
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        int IDTYP;  	// B:1 (always)  ID type
        int [] RSINF;  	// I4:3 (varies)  starting location for row or column, x,y,direction triplet
        uint [] BINLT;  	// U1:n (varies)  array of bin values, text or U1 array
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MID = list1[1];} else { MID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        IDTYP = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            RSINF = new int[list3.Length-1];
            for(int i=0; i < RSINF.Length; i++) {
                RSINF[i] = int.Parse(list3[1+i]);
                }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            BINLT = new uint[list3.Length-1];
            for(int i=0; i < BINLT.Length; i++) {
                BINLT[i] = uint.Parse(list3[1+i]);
                }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S12F15RMap Data Request Type 2 Sent by Equipment Only

    // S12F15R C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 12, 15, new SecsMsgReceiveDelegate(recv_S12F15R));

// receive method 
void recv_S12F15R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 MID IDTYP
        // variables for data items and parsing
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        int IDTYP;  	// B:1 (always)  ID type
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MID = list1[1];} else { MID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        IDTYP = sp.BinToInt(list1[1]);
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(12, 16, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S12F15R

S12F16Map Data Type 2 Sent by Host Only

    // S12F16 C# Parse reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(12, 15, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:4 MID IDTYP STRP BINLT
        // variables for data items and parsing
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        int IDTYP;  	// B:1 (always)  ID type
        int [] STRP;  	// I2:2 (varies)  x y die coordinate starting position
        uint [] BINLT;  	// U1:n (varies)  array of bin values, text or U1 array
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MID = list1[1];} else { MID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        IDTYP = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        STRP = new int[list1.Length-1];
        for(int i=0; i < STRP.Length; i++) {
            STRP[i] = int.Parse(list1[1+i]);
            }
        list1 = sp.ListSplit(list0[4]);
        if (list1.Length < 1) { ok = false; break; }
        BINLT = new uint[list1.Length-1];
        for(int i=0; i < BINLT.Length; i++) {
            BINLT[i] = uint.Parse(list1[1+i]);
            }
        return;  // parsed ok
        } // end while(ok)

S12F17RMap Data Request Type 3 Sent by Equipment Only

    // S12F17R C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 12, 17, new SecsMsgReceiveDelegate(recv_S12F17R));

// receive method 
void recv_S12F17R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:3 MID IDTYP SDBIN
        // variables for data items and parsing
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        int IDTYP;  	// B:1 (always)  ID type
        int SDBIN;  	// B:1 (always)  send bin data flag, 0=send, else do not
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MID = list1[1];} else { MID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        IDTYP = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        SDBIN = sp.BinToInt(list1[1]);
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(12, 18, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S12F17R

S12F18Map Data Type 3 Sent by Host Only

    // S12F18 C# Parse reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(12, 17, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:3 MID IDTYP {L:n {L:2 XYPOS BINLT}}
        // variables for data items and parsing
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        int IDTYP;  	// B:1 (always)  ID type
        int [] XYPOS;  	// I2:2 (varies)  x y coordinate position
        uint [] BINLT;  	// U1:n (varies)  array of bin values, text or U1 array
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MID = list1[1];} else { MID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        IDTYP = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            XYPOS = new int[list3.Length-1];
            for(int i=0; i < XYPOS.Length; i++) {
                XYPOS[i] = int.Parse(list3[1+i]);
                }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            BINLT = new uint[list3.Length-1];
            for(int i=0; i < BINLT.Length; i++) {
                BINLT[i] = uint.Parse(list3[1+i]);
                }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S12F19Map Error Report Send Sent by Host and Equipment

    // S12F19 C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 12, 19, new SecsMsgReceiveDelegate(recv_S12F19));

// receive method 
void recv_S12F19(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 MAPER DATLC
        // variables for data items and parsing
        int MAPER;  	// B:1 (always)  map error
        uint DATLC;  	// U1:1 (always)  location of invalid data, offset in bytes in the SECS-II message body
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        MAPER = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        DATLC = uint.Parse(list1[1]);
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(12, 20, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S12F19

S13F1RSend Data Set Send Sent by Host and Equipment

    // S13F1R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 13, 1, new SecsMsgReceiveDelegate(recv_S13F1R));

// receive method 
void recv_S13F1R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:1 DSNAME
        // variables for data items and parsing
        string DSNAME;  	// A:50 (varies)  the name of a dataset such as a PPID
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 2 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DSNAME = list1[1];} else { DSNAME = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(13, 2, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S13F1R

S13F2Send Data Set Ack Sent by Host and Equipment

    // S13F2 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(13, 1, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 DSNAME ACKC13
        // variables for data items and parsing
        string DSNAME;  	// A:50 (varies)  the name of a dataset such as a PPID
        int ACKC13;  	// B:1 (always)  acknowledge code, 0 ok
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DSNAME = list1[1];} else { DSNAME = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        ACKC13 = sp.BinToInt(list1[1]);
        return;  // parsed ok
        } // end while(ok)

S13F3ROpen Data Set Request Sent by Host and Equipment

    // S13F3R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 13, 3, new SecsMsgReceiveDelegate(recv_S13F3R));

// receive method 
void recv_S13F3R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:3 HANDLE DSNAME CKPNT
        // variables for data items and parsing
        uint [] HANDLE;  	// U4 (varies)  logical unit or handle for a data set
        string DSNAME;  	// A:50 (varies)  the name of a dataset such as a PPID
        uint CKPNT;  	// U4:1 (always)  data set checkpoint defined by sender
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        HANDLE = new uint[list1.Length-1];
        for(int i=0; i < HANDLE.Length; i++) {
            HANDLE[i] = uint.Parse(list1[1+i]);
            }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DSNAME = list1[1];} else { DSNAME = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U4:1" ) { ok = false; break; }
        CKPNT = uint.Parse(list1[1]);
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(13, 4, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S13F3R

S13F4Open Data Set Data Sent by Host and Equipment

    // S13F4 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(13, 3, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:5 HANDLE DSNAME ACKC13 RTYPE RECLEN
        // variables for data items and parsing
        uint [] HANDLE;  	// U4 (varies)  logical unit or handle for a data set
        string DSNAME;  	// A:50 (varies)  the name of a dataset such as a PPID
        int ACKC13;  	// B:1 (always)  acknowledge code, 0 ok
        string RTYPE;  	// U1:1 (varies)  type of data record
        string RECLEN;  	// U4:1 (varies)  maximum number of bytes or characters in a discrete record
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 6 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        HANDLE = new uint[list1.Length-1];
        for(int i=0; i < HANDLE.Length; i++) {
            HANDLE[i] = uint.Parse(list1[1+i]);
            }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DSNAME = list1[1];} else { DSNAME = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        ACKC13 = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[4]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { RTYPE = list1[1];} else { RTYPE = ""; }
        list1 = sp.ListSplit(list0[5]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { RECLEN = list1[1];} else { RECLEN = ""; }
        return;  // parsed ok
        } // end while(ok)

S13F5RRead Data Set Request Sent by Host and Equipment

    // S13F5R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 13, 5, new SecsMsgReceiveDelegate(recv_S13F5R));

// receive method 
void recv_S13F5R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 HANDLE READLN
        // variables for data items and parsing
        uint [] HANDLE;  	// U4 (varies)  logical unit or handle for a data set
        string READLN;  	// U4:1 (varies)  maximum number of bytes or characters to read
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        HANDLE = new uint[list1.Length-1];
        for(int i=0; i < HANDLE.Length; i++) {
            HANDLE[i] = uint.Parse(list1[1+i]);
            }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { READLN = list1[1];} else { READLN = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(13, 6, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S13F5R

S13F6Read Data Set Data Sent by Host and Equipment

    // S13F6 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(13, 5, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:4 HANDLE ACKC13 CKPNT {L:n FILDAT}
        // variables for data items and parsing
        uint [] HANDLE;  	// U4 (varies)  logical unit or handle for a data set
        int ACKC13;  	// B:1 (always)  acknowledge code, 0 ok
        uint CKPNT;  	// U4:1 (always)  data set checkpoint defined by sender
        int [] FILDAT;  	// B (varies)  Data Set Data, binary or ascii.  Max length is the RECLEN from open.
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        HANDLE = new uint[list1.Length-1];
        for(int i=0; i < HANDLE.Length; i++) {
            HANDLE[i] = uint.Parse(list1[1+i]);
            }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        ACKC13 = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U4:1" ) { ok = false; break; }
        CKPNT = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if (list2.Length < 1) { ok = false; break; }
            FILDAT = new int[list2.Length-1];
            for(int i=0; i < FILDAT.Length; i++) {
                FILDAT[i] = sp.BinToInt(list2[1+i]);
                }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S13F7RClose Data Set Send Sent by Host and Equipment

    // S13F7R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 13, 7, new SecsMsgReceiveDelegate(recv_S13F7R));

// receive method 
void recv_S13F7R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:1 HANDLE
        // variables for data items and parsing
        uint [] HANDLE;  	// U4 (varies)  logical unit or handle for a data set
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 2 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        HANDLE = new uint[list1.Length-1];
        for(int i=0; i < HANDLE.Length; i++) {
            HANDLE[i] = uint.Parse(list1[1+i]);
            }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(13, 8, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S13F7R

S13F8Close Data Set Ack Sent by Host and Equipment

    // S13F8 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(13, 7, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 HANDLE ACKC13
        // variables for data items and parsing
        uint [] HANDLE;  	// U4 (varies)  logical unit or handle for a data set
        int ACKC13;  	// B:1 (always)  acknowledge code, 0 ok
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        HANDLE = new uint[list1.Length-1];
        for(int i=0; i < HANDLE.Length; i++) {
            HANDLE[i] = uint.Parse(list1[1+i]);
            }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        ACKC13 = sp.BinToInt(list1[1]);
        return;  // parsed ok
        } // end while(ok)

S13F9RReset Data Set Send Sent by Host and Equipment

    // S13F9R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 13, 9, new SecsMsgReceiveDelegate(recv_S13F9R));

// receive method 
void recv_S13F9R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // no data expected
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(13, 10, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S13F9R

S13F10Reset Data Set Ack Sent by Host and Equipment

    // S13F10 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(13, 9, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // no data expected
        return;  // parsed ok
        } // end while(ok)

S13F11RData Set Obj Multi-Block Inquire Sent by Host and Equipment

    // S13F11R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 13, 11, new SecsMsgReceiveDelegate(recv_S13F11R));

// receive method 
void recv_S13F11R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:3 DATAID OBJSPEC DATALENGTH
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string OBJSPEC;  	// A:n (varies)  E39 structured text identifying an object, [object type:object id>]+
        string DATALENGTH;  	// U4:1 (varies)  total bytes of the message body 
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { OBJSPEC = list1[1];} else { OBJSPEC = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATALENGTH = list1[1];} else { DATALENGTH = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(13, 12, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S13F11R

S13F12Data Set Obj Multi-Block Grant Sent by Host and Equipment

    // S13F12 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(13, 11, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect GRANT
        // variables for data items and parsing
        int GRANT;  	// B:1 (always)  multiblock grant code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        GRANT = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S13F13RTable Data Send Sent by Host and Equipment

    // S13F13R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 13, 13, new SecsMsgReceiveDelegate(recv_S13F13R));

// receive method 
void recv_S13F13R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:8 DATAID OBJSPEC TBLTYP TBLID TBLCMD {L:n {L:2 ATTRID ATTRDATA}} {L:c COLHDR} {L:r {L:m TBLELT}}
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string OBJSPEC;  	// A:n (varies)  E39 structured text identifying an object, [object type:object id>]+
        string TBLTYP;  	// A:n (always)  denotes the format and application of the table, conforms to OBJTYPE
        string TBLID;  	// A:80 (varies)  table identifier, a kind of OBJSPEC
        uint TBLCMD;  	// U1:1 (always)  table command
        string ATTRID;  	// A:40 (varies)  identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~.  Does not begin or end with space.
        string ATTRDATA;  	// A:n (varies)  a specific attribute value of any data type
        string COLHDR;  	// A:20 (always)  table column name
        string TBLELT;  	// A:n (varies)  table element any type, list types or array types are discouraged, first column type must be a primary key value and not be a list or array
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 9 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { OBJSPEC = list1[1];} else { OBJSPEC = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { TBLTYP = list1[1];} else { TBLTYP = ""; }
        list1 = sp.ListSplit(list0[4]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { TBLID = list1[1];} else { TBLID = ""; }
        list1 = sp.ListSplit(list0[5]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        TBLCMD = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[6]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ATTRID = list3[1];} else { ATTRID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ATTRDATA = list3[1];} else { ATTRDATA = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[7]);
        if ( list1.Length < 1) { ok=false; break; }
        int c;
        for(c=1; c < list1.Length; c++) {
            string [] list2;
            list2 = sp.ListSplit(list1[c]);
            if (list2.Length < 1) { ok = false; break; }
            if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
            if ( list2.Length == 2) { COLHDR = list2[1];} else { COLHDR = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[8]);
        if ( list1.Length < 1) { ok=false; break; }
        int r;
        for(r=1; r < list1.Length; r++) {
            string [] list2;
            list2 = sp.ListSplit(list1[r]);
            if ( list2.Length < 1) { ok=false; break; }
            int m;
            for(m=1; m < list2.Length; m++) {
                string [] list3;
                list3 = sp.ListSplit(list2[m]);
                if (list3.Length < 1) { ok = false; break; }
                if ( list3.Length == 2) { TBLELT = list3[1];} else { TBLELT = ""; }
                }
            if (!ok) break;
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(13, 14, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S13F13R

S13F14Table Data Ack Sent by Host and Equipment

    // S13F14 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(13, 13, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 TBLACK {L:p {L:2 ERRCODE ERRTEXT}}
        // variables for data items and parsing
        uint TBLACK;  	// U1:1 (always)  acknowledge code
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        TBLACK = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list1.Length; p++) {
            string [] list2;
            list2 = sp.ListSplit(list1[p]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ERRCODE = list3[1];} else { ERRCODE = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { ERRTEXT = list3[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S13F15RTable Data Request Sent by Host and Equipment

    // S13F15R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 13, 15, new SecsMsgReceiveDelegate(recv_S13F15R));

// receive method 
void recv_S13F15R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:7 DATAID OBJSPEC TBLTYP TBLID TBLCMD {L:p COLHDR} {L:q TBLELT}
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string OBJSPEC;  	// A:n (varies)  E39 structured text identifying an object, [object type:object id>]+
        string TBLTYP;  	// A:n (always)  denotes the format and application of the table, conforms to OBJTYPE
        string TBLID;  	// A:80 (varies)  table identifier, a kind of OBJSPEC
        uint TBLCMD;  	// U1:1 (always)  table command
        string COLHDR;  	// A:20 (always)  table column name
        string TBLELT;  	// A:n (varies)  table element any type, list types or array types are discouraged, first column type must be a primary key value and not be a list or array
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 8 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { OBJSPEC = list1[1];} else { OBJSPEC = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { TBLTYP = list1[1];} else { TBLTYP = ""; }
        list1 = sp.ListSplit(list0[4]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { TBLID = list1[1];} else { TBLID = ""; }
        list1 = sp.ListSplit(list0[5]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        TBLCMD = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[6]);
        if ( list1.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list1.Length; p++) {
            string [] list2;
            list2 = sp.ListSplit(list1[p]);
            if (list2.Length < 1) { ok = false; break; }
            if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
            if ( list2.Length == 2) { COLHDR = list2[1];} else { COLHDR = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[7]);
        if ( list1.Length < 1) { ok=false; break; }
        int q;
        for(q=1; q < list1.Length; q++) {
            string [] list2;
            list2 = sp.ListSplit(list1[q]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { TBLELT = list2[1];} else { TBLELT = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(13, 16, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S13F15R

S13F16Table Data Sent by Host and Equipment

    // S13F16 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(13, 15, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:6 TBLTYP TBLID {L:n {L:2 ATTRID ATTRDATA}} {L:c COLHDR} {L:r {L:c TBLELT}} {L:2 TBLACK {L:p ERRCODE ERRTEXT}}
        // variables for data items and parsing
        string TBLTYP;  	// A:n (always)  denotes the format and application of the table, conforms to OBJTYPE
        string TBLID;  	// A:80 (varies)  table identifier, a kind of OBJSPEC
        string ATTRID;  	// A:40 (varies)  identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~.  Does not begin or end with space.
        string ATTRDATA;  	// A:n (varies)  a specific attribute value of any data type
        string COLHDR;  	// A:20 (always)  table column name
        string TBLELT;  	// A:n (varies)  table element any type, list types or array types are discouraged, first column type must be a primary key value and not be a list or array
        uint TBLACK;  	// U1:1 (always)  acknowledge code
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 7 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { TBLTYP = list1[1];} else { TBLTYP = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { TBLID = list1[1];} else { TBLID = ""; }
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ATTRID = list3[1];} else { ATTRID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ATTRDATA = list3[1];} else { ATTRDATA = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length < 1) { ok=false; break; }
        int c;
        for(c=1; c < list1.Length; c++) {
            string [] list2;
            list2 = sp.ListSplit(list1[c]);
            if (list2.Length < 1) { ok = false; break; }
            if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
            if ( list2.Length == 2) { COLHDR = list2[1];} else { COLHDR = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[5]);
        if ( list1.Length < 1) { ok=false; break; }
        int r;
        for(r=1; r < list1.Length; r++) {
            string [] list2;
            list2 = sp.ListSplit(list1[r]);
            if ( list2.Length < 1) { ok=false; break; }
            int c;
            for(c=1; c < list2.Length; c++) {
                string [] list3;
                list3 = sp.ListSplit(list2[c]);
                if (list3.Length < 1) { ok = false; break; }
                if ( list3.Length == 2) { TBLELT = list3[1];} else { TBLELT = ""; }
                }
            if (!ok) break;
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[6]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "U1:1" ) { ok = false; break; }
        TBLACK = uint.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list2.Length; p++) {
            string [] list3;
            list3 = sp.ListSplit(list2[p]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ERRCODE = list3[1];} else { ERRCODE = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S14F1RGet Attributes Request Sent by Host and Equipment

    // S14F1R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 14, 1, new SecsMsgReceiveDelegate(recv_S14F1R));

// receive method 
void recv_S14F1R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:5 OBJSPEC OBJTYPE {L:i OBJID} {L:q {L:3 ATTRID ATTRDATA ATTRRELN}} {L:a ATTRID}
        // variables for data items and parsing
        string OBJSPEC;  	// A:n (varies)  E39 structured text identifying an object, [object type:object id>]+
        string OBJTYPE;  	// A:40 (varies)  object class name, chars 0x20-0x7e but not >, ?, *, or ~.  Does not begin or end with space.
        string OBJID;  	// A:80 (varies)  E39 object identifier 1-80 chars 0x20-0x7e but not >, ?, *, or ~.  Does not begin or end with space.
        string ATTRID;  	// A:40 (varies)  identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~.  Does not begin or end with space.
        string ATTRDATA;  	// A:n (varies)  a specific attribute value of any data type
        uint ATTRRELN;  	// U1:1 (always)  relationship of a value to an attribute value of an object
        string ATTRID;  	// A:40 (varies)  identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~.  Does not begin or end with space.
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 6 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { OBJSPEC = list1[1];} else { OBJSPEC = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { OBJTYPE = list1[1];} else { OBJTYPE = ""; }
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length < 1) { ok=false; break; }
        int i;
        for(i=1; i < list1.Length; i++) {
            string [] list2;
            list2 = sp.ListSplit(list1[i]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { OBJID = list2[1];} else { OBJID = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length < 1) { ok=false; break; }
        int q;
        for(q=1; q < list1.Length; q++) {
            string [] list2;
            list2 = sp.ListSplit(list1[q]);
            if ( list2.Length != 4 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ATTRID = list3[1];} else { ATTRID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ATTRDATA = list3[1];} else { ATTRDATA = ""; }
            list3 = sp.ListSplit(list2[3]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3[0] != "U1:1" ) { ok = false; break; }
            ATTRRELN = uint.Parse(list3[1]);
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[5]);
        if ( list1.Length < 1) { ok=false; break; }
        int a;
        for(a=1; a < list1.Length; a++) {
            string [] list2;
            list2 = sp.ListSplit(list1[a]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { ATTRID = list2[1];} else { ATTRID = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(14, 2, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S14F1R

S14F2Attribute Data Sent by Host and Equipment

    // S14F2 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(14, 1, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 {L:n {L:2 OBJID {L:a {L:2 ATTRID ATTRDATA}}}} {L:2 OBJACK {L:p {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        string OBJID;  	// A:80 (varies)  E39 object identifier 1-80 chars 0x20-0x7e but not >, ?, *, or ~.  Does not begin or end with space.
        string ATTRID;  	// A:40 (varies)  identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~.  Does not begin or end with space.
        string ATTRDATA;  	// A:n (varies)  a specific attribute value of any data type
        uint OBJACK;  	// U1:1 (always)  acknowledge code, 0 ok, 1 error
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { OBJID = list3[1];} else { OBJID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if ( list3.Length < 1) { ok=false; break; }
            int a;
            for(a=1; a < list3.Length; a++) {
                string [] list4;
                list4 = sp.ListSplit(list3[a]);
                if ( list4.Length != 3 ) { ok=false; break; }
                string [] list5;
                list5 = sp.ListSplit(list4[1]);
                if (list5.Length < 1) { ok = false; break; }
                if ( list5.Length == 2) { ATTRID = list5[1];} else { ATTRID = ""; }
                list5 = sp.ListSplit(list4[2]);
                if (list5.Length < 1) { ok = false; break; }
                if ( list5.Length == 2) { ATTRDATA = list5[1];} else { ATTRDATA = ""; }
                }
            if (!ok) break;
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "U1:1" ) { ok = false; break; }
        OBJACK = uint.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list2.Length; p++) {
            string [] list3;
            list3 = sp.ListSplit(list2[p]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S14F3RSet Attributes Sent by Host and Equipment

    // S14F3R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 14, 3, new SecsMsgReceiveDelegate(recv_S14F3R));

// receive method 
void recv_S14F3R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:4 OBJSPEC OBJTYPE {L:i OBJID} {L:n {L:2 ATTRID ATTRDATA}}
        // variables for data items and parsing
        string OBJSPEC;  	// A:n (varies)  E39 structured text identifying an object, [object type:object id>]+
        string OBJTYPE;  	// A:40 (varies)  object class name, chars 0x20-0x7e but not >, ?, *, or ~.  Does not begin or end with space.
        string OBJID;  	// A:80 (varies)  E39 object identifier 1-80 chars 0x20-0x7e but not >, ?, *, or ~.  Does not begin or end with space.
        string ATTRID;  	// A:40 (varies)  identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~.  Does not begin or end with space.
        string ATTRDATA;  	// A:n (varies)  a specific attribute value of any data type
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { OBJSPEC = list1[1];} else { OBJSPEC = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { OBJTYPE = list1[1];} else { OBJTYPE = ""; }
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length < 1) { ok=false; break; }
        int i;
        for(i=1; i < list1.Length; i++) {
            string [] list2;
            list2 = sp.ListSplit(list1[i]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { OBJID = list2[1];} else { OBJID = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ATTRID = list3[1];} else { ATTRID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ATTRDATA = list3[1];} else { ATTRDATA = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(14, 4, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S14F3R

S14F4Set Attributes Reply Sent by Host and Equipment

    // S14F4 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(14, 3, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 {L:i {L:2 OBJID {L:n {L:2 ATTRID ATTRDATA}}}} {L:2 OBJACK {L:p {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        string OBJID;  	// A:80 (varies)  E39 object identifier 1-80 chars 0x20-0x7e but not >, ?, *, or ~.  Does not begin or end with space.
        string ATTRID;  	// A:40 (varies)  identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~.  Does not begin or end with space.
        string ATTRDATA;  	// A:n (varies)  a specific attribute value of any data type
        uint OBJACK;  	// U1:1 (always)  acknowledge code, 0 ok, 1 error
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if ( list1.Length < 1) { ok=false; break; }
        int i;
        for(i=1; i < list1.Length; i++) {
            string [] list2;
            list2 = sp.ListSplit(list1[i]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { OBJID = list3[1];} else { OBJID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if ( list3.Length < 1) { ok=false; break; }
            int n;
            for(n=1; n < list3.Length; n++) {
                string [] list4;
                list4 = sp.ListSplit(list3[n]);
                if ( list4.Length != 3 ) { ok=false; break; }
                string [] list5;
                list5 = sp.ListSplit(list4[1]);
                if (list5.Length < 1) { ok = false; break; }
                if ( list5.Length == 2) { ATTRID = list5[1];} else { ATTRID = ""; }
                list5 = sp.ListSplit(list4[2]);
                if (list5.Length < 1) { ok = false; break; }
                if ( list5.Length == 2) { ATTRDATA = list5[1];} else { ATTRDATA = ""; }
                }
            if (!ok) break;
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "U1:1" ) { ok = false; break; }
        OBJACK = uint.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list2.Length; p++) {
            string [] list3;
            list3 = sp.ListSplit(list2[p]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S14F5RGet Type Data Sent by Host and Equipment

    // S14F5R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 14, 5, new SecsMsgReceiveDelegate(recv_S14F5R));

// receive method 
void recv_S14F5R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect OBJSPEC
        // variables for data items and parsing
        string OBJSPEC;  	// A:n (varies)  E39 structured text identifying an object, [object type:object id>]+
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0.Length == 2) { OBJSPEC = list0[1];} else { OBJSPEC = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(14, 6, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S14F5R

S14F6Type Data Sent by Host and Equipment

    // S14F6 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(14, 5, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 {L:n OBJTYPE} {L:2 OBJACK {L:p {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        string OBJTYPE;  	// A:40 (varies)  object class name, chars 0x20-0x7e but not >, ?, *, or ~.  Does not begin or end with space.
        uint OBJACK;  	// U1:1 (always)  acknowledge code, 0 ok, 1 error
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { OBJTYPE = list2[1];} else { OBJTYPE = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "U1:1" ) { ok = false; break; }
        OBJACK = uint.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list2.Length; p++) {
            string [] list3;
            list3 = sp.ListSplit(list2[p]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S14F7RGet Attribute Names for the types Sent by Host and Equipment

    // S14F7R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 14, 7, new SecsMsgReceiveDelegate(recv_S14F7R));

// receive method 
void recv_S14F7R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 OBJSPEC {L:n OBJTYPE}
        // variables for data items and parsing
        string OBJSPEC;  	// A:n (varies)  E39 structured text identifying an object, [object type:object id>]+
        string OBJTYPE;  	// A:40 (varies)  object class name, chars 0x20-0x7e but not >, ?, *, or ~.  Does not begin or end with space.
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { OBJSPEC = list1[1];} else { OBJSPEC = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { OBJTYPE = list2[1];} else { OBJTYPE = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(14, 8, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S14F7R

S14F8Attribute Names of the object types Sent by Host and Equipment

    // S14F8 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(14, 7, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 {L:n {L:2 OBJTYPE {L:a ATTRID}}} {L:2 OBJACK {L:p {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        string OBJTYPE;  	// A:40 (varies)  object class name, chars 0x20-0x7e but not >, ?, *, or ~.  Does not begin or end with space.
        string ATTRID;  	// A:40 (varies)  identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~.  Does not begin or end with space.
        uint OBJACK;  	// U1:1 (always)  acknowledge code, 0 ok, 1 error
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { OBJTYPE = list3[1];} else { OBJTYPE = ""; }
            list3 = sp.ListSplit(list2[2]);
            if ( list3.Length < 1) { ok=false; break; }
            int a;
            for(a=1; a < list3.Length; a++) {
                string [] list4;
                list4 = sp.ListSplit(list3[a]);
                if (list4.Length < 1) { ok = false; break; }
                if ( list4.Length == 2) { ATTRID = list4[1];} else { ATTRID = ""; }
                }
            if (!ok) break;
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "U1:1" ) { ok = false; break; }
        OBJACK = uint.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list2.Length; p++) {
            string [] list3;
            list3 = sp.ListSplit(list2[p]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S14F9RCreate Obj Request Sent by Host and Equipment

    // S14F9R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 14, 9, new SecsMsgReceiveDelegate(recv_S14F9R));

// receive method 
void recv_S14F9R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:3 OBJSPEC OBJTYPE {L:a {L:2 ATTRID ATTRDATA}}
        // variables for data items and parsing
        string OBJSPEC;  	// A:n (varies)  E39 structured text identifying an object, [object type:object id>]+
        string OBJTYPE;  	// A:40 (varies)  object class name, chars 0x20-0x7e but not >, ?, *, or ~.  Does not begin or end with space.
        string ATTRID;  	// A:40 (varies)  identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~.  Does not begin or end with space.
        string ATTRDATA;  	// A:n (varies)  a specific attribute value of any data type
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { OBJSPEC = list1[1];} else { OBJSPEC = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { OBJTYPE = list1[1];} else { OBJTYPE = ""; }
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length < 1) { ok=false; break; }
        int a;
        for(a=1; a < list1.Length; a++) {
            string [] list2;
            list2 = sp.ListSplit(list1[a]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ATTRID = list3[1];} else { ATTRID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ATTRDATA = list3[1];} else { ATTRDATA = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(14, 10, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S14F9R

S14F10Create Obj Ack Sent by Host and Equipment

    // S14F10 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(14, 9, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:3 OBJSPEC {L:b {L:2 ATTRID ATTRDATA}} {L:2 OBJACK {L:p {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        string OBJSPEC;  	// A:n (varies)  E39 structured text identifying an object, [object type:object id>]+
        string ATTRID;  	// A:40 (varies)  identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~.  Does not begin or end with space.
        string ATTRDATA;  	// A:n (varies)  a specific attribute value of any data type
        uint OBJACK;  	// U1:1 (always)  acknowledge code, 0 ok, 1 error
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { OBJSPEC = list1[1];} else { OBJSPEC = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int b;
        for(b=1; b < list1.Length; b++) {
            string [] list2;
            list2 = sp.ListSplit(list1[b]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ATTRID = list3[1];} else { ATTRID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ATTRDATA = list3[1];} else { ATTRDATA = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "U1:1" ) { ok = false; break; }
        OBJACK = uint.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list2.Length; p++) {
            string [] list3;
            list3 = sp.ListSplit(list2[p]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S14F11RDelete Obj Request Sent by Host and Equipment

    // S14F11R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 14, 11, new SecsMsgReceiveDelegate(recv_S14F11R));

// receive method 
void recv_S14F11R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 OBJSPEC {L:a {L:2 ATTRID ATTRDATA}}
        // variables for data items and parsing
        string OBJSPEC;  	// A:n (varies)  E39 structured text identifying an object, [object type:object id>]+
        string ATTRID;  	// A:40 (varies)  identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~.  Does not begin or end with space.
        string ATTRDATA;  	// A:n (varies)  a specific attribute value of any data type
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { OBJSPEC = list1[1];} else { OBJSPEC = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int a;
        for(a=1; a < list1.Length; a++) {
            string [] list2;
            list2 = sp.ListSplit(list1[a]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ATTRID = list3[1];} else { ATTRID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ATTRDATA = list3[1];} else { ATTRDATA = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(14, 12, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S14F11R

S14F12Delete Obj Ack Sent by Host and Equipment

    // S14F12 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(14, 11, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 {L:b {L:2 ATTRID ATTRDATA}} {L:2 OBJACK {L:p {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        string ATTRID;  	// A:40 (varies)  identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~.  Does not begin or end with space.
        string ATTRDATA;  	// A:n (varies)  a specific attribute value of any data type
        uint OBJACK;  	// U1:1 (always)  acknowledge code, 0 ok, 1 error
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if ( list1.Length < 1) { ok=false; break; }
        int b;
        for(b=1; b < list1.Length; b++) {
            string [] list2;
            list2 = sp.ListSplit(list1[b]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ATTRID = list3[1];} else { ATTRID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ATTRDATA = list3[1];} else { ATTRDATA = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "U1:1" ) { ok = false; break; }
        OBJACK = uint.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list2.Length; p++) {
            string [] list3;
            list3 = sp.ListSplit(list2[p]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S14F13RObject Attach Request Sent by Host and Equipment

    // S14F13R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 14, 13, new SecsMsgReceiveDelegate(recv_S14F13R));

// receive method 
void recv_S14F13R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 OBJSPEC {L:a {L:2 ATTRID ATTRDATA}}
        // variables for data items and parsing
        string OBJSPEC;  	// A:n (varies)  E39 structured text identifying an object, [object type:object id>]+
        string ATTRID;  	// A:40 (varies)  identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~.  Does not begin or end with space.
        string ATTRDATA;  	// A:n (varies)  a specific attribute value of any data type
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { OBJSPEC = list1[1];} else { OBJSPEC = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int a;
        for(a=1; a < list1.Length; a++) {
            string [] list2;
            list2 = sp.ListSplit(list1[a]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ATTRID = list3[1];} else { ATTRID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ATTRDATA = list3[1];} else { ATTRDATA = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(14, 14, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S14F13R

S14F14Object Attach Ack Sent by Host and Equipment

    // S14F14 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(14, 13, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:3 OBJTOKEN {L:b {L:2 ATTRID ATTRDATA}} {L:2 OBJACK {L:p {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        uint OBJTOKEN;  	// U4:1 (always)  token used for authorization
        string ATTRID;  	// A:40 (varies)  identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~.  Does not begin or end with space.
        string ATTRDATA;  	// A:n (varies)  a specific attribute value of any data type
        uint OBJACK;  	// U1:1 (always)  acknowledge code, 0 ok, 1 error
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U4:1" ) { ok = false; break; }
        OBJTOKEN = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int b;
        for(b=1; b < list1.Length; b++) {
            string [] list2;
            list2 = sp.ListSplit(list1[b]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ATTRID = list3[1];} else { ATTRID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ATTRDATA = list3[1];} else { ATTRDATA = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "U1:1" ) { ok = false; break; }
        OBJACK = uint.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list2.Length; p++) {
            string [] list3;
            list3 = sp.ListSplit(list2[p]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S14F15RAttached Obj Action Req. Sent by Host and Equipment

    // S14F15R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 14, 15, new SecsMsgReceiveDelegate(recv_S14F15R));

// receive method 
void recv_S14F15R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:4 OBJSPEC OBJCMD OBJTOKEN {L:a {L:2 ATTRID ATTRDATA}}
        // variables for data items and parsing
        string OBJSPEC;  	// A:n (varies)  E39 structured text identifying an object, [object type:object id>]+
        uint OBJCMD;  	// U1:1 (always)  Specifies an action to be performed by an object
        uint OBJTOKEN;  	// U4:1 (always)  token used for authorization
        string ATTRID;  	// A:40 (varies)  identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~.  Does not begin or end with space.
        string ATTRDATA;  	// A:n (varies)  a specific attribute value of any data type
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { OBJSPEC = list1[1];} else { OBJSPEC = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        OBJCMD = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U4:1" ) { ok = false; break; }
        OBJTOKEN = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length < 1) { ok=false; break; }
        int a;
        for(a=1; a < list1.Length; a++) {
            string [] list2;
            list2 = sp.ListSplit(list1[a]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ATTRID = list3[1];} else { ATTRID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ATTRDATA = list3[1];} else { ATTRDATA = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(14, 16, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S14F15R

S14F16Attached Obj Action Ack Sent by Host and Equipment

    // S14F16 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(14, 15, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 {L:b {L:2 ATTRID ATTRDATA}} {L:2 OBJACK {L:p {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        string ATTRID;  	// A:40 (varies)  identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~.  Does not begin or end with space.
        string ATTRDATA;  	// A:n (varies)  a specific attribute value of any data type
        uint OBJACK;  	// U1:1 (always)  acknowledge code, 0 ok, 1 error
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if ( list1.Length < 1) { ok=false; break; }
        int b;
        for(b=1; b < list1.Length; b++) {
            string [] list2;
            list2 = sp.ListSplit(list1[b]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ATTRID = list3[1];} else { ATTRID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ATTRDATA = list3[1];} else { ATTRDATA = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "U1:1" ) { ok = false; break; }
        OBJACK = uint.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list2.Length; p++) {
            string [] list3;
            list3 = sp.ListSplit(list2[p]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S14F17RSupervised Obj Action Req Sent by Host and Equipment

    // S14F17R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 14, 17, new SecsMsgReceiveDelegate(recv_S14F17R));

// receive method 
void recv_S14F17R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:4 OBJSPEC OBJCMD TARGETSPEC {L:a {L:2 ATTRID ATTRDATA}}
        // variables for data items and parsing
        string OBJSPEC;  	// A:n (varies)  E39 structured text identifying an object, [object type:object id>]+
        uint OBJCMD;  	// U1:1 (always)  Specifies an action to be performed by an object
        string TARGETSPEC;  	// A:40 (always)  Specifier of target object
        string ATTRID;  	// A:40 (varies)  identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~.  Does not begin or end with space.
        string ATTRDATA;  	// A:n (varies)  a specific attribute value of any data type
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { OBJSPEC = list1[1];} else { OBJSPEC = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        OBJCMD = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { TARGETSPEC = list1[1];} else { TARGETSPEC = ""; }
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length < 1) { ok=false; break; }
        int a;
        for(a=1; a < list1.Length; a++) {
            string [] list2;
            list2 = sp.ListSplit(list1[a]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ATTRID = list3[1];} else { ATTRID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ATTRDATA = list3[1];} else { ATTRDATA = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(14, 18, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S14F17R

S14F18Supervised Obj Action Ack Sent by Host and Equipment

    // S14F18 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(14, 17, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 {L:b {L:2 ATTRID ATTRDATA}} {L:2 OBJACK {L:p {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        string ATTRID;  	// A:40 (varies)  identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~.  Does not begin or end with space.
        string ATTRDATA;  	// A:n (varies)  a specific attribute value of any data type
        uint OBJACK;  	// U1:1 (always)  acknowledge code, 0 ok, 1 error
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if ( list1.Length < 1) { ok=false; break; }
        int b;
        for(b=1; b < list1.Length; b++) {
            string [] list2;
            list2 = sp.ListSplit(list1[b]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ATTRID = list3[1];} else { ATTRID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ATTRDATA = list3[1];} else { ATTRDATA = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "U1:1" ) { ok = false; break; }
        OBJACK = uint.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list2.Length; p++) {
            string [] list3;
            list3 = sp.ListSplit(list2[p]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S14F19RGeneric Service Req Sent by Host Only

    // S14F19R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 14, 19, new SecsMsgReceiveDelegate(recv_S14F19R));

// receive method 
void recv_S14F19R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:5 DATAID OPID OBJSPEC SVCNAME {L:m {L:2 SPNAME SPVAL}}
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string OPID;  	// U4:1 (varies)  operation identifier
        string OBJSPEC;  	// A:n (varies)  E39 structured text identifying an object, [object type:object id>]+
        string SVCNAME;  	// A:n (always)  service name
        string SPNAME;  	// A:n (always)  service parameter name
        string SPVAL;  	// A:n (varies)  service parameter value, any format type
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 6 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { OPID = list1[1];} else { OPID = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { OBJSPEC = list1[1];} else { OBJSPEC = ""; }
        list1 = sp.ListSplit(list0[4]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { SVCNAME = list1[1];} else { SVCNAME = ""; }
        list1 = sp.ListSplit(list0[5]);
        if ( list1.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list1.Length; m++) {
            string [] list2;
            list2 = sp.ListSplit(list1[m]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { SPNAME = list3[1];} else { SPNAME = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { SPVAL = list3[1];} else { SPVAL = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(14, 20, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S14F19R

S14F20Generic Service Ack Sent by Host and Equipment

    // S14F20 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(14, 19, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:4 SVCACK LINKID {L:n {L:2 SPNAME SPVAL}} {L:2 SVCACK {L:p {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        int SVCACK;  	// B:1 (always)  service acknowledge code
        uint LINKID;  	// U4:1 (always)  correlates the RMOPID value in a request to a completion report
        string SPNAME;  	// A:n (always)  service parameter name
        string SPVAL;  	// A:n (varies)  service parameter value, any format type
        int SVCACK;  	// B:1 (always)  service acknowledge code
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        SVCACK = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U4:1" ) { ok = false; break; }
        LINKID = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { SPNAME = list3[1];} else { SPNAME = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { SPVAL = list3[1];} else { SPVAL = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "B:1" ) { ok = false; break; }
        SVCACK = sp.BinToInt(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list2.Length; p++) {
            string [] list3;
            list3 = sp.ListSplit(list2[p]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S14F21RGeneric Service Completion Sent by Host and Equipment

    // S14F21R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 14, 21, new SecsMsgReceiveDelegate(recv_S14F21R));

// receive method 
void recv_S14F21R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:5 DATAID OPID LINKID {L:n {L:2 SPNAME SPVAL}} {L:2 SVCACK {L:p {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string OPID;  	// U4:1 (varies)  operation identifier
        uint LINKID;  	// U4:1 (always)  correlates the RMOPID value in a request to a completion report
        string SPNAME;  	// A:n (always)  service parameter name
        string SPVAL;  	// A:n (varies)  service parameter value, any format type
        int SVCACK;  	// B:1 (always)  service acknowledge code
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 6 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { OPID = list1[1];} else { OPID = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U4:1" ) { ok = false; break; }
        LINKID = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { SPNAME = list3[1];} else { SPNAME = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { SPVAL = list3[1];} else { SPVAL = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[5]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "B:1" ) { ok = false; break; }
        SVCACK = sp.BinToInt(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list2.Length; p++) {
            string [] list3;
            list3 = sp.ListSplit(list2[p]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(14, 22, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S14F21R

S14F22Generic Service Comp Ack Sent by Host and Equipment

    // S14F22 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(14, 21, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect DATAACK
        // variables for data items and parsing
        int DATAACK;  	// B:1 (always)  Acknowledgement code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        DATAACK = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S14F23RMulti-block Generic Service Inquire Sent by Host and Equipment

    // S14F23R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 14, 23, new SecsMsgReceiveDelegate(recv_S14F23R));

// receive method 
void recv_S14F23R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 DATAID DATALENGTH
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string DATALENGTH;  	// U4:1 (varies)  total bytes of the message body 
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATALENGTH = list1[1];} else { DATALENGTH = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(14, 24, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S14F23R

S14F24Multi-block Generic Service Grant Sent by Host and Equipment

    // S14F24 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(14, 23, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect GRANT
        // variables for data items and parsing
        int GRANT;  	// B:1 (always)  multiblock grant code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        GRANT = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S14F25RService Name Request Sent by Host and Equipment

    // S14F25R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 14, 25, new SecsMsgReceiveDelegate(recv_S14F25R));

// receive method 
void recv_S14F25R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 OBJSPEC {L:n OBJTYPE}
        // variables for data items and parsing
        string OBJSPEC;  	// A:n (varies)  E39 structured text identifying an object, [object type:object id>]+
        string OBJTYPE;  	// A:40 (varies)  object class name, chars 0x20-0x7e but not >, ?, *, or ~.  Does not begin or end with space.
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { OBJSPEC = list1[1];} else { OBJSPEC = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { OBJTYPE = list2[1];} else { OBJTYPE = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(14, 26, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S14F25R

S14F26Service Name Data Sent by Host and Equipment

    // S14F26 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(14, 25, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 {L:n {L:2 OBJTYPE {L:a SVCNAME}}} {L:2 OBJACK {L:p {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        string OBJTYPE;  	// A:40 (varies)  object class name, chars 0x20-0x7e but not >, ?, *, or ~.  Does not begin or end with space.
        string SVCNAME;  	// A:n (always)  service name
        uint OBJACK;  	// U1:1 (always)  acknowledge code, 0 ok, 1 error
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { OBJTYPE = list3[1];} else { OBJTYPE = ""; }
            list3 = sp.ListSplit(list2[2]);
            if ( list3.Length < 1) { ok=false; break; }
            int a;
            for(a=1; a < list3.Length; a++) {
                string [] list4;
                list4 = sp.ListSplit(list3[a]);
                if (list4.Length < 1) { ok = false; break; }
                if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
                if ( list4.Length == 2) { SVCNAME = list4[1];} else { SVCNAME = ""; }
                }
            if (!ok) break;
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "U1:1" ) { ok = false; break; }
        OBJACK = uint.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list2.Length; p++) {
            string [] list3;
            list3 = sp.ListSplit(list2[p]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S14F27RService Parameter Name Req Sent by Host and Equipment

    // S14F27R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 14, 27, new SecsMsgReceiveDelegate(recv_S14F27R));

// receive method 
void recv_S14F27R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:3 OBJSPEC OBJTYPE {L:n SVCNAME}
        // variables for data items and parsing
        string OBJSPEC;  	// A:n (varies)  E39 structured text identifying an object, [object type:object id>]+
        string OBJTYPE;  	// A:40 (varies)  object class name, chars 0x20-0x7e but not >, ?, *, or ~.  Does not begin or end with space.
        string SVCNAME;  	// A:n (always)  service name
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { OBJSPEC = list1[1];} else { OBJSPEC = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { OBJTYPE = list1[1];} else { OBJTYPE = ""; }
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if (list2.Length < 1) { ok = false; break; }
            if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
            if ( list2.Length == 2) { SVCNAME = list2[1];} else { SVCNAME = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(14, 28, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S14F27R

S14F28Service Parameter Name Data Sent by Host and Equipment

    // S14F28 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(14, 27, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 {L:n {L:2 SVCNAME {L:a SPNAME}}} {L:2 OBJACK {L:p {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        string SVCNAME;  	// A:n (always)  service name
        string SPNAME;  	// A:n (always)  service parameter name
        uint OBJACK;  	// U1:1 (always)  acknowledge code, 0 ok, 1 error
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { SVCNAME = list3[1];} else { SVCNAME = ""; }
            list3 = sp.ListSplit(list2[2]);
            if ( list3.Length < 1) { ok=false; break; }
            int a;
            for(a=1; a < list3.Length; a++) {
                string [] list4;
                list4 = sp.ListSplit(list3[a]);
                if (list4.Length < 1) { ok = false; break; }
                if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
                if ( list4.Length == 2) { SPNAME = list4[1];} else { SPNAME = ""; }
                }
            if (!ok) break;
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "U1:1" ) { ok = false; break; }
        OBJACK = uint.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list2.Length; p++) {
            string [] list3;
            list3 = sp.ListSplit(list2[p]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S15F1RRecipe Management Multi-Block Inquire Sent by Host and Equipment

    // S15F1R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 15, 1, new SecsMsgReceiveDelegate(recv_S15F1R));

// receive method 
void recv_S15F1R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:3 DATAID RCPSPEC RMDATASIZE
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string RCPSPEC;  	// A:n (always)  recipe specifier
        string RMDATASIZE;  	// U4:1 (varies)  the maximum total message body length of a SECS-II message
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RCPSPEC = list1[1];} else { RCPSPEC = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { RMDATASIZE = list1[1];} else { RMDATASIZE = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(15, 2, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S15F1R

S15F2Recipe Management Multi-block Grant Sent by Host and Equipment

    // S15F2 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(15, 1, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect RMGRNT
        // variables for data items and parsing
        int RMGRNT;  	// B:1 (always)  grant code, 0 ok
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        RMGRNT = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S15F3RRecipe Namespace Action Req Sent by Host and Equipment

    // S15F3R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 15, 3, new SecsMsgReceiveDelegate(recv_S15F3R));

// receive method 
void recv_S15F3R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 RMNSSPEC RMNSCMD
        // variables for data items and parsing
        string RMNSSPEC;  	// A:n (always)  object id of a recipe namespace
        uint RMNSCMD;  	// U1:1 (always)  recipe namespace command
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RMNSSPEC = list1[1];} else { RMNSSPEC = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        RMNSCMD = uint.Parse(list1[1]);
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(15, 4, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S15F3R

S15F4Recipe Namespace Action Sent by Host and Equipment

    // S15F4 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(15, 3, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}
        // variables for data items and parsing
        uint RMACK;  	// U1:1 (always)  recipe managment completion code
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        RMACK = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list1.Length; p++) {
            string [] list2;
            list2 = sp.ListSplit(list1[p]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ERRCODE = list3[1];} else { ERRCODE = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { ERRTEXT = list3[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S15F5RRecipe Namespace Rename Req Sent by Host and Equipment

    // S15F5R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 15, 5, new SecsMsgReceiveDelegate(recv_S15F5R));

// receive method 
void recv_S15F5R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 RMNSSPEC RMNEWNS
        // variables for data items and parsing
        string RMNSSPEC;  	// A:n (always)  object id of a recipe namespace
        string RMNEWNS;  	// A:n (always)  new name for a recipe namespace
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RMNSSPEC = list1[1];} else { RMNSSPEC = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RMNEWNS = list1[1];} else { RMNEWNS = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(15, 6, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S15F5R

S15F6Recipe Namespace Rename Ack Sent by Host and Equipment

    // S15F6 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(15, 5, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}
        // variables for data items and parsing
        uint RMACK;  	// U1:1 (always)  recipe managment completion code
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        RMACK = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list1.Length; p++) {
            string [] list2;
            list2 = sp.ListSplit(list1[p]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ERRCODE = list3[1];} else { ERRCODE = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { ERRTEXT = list3[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S15F7RRecipe Space Req Sent by Host and Equipment

    // S15F7R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 15, 7, new SecsMsgReceiveDelegate(recv_S15F7R));

// receive method 
void recv_S15F7R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect OBJSPEC
        // variables for data items and parsing
        string OBJSPEC;  	// A:n (varies)  E39 structured text identifying an object, [object type:object id>]+
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0.Length == 2) { OBJSPEC = list0[1];} else { OBJSPEC = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(15, 8, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S15F7R

S15F8Recipe Space Data Sent by Host and Equipment

    // S15F8 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(15, 7, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 RMSPACE {L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        string RMSPACE;  	// U4:1 (varies)  the amount of storage available in bytes for at least one recipe
        uint RMACK;  	// U1:1 (always)  recipe managment completion code
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { RMSPACE = list1[1];} else { RMSPACE = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "U1:1" ) { ok = false; break; }
        RMACK = uint.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list2.Length; p++) {
            string [] list3;
            list3 = sp.ListSplit(list2[p]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S15F9RRecipe Status Request Sent by Host and Equipment

    // S15F9R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 15, 9, new SecsMsgReceiveDelegate(recv_S15F9R));

// receive method 
void recv_S15F9R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect RCPSPEC
        // variables for data items and parsing
        string RCPSPEC;  	// A:n (always)  recipe specifier
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( !list0[0].StartsWith("A:") ) { ok = false; break; }
        if ( list0.Length == 2) { RCPSPEC = list0[1];} else { RCPSPEC = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(15, 10, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S15F9R

S15F10Recipe Status Data Sent by Host and Equipment

    // S15F10 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(15, 9, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:3 RCPSTAT RCPVERS {L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        uint RCPSTAT;  	// U1:1 (always)  Recipe status code
        string RCPVERS;  	// A:n (always)  recipe version
        uint RMACK;  	// U1:1 (always)  recipe managment completion code
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        RCPSTAT = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RCPVERS = list1[1];} else { RCPVERS = ""; }
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "U1:1" ) { ok = false; break; }
        RMACK = uint.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list2.Length; p++) {
            string [] list3;
            list3 = sp.ListSplit(list2[p]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S15F11RRecipe Version Request Sent by Host and Equipment

    // S15F11R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 15, 11, new SecsMsgReceiveDelegate(recv_S15F11R));

// receive method 
void recv_S15F11R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:4 RMNSSPEC RCPCLASS RCPNAME AGENT
        // variables for data items and parsing
        string RMNSSPEC;  	// A:n (always)  object id of a recipe namespace
        string RCPCLASS;  	// A:n (always)  Recipe class
        string RCPNAME;  	// A:n (always)  recipe name
        string AGENT;  	// A:n (always)  no description, no max length
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RMNSSPEC = list1[1];} else { RMNSSPEC = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RCPCLASS = list1[1];} else { RCPCLASS = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RCPNAME = list1[1];} else { RCPNAME = ""; }
        list1 = sp.ListSplit(list0[4]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { AGENT = list1[1];} else { AGENT = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(15, 12, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S15F11R

S15F12Recipe Version Data Sent by Host and Equipment

    // S15F12 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(15, 11, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:3 AGENT RCPVERS {L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        string AGENT;  	// A:n (always)  no description, no max length
        string RCPVERS;  	// A:n (always)  recipe version
        uint RMACK;  	// U1:1 (always)  recipe managment completion code
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { AGENT = list1[1];} else { AGENT = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RCPVERS = list1[1];} else { RCPVERS = ""; }
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "U1:1" ) { ok = false; break; }
        RMACK = uint.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list2.Length; p++) {
            string [] list3;
            list3 = sp.ListSplit(list2[p]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S15F13RRecipe Create Req Sent by Host and Equipment

    // S15F13R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 15, 13, new SecsMsgReceiveDelegate(recv_S15F13R));

// receive method 
void recv_S15F13R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:5 DATAID RCPUPDT RCPSPEC {L:m {L:2 RCPATTRID RCPATTRDATA}} RCPBODY
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        int RCPUPDT;  	// TF:1 (always)  true for a recipe update, false for create
        string RCPSPEC;  	// A:n (always)  recipe specifier
        string RCPATTRID;  	// A:n (always)  the name of a recipe attribute, but not used to indicate the recipe identifier
        string RCPATTRDATA;  	// A:n (varies)  the value of a recipe attribute, any type of data including list
        int [] RCPBODY;  	// B:n (varies)  Recipe body
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 6 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "TF:1" ) { ok = false; break; }
        RCPUPDT = int.Parse(list1[1]);
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RCPSPEC = list1[1];} else { RCPSPEC = ""; }
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list1.Length; m++) {
            string [] list2;
            list2 = sp.ListSplit(list1[m]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { RCPATTRID = list3[1];} else { RCPATTRID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { RCPATTRDATA = list3[1];} else { RCPATTRDATA = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[5]);
        if (list1.Length < 1) { ok = false; break; }
        RCPBODY = new int[list1.Length-1];
        for(int i=0; i < RCPBODY.Length; i++) {
            RCPBODY[i] = sp.BinToInt(list1[1+i]);
            }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(15, 14, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S15F13R

S15F14Recipe Create Ack Sent by Host and Equipment

    // S15F14 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(15, 13, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}
        // variables for data items and parsing
        uint RMACK;  	// U1:1 (always)  recipe managment completion code
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        RMACK = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list1.Length; p++) {
            string [] list2;
            list2 = sp.ListSplit(list1[p]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ERRCODE = list3[1];} else { ERRCODE = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { ERRTEXT = list3[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S15F15RRecipe Store Req Sent by Host and Equipment

    // S15F15R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 15, 15, new SecsMsgReceiveDelegate(recv_S15F15R));

// receive method 
void recv_S15F15R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:4 DATAID RCPSPEC RCPSECCODE {L:q {L:r RCPSECNM {L:g {L:2 RCPATTRID RCPATTRDATA}}} RCPBODY {L:m {L:2 RCPSECNM {L:a {L:2 RCPATTRID RCPATTRDATA}}}}}
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string RCPSPEC;  	// A:n (always)  recipe specifier
        int RCPSECCODE;  	// B:1 (always)  indicates the sections of a recipe
        string RCPSECNM;  	// A:n (always)  Recipe section name, "Generic", "Body", "ASDS"
        string RCPATTRID;  	// A:n (always)  the name of a recipe attribute, but not used to indicate the recipe identifier
        string RCPATTRDATA;  	// A:n (varies)  the value of a recipe attribute, any type of data including list
        int [] RCPBODY;  	// B:n (varies)  Recipe body
        string RCPSECNM;  	// A:n (always)  Recipe section name, "Generic", "Body", "ASDS"
        string RCPATTRID;  	// A:n (always)  the name of a recipe attribute, but not used to indicate the recipe identifier
        string RCPATTRDATA;  	// A:n (varies)  the value of a recipe attribute, any type of data including list
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RCPSPEC = list1[1];} else { RCPSPEC = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        RCPSECCODE = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length < 1) { ok=false; break; }
        int q;
        for(q=1; q < list1.Length; q++) {
            string [] list2;
            list2 = sp.ListSplit(list1[q]);
            if ( list2.Length < 1) { ok=false; break; }
            int r;
            for(r=1; r < list2.Length; r++) {
                string [] list3;
                list3 = sp.ListSplit(list2[r]);
                if (list3.Length < 1) { ok = false; break; }
                if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
                if ( list3.Length == 2) { RCPSECNM = list3[1];} else { RCPSECNM = ""; }
                }
            if (!ok) break;
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(15, 16, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S15F15R

S15F16Recipe Store Ack Sent by Host and Equipment

    // S15F16 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(15, 15, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 RCPSECCODE {L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        int RCPSECCODE;  	// B:1 (always)  indicates the sections of a recipe
        uint RMACK;  	// U1:1 (always)  recipe managment completion code
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        RCPSECCODE = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "U1:1" ) { ok = false; break; }
        RMACK = uint.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list2.Length; p++) {
            string [] list3;
            list3 = sp.ListSplit(list2[p]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S15F17RRecipe Retrieve Req Sent by Host and Equipment

    // S15F17R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 15, 17, new SecsMsgReceiveDelegate(recv_S15F17R));

// receive method 
void recv_S15F17R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 RCPSPEC RCPSECCODE
        // variables for data items and parsing
        string RCPSPEC;  	// A:n (always)  recipe specifier
        int RCPSECCODE;  	// B:1 (always)  indicates the sections of a recipe
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RCPSPEC = list1[1];} else { RCPSPEC = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        RCPSECCODE = sp.BinToInt(list1[1]);
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(15, 18, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S15F17R

S15F18Recipe Retrieve Data Sent by Host and Equipment

    // S15F18 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(15, 17, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 {L:q {L:r RCPSECNM {L:g {L:2 RCPATTRID RCPATTRDATA}}} RCPBODY {L:m {L:2 RCPSECNM {L:a {L:2 RCPATTRID RCPATTRDATA}}}}} {L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        string RCPSECNM;  	// A:n (always)  Recipe section name, "Generic", "Body", "ASDS"
        string RCPATTRID;  	// A:n (always)  the name of a recipe attribute, but not used to indicate the recipe identifier
        string RCPATTRDATA;  	// A:n (varies)  the value of a recipe attribute, any type of data including list
        int [] RCPBODY;  	// B:n (varies)  Recipe body
        string RCPSECNM;  	// A:n (always)  Recipe section name, "Generic", "Body", "ASDS"
        string RCPATTRID;  	// A:n (always)  the name of a recipe attribute, but not used to indicate the recipe identifier
        string RCPATTRDATA;  	// A:n (varies)  the value of a recipe attribute, any type of data including list
        uint RMACK;  	// U1:1 (always)  recipe managment completion code
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if ( list1.Length < 1) { ok=false; break; }
        int q;
        for(q=1; q < list1.Length; q++) {
            string [] list2;
            list2 = sp.ListSplit(list1[q]);
            if ( list2.Length < 1) { ok=false; break; }
            int r;
            for(r=1; r < list2.Length; r++) {
                string [] list3;
                list3 = sp.ListSplit(list2[r]);
                if (list3.Length < 1) { ok = false; break; }
                if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
                if ( list3.Length == 2) { RCPSECNM = list3[1];} else { RCPSECNM = ""; }
                }
            if (!ok) break;
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "U1:1" ) { ok = false; break; }
        RMACK = uint.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list2.Length; p++) {
            string [] list3;
            list3 = sp.ListSplit(list2[p]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S15F19RRecipe Rename Req Sent by Host and Equipment

    // S15F19R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 15, 19, new SecsMsgReceiveDelegate(recv_S15F19R));

// receive method 
void recv_S15F19R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:3 RCPSPEC RCPRENAME RCPNEWID
        // variables for data items and parsing
        string RCPSPEC;  	// A:n (always)  recipe specifier
        int RCPRENAME;  	// TF:1 (always)  whether a recipe is to be renamed (TRUE) or copied (FALSE)
        string RCPNEWID;  	// A:n (always)  the new recipe identifier
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RCPSPEC = list1[1];} else { RCPSPEC = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "TF:1" ) { ok = false; break; }
        RCPRENAME = int.Parse(list1[1]);
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RCPNEWID = list1[1];} else { RCPNEWID = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(15, 20, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S15F19R

S15F20Recipe Rename Ack Sent by Host and Equipment

    // S15F20 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(15, 19, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}
        // variables for data items and parsing
        uint RMACK;  	// U1:1 (always)  recipe managment completion code
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        RMACK = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list1.Length; p++) {
            string [] list2;
            list2 = sp.ListSplit(list1[p]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ERRCODE = list3[1];} else { ERRCODE = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { ERRTEXT = list3[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S15F21RRecipe Action Req Sent by Host and Equipment

    // S15F21R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 15, 21, new SecsMsgReceiveDelegate(recv_S15F21R));

// receive method 
void recv_S15F21R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:6 DATAID RCPCMD RMNSSPEC OPID AGENT {L:n RCPID}
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        uint RCPCMD;  	// U1:1 (always)  recipe action
        string RMNSSPEC;  	// A:n (always)  object id of a recipe namespace
        string OPID;  	// U4:1 (varies)  operation identifier
        string AGENT;  	// A:n (always)  no description, no max length
        string RCPID;  	// A:n (always)  recipe identifier conforming to OBJSPEC
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 7 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        RCPCMD = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RMNSSPEC = list1[1];} else { RMNSSPEC = ""; }
        list1 = sp.ListSplit(list0[4]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { OPID = list1[1];} else { OPID = ""; }
        list1 = sp.ListSplit(list0[5]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { AGENT = list1[1];} else { AGENT = ""; }
        list1 = sp.ListSplit(list0[6]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if (list2.Length < 1) { ok = false; break; }
            if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
            if ( list2.Length == 2) { RCPID = list2[1];} else { RCPID = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(15, 22, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S15F21R

S15F22Recipe Action Ack Sent by Host and Equipment

    // S15F22 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(15, 21, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:4 AGENT LINKID RCPCMD {L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        string AGENT;  	// A:n (always)  no description, no max length
        uint LINKID;  	// U4:1 (always)  correlates the RMOPID value in a request to a completion report
        uint RCPCMD;  	// U1:1 (always)  recipe action
        uint RMACK;  	// U1:1 (always)  recipe managment completion code
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { AGENT = list1[1];} else { AGENT = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U4:1" ) { ok = false; break; }
        LINKID = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        RCPCMD = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "U1:1" ) { ok = false; break; }
        RMACK = uint.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list2.Length; p++) {
            string [] list3;
            list3 = sp.ListSplit(list2[p]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S15F23RRecipe Descriptor Req Sent by Host and Equipment

    // S15F23R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 15, 23, new SecsMsgReceiveDelegate(recv_S15F23R));

// receive method 
void recv_S15F23R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:3 DATAID OBJSPEC {L:n RCPID}
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string OBJSPEC;  	// A:n (varies)  E39 structured text identifying an object, [object type:object id>]+
        string RCPID;  	// A:n (always)  recipe identifier conforming to OBJSPEC
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { OBJSPEC = list1[1];} else { OBJSPEC = ""; }
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if (list2.Length < 1) { ok = false; break; }
            if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
            if ( list2.Length == 2) { RCPID = list2[1];} else { RCPID = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(15, 24, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S15F23R

S15F24Recipe Descriptor Data Sent by Host and Equipment

    // S15F24 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(15, 23, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 {L:n {L:a {L:r RCPDESCNM RCPDESCTIME RCPDESCLTH}}} {L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        string RCPDESCNM;  	// A:n (always)  Identifies a descriptor type "ASDesc", "BodyDesc", "GenDesc"
        string RCPDESCTIME;  	// A:16 (always)  timestamp of a recipe section "YYYYMMDDhhmmsscc"
        string RCPDESCLTH;  	// U4:1 (varies)  the byte length of a recipe
        uint RMACK;  	// U1:1 (always)  recipe managment completion code
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length < 1) { ok=false; break; }
            int a;
            for(a=1; a < list2.Length; a++) {
                string [] list3;
                list3 = sp.ListSplit(list2[a]);
                if ( list3.Length < 1) { ok=false; break; }
                int r;
                for(r=1; r < list3.Length; r++) {
                    string [] list4;
                    list4 = sp.ListSplit(list3[r]);
                    if (list4.Length < 1) { ok = false; break; }
                    if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
                    if ( list4.Length == 2) { RCPDESCNM = list4[1];} else { RCPDESCNM = ""; }
                    }
                if (!ok) break;
                }
            if (!ok) break;
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "U1:1" ) { ok = false; break; }
        RMACK = uint.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list2.Length; p++) {
            string [] list3;
            list3 = sp.ListSplit(list2[p]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S15F25RRecipe Parameter Update Req Sent by Host and Equipment

    // S15F25R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 15, 25, new SecsMsgReceiveDelegate(recv_S15F25R));

// receive method 
void recv_S15F25R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:4 DATAID RMNSSPEC AGENT {L:n {L:3 RCPPARNM RCPPARVAL RCPPARRULE}}
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string RMNSSPEC;  	// A:n (always)  object id of a recipe namespace
        string AGENT;  	// A:n (always)  no description, no max length
        string RCPPARNM;  	// A:256 (always)  the name of a recipe variable parameter
        string RCPPARVAL;  	// A:80 (varies)  the value of a recipe variable parameter, any scalar format type
        string RCPPARRULE;  	// A:80 (always)  the restrictions applied to a recipe variable parameter setting
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RMNSSPEC = list1[1];} else { RMNSSPEC = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { AGENT = list1[1];} else { AGENT = ""; }
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 4 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { RCPPARNM = list3[1];} else { RCPPARNM = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { RCPPARVAL = list3[1];} else { RCPPARVAL = ""; }
            list3 = sp.ListSplit(list2[3]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { RCPPARRULE = list3[1];} else { RCPPARRULE = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(15, 26, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S15F25R

S15F26Recipe Parameter Update Ack Sent by Host and Equipment

    // S15F26 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(15, 25, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}
        // variables for data items and parsing
        uint RMACK;  	// U1:1 (always)  recipe managment completion code
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        RMACK = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list1.Length; p++) {
            string [] list2;
            list2 = sp.ListSplit(list1[p]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ERRCODE = list3[1];} else { ERRCODE = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { ERRTEXT = list3[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S15F27RRecipe Download Req Sent by Host Only

    // S15F27R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 15, 27, new SecsMsgReceiveDelegate(recv_S15F27R));

// receive method 
void recv_S15F27R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:5 DATAID RCPOWCODE RCPSPEC {L:m {L:2 RCPATTRID RCPATTRDATA}} RCPBODY
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        int RCPOWCODE;  	// TF:1 (always)  recipe overwrite code, true=overwrite ok, false=do not overwrite
        string RCPSPEC;  	// A:n (always)  recipe specifier
        string RCPATTRID;  	// A:n (always)  the name of a recipe attribute, but not used to indicate the recipe identifier
        string RCPATTRDATA;  	// A:n (varies)  the value of a recipe attribute, any type of data including list
        int [] RCPBODY;  	// B:n (varies)  Recipe body
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 6 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "TF:1" ) { ok = false; break; }
        RCPOWCODE = int.Parse(list1[1]);
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RCPSPEC = list1[1];} else { RCPSPEC = ""; }
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list1.Length; m++) {
            string [] list2;
            list2 = sp.ListSplit(list1[m]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { RCPATTRID = list3[1];} else { RCPATTRID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { RCPATTRDATA = list3[1];} else { RCPATTRDATA = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[5]);
        if (list1.Length < 1) { ok = false; break; }
        RCPBODY = new int[list1.Length-1];
        for(int i=0; i < RCPBODY.Length; i++) {
            RCPBODY[i] = sp.BinToInt(list1[1+i]);
            }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(15, 28, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S15F27R

S15F28Recipe Download Ack Sent by Equipment Only

    // S15F28 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(15, 27, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:3 RCPID {L:n {L:2 RCPATTRID RCPATTRDATA}} {L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        string RCPID;  	// A:n (always)  recipe identifier conforming to OBJSPEC
        string RCPATTRID;  	// A:n (always)  the name of a recipe attribute, but not used to indicate the recipe identifier
        string RCPATTRDATA;  	// A:n (varies)  the value of a recipe attribute, any type of data including list
        uint RMACK;  	// U1:1 (always)  recipe managment completion code
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RCPID = list1[1];} else { RCPID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { RCPATTRID = list3[1];} else { RCPATTRID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { RCPATTRDATA = list3[1];} else { RCPATTRDATA = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "U1:1" ) { ok = false; break; }
        RMACK = uint.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list2.Length; p++) {
            string [] list3;
            list3 = sp.ListSplit(list2[p]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S15F29RRecipe Verify Req Sent by Host Only

    // S15F29R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 15, 29, new SecsMsgReceiveDelegate(recv_S15F29R));

// receive method 
void recv_S15F29R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:4 DATAID OPID RESPEC {L:m RCPID}
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string OPID;  	// U4:1 (varies)  operation identifier
        string RESPEC;  	// A:n (always)  object specifier for the recipe executor
        string RCPID;  	// A:n (always)  recipe identifier conforming to OBJSPEC
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { OPID = list1[1];} else { OPID = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RESPEC = list1[1];} else { RESPEC = ""; }
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list1.Length; m++) {
            string [] list2;
            list2 = sp.ListSplit(list1[m]);
            if (list2.Length < 1) { ok = false; break; }
            if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
            if ( list2.Length == 2) { RCPID = list2[1];} else { RCPID = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(15, 30, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S15F29R

S15F30Recipe Verify Ack Sent by Equipment Only

    // S15F30 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(15, 29, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:5 OPID LINKID RCPID {L:n {L:2 RCPATTRID RCPATTRDATA}} {L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        string OPID;  	// U4:1 (varies)  operation identifier
        uint LINKID;  	// U4:1 (always)  correlates the RMOPID value in a request to a completion report
        string RCPID;  	// A:n (always)  recipe identifier conforming to OBJSPEC
        string RCPATTRID;  	// A:n (always)  the name of a recipe attribute, but not used to indicate the recipe identifier
        string RCPATTRDATA;  	// A:n (varies)  the value of a recipe attribute, any type of data including list
        uint RMACK;  	// U1:1 (always)  recipe managment completion code
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 6 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { OPID = list1[1];} else { OPID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U4:1" ) { ok = false; break; }
        LINKID = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RCPID = list1[1];} else { RCPID = ""; }
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { RCPATTRID = list3[1];} else { RCPATTRID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { RCPATTRDATA = list3[1];} else { RCPATTRDATA = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[5]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "U1:1" ) { ok = false; break; }
        RMACK = uint.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list2.Length; p++) {
            string [] list3;
            list3 = sp.ListSplit(list2[p]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S15F31RRecipe Unload Req Sent by Host Only

    // S15F31R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 15, 31, new SecsMsgReceiveDelegate(recv_S15F31R));

// receive method 
void recv_S15F31R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect RCPSPEC
        // variables for data items and parsing
        string RCPSPEC;  	// A:n (always)  recipe specifier
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( !list0[0].StartsWith("A:") ) { ok = false; break; }
        if ( list0.Length == 2) { RCPSPEC = list0[1];} else { RCPSPEC = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(15, 32, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S15F31R

S15F32Recipe Unload Data Sent by Equipment Only

    // S15F32 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(15, 31, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:4 RCPSPEC {L:m {L:2 RCPATTRID RCPATTRDATA}} RCPBODY {L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        string RCPSPEC;  	// A:n (always)  recipe specifier
        string RCPATTRID;  	// A:n (always)  the name of a recipe attribute, but not used to indicate the recipe identifier
        string RCPATTRDATA;  	// A:n (varies)  the value of a recipe attribute, any type of data including list
        int [] RCPBODY;  	// B:n (varies)  Recipe body
        uint RMACK;  	// U1:1 (always)  recipe managment completion code
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RCPSPEC = list1[1];} else { RCPSPEC = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list1.Length; m++) {
            string [] list2;
            list2 = sp.ListSplit(list1[m]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { RCPATTRID = list3[1];} else { RCPATTRID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { RCPATTRDATA = list3[1];} else { RCPATTRDATA = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        RCPBODY = new int[list1.Length-1];
        for(int i=0; i < RCPBODY.Length; i++) {
            RCPBODY[i] = sp.BinToInt(list1[1+i]);
            }
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "U1:1" ) { ok = false; break; }
        RMACK = uint.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list2.Length; p++) {
            string [] list3;
            list3 = sp.ListSplit(list2[p]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S15F33RRecipe Select Req Sent by Host Only

    // S15F33R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 15, 33, new SecsMsgReceiveDelegate(recv_S15F33R));

// receive method 
void recv_S15F33R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:3 DATAID RESPEC {L:r {L:2 RCPID {L:p {L:2 RCPPARNM RCPPARVAL}}}} 
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string RESPEC;  	// A:n (always)  object specifier for the recipe executor
        string RCPID;  	// A:n (always)  recipe identifier conforming to OBJSPEC
        string RCPPARNM;  	// A:256 (always)  the name of a recipe variable parameter
        string RCPPARVAL;  	// A:80 (varies)  the value of a recipe variable parameter, any scalar format type
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RESPEC = list1[1];} else { RESPEC = ""; }
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length < 1) { ok=false; break; }
        int r;
        for(r=1; r < list1.Length; r++) {
            string [] list2;
            list2 = sp.ListSplit(list1[r]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { RCPID = list3[1];} else { RCPID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if ( list3.Length < 1) { ok=false; break; }
            int p;
            for(p=1; p < list3.Length; p++) {
                string [] list4;
                list4 = sp.ListSplit(list3[p]);
                if ( list4.Length != 3 ) { ok=false; break; }
                string [] list5;
                list5 = sp.ListSplit(list4[1]);
                if (list5.Length < 1) { ok = false; break; }
                if ( !list5[0].StartsWith("A:") ) { ok = false; break; }
                if ( list5.Length == 2) { RCPPARNM = list5[1];} else { RCPPARNM = ""; }
                list5 = sp.ListSplit(list4[2]);
                if (list5.Length < 1) { ok = false; break; }
                if ( list5.Length == 2) { RCPPARVAL = list5[1];} else { RCPPARVAL = ""; }
                }
            if (!ok) break;
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(15, 34, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S15F33R

S15F34Recipe Select Ack Sent by Equipment Only

    // S15F34 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(15, 33, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}
        // variables for data items and parsing
        uint RMACK;  	// U1:1 (always)  recipe managment completion code
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        RMACK = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list1.Length; p++) {
            string [] list2;
            list2 = sp.ListSplit(list1[p]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ERRCODE = list3[1];} else { ERRCODE = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { ERRTEXT = list3[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S15F35RRecipe Delete Req Sent by Host Only

    // S15F35R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 15, 35, new SecsMsgReceiveDelegate(recv_S15F35R));

// receive method 
void recv_S15F35R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:4 DATAID RESPEC RCPDEL {L:n RCPID}
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string RESPEC;  	// A:n (always)  object specifier for the recipe executor
        uint RCPDEL;  	// U1:1 (always)  recipe action
        string RCPID;  	// A:n (always)  recipe identifier conforming to OBJSPEC
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RESPEC = list1[1];} else { RESPEC = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        RCPDEL = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if (list2.Length < 1) { ok = false; break; }
            if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
            if ( list2.Length == 2) { RCPID = list2[1];} else { RCPID = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(15, 36, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S15F35R

S15F36Recipe Delete Ack Sent by Equipment Only

    // S15F36 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(15, 35, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}
        // variables for data items and parsing
        uint RMACK;  	// U1:1 (always)  recipe managment completion code
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        RMACK = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list1.Length; p++) {
            string [] list2;
            list2 = sp.ListSplit(list1[p]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ERRCODE = list3[1];} else { ERRCODE = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { ERRTEXT = list3[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S15F37RDRNS Segment Approve Action Req Sent by Host and Equipment

    // S15F37R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 15, 37, new SecsMsgReceiveDelegate(recv_S15F37R));

// receive method 
void recv_S15F37R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:6 RMSEGSPEC OBJTOKEN RMGRNT OPID RCPID RMCHGTYPE
        // variables for data items and parsing
        string RMSEGSPEC;  	// A:n (always)  The object ID of a distributed recipe namespace segment
        uint OBJTOKEN;  	// U4:1 (always)  token used for authorization
        int RMGRNT;  	// B:1 (always)  grant code, 0 ok
        string OPID;  	// U4:1 (varies)  operation identifier
        string RCPID;  	// A:n (always)  recipe identifier conforming to OBJSPEC
        string RMCHGTYPE;  	// U4:1 (varies)  type of change for a recipe
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 7 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RMSEGSPEC = list1[1];} else { RMSEGSPEC = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U4:1" ) { ok = false; break; }
        OBJTOKEN = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        RMGRNT = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[4]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { OPID = list1[1];} else { OPID = ""; }
        list1 = sp.ListSplit(list0[5]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RCPID = list1[1];} else { RCPID = ""; }
        list1 = sp.ListSplit(list0[6]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { RMCHGTYPE = list1[1];} else { RMCHGTYPE = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(15, 38, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S15F37R

S15F38DRNS Segment Approve Action Ack Sent by Host and Equipment

    // S15F38 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(15, 37, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}
        // variables for data items and parsing
        uint RMACK;  	// U1:1 (always)  recipe managment completion code
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        RMACK = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list1.Length; p++) {
            string [] list2;
            list2 = sp.ListSplit(list1[p]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ERRCODE = list3[1];} else { ERRCODE = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { ERRTEXT = list3[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S15F39RDRNS Recorder Seg Req Sent by Host and Equipment

    // S15F39R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 15, 39, new SecsMsgReceiveDelegate(recv_S15F39R));

// receive method 
void recv_S15F39R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:5 DATAID RMNSCMD RMRECSPEC RMSEGSPEC OBJTOKEN
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        uint RMNSCMD;  	// U1:1 (always)  recipe namespace command
        string RMRECSPEC;  	// A:n (always)  object id of a distributed recipe namespace recorder
        string RMSEGSPEC;  	// A:n (always)  The object ID of a distributed recipe namespace segment
        uint OBJTOKEN;  	// U4:1 (always)  token used for authorization
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 6 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        RMNSCMD = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RMRECSPEC = list1[1];} else { RMRECSPEC = ""; }
        list1 = sp.ListSplit(list0[4]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RMSEGSPEC = list1[1];} else { RMSEGSPEC = ""; }
        list1 = sp.ListSplit(list0[5]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U4:1" ) { ok = false; break; }
        OBJTOKEN = uint.Parse(list1[1]);
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(15, 40, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S15F39R

S15F40DRNS Recorder Seg Ack Sent by Host and Equipment

    // S15F40 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(15, 39, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}
        // variables for data items and parsing
        uint RMACK;  	// U1:1 (always)  recipe managment completion code
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        RMACK = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list1.Length; p++) {
            string [] list2;
            list2 = sp.ListSplit(list1[p]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ERRCODE = list3[1];} else { ERRCODE = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { ERRTEXT = list3[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S15F41RDRNS Recorder Mod Req Sent by Host and Equipment

    // S15F41R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 15, 41, new SecsMsgReceiveDelegate(recv_S15F41R));

// receive method 
void recv_S15F41R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:5 DATAID RMRECSPEC OBJTOKEN RMNSCMD {L:c RCPID RCPNEWID RMSEGSPEC RMCHGTYPE OPID TIMESTAMP RMREQUESTOR}
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string RMRECSPEC;  	// A:n (always)  object id of a distributed recipe namespace recorder
        uint OBJTOKEN;  	// U4:1 (always)  token used for authorization
        uint RMNSCMD;  	// U1:1 (always)  recipe namespace command
        string RCPID;  	// A:n (always)  recipe identifier conforming to OBJSPEC
        string RCPNEWID;  	// A:n (always)  the new recipe identifier
        string RMSEGSPEC;  	// A:n (always)  The object ID of a distributed recipe namespace segment
        string RMCHGTYPE;  	// U4:1 (varies)  type of change for a recipe
        string OPID;  	// U4:1 (varies)  operation identifier
        string TIMESTAMP;  	// A:32 (always)  ECV TimeFormat controls format, 0=A:12 YYMMDDHHMMSS, 1=A:16 YYYYMMDDHHMMSScc,2=YYYY-MM-DDTHH:MM:SS.s[s]*{Z|+hh:mm|-hh:mm}
        int RMREQUESTOR;  	// TF:1 (always)  True when the initiator of a change request is an attached segment, otherwise false
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 6 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RMRECSPEC = list1[1];} else { RMRECSPEC = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U4:1" ) { ok = false; break; }
        OBJTOKEN = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[4]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        RMNSCMD = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[5]);
        if ( list1.Length < 1) { ok=false; break; }
        int c;
        for(c=1; c < list1.Length; c++) {
            string [] list2;
            list2 = sp.ListSplit(list1[c]);
            if (list2.Length < 1) { ok = false; break; }
            if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
            if ( list2.Length == 2) { RCPID = list2[1];} else { RCPID = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(15, 42, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S15F41R

S15F42DRNS Recorder Mod Ack Sent by Host and Equipment

    // S15F42 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(15, 41, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}
        // variables for data items and parsing
        uint RMACK;  	// U1:1 (always)  recipe managment completion code
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        RMACK = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list1.Length; p++) {
            string [] list2;
            list2 = sp.ListSplit(list1[p]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ERRCODE = list3[1];} else { ERRCODE = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { ERRTEXT = list3[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S15F43RDRNS Get Change Req Sent by Host and Equipment

    // S15F43R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 15, 43, new SecsMsgReceiveDelegate(recv_S15F43R));

// receive method 
void recv_S15F43R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:3 DATAID OBJSPEC TARGETSPEC
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string OBJSPEC;  	// A:n (varies)  E39 structured text identifying an object, [object type:object id>]+
        string TARGETSPEC;  	// A:40 (always)  Specifier of target object
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { OBJSPEC = list1[1];} else { OBJSPEC = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { TARGETSPEC = list1[1];} else { TARGETSPEC = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(15, 44, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S15F43R

S15F44DRNS Get Change Ack Sent by Host and Equipment

    // S15F44 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(15, 43, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 {L:n {L:7 RCPID RCPNEWID RMSEGSPEC RMCHGTYPE OPID TIMESTAMP RMREQUESTOR}} {L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        string RCPID;  	// A:n (always)  recipe identifier conforming to OBJSPEC
        string RCPNEWID;  	// A:n (always)  the new recipe identifier
        string RMSEGSPEC;  	// A:n (always)  The object ID of a distributed recipe namespace segment
        string RMCHGTYPE;  	// U4:1 (varies)  type of change for a recipe
        string OPID;  	// U4:1 (varies)  operation identifier
        string TIMESTAMP;  	// A:32 (always)  ECV TimeFormat controls format, 0=A:12 YYMMDDHHMMSS, 1=A:16 YYYYMMDDHHMMSScc,2=YYYY-MM-DDTHH:MM:SS.s[s]*{Z|+hh:mm|-hh:mm}
        int RMREQUESTOR;  	// TF:1 (always)  True when the initiator of a change request is an attached segment, otherwise false
        uint RMACK;  	// U1:1 (always)  recipe managment completion code
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 8 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { RCPID = list3[1];} else { RCPID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { RCPNEWID = list3[1];} else { RCPNEWID = ""; }
            list3 = sp.ListSplit(list2[3]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { RMSEGSPEC = list3[1];} else { RMSEGSPEC = ""; }
            list3 = sp.ListSplit(list2[4]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { RMCHGTYPE = list3[1];} else { RMCHGTYPE = ""; }
            list3 = sp.ListSplit(list2[5]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { OPID = list3[1];} else { OPID = ""; }
            list3 = sp.ListSplit(list2[6]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { TIMESTAMP = list3[1];} else { TIMESTAMP = ""; }
            list3 = sp.ListSplit(list2[7]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3[0] != "TF:1" ) { ok = false; break; }
            RMREQUESTOR = int.Parse(list3[1]);
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "U1:1" ) { ok = false; break; }
        RMACK = uint.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list2.Length; p++) {
            string [] list3;
            list3 = sp.ListSplit(list2[p]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S15F45RDRNS Mgr Seg Aprvl Req Sent by Host and Equipment

    // S15F45R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 15, 45, new SecsMsgReceiveDelegate(recv_S15F45R));

// receive method 
void recv_S15F45R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:4 DATAID RCPSPEC RCPNEWID RMCHGTYPE
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string RCPSPEC;  	// A:n (always)  recipe specifier
        string RCPNEWID;  	// A:n (always)  the new recipe identifier
        string RMCHGTYPE;  	// U4:1 (varies)  type of change for a recipe
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RCPSPEC = list1[1];} else { RCPSPEC = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RCPNEWID = list1[1];} else { RCPNEWID = ""; }
        list1 = sp.ListSplit(list0[4]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { RMCHGTYPE = list1[1];} else { RMCHGTYPE = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(15, 46, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S15F45R

S15F46DRNS Mgr Seg Aprvl Ack Sent by Host and Equipment

    // S15F46 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(15, 45, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:3 RMCHGTYPE RMGRNT OPID
        // variables for data items and parsing
        string RMCHGTYPE;  	// U4:1 (varies)  type of change for a recipe
        int RMGRNT;  	// B:1 (always)  grant code, 0 ok
        string OPID;  	// U4:1 (varies)  operation identifier
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { RMCHGTYPE = list1[1];} else { RMCHGTYPE = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "B:1" ) { ok = false; break; }
        RMGRNT = sp.BinToInt(list1[1]);
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { OPID = list1[1];} else { OPID = ""; }
        return;  // parsed ok
        } // end while(ok)

S15F47RDRNS Mgr Rebuild Req Sent by Host and Equipment

    // S15F47R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 15, 47, new SecsMsgReceiveDelegate(recv_S15F47R));

// receive method 
void recv_S15F47R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:5 DATAID OBJSPEC RMNSSPEC RMRECSPEC {L:n RMSEGSPEC}
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string OBJSPEC;  	// A:n (varies)  E39 structured text identifying an object, [object type:object id>]+
        string RMNSSPEC;  	// A:n (always)  object id of a recipe namespace
        string RMRECSPEC;  	// A:n (always)  object id of a distributed recipe namespace recorder
        string RMSEGSPEC;  	// A:n (always)  The object ID of a distributed recipe namespace segment
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 6 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { OBJSPEC = list1[1];} else { OBJSPEC = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RMNSSPEC = list1[1];} else { RMNSSPEC = ""; }
        list1 = sp.ListSplit(list0[4]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RMRECSPEC = list1[1];} else { RMRECSPEC = ""; }
        list1 = sp.ListSplit(list0[5]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if (list2.Length < 1) { ok = false; break; }
            if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
            if ( list2.Length == 2) { RMSEGSPEC = list2[1];} else { RMSEGSPEC = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(15, 48, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S15F47R

S15F48DRNS Mgr Rebuild Ack Sent by Host and Equipment

    // S15F48 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(15, 47, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 RMACK {L:p {L:2 ERRCODE ERRTEXT}}
        // variables for data items and parsing
        uint RMACK;  	// U1:1 (always)  recipe managment completion code
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        RMACK = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list1.Length; p++) {
            string [] list2;
            list2 = sp.ListSplit(list1[p]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ERRCODE = list3[1];} else { ERRCODE = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { ERRTEXT = list3[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S15F49RLarge Recipe Download Req Sent by Host Only

    // S15F49R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 15, 49, new SecsMsgReceiveDelegate(recv_S15F49R));

// receive method 
void recv_S15F49R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 DSNAME RCPOWCODE
        // variables for data items and parsing
        string DSNAME;  	// A:50 (varies)  the name of a dataset such as a PPID
        int RCPOWCODE;  	// TF:1 (always)  recipe overwrite code, true=overwrite ok, false=do not overwrite
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DSNAME = list1[1];} else { DSNAME = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "TF:1" ) { ok = false; break; }
        RCPOWCODE = int.Parse(list1[1]);
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(15, 50, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S15F49R

S15F50Large Recipe Download Ack Sent by Equipment Only

    // S15F50 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(15, 49, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect ACKC15
        // variables for data items and parsing
        int ACKC15;  	// B:1 (always)  acknowledge code, 0 ok
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        ACKC15 = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S15F51RLarge Recipe Upload Req Sent by Host Only

    // S15F51R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 15, 51, new SecsMsgReceiveDelegate(recv_S15F51R));

// receive method 
void recv_S15F51R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect DSNAME
        // variables for data items and parsing
        string DSNAME;  	// A:50 (varies)  the name of a dataset such as a PPID
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0.Length == 2) { DSNAME = list0[1];} else { DSNAME = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(15, 52, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S15F51R

S15F52Large Recipe Upload Ack Sent by Equipment Only

    // S15F52 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(15, 51, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect ACKC15
        // variables for data items and parsing
        int ACKC15;  	// B:1 (always)  acknowledge code, 0 ok
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        ACKC15 = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S15F53RRecipe Verification Send Sent by Equipment Only

    // S15F53R C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 15, 53, new SecsMsgReceiveDelegate(recv_S15F53R));

// receive method 
void recv_S15F53R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:3 RCPSPEC RCPID {L:2 RMACK {L:n {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        string RCPSPEC;  	// A:n (always)  recipe specifier
        string RCPID;  	// A:n (always)  recipe identifier conforming to OBJSPEC
        uint RMACK;  	// U1:1 (always)  recipe managment completion code
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RCPSPEC = list1[1];} else { RCPSPEC = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { RCPID = list1[1];} else { RCPID = ""; }
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "U1:1" ) { ok = false; break; }
        RMACK = uint.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list2.Length; n++) {
            string [] list3;
            list3 = sp.ListSplit(list2[n]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(15, 54, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S15F53R

S15F54Recipe Verification Ack Sent by Host Only

    // S15F54 C# Parse reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(15, 53, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // no data expected
        return;  // parsed ok
        } // end while(ok)

S16F1RProcess Job Data MBI Sent by Host Only

    // S16F1R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 16, 1, new SecsMsgReceiveDelegate(recv_S16F1R));

// receive method 
void recv_S16F1R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 DATAID DATALENGTH
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string DATALENGTH;  	// U4:1 (varies)  total bytes of the message body 
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATALENGTH = list1[1];} else { DATALENGTH = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(16, 2, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S16F1R

S16F2PJD MBI Grant Sent by Equipment Only

    // S16F2 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(16, 1, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect GRANT
        // variables for data items and parsing
        int GRANT;  	// B:1 (always)  multiblock grant code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        GRANT = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S16F3RProcess Job Create Req Sent by Host Only

    // S16F3R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 16, 3, new SecsMsgReceiveDelegate(recv_S16F3R));

// receive method 
void recv_S16F3R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:5 DATAID MF {L:n MID} {L:3 PRRECIPEMETHOD RCPSPEC {L:m {L:2 RCPPARNM RCPPARVAL}}} PRPROCESSSTART
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string MF;  	// B:1 (varies)  material format code, ASCII indicates generic units, E40 restricts to B:1
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        uint PRRECIPEMETHOD;  	// U1:1 (always)  recipe type
        string RCPSPEC;  	// A:n (always)  recipe specifier
        string RCPPARNM;  	// A:256 (always)  the name of a recipe variable parameter
        string RCPPARVAL;  	// A:80 (varies)  the value of a recipe variable parameter, any scalar format type
        int PRPROCESSSTART;  	// TF:1 (always)  automatic start flag, false implies manual start
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 6 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MF = list1[1];} else { MF = ""; }
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { MID = list2[1];} else { MID = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length != 4 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "U1:1" ) { ok = false; break; }
        PRRECIPEMETHOD = uint.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if (list2.Length < 1) { ok = false; break; }
        if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
        if ( list2.Length == 2) { RCPSPEC = list2[1];} else { RCPSPEC = ""; }
        list2 = sp.ListSplit(list1[3]);
        if ( list2.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list2.Length; m++) {
            string [] list3;
            list3 = sp.ListSplit(list2[m]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { RCPPARNM = list4[1];} else { RCPPARNM = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { RCPPARVAL = list4[1];} else { RCPPARVAL = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[5]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "TF:1" ) { ok = false; break; }
        PRPROCESSSTART = int.Parse(list1[1]);
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(16, 4, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S16F3R

S16F4Process Job Create Ack Sent by Equipment Only

    // S16F4 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(16, 3, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 PRJOBID {L:2 ACKA {L:n {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        string PRJOBID;  	// A:n (always)  process job identifier
        int ACKA;  	// TF:1 (always)  request success
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { PRJOBID = list1[1];} else { PRJOBID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "TF:1" ) { ok = false; break; }
        ACKA = int.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list2.Length; n++) {
            string [] list3;
            list3 = sp.ListSplit(list2[n]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S16F5RProcess Job Cmd Req Sent by Host Only

    // S16F5R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 16, 5, new SecsMsgReceiveDelegate(recv_S16F5R));

// receive method 
void recv_S16F5R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:4 DATAID PRJOBID PRCMDNAME {L:n {L:2 CPNAME CPVAL}}
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string PRJOBID;  	// A:n (always)  process job identifier
        string PRCMDNAME;  	// A:6 (always)  process job commmands, START, STOP, PAUSE, RESUME, ABORT, CANCEL
        string CPNAME;  	// A:n (varies)  command parameter name
        string CPVAL;  	// A:n (varies)  command parameter value, any scalar type
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { PRJOBID = list1[1];} else { PRJOBID = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { PRCMDNAME = list1[1];} else { PRCMDNAME = ""; }
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { CPNAME = list3[1];} else { CPNAME = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { CPVAL = list3[1];} else { CPVAL = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(16, 6, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S16F5R

S16F6Process Job Cmd Ack Sent by Equipment Only

    // S16F6 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(16, 5, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 PRJOBID {L:2 ACKA {L:n {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        string PRJOBID;  	// A:n (always)  process job identifier
        int ACKA;  	// TF:1 (always)  request success
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { PRJOBID = list1[1];} else { PRJOBID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "TF:1" ) { ok = false; break; }
        ACKA = int.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list2.Length; n++) {
            string [] list3;
            list3 = sp.ListSplit(list2[n]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S16F7[R]Process Job Alert Notify Sent by Equipment Only

    // S16F7 C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 16, 7, new SecsMsgReceiveDelegate(recv_S16F7));

// receive method 
void recv_S16F7(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:4 TIMESTAMP PRJOBID PRJOBMILESTONE {L:2 ACKA {L:n {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        string TIMESTAMP;  	// A:32 (always)  ECV TimeFormat controls format, 0=A:12 YYMMDDHHMMSS, 1=A:16 YYYYMMDDHHMMSScc,2=YYYY-MM-DDTHH:MM:SS.s[s]*{Z|+hh:mm|-hh:mm}
        string PRJOBID;  	// A:n (always)  process job identifier
        string PRJOBMILESTONE;  	// U1:1 (varies)  process job status 
        int ACKA;  	// TF:1 (always)  request success
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { TIMESTAMP = list1[1];} else { TIMESTAMP = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { PRJOBID = list1[1];} else { PRJOBID = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { PRJOBMILESTONE = list1[1];} else { PRJOBMILESTONE = ""; }
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "TF:1" ) { ok = false; break; }
        ACKA = int.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list2.Length; n++) {
            string [] list3;
            list3 = sp.ListSplit(list2[n]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(16, 8, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S16F7

S16F8Process Job Alert Ack Sent by Host Only

    // S16F8 C# Parse reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(16, 7, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // no data expected
        return;  // parsed ok
        } // end while(ok)

S16F9[R]Process Job Event Notify Sent by Equipment Only

    // S16F9 C# Receive message - add next line to setup
    //SecsHost sp=your_SecsHost;
    sp.MessageTypeAdd( 16, 9, new SecsMsgReceiveDelegate(recv_S16F9));

// receive method 
void recv_S16F9(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:4 PREVENTID TIMESTAMP PRJOBID {L:n {L:2 VID V}}
        // variables for data items and parsing
        string PREVENTID;  	// U1:1 (varies)  process job event ID
        string TIMESTAMP;  	// A:32 (always)  ECV TimeFormat controls format, 0=A:12 YYMMDDHHMMSS, 1=A:16 YYYYMMDDHHMMSScc,2=YYYY-MM-DDTHH:MM:SS.s[s]*{Z|+hh:mm|-hh:mm}
        string PRJOBID;  	// A:n (always)  process job identifier
        string VID;  	// A:n (varies)  A variable ID
        string V;  	// A:n (varies)  variable value, any type including list
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { PREVENTID = list1[1];} else { PREVENTID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { TIMESTAMP = list1[1];} else { TIMESTAMP = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { PRJOBID = list1[1];} else { PRJOBID = ""; }
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { VID = list3[1];} else { VID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { V = list3[1];} else { V = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(16, 10, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S16F9

S16F10Process Job Event Ack Sent by Host Only

    // S16F10 C# Parse reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(16, 9, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // no data expected
        return;  // parsed ok
        } // end while(ok)

S16F11RPRJobCreateEnh Sent by Host Only

    // S16F11R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 16, 11, new SecsMsgReceiveDelegate(recv_S16F11R));

// receive method 
void recv_S16F11R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:7 DATAID PRJOBID MF {L:n {L:2 CARRIERID {L:j SLOTID}}} {L:3 PRRECIPEMETHOD RCPSPEC {L:m {L:2 RCPPARNM RCPPARVAL}}} PRPROCESSSTART {L:p PRPAUSEEVENTID}
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string PRJOBID;  	// A:n (always)  process job identifier
        string MF;  	// B:1 (varies)  material format code, ASCII indicates generic units, E40 restricts to B:1
        string CARRIERID;  	// A:n (always)  carrier ID
        uint SLOTID;  	// U1:1 (always)  slot position within a carrier
        uint PRRECIPEMETHOD;  	// U1:1 (always)  recipe type
        string RCPSPEC;  	// A:n (always)  recipe specifier
        string RCPPARNM;  	// A:256 (always)  the name of a recipe variable parameter
        string RCPPARVAL;  	// A:80 (varies)  the value of a recipe variable parameter, any scalar format type
        int PRPROCESSSTART;  	// TF:1 (always)  automatic start flag, false implies manual start
        string PRPAUSEEVENTID;  	// U4:1 (varies)  an event identifier for which a process job should be paused
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 8 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { PRJOBID = list1[1];} else { PRJOBID = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MF = list1[1];} else { MF = ""; }
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { CARRIERID = list3[1];} else { CARRIERID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if ( list3.Length < 1) { ok=false; break; }
            int j;
            for(j=1; j < list3.Length; j++) {
                string [] list4;
                list4 = sp.ListSplit(list3[j]);
                if (list4.Length < 1) { ok = false; break; }
                if ( list4[0] != "U1:1" ) { ok = false; break; }
                SLOTID = uint.Parse(list4[1]);
                }
            if (!ok) break;
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[5]);
        if ( list1.Length != 4 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "U1:1" ) { ok = false; break; }
        PRRECIPEMETHOD = uint.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if (list2.Length < 1) { ok = false; break; }
        if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
        if ( list2.Length == 2) { RCPSPEC = list2[1];} else { RCPSPEC = ""; }
        list2 = sp.ListSplit(list1[3]);
        if ( list2.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list2.Length; m++) {
            string [] list3;
            list3 = sp.ListSplit(list2[m]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { RCPPARNM = list4[1];} else { RCPPARNM = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { RCPPARVAL = list4[1];} else { RCPPARVAL = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[6]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "TF:1" ) { ok = false; break; }
        PRPROCESSSTART = int.Parse(list1[1]);
        list1 = sp.ListSplit(list0[7]);
        if ( list1.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list1.Length; p++) {
            string [] list2;
            list2 = sp.ListSplit(list1[p]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { PRPAUSEEVENTID = list2[1];} else { PRPAUSEEVENTID = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(16, 12, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S16F11R

S16F12PRJobCreateEnh Ack Sent by Equipment Only

    // S16F12 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(16, 11, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 PRJOBID {L:2 ACKA {L:n {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        string PRJOBID;  	// A:n (always)  process job identifier
        int ACKA;  	// TF:1 (always)  request success
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { PRJOBID = list1[1];} else { PRJOBID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "TF:1" ) { ok = false; break; }
        ACKA = int.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list2.Length; n++) {
            string [] list3;
            list3 = sp.ListSplit(list2[n]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S16F15RPRJobMultiCreate Sent by Host Only

    // S16F15R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 16, 15, new SecsMsgReceiveDelegate(recv_S16F15R));

// receive method 
void recv_S16F15R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 DATAID {L:p {L:6 PRJOBID MF {L:n {L:2 CARRIERID {L:j SLOTID}}} {L:3 PRRECIPEMETHOD RCPSPEC {L:m {L:2 RCPPARNM RCPPARVAL}}} PRPROCESSSTART {L:k PRPAUSEEVENTID}}}
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string PRJOBID;  	// A:n (always)  process job identifier
        string MF;  	// B:1 (varies)  material format code, ASCII indicates generic units, E40 restricts to B:1
        string CARRIERID;  	// A:n (always)  carrier ID
        uint SLOTID;  	// U1:1 (always)  slot position within a carrier
        uint PRRECIPEMETHOD;  	// U1:1 (always)  recipe type
        string RCPSPEC;  	// A:n (always)  recipe specifier
        string RCPPARNM;  	// A:256 (always)  the name of a recipe variable parameter
        string RCPPARVAL;  	// A:80 (varies)  the value of a recipe variable parameter, any scalar format type
        int PRPROCESSSTART;  	// TF:1 (always)  automatic start flag, false implies manual start
        string PRPAUSEEVENTID;  	// U4:1 (varies)  an event identifier for which a process job should be paused
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int p;
        for(p=1; p < list1.Length; p++) {
            string [] list2;
            list2 = sp.ListSplit(list1[p]);
            if ( list2.Length != 7 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { PRJOBID = list3[1];} else { PRJOBID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { MF = list3[1];} else { MF = ""; }
            list3 = sp.ListSplit(list2[3]);
            if ( list3.Length < 1) { ok=false; break; }
            int n;
            for(n=1; n < list3.Length; n++) {
                string [] list4;
                list4 = sp.ListSplit(list3[n]);
                if ( list4.Length != 3 ) { ok=false; break; }
                string [] list5;
                list5 = sp.ListSplit(list4[1]);
                if (list5.Length < 1) { ok = false; break; }
                if ( !list5[0].StartsWith("A:") ) { ok = false; break; }
                if ( list5.Length == 2) { CARRIERID = list5[1];} else { CARRIERID = ""; }
                list5 = sp.ListSplit(list4[2]);
                if ( list5.Length < 1) { ok=false; break; }
                int j;
                for(j=1; j < list5.Length; j++) {
                    string [] list6;
                    list6 = sp.ListSplit(list5[j]);
                    if (list6.Length < 1) { ok = false; break; }
                    if ( list6[0] != "U1:1" ) { ok = false; break; }
                    SLOTID = uint.Parse(list6[1]);
                    }
                if (!ok) break;
                }
            if (!ok) break;
            list3 = sp.ListSplit(list2[4]);
            if ( list3.Length != 4 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4[0] != "U1:1" ) { ok = false; break; }
            PRRECIPEMETHOD = uint.Parse(list4[1]);
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { RCPSPEC = list4[1];} else { RCPSPEC = ""; }
            list4 = sp.ListSplit(list3[3]);
            if ( list4.Length < 1) { ok=false; break; }
            int m;
            for(m=1; m < list4.Length; m++) {
                string [] list5;
                list5 = sp.ListSplit(list4[m]);
                if ( list5.Length != 3 ) { ok=false; break; }
                string [] list6;
                list6 = sp.ListSplit(list5[1]);
                if (list6.Length < 1) { ok = false; break; }
                if ( !list6[0].StartsWith("A:") ) { ok = false; break; }
                if ( list6.Length == 2) { RCPPARNM = list6[1];} else { RCPPARNM = ""; }
                list6 = sp.ListSplit(list5[2]);
                if (list6.Length < 1) { ok = false; break; }
                if ( list6.Length == 2) { RCPPARVAL = list6[1];} else { RCPPARVAL = ""; }
                }
            if (!ok) break;
            list3 = sp.ListSplit(list2[5]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3[0] != "TF:1" ) { ok = false; break; }
            PRPROCESSSTART = int.Parse(list3[1]);
            list3 = sp.ListSplit(list2[6]);
            if ( list3.Length < 1) { ok=false; break; }
            int k;
            for(k=1; k < list3.Length; k++) {
                string [] list4;
                list4 = sp.ListSplit(list3[k]);
                if (list4.Length < 1) { ok = false; break; }
                if ( list4.Length == 2) { PRPAUSEEVENTID = list4[1];} else { PRPAUSEEVENTID = ""; }
                }
            if (!ok) break;
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(16, 16, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S16F15R

S16F16PRJobMultiCreate Ack Sent by Equipment Only

    // S16F16 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(16, 15, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 {L:m PRJOBID} {L:2 ACKA {L:n {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        string PRJOBID;  	// A:n (always)  process job identifier
        int ACKA;  	// TF:1 (always)  request success
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if ( list1.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list1.Length; m++) {
            string [] list2;
            list2 = sp.ListSplit(list1[m]);
            if (list2.Length < 1) { ok = false; break; }
            if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
            if ( list2.Length == 2) { PRJOBID = list2[1];} else { PRJOBID = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "TF:1" ) { ok = false; break; }
        ACKA = int.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list2.Length; n++) {
            string [] list3;
            list3 = sp.ListSplit(list2[n]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S16F17RPRJobDequeue Sent by Host Only

    // S16F17R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 16, 17, new SecsMsgReceiveDelegate(recv_S16F17R));

// receive method 
void recv_S16F17R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:m PRJOBID
        // variables for data items and parsing
        string PRJOBID;  	// A:n (always)  process job identifier
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list0.Length; m++) {
            string [] list1;
            list1 = sp.ListSplit(list0[m]);
            if (list1.Length < 1) { ok = false; break; }
            if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
            if ( list1.Length == 2) { PRJOBID = list1[1];} else { PRJOBID = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(16, 18, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S16F17R

S16F18PRJobDequeue Ack Sent by Equipment Only

    // S16F18 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(16, 17, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 {L:m PRJOBID} {L:2 ACKA {L:n {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        string PRJOBID;  	// A:n (always)  process job identifier
        int ACKA;  	// TF:1 (always)  request success
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if ( list1.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list1.Length; m++) {
            string [] list2;
            list2 = sp.ListSplit(list1[m]);
            if (list2.Length < 1) { ok = false; break; }
            if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
            if ( list2.Length == 2) { PRJOBID = list2[1];} else { PRJOBID = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "TF:1" ) { ok = false; break; }
        ACKA = int.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list2.Length; n++) {
            string [] list3;
            list3 = sp.ListSplit(list2[n]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S16F19RPRJob List Req Sent by Host Only

    // S16F19R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 16, 19, new SecsMsgReceiveDelegate(recv_S16F19R));

// receive method 
void recv_S16F19R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // no data expected
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(16, 20, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S16F19R

S16F20PRJob List Data Sent by Equipment Only

    // S16F20 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(16, 19, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:m {L:2 PRJOBID PRSTATE}
        // variables for data items and parsing
        string PRJOBID;  	// A:n (always)  process job identifier
        uint PRSTATE;  	// U1:1 (always)  process job state, E40 definition
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list0.Length; m++) {
            string [] list1;
            list1 = sp.ListSplit(list0[m]);
            if ( list1.Length != 3 ) { ok=false; break; }
            string [] list2;
            list2 = sp.ListSplit(list1[1]);
            if (list2.Length < 1) { ok = false; break; }
            if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
            if ( list2.Length == 2) { PRJOBID = list2[1];} else { PRJOBID = ""; }
            list2 = sp.ListSplit(list1[2]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2[0] != "U1:1" ) { ok = false; break; }
            PRSTATE = uint.Parse(list2[1]);
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S16F21RPRJob Create Limit Req Sent by Host Only

    // S16F21R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 16, 21, new SecsMsgReceiveDelegate(recv_S16F21R));

// receive method 
void recv_S16F21R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // no data expected
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(16, 22, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S16F21R

S16F22PRJob Create Limit Data Sent by Equipment Only

    // S16F22 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(16, 21, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect PRJOBSPACE
        // variables for data items and parsing
        uint PRJOBSPACE;  	// U2:1 (always)  the number of process jobs that can be created
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "U2:1" ) { ok = false; break; }
        PRJOBSPACE = uint.Parse(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S16F23RPRJob Recipe Variable Set Sent by Host Only

    // S16F23R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 16, 23, new SecsMsgReceiveDelegate(recv_S16F23R));

// receive method 
void recv_S16F23R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 PRJOBID {L:m {L:2 RCPPARNM RCPPARVAL}}
        // variables for data items and parsing
        string PRJOBID;  	// A:n (always)  process job identifier
        string RCPPARNM;  	// A:256 (always)  the name of a recipe variable parameter
        string RCPPARVAL;  	// A:80 (varies)  the value of a recipe variable parameter, any scalar format type
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { PRJOBID = list1[1];} else { PRJOBID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list1.Length; m++) {
            string [] list2;
            list2 = sp.ListSplit(list1[m]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { RCPPARNM = list3[1];} else { RCPPARNM = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { RCPPARVAL = list3[1];} else { RCPPARVAL = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(16, 24, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S16F23R

S16F24PRJob Recipe Variable Ack Sent by Host Only

    // S16F24 C# Parse reply
    SecsPort sp=(SecsPort)your_SecsPort
    RcResult rcr = sp.SendSecsMsg(16, 23, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 ACKA {L:n {L:2 ERRCODE ERRTEXT}}
        // variables for data items and parsing
        int ACKA;  	// TF:1 (always)  request success
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "TF:1" ) { ok = false; break; }
        ACKA = int.Parse(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ERRCODE = list3[1];} else { ERRCODE = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { ERRTEXT = list3[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S16F25RPRJob Start Method Set Sent by Host Only

    // S16F25R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 16, 25, new SecsMsgReceiveDelegate(recv_S16F25R));

// receive method 
void recv_S16F25R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 {L:m PRJOBID} PRPROCESSSTART
        // variables for data items and parsing
        string PRJOBID;  	// A:n (always)  process job identifier
        int PRPROCESSSTART;  	// TF:1 (always)  automatic start flag, false implies manual start
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if ( list1.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list1.Length; m++) {
            string [] list2;
            list2 = sp.ListSplit(list1[m]);
            if (list2.Length < 1) { ok = false; break; }
            if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
            if ( list2.Length == 2) { PRJOBID = list2[1];} else { PRJOBID = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "TF:1" ) { ok = false; break; }
        PRPROCESSSTART = int.Parse(list1[1]);
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(16, 26, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S16F25R

S16F26PRJob Start Method Ack Sent by Equipment Only

    // S16F26 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(16, 25, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 {L:m PRJOBID} {L:2 ACKA {L:n {L:2 ERRCODE ERRTEXT}}}
        // variables for data items and parsing
        string PRJOBID;  	// A:n (always)  process job identifier
        int ACKA;  	// TF:1 (always)  request success
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if ( list1.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list1.Length; m++) {
            string [] list2;
            list2 = sp.ListSplit(list1[m]);
            if (list2.Length < 1) { ok = false; break; }
            if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
            if ( list2.Length == 2) { PRJOBID = list2[1];} else { PRJOBID = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2[0] != "TF:1" ) { ok = false; break; }
        ACKA = int.Parse(list2[1]);
        list2 = sp.ListSplit(list1[2]);
        if ( list2.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list2.Length; n++) {
            string [] list3;
            list3 = sp.ListSplit(list2[n]);
            if ( list3.Length != 3 ) { ok=false; break; }
            string [] list4;
            list4 = sp.ListSplit(list3[1]);
            if (list4.Length < 1) { ok = false; break; }
            if ( list4.Length == 2) { ERRCODE = list4[1];} else { ERRCODE = ""; }
            list4 = sp.ListSplit(list3[2]);
            if (list4.Length < 1) { ok = false; break; }
            if ( !list4[0].StartsWith("A:") ) { ok = false; break; }
            if ( list4.Length == 2) { ERRTEXT = list4[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S16F27RControl Job Command Sent by Host Only

    // S16F27R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 16, 27, new SecsMsgReceiveDelegate(recv_S16F27R));

// receive method 
void recv_S16F27R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:3 CTLJOBID CTLJOBCMD {L:2 CPNAME CPVAL}
        // variables for data items and parsing
        string CTLJOBID;  	// A:n (always)  control job ID, an OBJID
        uint CTLJOBCMD;  	// U1:1 (always)  control job command
        string CPNAME;  	// A:n (varies)  command parameter name
        string CPVAL;  	// A:n (varies)  command parameter value, any scalar type
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { CTLJOBID = list1[1];} else { CTLJOBID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        CTLJOBCMD = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2.Length == 2) { CPNAME = list2[1];} else { CPNAME = ""; }
        list2 = sp.ListSplit(list1[2]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2.Length == 2) { CPVAL = list2[1];} else { CPVAL = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(16, 28, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S16F27R

S16F28Control Job Command Ack Sent by Equipment Only

    // S16F28 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(16, 27, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 ACKA {L:2 ERRCODE ERRTEXT}
        // variables for data items and parsing
        int ACKA;  	// TF:1 (always)  request success
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "TF:1" ) { ok = false; break; }
        ACKA = int.Parse(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length != 3 ) { ok=false; break; }
        string [] list2;
        list2 = sp.ListSplit(list1[1]);
        if (list2.Length < 1) { ok = false; break; }
        if ( list2.Length == 2) { ERRCODE = list2[1];} else { ERRCODE = ""; }
        list2 = sp.ListSplit(list1[2]);
        if (list2.Length < 1) { ok = false; break; }
        if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
        if ( list2.Length == 2) { ERRTEXT = list2[1];} else { ERRTEXT = ""; }
        return;  // parsed ok
        } // end while(ok)

S16F29PRSetMtrlOrder Sent by Host Only

    // S16F29 C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 16, 29, new SecsMsgReceiveDelegate(recv_S16F29));

// receive method 
void recv_S16F29(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect PRMTRLORDER
        // variables for data items and parsing
        uint PRMTRLORDER;  	// U1:1 (always)  ordering method for pending process jobs
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "U1:1" ) { ok = false; break; }
        PRMTRLORDER = uint.Parse(list0[1]);
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(16, 30, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S16F29

S16F30PRSetMtrlOrder Ack Sent by Equipment Only

    // S16F30 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(16, 29, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect ACKA
        // variables for data items and parsing
        int ACKA;  	// TF:1 (always)  request success
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "TF:1" ) { ok = false; break; }
        ACKA = int.Parse(list0[1]);
        return;  // parsed ok
        } // end while(ok)

S17F1RData Report Create Req Sent by Host Only

    // S17F1R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 17, 1, new SecsMsgReceiveDelegate(recv_S17F1R));

// receive method 
void recv_S17F1R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:4 DATAID RPTID DATASRC {L:n VID}
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string RPTID;  	// U4:1 (varies)  report ID
        string DATASRC;  	// A:n (always)  identifies a data source, use length 0 to mean the default
        string VID;  	// A:n (varies)  A variable ID
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { RPTID = list1[1];} else { RPTID = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { DATASRC = list1[1];} else { DATASRC = ""; }
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { VID = list2[1];} else { VID = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(17, 2, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S17F1R

S17F2Data Report Create Ack Sent by Equipment Only

    // S17F2 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(17, 1, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 RPTID ERRCODE
        // variables for data items and parsing
        string RPTID;  	// U4:1 (varies)  report ID
        string ERRCODE;  	// U4:1 (varies)  error code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { RPTID = list1[1];} else { RPTID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { ERRCODE = list1[1];} else { ERRCODE = ""; }
        return;  // parsed ok
        } // end while(ok)

S17F3RData Report Delete Req Sent by Host Only

    // S17F3R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 17, 3, new SecsMsgReceiveDelegate(recv_S17F3R));

// receive method 
void recv_S17F3R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:n RPTID
        // variables for data items and parsing
        string RPTID;  	// U4:1 (varies)  report ID
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list0.Length; n++) {
            string [] list1;
            list1 = sp.ListSplit(list0[n]);
            if (list1.Length < 1) { ok = false; break; }
            if ( list1.Length == 2) { RPTID = list1[1];} else { RPTID = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(17, 4, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S17F3R

S17F4Data Report Del Ack Sent by Equipment Only

    // S17F4 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(17, 3, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 ACKA {L:m {L:3 RPTID ERRCODE ERRTEXT}}
        // variables for data items and parsing
        int ACKA;  	// TF:1 (always)  request success
        string RPTID;  	// U4:1 (varies)  report ID
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "TF:1" ) { ok = false; break; }
        ACKA = int.Parse(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list1.Length; m++) {
            string [] list2;
            list2 = sp.ListSplit(list1[m]);
            if ( list2.Length != 4 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { RPTID = list3[1];} else { RPTID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ERRCODE = list3[1];} else { ERRCODE = ""; }
            list3 = sp.ListSplit(list2[3]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { ERRTEXT = list3[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S17F5RTrace Create Req Sent by Host Only

    // S17F5R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 17, 5, new SecsMsgReceiveDelegate(recv_S17F5R));

// receive method 
void recv_S17F5R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:6 DATAID TRID CEED {L:n RPTID} {L:8* TOTSMP REPGSZ EVNTSRC CEIDSTART EVNTSRC2 CEIDSTOP TRAUTOD RPTOC}
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string TRID;  	// A:n (varies)  trace request ID
        int CEED;  	// TF:1 (always)  collection event or trace enablement, true is enabled
        string RPTID;  	// U4:1 (varies)  report ID
        string TOTSMP;  	// U4:1 (varies)  total samples to be made, should be an even multiple of REPGSZ
        string REPGSZ;  	// U4:1 (varies)  reporting group size, TOTSMP modulo REPGSZ should be 0
        string EVNTSRC;  	// A:n (always)  identifies an event source, use length 0 to specify the default
        string CEIDSTART;  	// U4:1 (varies)  the CEID of a start event
        string EVNTSRC2;  	// A:n (always)  a second event source EVNTSRC
        string CEIDSTOP;  	// U4:1 (varies)  the CEID of a stop event
        int TRAUTOD;  	// TF:1 (always)  delete upon completion flag
        int RPTOC;  	// TF:1 (always)  send only changed data trace report flag
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 7 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { TRID = list1[1];} else { TRID = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "TF:1" ) { ok = false; break; }
        CEED = int.Parse(list1[1]);
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { RPTID = list2[1];} else { RPTID = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[5]);
        if ( list1.Length == 9 ) {  // 8 optional items found
            string [] list2;
            list2 = sp.ListSplit(list1[1]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { TOTSMP = list2[1];} else { TOTSMP = ""; }
            list2 = sp.ListSplit(list1[2]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { REPGSZ = list2[1];} else { REPGSZ = ""; }
            list2 = sp.ListSplit(list1[3]);
            if (list2.Length < 1) { ok = false; break; }
            if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
            if ( list2.Length == 2) { EVNTSRC = list2[1];} else { EVNTSRC = ""; }
            list2 = sp.ListSplit(list1[4]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { CEIDSTART = list2[1];} else { CEIDSTART = ""; }
            list2 = sp.ListSplit(list1[5]);
            if (list2.Length < 1) { ok = false; break; }
            if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
            if ( list2.Length == 2) { EVNTSRC2 = list2[1];} else { EVNTSRC2 = ""; }
            list2 = sp.ListSplit(list1[6]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { CEIDSTOP = list2[1];} else { CEIDSTOP = ""; }
            list2 = sp.ListSplit(list1[7]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2[0] != "TF:1" ) { ok = false; break; }
            TRAUTOD = int.Parse(list2[1]);
            list2 = sp.ListSplit(list1[8]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2[0] != "TF:1" ) { ok = false; break; }
            RPTOC = int.Parse(list2[1]);
            }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(17, 6, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S17F5R

S17F6Trace Create Ack Sent by Equipment Only

    // S17F6 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(17, 5, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 TRID ERRCODE
        // variables for data items and parsing
        string TRID;  	// A:n (varies)  trace request ID
        string ERRCODE;  	// U4:1 (varies)  error code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { TRID = list1[1];} else { TRID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { ERRCODE = list1[1];} else { ERRCODE = ""; }
        return;  // parsed ok
        } // end while(ok)

S17F7RTrace Delete Req Sent by Host Only

    // S17F7R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 17, 7, new SecsMsgReceiveDelegate(recv_S17F7R));

// receive method 
void recv_S17F7R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:n TRID
        // variables for data items and parsing
        string TRID;  	// A:n (varies)  trace request ID
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list0.Length; n++) {
            string [] list1;
            list1 = sp.ListSplit(list0[n]);
            if (list1.Length < 1) { ok = false; break; }
            if ( list1.Length == 2) { TRID = list1[1];} else { TRID = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(17, 8, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S17F7R

S17F8Trace Delete Ack Sent by Equipment Only

    // S17F8 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(17, 7, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 ACKA {L:m {L:3 TRID ERRCODE ERRTEXT}}
        // variables for data items and parsing
        int ACKA;  	// TF:1 (always)  request success
        string TRID;  	// A:n (varies)  trace request ID
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "TF:1" ) { ok = false; break; }
        ACKA = int.Parse(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list1.Length; m++) {
            string [] list2;
            list2 = sp.ListSplit(list1[m]);
            if ( list2.Length != 4 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { TRID = list3[1];} else { TRID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ERRCODE = list3[1];} else { ERRCODE = ""; }
            list3 = sp.ListSplit(list2[3]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { ERRTEXT = list3[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S17F9RCollection Event Link Req Sent by Host Only

    // S17F9R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 17, 9, new SecsMsgReceiveDelegate(recv_S17F9R));

// receive method 
void recv_S17F9R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:4 DATAID EVNTSRC CEID {L:n RPTID}
        // variables for data items and parsing
        string DATAID;  	// U4:1 (varies)  an identifier to correlate related messages
        string EVNTSRC;  	// A:n (always)  identifies an event source, use length 0 to specify the default
        string CEID;  	// U4:1 (varies)  collection event identifier, GEM requires type Un
        string RPTID;  	// U4:1 (varies)  report ID
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATAID = list1[1];} else { DATAID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { EVNTSRC = list1[1];} else { EVNTSRC = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { CEID = list1[1];} else { CEID = ""; }
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { RPTID = list2[1];} else { RPTID = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(17, 10, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S17F9R

S17F10Collection Event Link Ack Sent by Equipment Only

    // S17F10 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(17, 9, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:3 EVNTSRC CEID ERRCODE
        // variables for data items and parsing
        string EVNTSRC;  	// A:n (always)  identifies an event source, use length 0 to specify the default
        string CEID;  	// U4:1 (varies)  collection event identifier, GEM requires type Un
        string ERRCODE;  	// U4:1 (varies)  error code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { EVNTSRC = list1[1];} else { EVNTSRC = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { CEID = list1[1];} else { CEID = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { ERRCODE = list1[1];} else { ERRCODE = ""; }
        return;  // parsed ok
        } // end while(ok)

S17F11RCollection Event Unlink Sent by Host Only

    // S17F11R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 17, 11, new SecsMsgReceiveDelegate(recv_S17F11R));

// receive method 
void recv_S17F11R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:3 EVNTSRC CEID RPTID
        // variables for data items and parsing
        string EVNTSRC;  	// A:n (always)  identifies an event source, use length 0 to specify the default
        string CEID;  	// U4:1 (varies)  collection event identifier, GEM requires type Un
        string RPTID;  	// U4:1 (varies)  report ID
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { EVNTSRC = list1[1];} else { EVNTSRC = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { CEID = list1[1];} else { CEID = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { RPTID = list1[1];} else { RPTID = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(17, 12, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S17F11R

S17F12Collection Event Unlink Ack Sent by Equipment Only

    // S17F12 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(17, 11, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:4 EVNTSRC CEID RPTID ERRCODE
        // variables for data items and parsing
        string EVNTSRC;  	// A:n (always)  identifies an event source, use length 0 to specify the default
        string CEID;  	// U4:1 (varies)  collection event identifier, GEM requires type Un
        string RPTID;  	// U4:1 (varies)  report ID
        string ERRCODE;  	// U4:1 (varies)  error code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { EVNTSRC = list1[1];} else { EVNTSRC = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { CEID = list1[1];} else { CEID = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { RPTID = list1[1];} else { RPTID = ""; }
        list1 = sp.ListSplit(list0[4]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { ERRCODE = list1[1];} else { ERRCODE = ""; }
        return;  // parsed ok
        } // end while(ok)

S17F13RTrace Reset Req Sent by Host Only

    // S17F13R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 17, 13, new SecsMsgReceiveDelegate(recv_S17F13R));

// receive method 
void recv_S17F13R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:n TRID
        // variables for data items and parsing
        string TRID;  	// A:n (varies)  trace request ID
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list0.Length; n++) {
            string [] list1;
            list1 = sp.ListSplit(list0[n]);
            if (list1.Length < 1) { ok = false; break; }
            if ( list1.Length == 2) { TRID = list1[1];} else { TRID = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(17, 14, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S17F13R

S17F14Trace Reset Ack Sent by Equipment Only

    // S17F14 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(17, 13, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 ACKA {L:m {L:3 TRID ERRCODE ERRTEXT}}
        // variables for data items and parsing
        int ACKA;  	// TF:1 (always)  request success
        string TRID;  	// A:n (varies)  trace request ID
        string ERRCODE;  	// U4:1 (varies)  error code
        string ERRTEXT;  	// A:80 (always)  description of ERRCODE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "TF:1" ) { ok = false; break; }
        ACKA = int.Parse(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list1.Length; m++) {
            string [] list2;
            list2 = sp.ListSplit(list1[m]);
            if ( list2.Length != 4 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { TRID = list3[1];} else { TRID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ERRCODE = list3[1];} else { ERRCODE = ""; }
            list3 = sp.ListSplit(list2[3]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { ERRTEXT = list3[1];} else { ERRTEXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S18F1RRead Attribute Req Sent by Host Only

    // S18F1R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 18, 1, new SecsMsgReceiveDelegate(recv_S18F1R));

// receive method 
void recv_S18F1R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 TARGETID {L:n ATTRID}
        // variables for data items and parsing
        string TARGETID;  	// A:n (always)  the OBJSPEC for the target object
        string ATTRID;  	// A:40 (varies)  identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~.  Does not begin or end with space.
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { TARGETID = list1[1];} else { TARGETID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { ATTRID = list2[1];} else { ATTRID = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(18, 2, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S18F1R

S18F2Read Attribute Data Sent by Equipment Only

    // S18F2 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(18, 1, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:3 TARGETID SSACK {L:n ATTRDATA}
        // variables for data items and parsing
        string TARGETID;  	// A:n (always)  the OBJSPEC for the target object
        string SSACK;  	// A:2 (always)  two character codes for success or failure
        string ATTRDATA;  	// A:n (varies)  a specific attribute value of any data type
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { TARGETID = list1[1];} else { TARGETID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { SSACK = list1[1];} else { SSACK = ""; }
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { ATTRDATA = list2[1];} else { ATTRDATA = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S18F3RWrite Attribute Req Sent by Host Only

    // S18F3R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 18, 3, new SecsMsgReceiveDelegate(recv_S18F3R));

// receive method 
void recv_S18F3R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 TARGETID {L:n {L:2 ATTRID ATTRDATA}}
        // variables for data items and parsing
        string TARGETID;  	// A:n (always)  the OBJSPEC for the target object
        string ATTRID;  	// A:40 (varies)  identifies an attribute type, chars 0x20-0x7e but not >, :, ?, *, or ~.  Does not begin or end with space.
        string ATTRDATA;  	// A:n (varies)  a specific attribute value of any data type
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { TARGETID = list1[1];} else { TARGETID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ATTRID = list3[1];} else { ATTRID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { ATTRDATA = list3[1];} else { ATTRDATA = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(18, 4, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S18F3R

S18F4Write Attribute Ack Sent by Equipment Only

    // S18F4 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(18, 3, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:3 TARGETID SSACK STATUSLIST
        // variables for data items and parsing
        string TARGETID;  	// A:n (always)  the OBJSPEC for the target object
        string SSACK;  	// A:2 (always)  two character codes for success or failure
        int [] STATUSLIST;  	// L (always)  subsystem status data strings in a fixed order
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { TARGETID = list1[1];} else { TARGETID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { SSACK = list1[1];} else { SSACK = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith(":") ) { ok = false; break; }
        STATUSLIST = new int[list1.Length-1];
        for(int i=0; i < STATUSLIST.Length; i++) {
            STATUSLIST[i] = int.Parse(list1[1+i]);
            }
        return;  // parsed ok
        } // end while(ok)

S18F5RRead Request Sent by Host Only

    // S18F5R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 18, 5, new SecsMsgReceiveDelegate(recv_S18F5R));

// receive method 
void recv_S18F5R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:3 TARGETID DATASEG DATALENGTH
        // variables for data items and parsing
        string TARGETID;  	// A:n (always)  the OBJSPEC for the target object
        string DATASEG;  	// A:n (varies)  identifies data requested, E87 requires text
        string DATALENGTH;  	// U4:1 (varies)  total bytes of the message body 
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { TARGETID = list1[1];} else { TARGETID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATASEG = list1[1];} else { DATASEG = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATALENGTH = list1[1];} else { DATALENGTH = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(18, 6, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S18F5R

S18F6Read Data Sent by Equipment Only

    // S18F6 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(18, 5, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:4 TARGETID SSACK DATA {L:s STATUS}
        // variables for data items and parsing
        string TARGETID;  	// A:n (always)  the OBJSPEC for the target object
        string SSACK;  	// A:2 (always)  two character codes for success or failure
        string DATA;  	// A:n (varies)  unformatted data
        string STATUS;  	// A:n (always)  subsystem status data
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { TARGETID = list1[1];} else { TARGETID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { SSACK = list1[1];} else { SSACK = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATA = list1[1];} else { DATA = ""; }
        list1 = sp.ListSplit(list0[4]);
        if ( list1.Length < 1) { ok=false; break; }
        int s;
        for(s=1; s < list1.Length; s++) {
            string [] list2;
            list2 = sp.ListSplit(list1[s]);
            if (list2.Length < 1) { ok = false; break; }
            if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
            if ( list2.Length == 2) { STATUS = list2[1];} else { STATUS = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S18F7RWrite Data Request Sent by Host Only

    // S18F7R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 18, 7, new SecsMsgReceiveDelegate(recv_S18F7R));

// receive method 
void recv_S18F7R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:4 TARGETID DATASEG DATALENGTH DATA
        // variables for data items and parsing
        string TARGETID;  	// A:n (always)  the OBJSPEC for the target object
        string DATASEG;  	// A:n (varies)  identifies data requested, E87 requires text
        string DATALENGTH;  	// U4:1 (varies)  total bytes of the message body 
        string DATA;  	// A:n (varies)  unformatted data
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { TARGETID = list1[1];} else { TARGETID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATASEG = list1[1];} else { DATASEG = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATALENGTH = list1[1];} else { DATALENGTH = ""; }
        list1 = sp.ListSplit(list0[4]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { DATA = list1[1];} else { DATA = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(18, 8, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S18F7R

S18F8Write Data Ack Sent by Equipment Only

    // S18F8 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(18, 7, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:3 TARGETID SSACK STATUSLIST
        // variables for data items and parsing
        string TARGETID;  	// A:n (always)  the OBJSPEC for the target object
        string SSACK;  	// A:2 (always)  two character codes for success or failure
        int [] STATUSLIST;  	// L (always)  subsystem status data strings in a fixed order
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { TARGETID = list1[1];} else { TARGETID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { SSACK = list1[1];} else { SSACK = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith(":") ) { ok = false; break; }
        STATUSLIST = new int[list1.Length-1];
        for(int i=0; i < STATUSLIST.Length; i++) {
            STATUSLIST[i] = int.Parse(list1[1+i]);
            }
        return;  // parsed ok
        } // end while(ok)

S18F9RRead ID Req Sent by Host Only

    // S18F9R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 18, 9, new SecsMsgReceiveDelegate(recv_S18F9R));

// receive method 
void recv_S18F9R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect TARGETID
        // variables for data items and parsing
        string TARGETID;  	// A:n (always)  the OBJSPEC for the target object
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( !list0[0].StartsWith("A:") ) { ok = false; break; }
        if ( list0.Length == 2) { TARGETID = list0[1];} else { TARGETID = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(18, 10, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S18F9R

S18F10Read ID Data Sent by Equipment Only

    // S18F10 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(18, 9, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:4 TARGETID SSACK MID STATUSLIST
        // variables for data items and parsing
        string TARGETID;  	// A:n (always)  the OBJSPEC for the target object
        string SSACK;  	// A:2 (always)  two character codes for success or failure
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        int [] STATUSLIST;  	// L (always)  subsystem status data strings in a fixed order
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { TARGETID = list1[1];} else { TARGETID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { SSACK = list1[1];} else { SSACK = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MID = list1[1];} else { MID = ""; }
        list1 = sp.ListSplit(list0[4]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith(":") ) { ok = false; break; }
        STATUSLIST = new int[list1.Length-1];
        for(int i=0; i < STATUSLIST.Length; i++) {
            STATUSLIST[i] = int.Parse(list1[1+i]);
            }
        return;  // parsed ok
        } // end while(ok)

S18F11RWrite ID Req Sent by Host Only

    // S18F11R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 18, 11, new SecsMsgReceiveDelegate(recv_S18F11R));

// receive method 
void recv_S18F11R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 TARGETID MID
        // variables for data items and parsing
        string TARGETID;  	// A:n (always)  the OBJSPEC for the target object
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { TARGETID = list1[1];} else { TARGETID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MID = list1[1];} else { MID = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(18, 12, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S18F11R

S18F12Write ID Ack Sent by Equipment Only

    // S18F12 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(18, 11, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:3 TARGETID SSACK STATUSLIST
        // variables for data items and parsing
        string TARGETID;  	// A:n (always)  the OBJSPEC for the target object
        string SSACK;  	// A:2 (always)  two character codes for success or failure
        int [] STATUSLIST;  	// L (always)  subsystem status data strings in a fixed order
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { TARGETID = list1[1];} else { TARGETID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { SSACK = list1[1];} else { SSACK = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith(":") ) { ok = false; break; }
        STATUSLIST = new int[list1.Length-1];
        for(int i=0; i < STATUSLIST.Length; i++) {
            STATUSLIST[i] = int.Parse(list1[1+i]);
            }
        return;  // parsed ok
        } // end while(ok)

S18F13RSubsystem Command Sent by Host Only

    // S18F13R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 18, 13, new SecsMsgReceiveDelegate(recv_S18F13R));

// receive method 
void recv_S18F13R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:3 TARGETID SSCMD {L:n CPVAL}
        // variables for data items and parsing
        string TARGETID;  	// A:n (always)  the OBJSPEC for the target object
        string SSCMD;  	// A:n (always)  subsystem action command
        string CPVAL;  	// A:n (varies)  command parameter value, any scalar type
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { TARGETID = list1[1];} else { TARGETID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { SSCMD = list1[1];} else { SSCMD = ""; }
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2.Length == 2) { CPVAL = list2[1];} else { CPVAL = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(18, 14, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S18F13R

S18F14Subsystem Command Ack Sent by Equipment Only

    // S18F14 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(18, 13, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:3 TARGETID SSACK STATUSLIST
        // variables for data items and parsing
        string TARGETID;  	// A:n (always)  the OBJSPEC for the target object
        string SSACK;  	// A:2 (always)  two character codes for success or failure
        int [] STATUSLIST;  	// L (always)  subsystem status data strings in a fixed order
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { TARGETID = list1[1];} else { TARGETID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { SSACK = list1[1];} else { SSACK = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith(":") ) { ok = false; break; }
        STATUSLIST = new int[list1.Length-1];
        for(int i=0; i < STATUSLIST.Length; i++) {
            STATUSLIST[i] = int.Parse(list1[1+i]);
            }
        return;  // parsed ok
        } // end while(ok)

S18F15RRead 2D Code Cond Req Sent by Host Only

    // S18F15R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 18, 15, new SecsMsgReceiveDelegate(recv_S18F15R));

// receive method 
void recv_S18F15R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect TARGETID
        // variables for data items and parsing
        string TARGETID;  	// A:n (always)  the OBJSPEC for the target object
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( !list0[0].StartsWith("A:") ) { ok = false; break; }
        if ( list0.Length == 2) { TARGETID = list0[1];} else { TARGETID = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(18, 16, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S18F15R

S18F16Read 2D Code Cond Data Sent by Equipment Only

    // S18F16 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(18, 15, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:5 TARGETID SSACK MID STATUSLIST CONDITIONLIST
        // variables for data items and parsing
        string TARGETID;  	// A:n (always)  the OBJSPEC for the target object
        string SSACK;  	// A:2 (always)  two character codes for success or failure
        string MID;  	// A:16 (varies)  material ID, E40 restricts to A:n
        int [] STATUSLIST;  	// L (always)  subsystem status data strings in a fixed order
        int [] CONDITIONLIST;  	// L (always)  a list of Ascii values sent in a fixed order, each string provides condition info for a component
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 6 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { TARGETID = list1[1];} else { TARGETID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { SSACK = list1[1];} else { SSACK = ""; }
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1.Length == 2) { MID = list1[1];} else { MID = ""; }
        list1 = sp.ListSplit(list0[4]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith(":") ) { ok = false; break; }
        STATUSLIST = new int[list1.Length-1];
        for(int i=0; i < STATUSLIST.Length; i++) {
            STATUSLIST[i] = int.Parse(list1[1+i]);
            }
        list1 = sp.ListSplit(list0[5]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith(":") ) { ok = false; break; }
        CONDITIONLIST = new int[list1.Length-1];
        for(int i=0; i < CONDITIONLIST.Length; i++) {
            CONDITIONLIST[i] = int.Parse(list1[1+i]);
            }
        return;  // parsed ok
        } // end while(ok)

S19F1RRequest Process Definition Element (PDE) Directory Sent by Host and Equipment

    // S19F1R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 19, 1, new SecsMsgReceiveDelegate(recv_S19F1R));

// receive method 
void recv_S19F1R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 {L:m {L:3 PDEATTRIBUTENAME COMPARISONOPERATOR PDEATTRIBUTEVALUE}} {L:n PDEATTRIBUTE}
        // variables for data items and parsing
        uint PDEATTRIBUTENAME;  	// U1:1 (always)  identifies a PDE attribute type
        uint COMPARISONOPERATOR;  	// U1:1 (always)  choice of comparison operators.  Interpreted as "target <op> <const>" where <op> is this value and <const> is supplied in the expression
        string PDEATTRIBUTEVALUE;  	// A (varies)  contains the value of a PDE Attribute, may be type L, A, TF, U1
        uint PDEATTRIBUTE;  	// U1:1 (always)  a reportable PDE attribute type, not necessarily useable in a filter expression
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if ( list1.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list1.Length; m++) {
            string [] list2;
            list2 = sp.ListSplit(list1[m]);
            if ( list2.Length != 4 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3[0] != "U1:1" ) { ok = false; break; }
            PDEATTRIBUTENAME = uint.Parse(list3[1]);
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3[0] != "U1:1" ) { ok = false; break; }
            COMPARISONOPERATOR = uint.Parse(list3[1]);
            list3 = sp.ListSplit(list2[3]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3.Length == 2) { PDEATTRIBUTEVALUE = list3[1];} else { PDEATTRIBUTEVALUE = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2[0] != "U1:1" ) { ok = false; break; }
            PDEATTRIBUTE = uint.Parse(list2[1]);
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(19, 2, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S19F1R

S19F2PDE Directory Data Sent by Host and Equipment

    // S19F2 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(19, 1, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:3 DIRRSPSTAT STATUSTXT {L:m {L:2 UID {L:n {L:2 PDEATTRIBUTE PDEATTRIBUTEVALUE}}}}
        // variables for data items and parsing
        uint DIRRSPSTAT;  	// U1:1 (always)  get dir status response
        string STATUSTXT;  	// A:80 (always)  status response description
        string UID;  	// A:36 (always)  See SEMI E139.  A unique identifier for a PDE consisting of a 36 character string with runs of 8, 4, 4, 4, and 12 characters separated by hyphens 
        uint PDEATTRIBUTE;  	// U1:1 (always)  a reportable PDE attribute type, not necessarily useable in a filter expression
        string PDEATTRIBUTEVALUE;  	// A (varies)  contains the value of a PDE Attribute, may be type L, A, TF, U1
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        DIRRSPSTAT = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { STATUSTXT = list1[1];} else { STATUSTXT = ""; }
        list1 = sp.ListSplit(list0[3]);
        if ( list1.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list1.Length; m++) {
            string [] list2;
            list2 = sp.ListSplit(list1[m]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { UID = list3[1];} else { UID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if ( list3.Length < 1) { ok=false; break; }
            int n;
            for(n=1; n < list3.Length; n++) {
                string [] list4;
                list4 = sp.ListSplit(list3[n]);
                if ( list4.Length != 3 ) { ok=false; break; }
                string [] list5;
                list5 = sp.ListSplit(list4[1]);
                if (list5.Length < 1) { ok = false; break; }
                if ( list5[0] != "U1:1" ) { ok = false; break; }
                PDEATTRIBUTE = uint.Parse(list5[1]);
                list5 = sp.ListSplit(list4[2]);
                if (list5.Length < 1) { ok = false; break; }
                if ( list5.Length == 2) { PDEATTRIBUTEVALUE = list5[1];} else { PDEATTRIBUTEVALUE = ""; }
                }
            if (!ok) break;
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S19F3RPDE Delete Request Sent by Host Only

    // S19F3R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 19, 3, new SecsMsgReceiveDelegate(recv_S19F3R));

// receive method 
void recv_S19F3R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:n UID
        // variables for data items and parsing
        string UID;  	// A:36 (always)  See SEMI E139.  A unique identifier for a PDE consisting of a 36 character string with runs of 8, 4, 4, 4, and 12 characters separated by hyphens 
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list0.Length; n++) {
            string [] list1;
            list1 = sp.ListSplit(list0[n]);
            if (list1.Length < 1) { ok = false; break; }
            if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
            if ( list1.Length == 2) { UID = list1[1];} else { UID = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(19, 4, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S19F3R

S19F4PDE Delete Acknowledge Sent by Equipment Only

    // S19F4 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(19, 3, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:n {L:3 UID DELRSPSTAT STATUSTXT}
        // variables for data items and parsing
        string UID;  	// A:36 (always)  See SEMI E139.  A unique identifier for a PDE consisting of a 36 character string with runs of 8, 4, 4, 4, and 12 characters separated by hyphens 
        uint DELRSPSTAT;  	// U1:1 (always)  Response code for the PDE deletion request, non-zero means not deleted
        string STATUSTXT;  	// A:80 (always)  status response description
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list0.Length; n++) {
            string [] list1;
            list1 = sp.ListSplit(list0[n]);
            if ( list1.Length != 4 ) { ok=false; break; }
            string [] list2;
            list2 = sp.ListSplit(list1[1]);
            if (list2.Length < 1) { ok = false; break; }
            if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
            if ( list2.Length == 2) { UID = list2[1];} else { UID = ""; }
            list2 = sp.ListSplit(list1[2]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2[0] != "U1:1" ) { ok = false; break; }
            DELRSPSTAT = uint.Parse(list2[1]);
            list2 = sp.ListSplit(list1[3]);
            if (list2.Length < 1) { ok = false; break; }
            if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
            if ( list2.Length == 2) { STATUSTXT = list2[1];} else { STATUSTXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S19F5RPDE Header Data Request Sent by Host and Equipment

    // S19F5R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 19, 5, new SecsMsgReceiveDelegate(recv_S19F5R));

// receive method 
void recv_S19F5R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:n UID
        // variables for data items and parsing
        string UID;  	// A:36 (always)  See SEMI E139.  A unique identifier for a PDE consisting of a 36 character string with runs of 8, 4, 4, 4, and 12 characters separated by hyphens 
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list0.Length; n++) {
            string [] list1;
            list1 = sp.ListSplit(list0[n]);
            if (list1.Length < 1) { ok = false; break; }
            if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
            if ( list1.Length == 2) { UID = list1[1];} else { UID = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(19, 6, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S19F5R

S19F6PDE Header Data Reply Sent by Host and Equipment

    // S19F6 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(19, 5, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 TCID {L:n {L:3 UID GETRSPSTAT STATUSTXT}}
        // variables for data items and parsing
        string TCID;  	// A:36 (always)  The identity of a transfer container specified as a 36 character string with runs of 8, 4, 4, 4, and 12 characters joined by hyphens
        string UID;  	// A:36 (always)  See SEMI E139.  A unique identifier for a PDE consisting of a 36 character string with runs of 8, 4, 4, 4, and 12 characters separated by hyphens 
        uint GETRSPSTAT;  	// U1:1 (always)  Response code for PDE queries, non-zero indicates failure
        string STATUSTXT;  	// A:80 (always)  status response description
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { TCID = list1[1];} else { TCID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 4 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { UID = list3[1];} else { UID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3[0] != "U1:1" ) { ok = false; break; }
            GETRSPSTAT = uint.Parse(list3[1]);
            list3 = sp.ListSplit(list2[3]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { STATUSTXT = list3[1];} else { STATUSTXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S19F7Rrequest the transfer of PDEs via Stream 13 Sent by Host and Equipment

    // S19F7R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 19, 7, new SecsMsgReceiveDelegate(recv_S19F7R));

// receive method 
void recv_S19F7R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:n UID
        // variables for data items and parsing
        string UID;  	// A:36 (always)  See SEMI E139.  A unique identifier for a PDE consisting of a 36 character string with runs of 8, 4, 4, 4, and 12 characters separated by hyphens 
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list0.Length; n++) {
            string [] list1;
            list1 = sp.ListSplit(list0[n]);
            if (list1.Length < 1) { ok = false; break; }
            if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
            if ( list1.Length == 2) { UID = list1[1];} else { UID = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(19, 8, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S19F7R

S19F8PDE Transfer Reply Sent by Host and Equipment

    // S19F8 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(19, 7, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 TCID {L:n {L:3 UID GETRSPSTAT STATUSTXT}}
        // variables for data items and parsing
        string TCID;  	// A:36 (always)  The identity of a transfer container specified as a 36 character string with runs of 8, 4, 4, 4, and 12 characters joined by hyphens
        string UID;  	// A:36 (always)  See SEMI E139.  A unique identifier for a PDE consisting of a 36 character string with runs of 8, 4, 4, 4, and 12 characters separated by hyphens 
        uint GETRSPSTAT;  	// U1:1 (always)  Response code for PDE queries, non-zero indicates failure
        string STATUSTXT;  	// A:80 (always)  status response description
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { TCID = list1[1];} else { TCID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 4 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { UID = list3[1];} else { UID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3[0] != "U1:1" ) { ok = false; break; }
            GETRSPSTAT = uint.Parse(list3[1]);
            list3 = sp.ListSplit(list2[3]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { STATUSTXT = list3[1];} else { STATUSTXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S19F9RRequest to Send PDE Sent by Host and Equipment

    // S19F9R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 19, 9, new SecsMsgReceiveDelegate(recv_S19F9R));

// receive method 
void recv_S19F9R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 TCID TRANSFERSIZE
        // variables for data items and parsing
        string TCID;  	// A:36 (always)  The identity of a transfer container specified as a 36 character string with runs of 8, 4, 4, 4, and 12 characters joined by hyphens
        uint TRANSFERSIZE;  	// U8:1 (always)  SIze in bytes of the TransferContainer.   An 8 byte value but HSMS uses 4 byte message lengths!!!
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { TCID = list1[1];} else { TCID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U8:1" ) { ok = false; break; }
        TRANSFERSIZE = uint.Parse(list1[1]);
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(19, 10, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S19F9R

S19F10Initiate PDE transfer Reply Sent by Host and Equipment

    // S19F10 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(19, 9, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:3 TCID RTSRSPSTAT STATUSTXT
        // variables for data items and parsing
        string TCID;  	// A:36 (always)  The identity of a transfer container specified as a 36 character string with runs of 8, 4, 4, 4, and 12 characters joined by hyphens
        uint RTSRSPSTAT;  	// U1:1 (always)  PDE transfer request reply code, non-zero means denied
        string STATUSTXT;  	// A:80 (always)  status response description
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 4 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { TCID = list1[1];} else { TCID = ""; }
        list1 = sp.ListSplit(list0[2]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        RTSRSPSTAT = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { STATUSTXT = list1[1];} else { STATUSTXT = ""; }
        return;  // parsed ok
        } // end while(ok)

S19F11RSend PDE Sent by Host and Equipment

    // S19F11R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 19, 11, new SecsMsgReceiveDelegate(recv_S19F11R));

// receive method 
void recv_S19F11R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect TCID
        // variables for data items and parsing
        string TCID;  	// A:36 (always)  The identity of a transfer container specified as a 36 character string with runs of 8, 4, 4, 4, and 12 characters joined by hyphens
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( !list0[0].StartsWith("A:") ) { ok = false; break; }
        if ( list0.Length == 2) { TCID = list0[1];} else { TCID = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(19, 12, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S19F11R

S19F12Send PDE Acknowledge Sent by Host and Equipment

    // S19F12 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(19, 11, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // no data expected
        return;  // parsed ok
        } // end while(ok)

S19F13RTransferContainer Report Sent by Host and Equipment

    // S19F13R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 19, 13, new SecsMsgReceiveDelegate(recv_S19F13R));

// receive method 
void recv_S19F13R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:n {L:4 UID SENDRSPSTAT VERIFYRSPSTAT STATUSTXT}
        // variables for data items and parsing
        string UID;  	// A:36 (always)  See SEMI E139.  A unique identifier for a PDE consisting of a 36 character string with runs of 8, 4, 4, 4, and 12 characters separated by hyphens 
        uint SENDRSPSTAT;  	// U1:1 (always)  Return codes for the Send PDE request, non-zero means failure
        uint VERIFYRSPSTAT;  	// U1:1 (always)  PDE verification result, 0 success, 10 none, other error
        string STATUSTXT;  	// A:80 (always)  status response description
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list0.Length; n++) {
            string [] list1;
            list1 = sp.ListSplit(list0[n]);
            if ( list1.Length != 5 ) { ok=false; break; }
            string [] list2;
            list2 = sp.ListSplit(list1[1]);
            if (list2.Length < 1) { ok = false; break; }
            if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
            if ( list2.Length == 2) { UID = list2[1];} else { UID = ""; }
            list2 = sp.ListSplit(list1[2]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2[0] != "U1:1" ) { ok = false; break; }
            SENDRSPSTAT = uint.Parse(list2[1]);
            list2 = sp.ListSplit(list1[3]);
            if (list2.Length < 1) { ok = false; break; }
            if ( list2[0] != "U1:1" ) { ok = false; break; }
            VERIFYRSPSTAT = uint.Parse(list2[1]);
            list2 = sp.ListSplit(list1[4]);
            if (list2.Length < 1) { ok = false; break; }
            if ( !list2[0].StartsWith("A:") ) { ok = false; break; }
            if ( list2.Length == 2) { STATUSTXT = list2[1];} else { STATUSTXT = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(19, 14, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S19F13R

S19F14TransferContainer Report Ack Sent by Host and Equipment

    // S19F14 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(19, 13, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // no data expected
        return;  // parsed ok
        } // end while(ok)

S19F15RRequest PDE Resolution Sent by Host Only

    // S19F15R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 19, 15, new SecsMsgReceiveDelegate(recv_S19F15R));

// receive method 
void recv_S19F15R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:2 TARGETPDE {L:n {L:2 PDEREF RESOLUTION}}
        // variables for data items and parsing
        string TARGETPDE;  	// A:36 (always)  the UID of the target PDE, a 36 character string with runs of 8,4,4,4, and 12 characters joined by hyphens.
        string PDEREF;  	// A:36 (always)  The UID of a PDE or of a PDE group formatted as a 36 character string with runs of 8, 4, 4, 4, and 12 characters joined by hyphens.
        string RESOLUTION;  	// A:36 (always)  the UID of a PDE
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { TARGETPDE = list1[1];} else { TARGETPDE = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { PDEREF = list3[1];} else { PDEREF = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { RESOLUTION = list3[1];} else { RESOLUTION = ""; }
            }
        if (!ok) break;
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(19, 16, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S19F15R

S19F16PDE Resolution Data Sent by Equipment Only

    // S19F16 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(19, 15, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 {L:m {L:2 PDEREF RESOLUTION}} {L:n {L:3 UID RESPDESTAT STATUSTXT}}
        // variables for data items and parsing
        string PDEREF;  	// A:36 (always)  The UID of a PDE or of a PDE group formatted as a 36 character string with runs of 8, 4, 4, 4, and 12 characters joined by hyphens.
        string RESOLUTION;  	// A:36 (always)  the UID of a PDE
        string UID;  	// A:36 (always)  See SEMI E139.  A unique identifier for a PDE consisting of a 36 character string with runs of 8, 4, 4, 4, and 12 characters separated by hyphens 
        uint RESPDESTAT;  	// U1:1 (always)  status codes for PDE resolution
        string STATUSTXT;  	// A:80 (always)  status response description
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if ( list1.Length < 1) { ok=false; break; }
        int m;
        for(m=1; m < list1.Length; m++) {
            string [] list2;
            list2 = sp.ListSplit(list1[m]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { PDEREF = list3[1];} else { PDEREF = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { RESOLUTION = list3[1];} else { RESOLUTION = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 4 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { UID = list3[1];} else { UID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3[0] != "U1:1" ) { ok = false; break; }
            RESPDESTAT = uint.Parse(list3[1]);
            list3 = sp.ListSplit(list2[3]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { STATUSTXT = list3[1];} else { STATUSTXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S19F17RVerify PDE Request Sent by Host Only

    // S19F17R C# Receive message - add next line to setup
    //SecsPort sp=your_SecsPort;
    sp.MessageTypeAdd( 19, 17, new SecsMsgReceiveDelegate(recv_S19F17R));

// receive method 
void recv_S19F17R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    SecsPort sp = (SecsPort)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect L:4 TARGETPDE {L:n {L:2 PDEREF RESOLUTION}} VERIFYTYPE VERIFYDEPTH
        // variables for data items and parsing
        string TARGETPDE;  	// A:36 (always)  the UID of the target PDE, a 36 character string with runs of 8,4,4,4, and 12 characters joined by hyphens.
        string PDEREF;  	// A:36 (always)  The UID of a PDE or of a PDE group formatted as a 36 character string with runs of 8, 4, 4, 4, and 12 characters joined by hyphens.
        string RESOLUTION;  	// A:36 (always)  the UID of a PDE
        uint VERIFYTYPE;  	// U1:1 (always)  chooses the type of verification
        uint VERIFYDEPTH;  	// U1:1 (always)  whether to check only the target, or the target and all referenced PDEs
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 5 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( !list1[0].StartsWith("A:") ) { ok = false; break; }
        if ( list1.Length == 2) { TARGETPDE = list1[1];} else { TARGETPDE = ""; }
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 3 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { PDEREF = list3[1];} else { PDEREF = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { RESOLUTION = list3[1];} else { RESOLUTION = ""; }
            }
        if (!ok) break;
        list1 = sp.ListSplit(list0[3]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        VERIFYTYPE = uint.Parse(list1[1]);
        list1 = sp.ListSplit(list0[4]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "U1:1" ) { ok = false; break; }
        VERIFYDEPTH = uint.Parse(list1[1]);
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(19, 18, transID, reply);
            }
        return; 
        } // end while(ok)
    // bad data 
    sp.SendS9(7, header);
    } // end recv_S19F17R

S19F18PDE Verification Result Sent by Equipment Only

    // S19F18 C# Parse reply
    SecsHost sp=(SecsHost)your_SecsHost;
    RcResult rcr = sp.SendSecsMsg(19, 17, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect L:2 VERIFYSUCCESS {L:n {L:3 UID VERIFYRSPSTAT STATUSTXT}}
        // variables for data items and parsing
        int VERIFYSUCCESS;  	// TF:1 (always)  True if no errors were found
        string UID;  	// A:36 (always)  See SEMI E139.  A unique identifier for a PDE consisting of a 36 character string with runs of 8, 4, 4, 4, and 12 characters separated by hyphens 
        uint VERIFYRSPSTAT;  	// U1:1 (always)  PDE verification result, 0 success, 10 none, other error
        string STATUSTXT;  	// A:80 (always)  status response description
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if ( list0.Length != 3 ) { ok=false; break; }
        string [] list1;
        list1 = sp.ListSplit(list0[1]);
        if (list1.Length < 1) { ok = false; break; }
        if ( list1[0] != "TF:1" ) { ok = false; break; }
        VERIFYSUCCESS = int.Parse(list1[1]);
        list1 = sp.ListSplit(list0[2]);
        if ( list1.Length < 1) { ok=false; break; }
        int n;
        for(n=1; n < list1.Length; n++) {
            string [] list2;
            list2 = sp.ListSplit(list1[n]);
            if ( list2.Length != 4 ) { ok=false; break; }
            string [] list3;
            list3 = sp.ListSplit(list2[1]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { UID = list3[1];} else { UID = ""; }
            list3 = sp.ListSplit(list2[2]);
            if (list3.Length < 1) { ok = false; break; }
            if ( list3[0] != "U1:1" ) { ok = false; break; }
            VERIFYRSPSTAT = uint.Parse(list3[1]);
            list3 = sp.ListSplit(list2[3]);
            if (list3.Length < 1) { ok = false; break; }
            if ( !list3[0].StartsWith("A:") ) { ok = false; break; }
            if ( list3.Length == 2) { STATUSTXT = list3[1];} else { STATUSTXT = ""; }
            }
        if (!ok) break;
        return;  // parsed ok
        } // end while(ok)

S19F19RS19 Multi-block Inquire Sent by Host and Equipment

    // S19F19R C# Receive message - add next line to setup
    //sp is a SecsPort or SecsHost object reference
    sp.MessageTypeAdd( 19, 19, new SecsMsgReceiveDelegate(recv_S19F19R));

// receive method 
void recv_S19F19R(object sender, int stream, int function, bool send_reply, int transID, string TSN_data, string header) {
    //SecsPort sp = (SecsPort)sender;
    //SecsHost sp = (SecsHost)sender;
    bool ok=true;
    while (ok) {   // break out of loop on error
        // expect DATALENGTH
        // variables for data items and parsing
        string DATALENGTH;  	// U4:1 (varies)  total bytes of the message body 
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0.Length == 2) { DATALENGTH = list0[1];} else { DATALENGTH = ""; }
        if (send_reply) {
            string reply; // TBD create reply
            sp.SendReply(19, 20, transID, reply);
            }
        return; 
        } // end while(ok)
    } // end recv_S19F19R

S19F20S19 Multi-block Grant Sent by Host and Equipment

    // S19F20 C# Parse reply
    // sp is a SecsPort or SecsHost object reference
    RcResult rcr = sp.SendSecsMsg(19, 19, true, sendData, true);
    string TSN_data;  
    bool ok=true;  
    while (ok) {   // break out of loop on error
        if (rcr.rc != 0) {ok=false; break;}
        TSN_data = rcr.result;
        // expect GRANT
        // variables for data items and parsing
        int GRANT;  	// B:1 (always)  multiblock grant code
        string [] list0;
        list0 = sp.ListSplit(TSN_data);
        if (list0.Length < 1) { ok = false; break; }
        if ( list0[0] != "B:1" ) { ok = false; break; }
        GRANT = sp.BinToInt(list0[1]);
        return;  // parsed ok
        } // end while(ok)