--- Begin Message ---
- To: Jonathan Wakely <cow@xxxxxxxxxxxxxxxxx>
- Subject: Re: help needed
- From: sandeep nadkarni <sanket97@xxxxxxxxx>
- Date: Wed, 1 Jun 2005 04:52:39 -0700 (PDT)
- In-reply-to: <20050601113402.GA51104@compsoc.man.ac.uk>
Hello
thanks for reply
i'm pasting compilation errors which i'mgetting and
also attaching files which are included with it.
gcc -o syfa syfa.c
In file included from syfa.c:22:
/usr/include/mbx.h:401: error: syntax error before
"int64"
/usr/include/mbx.h:819: error: syntax error before
"int64"
/usr/include/mbx.h:824: error: syntax error before '}'
token
/usr/include/mbx.h:829: error: syntax error before
"int64"
/usr/include/mbx.h:832: error: syntax error before '}'
token
/usr/include/mbx.h:1483: error: field `add_head' has
incomplete type
/usr/include/mbx.h:1490: error: field `add_head' has
incomplete type
/usr/include/mbx.h:1531: error: field `add_head' has
incomplete type
/usr/include/mbx.h:1548: error: syntax error before
"int64"
/usr/include/mbx.h:1551: error: syntax error before
'}' token
/usr/include/mbx.h:1555: error: field `add_head' has
incomplete type
/usr/include/mbx.h:1644: error: field `add_head' has
incomplete type
/usr/include/mbx.h:1646: error: syntax error before
"int64"
/usr/include/mbx.h:1654: error: syntax error before
"dati_event"
/usr/include/mbx.h:1877: error: field `event_timing'
has incomplete type
In file included from syfa.c:25:
/usr/include/util.h:20:80: timeb.h: No such file or
directory
In file included from syfa.c:25:
/usr/include/util.h:69: error: syntax error before
"__int64"
/usr/include/util.h:79: error: syntax error before '*'
token
/usr/include/util.h:80: error: syntax error before '*'
token
/usr/include/util.h:84: error: syntax error before
"vms_time"
/usr/include/util.h:86: error: syntax error before
"int64"
/usr/include/util.h:122: error: syntax error before
"__int64"
syfa.c:28:45: Xlib.h: No such file or directory
syfa.c:29:45: Xutil.h: No such file or directory
--- Jonathan Wakely <cow@xxxxxxxxxxxxxxxxx> wrote:
> On Wed, Jun 01, 2005 at 04:22:24AM -0700, sandeep
> nadkarni wrote:
>
> > Hello,
>
> Hi,
>
> > I'm trying to migrate from open vms to Linux. I'm
> > compiling programs on Linux which are running on
> open
> > VMS
> >
> > I'm facing problem with int64 function.
>
> What problem? Which function?
>
> > my hardware configuration is P-IV 3.06 GHz
> > 512 MB,
> > I'm Running Fedora Core 3 with gcc
> > Reading specs from
> > /usr/lib/gcc/i386-redhat-linux/3.4.3/specs
> > Configured with: ../configure --prefix=/usr
> > --mandir=/usr/share/man --infodir=/usr/share/info
> > --enable-shared --enable-threads=posix
> > --disable-checking --with-system-zlib
> > --enable-__cxa_atexit
> --disable-libunwind-exceptions
> > --enable-java-awt=gtk --host=i386-redhat-linux
> > Thread model: posix
> > gcc version 3.4.3 20050227 (Red Hat 3.4.3-22.fc3)
> >
> > can i compile the same with this? what compiler
> option
> > will i have to use?
>
> You haven't given much information but as your
> question is about using
> GCC (not developing it) you might get a better
> answer by mailing
> gcc-help@xxxxxxxxxxx
>
> The gcc@xxxxxxxxxxx list is for GCC development.
>
> Regards,
>
> jon
>
>
> --
> "Anyone who cannot cope with mathematics is not
> fully human.
> At best, he is a tolerable subhuman who has learned
> to dress himself,
> bathe, and not make messes in the house."
> - Robert Heinlein
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
/******************************************************************************
S M S
-----
project : Caster Computer
filename : __prj[.SOURCE.SYFA]SYFA.C
version : 0.0
description : realisation of SYFA
author : ht
creation : 19-MAR-1996
update :
******************************************************************************/
/* main module ***************************************************************/
#define MAIN
/* standard includes ********************************************************/
#include <general.h> /* general includes, constants and variables */
/* mailbox includes **********************************************************/
#include <mbx.h> /* mailbox constants and prototypes */
/* utility includes **********************************************************/
#include <util.h> /* utility constants and prototypes */
/* program specific includes *************************************************/
#include <Xlib.h> /* XWindows library */
#include <Xutil.h> /* XWindows utilit. */
#include "syfa.h" /* local include for SYFA */
/* prototypes of local functions *********************************************/
void f_open_cmn ( void ); /* open communication for SYFA */
void init_module ( void ); /* initialisation of SYFA */
void main_module ( void ); /* main processing loop of SYFA */
void exit_handler ( void ); /* exit-functions of SYFA */
/******************************************************************************
function : init_module
input :
output :
return value :
description : initialisation of SYFA
update :
******************************************************************************/
void init_module ( void )
{
int status;
char name[sizeof( own_process )];
char process_name[80];
/* create processname from programname */
strcpy ( name, PNAME_HEADER );
strcat ( name, own_process );
strcpy ( own_process, name );
/* startmessage to process logging device */
printlog ( DBG_MSG_ALL, "proccess started !" );
/* check processname */
get_process_name ( (unsigned short) sizeof ( process_name ), process_name );
if ( strcmp ( process_name, own_process ) )
{
/* errormessage to process logging device */
printlog ( DBG_MSG_ALL,
"not the expected process name, proccess will be stopped !" );
/* print stop message to process logging device */
printlog ( DBG_MSG_ALL , "process stopped !" );
/* stop process if the returned process name was not expected */
exit ( 1 );
}
/* open communication for SYFA */
f_open_cmn ();
/* connect to database */
if ( connect_to_dba () != RET_CODE_OK )
{
/* detach DECmessageQ */
dassign_mailbox ();
/* print stop message to process logging device */
printlog ( DBG_MSG_ALL , "process stopped !" );
/* stop process if database connection failed */
exit ( 1 );
}
/* install exit handler */
status = atexit ( exit_handler );
if ( status != RET_CODE_OK )
{
/* errormessage to process logging device */
printlog ( DBG_MSG_ALL,
"exithandler installation failed, proccess will be stopped !" );
/* disconnect database */
disconnect_dba ();
/* detach DECmessageQ */
dassign_mailbox ();
/* print stop message to process logging device */
printlog ( DBG_MSG_ALL , "process stopped !" );
/* stop process if exit handler installation failed */
exit ( 1 );
}
/* startmessage to console */
/* f_send_msg_to_syfa ( ERR_CODE_PROC_START, 0, 0, "" ); */
/* read system parameters */
handle_tel_read_para ( INIT_READ );
return;
}
/******************************************************************************
function : f_open_cmn
input :
output :
return value :
description : open communication queues for SYFA
update :
******************************************************************************/
void f_open_cmn ( void )
{
/* attach SYFA to permanent queue */
attach_own_mailbox ( own_process );
/* attach to ASET-queue */
/* remove the comments of the following command line if message delivery is */
/* ALWAYS required and put them to the next following command line */
/* msg_qs_aset.delivery = PDEL_MODE_WF_SAF; */ /* block until stored */
msg_qs_aset.delivery = PDEL_MODE_NN_MEM; /* no notify, memory queuing */
msg_qs_aset.uma = PDEL_UMA_DISC; /* discard if undeliverable */
attach_other_mailbox ( &msg_qs_aset, PNAME_ASET );
msg_qs_syfo.delivery = PDEL_MODE_NN_MEM; /* no notify, memory queuing */
msg_qs_syfo.uma = PDEL_UMA_DISC; /* discard if undeliverable */
attach_other_mailbox ( &msg_qs_syfo, PNAME_SYFO );
return;
}
/******************************************************************************
function : main_module
input :
output :
return value :
description : main processing loop of SYFA
update :
******************************************************************************/
void main_module ( void )
{
int status;
/* set SYFA-queue parameters */
msg_qr.priority = 0; /* Receive all priority messages */
msg_qr.timeout = MBX_TIMEOUT; /* timout waiting for telegram, here 0 */
msg_qr.select = 0; /* No special selection mask */
/* main processing loop */
while (1)
{
/* wait for next message */
status = wait_for_telegram ( &msg_qr );
/* message received ok or duplicate ? */
if ( ( status == RET_CODE_OK ) || ( status == RET_CODE_POSSDUPL ) )
{
switch ( msg_qr.type )
{
case TEL_STOP_REQUEST :
handle_tel_stop_request ();
case TEL_READ_PARA :
handle_tel_read_para ( MOD_READ );
break;
case TEL_ERR_MSG :
handle_tel_err_msg ( &msg_qr.buf.err_msg );
break;
default :
/* errormessages to process logging device */
M_PRINTLOG ( DBG_MSG_ALL,
"unknown telegram received, type = %d", msg_qr.type,
NULL, NULL );
/* send error message to SYFA */
f_send_msg_to_syfa ( ERR_CODE_UNDEF_TEL, 0, 0, "" );
}
/* confirm message */
if ( !msg_qr.confirmed ) confirm_telegram ();
}
else
{
/* timeout received ? */
if ( status == RET_CODE_TIMEOUT )
{
/* errormessage to process logging device */
printlog ( DBG_MSG_ALL, "not defined timeout received !" );
/* send error message to SYFA */
f_send_msg_to_syfa ( ERR_CODE_UNDEF_TIMEOUT, 0, 0, "" );
}
}
}
}
/******************************************************************************
function : exit_handler
input :
output :
return value :
description : performs exit-functions on exit of SYFA
update :
******************************************************************************/
void exit_handler ( void )
{
/* stopmessage to console */
f_send_msg_to_syfa ( ERR_CODE_PROC_STOP, 0, 0, "" );
/* disconnect database */
disconnect_dba ();
/* close line printer device */
fclose (own_prc_syfa.lp_ptr);
/* detach DECmessageQ */
dassign_mailbox ();
/* print stop message to process logging device */
printlog ( DBG_MSG_ALL , "process stopped !" );
}
/******************************************************************************
function : main
input :
output :
return value :
description : program SYFA - receives and handles (error) messages from
other processes
update :
******************************************************************************/
int main ( void )
{
/* init SYFA */
init_module ();
/* main loop */
main_module ();
/* exit process via exit handler */
exit ( 0 );
}
/******************************************************************************
S M S
-----
project : Caster Computer
filename : __prj[.INCL]GENERAL.H
version : 0.0
description : general constant declarations
author : ph
creation : 25-JAN-1996
update : 18-JUN-1996, ht
18-JUL-2003 SLAB_ID size changed to 11 char
******************************************************************************/
/* header file define-constant ***********************************************/
#ifndef GENERAL_H
#define GENERAL_H
/* define-constant for extern-directive **************************************/
#ifndef MAIN
#define EXTERN extern
#else
#define EXTERN
#endif
/* general includes **********************************************************/
/* standard includes */
#include <stdio.h> /* standard I/O functions */
#include <string.h> /* standard string functions */
#include <stdlib.h> /* general utilities */
#include <unistd.h> /* standard symbolic constants and types */
#include "../../incl/ints.h" /* standard integer definitions */
#include <errno.h> /* errorcodes and errorvariable 'errno' */
#ifdef VMS
/* vms system includes */
#include <starlet.h> /* */
#include <iodef.h> /* I/O function code definitions */
#include <descrip.h> /* char descriptor macros for vms system calls */
#include <stsdef.h> /* System Service Status Codes */
#include <ssdef.h> /* System Service Return Status Value Definitions */
#include <ctype.h> /* charcter conversion functions */
#include <jpidef.h> /* process informations */
#include <lnmdef.h> /* definitions in logical nametables */
#include <clidef.h> /* */
#else
/* for other operating systems */
#endif
/* constants definitions *****************************************************/
/* constants for return codes */
#define RET_CODE_NO_DATA 3
#define RET_CODE_POSSDUPL 2
#define RET_CODE_ERR 1
#define RET_CODE_OK 0
#define RET_CODE_FATAL_ERR -1
#define RET_CODE_TIMEOUT -2
#define RET_CODE_OUT_OF_RANGE -3
#define RET_CODE_FALSE 1
#define RET_CODE_TRUE 0
/* constants for type of alarm messages */
#define ERR_MSG_TEST 0
#define ERR_MSG_INFO 1
#define ERR_MSG_WARN 2
#define ERR_MSG_ERR 3
#define ERR_MSG_ALL 10
/* constants for debug levels */
#define DBG_MSG_TEST 0
#define DBG_MSG_INFO 1
#define DBG_MSG_TEL 2
#define DBG_MSG_WARN 3
#define DBG_MSG_ERR 4
#define DBG_MSG_ALL 10
/* constants for general alarm messages */
#define ERR_CODE_MAX_GENERAL 99
#define ERR_PROC_NAME_GENERAL "AAAA"
/* constants for alarm numbers */
#define ERR_CODE_NO_DB 0
#define ERR_CODE_NO_CONNECT 1
#define ERR_CODE_NO_DISCONNECT 2
#define ERR_CODE_SELECT 3
#define ERR_CODE_UPDATE 4
#define ERR_CODE_INSERT 5
#define ERR_CODE_DELETE 6
#define ERR_CODE_CURSOR 7
#define ERR_CODE_NO_TIME_SET 20
#define ERR_CODE_NO_TIME_READ 21
#define ERR_CODE_PROC_START 22
#define ERR_CODE_PROC_STOP 23
#define ERR_CODE_UNDEF_TEL 24
#define ERR_CODE_MBX_NO_ATA 25
#define ERR_CODE_SEND_TEL 26
#define ERR_CODE_READ_TEL 27
#define ERR_CODE_WAIT_TEL 28
#define ERR_CODE_STOP_REQ 29
#define ERR_CODE_CONF_NOK 30
#define ERR_CODE_START_TIMER 31
#define ERR_CODE_STOP_TIMER 32
#define ERR_CODE_INVAL_TIM_VAL 33
#define ERR_CODE_UNDEF_TIMEOUT 34
#define ERR_CODE_INVAL_POSI_ID 35
#define ERR_CODE_INVAL_TRANS_COD 36
#define ERR_CODE_INVAL_CONTENT 37
#define ERR_CODE_INVAL_TIME 38 /* inval time in message */
#define ERR_CODE_INVAL_FLAG 39 /* inval flag value in message */
/* error codes SNRX / SNSX */
#define ERR_CODE_ASSIGN 40
#define ERR_CODE_TRNLNM 41
#define ERR_CODE_QIO_ACCESS 42
#define ERR_CODE_QIO_ACCEPT 43
#define ERR_CODE_QIO_READ 44
#define ERR_CODE_SET_TIMER 45
#define ERR_CODE_WFLOR 46
#define ERR_CODE_CONN_BROKEN 47
#define ERR_CODE_CONN_BROKEN_LIFE 48
#define ERR_CODE_DASSGN_NET 49
#define ERR_CODE_READ_NET 50
#define ERR_CODE_WRITE_NET 51
#define ERR_CODE_QIO_WRITE 52
#define ERR_CODE_HNDL_READ_PARA 53
#define ERR_CODE_HNDL_TIMER_EXPIRED 54
#define ERR_CODE_55 55
#define ERR_CODE_56 56
#define ERR_CODE_57 57
#define ERR_CODE_58 58
#define ERR_CODE_59 59
#define ERR_CODE_60 60
/* messages for TDSC */
#define ERR_CODE_MESS_VAL_DSC_FAIL 61
#define ERR_CODE_MESS_VAL_DSC_OK 62
#define ERR_CODE_SEND_TO_DSC 63
/* messages for QUIC */
#define ERR_CODE_QEVEN_TYPE_INVALID 71
#define ERR_CODE_NO_SLAB_DATA 72
/* messages for UTIL */
#define ERR_CODE_NO_TIME_CONVERT 81
#define ERR_CODE_SELECT_MELD 100
#define ERR_CODE_OPEN_LP 101 /* error at open line printer device */
#define ERR_CODE_OFF_LIMIT_VALUE 111 /* error off limit values */
#define VALUE_IN_LIMIT 112 /* message values in limit */
#define ERR_CODE_CUT_PIC_NOT_FOUND 100 /* no record found in PSLB */
#define ERR_CODE_INVAL_NODE 100 /* inval node name in message (DNRX) */
#define ERR_CODE_INVAL_NR_CUT_PIC 101 /* inval no. of order cut piece id's */
#define ERR_CODE_NOT_ALL_CUT_PIC 102 /* not all order cut piece id's in msg*/
#define ERR_CODE_INVAL_TYPE 103 /* inval type of message (DNRX) */
#define ERR_CODE_INVAL_MSG_NO 104 /* inval message number (DNRX) */
#define ERR_CODE_INVAL_TRANS_ID 105 /* inval transmission Id (DNRX) */
/* errorcodes for PROC */
#define ERR_CODE_FAST_CYC_NOT_ACT 100
#define ERR_CODE_SLOW_CYC_NOT_ACT 101
#define ERR_CODE_NO_PARAM_CAST_LEN 102
#define ERR_CODE_CAST_LEN_OUT_RNG 103
/* errorcodes for ELOG */
#define ERR_CODE_EVT_BUF_LIM_RCHD 100
/* errorcodes for DNSP */
#define ERR_CODE_NO_EVT_FOUND 100
#define ERR_CODE_WIDTH_CHANGE 120 /* width change is not in progress */
/* used in RCCR */
#define ERR_CODE_RCCR 130 /* */
/* used in DELE */
#define ERR_CODE_DELE 140 /* */
/* used in COOL */
#define ERR_CODE_CONTROL_LOOP 150
#define ERR_CODE_SETPOINTS_NOT_VALID 151
#define ERR_CODE_DSC_NOT_AVAILABLE 152
/* definitions of error codes for module TNXX */
#define ERR_CODE_TNRX_TRY_CON 200 /* "Connecting to BA ... " */
#define ERR_CODE_TNRX_ERR_SND_INAV 201 /* "Error sending telegram to BA */
#define ERR_CODE_TNRX_ERR_OP_SOC 202 /* */
#define ERR_CODE_TNRX_ERR_GET_HST 203 /* */
#define ERR_CODE_TNRX_ERR_GET_PTR 204 /* */
#define ERR_CODE_TNRX_TRY_BIND 205 /* Binding to socket ..." */
#define ERR_CODE_TNRX_BIND_NOK 206 /* */
#define ERR_CODE_TNRX_BIND_OK 207 /* Bind to socket" */
#define ERR_CODE_TNRX_LISTEN 208 /* Listen on socket */
#define ERR_CODE_TNRX_LIS_NOK 209 /* Listen on socket */
#define ERR_CODE_TNRX_CON_ACC 210 /* "Connection accepted" */
#define ERR_CODE_TNRX_HST_INF 211 /* "Local host name = " */
#define ERR_CODE_TNRX_ACCEPT 212 /* "Accepting connection ..." */
#define ERR_CODE_TNRX_ACC_NOK 213 /* */
#define ERR_CODE_TNRX_SEL_NOK 214 /* */
#define ERR_CODE_TNRX_RCV_NOK 215 /* Listen on socket */
#define ERR_CODE_TNRX_COUNT_NOK 216 /* Listen on socket */
#define ERR_CODE_TNRX_RCV_EVENTS 217 /* received events */
#define ERR_CODE_TNRX_SOCK_SEL 218 /* socket select error */
#define ERR_CODE_TNRX_RECONNECT 219 /* reconnect to plc */
#define ERR_CODE_TNRX_SOCK_FAILED 220 /* socket error */
#define ERR_CODE_TNRX_PLC_TIMEOUT 221 /* timeout */
#define ERR_CODE_TNRX_ERR_SND_INAT 222 /* "Error sending telegram to BA */
#define ERR_CODE_TNSX_TRY_CON 240 /* "Connecting to BA ... " */
#define ERR_CODE_TNSX_ERR_OP_SOC 241 /* */
#define ERR_CODE_TNSX_ERR_GET_HST 242 /* */
#define ERR_CODE_TNSX_CON_NOK 243 /* */
#define ERR_CODE_TNSX_CON_OK 244 /* "TNSD connected to BA"*/
#define ERR_CODE_TNSX_SEND_NOK 245 /* */
#define ERR_CODE_TNRX_RCV_DATA 246 /* */
#define ERR_CODE_TNSX_SEND_DATA 247 /* */
/* constants for error locations in database connection functions */
#define PROG_LOC_CONN 1 /* error at connect to database */
#define PROG_LOC_DIS_CONN 2 /* error at disconnect from database*/
/* constants for error locations in database acces functions */
#define PROG_LOC_OP_TRANS 1 /* error at open transaction */
#define PROG_LOC_SELECT 2 /* error at select */
#define PROG_LOC_UPDATE 3 /* error at update */
#define PROG_LOC_INSERT 4 /* error at insert */
#define PROG_LOC_DELETE 5 /* error at delete */
#define PROG_LOC_COMMIT 6 /* error at commit */
#define PROG_LOC_DECLARE 7 /* error at declare cursor */
#define PROG_LOC_OPEN 8 /* error at open cursor */
#define PROG_LOC_FETCH 9 /* error at fetch cursor */
#define PROG_LOC_CLOSE 10 /* error at close cursor */
#define PROG_LOC_SAVEPOINT 11 /* error at set savepoint */
#define PROG_LOC_ROLLBACK 12 /* error at ROLLBACK */
/* database user constant */
#define DB_USER "ISPAT/ISPAT" /* "SCOTT/TIGER" */
/* constants for database access return-codes */
#define ORA_NO_DATA_FOUND 100
#define ORA_DUP -1
#define ORA_NULL -1405
#define ORA_OK 0
/* constants for database access functions */
#define DB_SELECT 1
#define DB_UPDATE 2
#define DB_INSERT 3
#define DB_DELETE 4
#define DB_SELCNT 5
/* for sqlnet functions */
#define DBA_OPEN_READ "6"
#define DBA_FETCH_CURSOR "7"
#define DBA_CLOSE_COMMIT "8"
#define DBA_CLOSE_ROLLBACK "9"
/* initial read or read after modifing file SYKO */
#define MOD_READ 0
#define INIT_READ 1
/* ------------------------------------------------------------------
constants for ANKO, SYKO, general parameter
------------------------------------------------------------------ */
#define PARA_GENERAL "...."
/* constants for type-field in file SYKO */
#define SYKO_TYPE_NUM 0
#define SYKO_TYPE_CHAR 1
#define SYKO_TYPE_DATE 2
#define SYKO_TYPE_BOOLEAN 3
#define SYKO_TYPE_STRING 4
#define SYKO_TYPE_FLOAT 5
/* constants for type-field in file ANKO */
#define ANKO_TYPE_NUM 0
#define ANKO_TYPE_CHAR 1
#define ANKO_TYPE_DATE 2
#define ANKO_TYPE_BOOLEAN 3
#define ANKO_TYPE_STRING 4
#define ANKO_TYPE_FLOAT 5
/* String-Len of important Data-Types (+ End of String) */
#define LEN_TIME_DATE 20+1 /* for internal use */
#define LEN_TIME_DATE_NET 20 /* time/date for DMQ-telegrams
to SMC, TFC, MCS */
#define LEN_CHAR_FLAG 1+1
#define LEN_L3_HEAT_ID 8+1
#define LEN_HEAT_ID 8+1
#define LEN_STEELGRADE 12+1
#define LEN_ORD_CUT_PIECE_ID 15+1
#define LEN_ORD_GRP_ID 10+1
#define LEN_SAMPLE_NO 3+1
#define LEN_SAMPLE_CODE 3+1
#define LEN_OFF_GRADE 80+1
#define LEN_ANA_TEXT 80+1
#define LEN_SLAB_ID 11+1 /* changed from 10*/
#define LEN_SLAB_TYPE 1+1
#define LEN_SEQU_ID 7+1
#define LEN_EVENT_CODE 3+1
#define LEN_EVENT_TEXT 30+1
#define LEN_SHOP_ORDER_NO 10+1
#define LEN_TIME_SMC_COMM 20+1
#define LEN_SAMPLE_CODE 3+1
#define LEN_DESCR_TEXT 40+1
#define LEN_FLAG_ACCEPT 1+1
/* maximum analysis data (HEDA) */
#define MAX_ANALYS_VAL 40
#define ANALYS_VALUE_FACTOR 10000.0 /* Value from HEDA/TANA * FACTOR */
/* = Value in TAVE/AVAL !!!! */
/* maxima used for recording of production data in PROC and DNSP */
#define MAX_FAST_CYC_SAMP 2000 /* max. samples for fast cycle values */
#define MAX_FAST_CYC_MESS 31 /* max. values per sample */
#define MAX_SLOW_CYC_SAMP 800 /* max. samples for slow cycle values */
#define MAX_SLOW_CYC_MESS 65 /* max. values per sample */
#define MAX_HEATS 10
#define MAX_HEAT_EVENTS 700
/* maximum val to control , MUST BE THE SAME NUMBER AS "TELMAX_INAV_QEVP" */
#define MAX_VALUES 25
/* constants for default date-time-format */
#define DFLT_DATE_TIME_FMT "DD-MON-YYYY HH24:MI:SS"
#define TIME_OF_EPOCH "01-JAN-1970 00:00:00"
#define DATE_CPC_NULL 0x8000000080000000
/* conversion constants */
/* fahrenheit to celsius */
#define CONV_F_TO_C_FAC 9/5
#define CONV_F_TO_C_CONST 32
/* pounds to kilogram */
#define CONV_LB_TO_KG_CONST 0.453
/* constants for process names */
#define DFLT_PROG_NAME "...." /* default program name for general */
/* read in file SYKO */
#define PNAME_HEADER "CC_"
#define PNAME_OPER "OPER" /* Operator */
#define PNAME_USEX "USEX" /* Forms User Exits */
#define PNAME_MAFO "MAFO" /* MAFO */
#define PNAME_THEM "THEM" /* THEM */
#define PNAME_ATRA "ATRA" /* Programm-Name */
#define PNAME_KOKI "KOKI" /* KOKI */
#define PNAME_COOL "COOL" /* COOL */
#define PNAME_COPT "COPT" /* COPT */
#define PNAME_HPAC "HPAC" /* HPAC */
#define PNAME_QUIC "QUIC" /* QUIC */
#define PNAME_INCE "INCE" /* INCE */
#define PNAME_INAV "INAV" /* INAV */
#define PNAME_INAT "INAT" /* INAT */
#define PNAME_ASET "ASET" /* ASET */
#define PNAME_PROD "PROD" /* PROD */
#define PNAME_HEDA "HEDA" /* HEDA */
#define PNAME_WIGA "WIGA" /* WIGA */
#define PNAME_SLAR "SLAR" /* SLAR */
#define PNAME_KOKW "KOKW" /* KOKW */
#define PNAME_QEVP "QEVP" /* QEVP */
#define PNAME_ELOG "ELOG" /* ELOG */
#define PNAME_PROC "PROC" /* PROC */
#define PNAME_MNTN "MNTN" /* MNTN */
#define PNAME_SAND "SAND" /* SAND */
#define PNAME_RCCR "RCCR" /* RCCR */
#define PNAME_SYFA "SYFA" /* SYFA */
#define PNAME_SYFO "SYFO" /* SYFA-Box-Output */
#define PNAME_DIAL "DIAL" /* DIAL */
#define PNAME_LOGG "LOGG" /* LOGG */
#define PNAME_DBSV "DBSV" /* DBSV */
#define PNAME_DELE "DELE" /* DELE */
#define PNAME_SNRP "SNRP" /* SNRP */
#define PNAME_SNRD "SNRD" /* SNRD */
#define PNAME_SNSP "SNSP" /* SNSP */
#define PNAME_SNSD "SNSD" /* SNSD */
#define PNAME_DNRX "DNRX" /* DNRX */
#define PNAME_DNSS "DNSS" /* DNSS */
#define PNAME_DNSP "DNSP" /* DNSP */
#define PNAME_TDSC "TDSC" /* TDSC transmission to DSC*/
#define PNAME_FLAC "FLAC" /* FTP-Comm. to LAB-Computer*/
/* PL+ */
#define PNAME_APIS "APIS" /* Server process for APC */
/* PL- */
#define PNAME_UXSV "UXSV" /* UXSV:sql-pipe server */
#define PNAME_UTIL "UTIL" /* UTIL */
#define PNAME_SEND "SEND" /* only for testing */
#define PNAME_STEL "STEL" /* test: SEND_TELE */
/* program names for tests */
#define PNAME_TNXX "TNXX" /* TCP/IP test PC */
#define PNAME_TNRD "TNRD" /* TCP/IP test PC */
#define PNAME_TNRP "TNRP" /* TCP/IP test PC */
#define PNAME_TNRM "TNRM" /* TCP/IP test PC */
#define PNAME_TNSD "TNSD" /* TCP/IP test PC */
#define PNAME_TNSP "TNSP" /* TCP/IP test PC */
#define PNAME_TNSM "TNSM" /* TCP/IP test PC */
/* full names where it is neccessary */
#define PNAME_F_TNRD "CC_TNRD" /* TCP/IP test PC */
#define PNAME_F_TNRP "CC_TNRP" /* TCP/IP test PC */
#define PNAME_F_TNRM "CC_TNRM" /* TCP/IP test PC */
#define PNAME_TNXX_SIMU "CC_TNRD" /* TCP/IP for simulat. PC */
/* queue/process names of external computers via decmessageQ*/
#define PNAME_MCS "MCS" /* MCS mill computer */
#define PNAME_CFC "CFC" /* CFC tunnel furnace computer */
#define PNAME_SMC "SMC" /* SMC steel melt shop computer */
#define PNAME_LAB "LAB" /* LAB lab computer */
/* constants for flags */
#define FLAG_YES '*'
/* constants for value status */
#define VAL_OK 1 /* value status is ok */
#define VAL_NOT_OK 0 /* value status is not ok */
/* constants for actual value status (EVVA / AVAL) */
#define STATUS_ACTUAL_AND_ACTIV 1
#define STATUS_ACTUAL_AND_OFF_LIMIT 2
#define STATUS_ACTUAL_ACTIV_NOT_GEN 9
#define PROCESS_MAX 30
/* constant for default steelgrade */
#define DEFAULT_STEELGRADE "DEFAULT"
/* constant for transition-point to store cast_length into shared memory */
#define TRANS_HEAT 1
#define LAST_MNTN 2
#define TAILOUT_CASTLEN 3
#define LADLE_OPEN 4
#define TRANSITION_END 5
/* count of water flow zones for cooling */
#define MAX_DSC_ZONE 15 /* control loops for cooling zones */
#define MAX_COOLING_ZONE_NO 7
/* constants for Program DELE */
#define DELE_MODE_DELETE 1 /* Delete Circulation Buffers */
#define DELE_MODE_HREN 2 /* Rename Heat in Archiv-Tables */
#define POS_NEXT_COMBINE 1
#define POS_NEXT_CAST 2
#define POS_CASTING 3
#define POS_TURRET 3
#define POS_TUNDISH 4
#define POS_MOULD 5
#define POS_SHEAR 6
#define POS_BEHIND_SHEAR 7
/* constant for manual combining */
#define POSI_COMB_OPERATOR 90
/* ---------------------------------------------------------------------
constants for SLAB_LOCK_CODE in X_CCC_CONFIRM
------------------------------------------------------------------ */
#define SLAB_LOCK_FREE 0
#define SLAB_LOCK_PROCESSED 1
#define SLAB_LOCK_LENGTH_LOCKED 2
#define SLAB_LOCK_WIDTH_LOCKED 3
#define SLAB_LOCK_DBA_ERR 4
/* ------------------------------------------------------------------
constants for HEAT_LOCK_CODE in X_CCC_CONFIRM
------------------------------------------------------------------ */
#define HEAT_LOCK_FREE 0
#define HEAT_LOCK_PROCESS 1
#define HEAT_LOCK_COMB 2
#define HEAT_LOCK_DBA_ERR 3
/* ------------------------------------------------------------------
constants for FLAG_CONFIRM in X_CCC_CONFIRM
------------------------------------------------------------------ */
#define FLAG_CONF_YES "Y"
#define FLAG_CONF_NO "N"
/* constants for the caster-slab positions */
#define POS_SLAB_IN_LADLE 3
#define POS_SLAB_LOCKED 4
#define POS_SLAB_BEFORE_SHEAR 5
#define POS_SLAB_AFTER_SHEAR 6
#define POS_SLAB_1 0
#define POS_SLAB_2 1
#define POS_SLAB_3 2
#define POS_SLAB_4 3
#define POS_SLAB_5 4
#define POS_SLAB_6 5
/* constants for slab counter CC */
#define SLAB_NO_CC_MIN 1
#define SLAB_NO_CC_MAX 99
/* Constant for definition of caster plant no */
#define SLAB_NO_CAST_PLANT 100000 /* constant slab no for BA */
/* constants for slab in SLDA */
#define SLAB_TYPE_NORM "N" /* normal cut */
#define SLAB_TYPE_EX "E" /* Exess Metal*/
#define SLAB_TYPE_HEAD "H" /* head cut */
#define SLAB_TYPE_TAIL "T" /* tail cut */
#define SLAB_TYPE_SAMPLE "S" /* sample cut */
/*#define SLAB_TYPE_CROP "F" crop cut */
#define SLAB_TYPE_CROP "C" /* Rana modified on 8.5.99 crop cut */
#define SLAB_TYPE_CROP_M "M" /* Manual crop cut */
#define SLAB_TYPE_WCROP "W" /* Width change crop cut */
#define FLAG_COPT_YES "Y" /* flag used for copt task */
#define FLAG_COPT_NO "N" /* flag used for copt task */
/* constants for cut Mode */
#define CUT_MODE_COMPUTER 1
#define CUT_MODE_AUTOMATIC 2
#define CUT_MODE_MANUAL 3
#define SLAB_CODE_CUT_C "C" /* cut is made in mode CC */
#define SLAB_CODE_CUT_A "A" /* in PLC-Automatic */
#define SLAB_CODE_CUT_M "M" /* manual */
/* ---------------------------------------------------------------------
constants for THIN_SLAB_STATUS in SLDA
------------------------------------------------------------------ */
#define THIN_SLAB_STATUS_FREE "F"
#define THIN_SLAB_STATUS_PROCESSED "P"
#define THIN_SLAB_STATUS_LENGTH_LOCKED "L"
#define THIN_SLAB_STATUS_WIDTH_LOCKED "W"
#define THIN_SLAB_STATUS_BEFORE "F"
#define THIN_SLAB_STATUS_AFTER "A"
#define SLAB_STATUS_BEFORE "F"
#define SLAB_STATUS_AFTER "A"
/* ---------------------------------------------------------------------
constants for SEQU_SLAB_STATUS in PSLB
------------------------------------------------------------------ */
#define SEQU_SLAB_STATUS_NEW "NEWS" /* new slab is inserted */
#define SEQU_SLAB_STATUS_WAIT "WAIT" /* slab still to be cut */
#define SEQU_SLAB_STATUS_SETP "SETP" /* set point issued for cut */
#define SEQU_SLAB_STATUS_WLOCK "WLOK" /* locked for width change */
#define SEQU_SLAB_STATUS_LLOCK "LLOK" /* locked for lenght change */
#define SEQU_SLAB_STATUS_DONE "DONE" /* slab cut already */
/* ------------------------------------------------------------------
constants for order data
------------------------------------------------------------------ */
#define PHDR_STATUS_SCHED 1
#define PHDR_STATUS_END 2
/* ---------------------------------------------------------------------
constants for SEQU_HEAT_STATUS in PHDR
------------------------------------------------------------------ */
#define SEQU_HEAT_STATUS_NEW "NEWH" /* new heat is inserted */
#define SEQU_HEAT_STATUS_FREE "FREE"
#define SEQU_HEAT_STATUS_COMBINED "COMB"
#define SEQU_HEAT_STATUS_CAST "CAST"
#define SEQU_HEAT_STATUS_WAIT "WAIT"
#define SEQU_HEAT_STATUS_DONE "DONE"
/* ---------------------------------------------------------------------
constants for HEDA_HEAT_STATUS in HEDA
------------------------------------------------------------------ */
#define HEDA_HEAT_STATUS_WAIT "WAIT" /* waiting for cast */
#define HEDA_HEAT_STATUS_COMBINED "COMB" /* heat is combined */
#define HEDA_HEAT_STATUS_CAST "CAST" /* during casting */
#define HEDA_HEAT_STATUS_DONE "DONE" /* heat is casted */
#define SLAB_WIDTH_CODE_NO_CHANGE " "
#define SLAB_WIDTH_CODE_CHANGE "W"
#define SLAB_CODE_CRP_NO "0" /* no crop cut */
#define SLAB_CODE_CRP_YES "1" /* crop cut */
/* ------------------------------------------------------------------
constants for concentration mismatch flag conc_mism_xx
------------------------------------------------------------------ */
#define CONC_MISM_NORMAL "N" /* Concentration in Normal range */
#define CONC_MISM_UPP_L "U" /* Upper limit exceeded */
#define CONC_MISM_LOW_L "L" /* Lower limit exceeded */
/* ------------------------------------------------------------------
constants for data_origin_flg
------------------------------------------------------------------ */
#define ORI_FLG_TEL_RECV "T" /* set at telegram receive */
#define ORI_FLG_TEL_UPD "U" /* update per telegram */
#define ORI_FLG_NEW_DIA "M" /* set at new entry via dialog */
/* ------------------------------------------------------------------
constants for data_change_flg
------------------------------------------------------------------ */
#define CHG_FLG_TEL_RECV " " /* set at telegram recieve */
#define CHG_FLG_UPD_DIA "*" /* if data were inserted or updated via dialog*/
/* constants for Quality processing */
#define QEVEN_NO_BASE 1000 /* number of the first quality event */
#define GBL_MAX_QEVEN 10000 /* max. count of quality events */
/* types of Quality events */
#define QE_NOT_EXIST 0 /* no definition for this quality event */
#define QE_COUNT_SL 1 /* quality event wich is valid by a */
/* defined count of appearance of a slab */
#define QE_COUNT_HT 2 /* quality event wich is valid by a */
/* defined count of appearance of a heat */
#define QE_RANGE_SL 3 /* quality event with influence to a */
/* defined number of slabs behind */
/* the appearance of the event */
#define QE_RANGE_CL 4 /* quality event with influence to a */
/* defined cast length before and behind */
/* the appearance of the event */
#define QE_STATUS_BA 5 /* quality event with influence from the */
/* cast length at appearance of the event*/
/* until the the event is reset */
#define QE_GBL_INIT_NO 100 /* initialisation value for global memory */
/* constants for quality event status (table QEVE, AQEV) */
#define AQEV_STATUS_NORM 0 /* actual value in normal range */
#define AQEV_STATUS_RESET 0 /* event is not set */
#define AQEV_STATUS_SET 1 /* event is set */
#define AQEV_STATUS_MIN 2 /* actual value lower MIN value */
#define AQEV_STATUS_MAX 3 /* actual value greater MAX value */
/* function codes for table TFUN */
#define FUN_EMBR 1 /* electromagnetic brake EMBR */
#define FUN_LCR 2 /* liquid core reduction LCR */
#define FUN_QEVE 3 /* quality processing QEVE */
#define FUN_KOKI 4 /* width change KOKI */
#define FUN_COOL 5 /* secondary cooling DSC */
#define FUN_OSCI 6 /* hydraulic oscillator */
#define FUN_MAIP 7 /* maintenance processing */
#define FUN_TREN 8 /* Trending registration */
#define FUN_PSS_AVAIL 9 /* PSS available */
#define FUN_COPT 10 /* Function COPT available or not */
#define FUN_HPAC_DNSP 11 /* Function HPAC tel. to DNSP */
#define FUN_PIPE_ACK 12 /* Pipe acknoledle to Client PC (UXSV) */
#define FUN_RCCR 14 /* Function RCCR available or not */
#define CASTER_ID '1' /* caster id */
#define NO_VALUE_STRING "|" /* no value for string */
/* wrong no value for CPC OCT-96 MR */
/* #define NO_VALUE_DBL -1.0e+125 no value for double */
/* process-global structure declarations *************************************/
/* structure for global process parameters */
struct process
{
char prog_name[5]; /* program name */
int error_level; /* print error messages, if set */
int debug_level; /* print debug messages, if set */
unsigned int main_cycle_time; /* cycle time of process, if defined */
};
struct control_aval_value /* measured values */
{
int messno; /* measured value number */
int value; /* actual measured value */
};
struct control_aval
{
int mess_val_cnt; /* count of measured values */
struct control_aval_value mess_val[MAX_VALUES];
};
/* date and time structure in short integer format **************************/
typedef struct
{
unsigned short day; /* day of the month 1..31 */
unsigned short month; /* month 1 .. 12 */
unsigned short year; /* year 1997 .. 2999 */
unsigned short hour; /* hour 0 .. 23 */
unsigned short min; /* minutes 0 .. 59 */
unsigned short sec; /* seconds 0 .. 59 */
} sh_datim;
#endif
/******************************************************************************
S M S
-----
project : Caster Computer
filename : __prj[.SOURCE.MBX]MBX.H
version : 0.0
description : include file for mailbox functions (internal communication)
author : ht
creation : 23-APR-1996
update : 18-JUN-1996, ht
: 01-FEB-2000 pl
18-JUL-2003 SLAB_ID size changed to 11 char
******************************************************************************/
/* header file define-constant ***********************************************/
#ifndef MBX_H
#define MBX_H
/* DMQ-specific includes *****************************************************/
#include <p_entry.h> /* PAMS function declarations */
#include <p_proces.h> /* Known Queue number definitions */
#include <p_group.h> /* Known Group ID definitions */
#include <p_typecl.h> /* Generic Type/Class definitions */
#include <p_return.h> /* PAMS return status definitions */
#include <p_symbol.h> /* Generic PSEL/PSYM definitions */
/* mailbox specific constants **********************************************/
/* general mailbox-constants */
#define MBX_HEADER "MBX_" /* mailbox name consists of */
/* process name and mailbox header */
#define MBX_NAME_LEN 31 /* maximum length of mailboxname */
#define MAX_NO_ORD_CUT_PIECES 329 /* maximum number of ordered cut */
/* piece id's in 'caster sequence */
/* schedule' telegram */
#define MAX_NO_OBSRV_LINES 10
#define MAX_NO_INFL_S 1140 /* maximum number of quality influ- */
#define MAX_NO_INFL_C 1141 /* ences per telegram (star/cont.) */
#define MAX_NO_SEGMENT 3
#define MAX_NO_EVENTS 700
/* length constants in telegrams */
#define LEN_ERR_TEXT 80
#define LEN_NODE_NAME 15
#define LEN_TRANS_ID 10
#define LEN_MSG_ID 4
#define LEN_STATION_ID 4
#define LEN_CAST_SEQ_ID_TEL 10
#define LEN_OBSRV_TEXT 80
#define LEN_LADDLE_SHROUD 6
#define LEN_SHROUD_GASKET 10
#define LEN_TUND_CAR_ID 5
#define LEN_TUND_FLUX 10
#define LEN_TUND_ID 10
#define LEN_STOPPER_ROD 10
#define LEN_SEN_TYPE 6
#define LEN_MLD_PWDR_TYPE 10
#define LEN_SIDE_ID 10
/* constants for error locations in mailbox functions */
#define PROG_LOC_SND_TEL_ERR 0 /* error at 'send_telegram' */
#define PROG_LOC_SND_TEL_ERR_TYPE 1 /* invalid type in send telegram */
#define PROG_LOC_SND_TEL_UMA_ERR 2 /* error at 'send_telegram' UMA-error */
#define PROG_LOC_SND_TEL_INF_DEL 3 /* DELIVERY info at 'send_telegram' */
#define PROG_LOC_SND_TEL_INF_UMA 4 /* UMA info at 'send_telegram' */
/* constants for events in BA telegramms *************************************/
/* stati for events */
#define EVENT_ON 1 /* */
#define EVENT_OFF 0 /* */
#define EVENT_IN 1 /* */
#define EVENT_OUT 0 /* */
#define EVENT_OPEN 1 /* */
#define EVENT_CLOSE 0 /* */
#define EVENT_START 1 /* */
#define EVENT_END 0 /* */
#define EVENT_AUTO 1 /* */
#define EVENT_MANU 0 /* */
#define EVENT_SLAG 1 /* */
#define EVENT_NO_SLAG 0 /* */
#define EVENT_MOULD_WIDE 1 /* */
#define EVENT_MOULD_OTHER 0 /* */
#define EVENT_MOULD_MEDIUM 1 /* */
#define EVENT_MOULD_SMALL 1 /* */
#define EVENT_YES 1 /* */
#define EVENT_NO 0 /* */
/* general constants *********************************************************/
#define MBXBUF_LEN 512 /* max. message length */
/* constants for timer ids only allowed from 1 to 999 */
#define TIMER_MAFO 1 /* timer not used */
#define TIMER_THEM 2 /* timer not used */
#define TIMER_KOKI 3 /* timer not used */
#define TIMER_COPT 4 /* timer not used */
#define TIMER_HPAC 5 /* timer is active */
#define TIMER_QUIC 6 /* timer not used */
#define TIMER_INCE 7 /* timer not used */
#define TIMER_INAV 8 /* timer is active */
#define TIMER_INAT 9 /* timer not used */
#define TIMER_ASET 10 /* timer not used */
#define TIMER_ATRA 11 /* timer is active */
#define TIMER_KOKW 15 /* timer is active */
#define TIMER_QEVP 16 /* timer not used */
#define TIMER_ELOG 17 /* timer not used */
#define TIMER_COLD 19 /* timer not used */
#define TIMER_SAND 20 /* timer not used */
#define TIMER_RCCR 21 /* timer not used */
#define TIMER_SYFA 22 /* timer not used */
#define TIMER_DIAL 23 /* timer not used */
#define TIMER_LOGG 24 /* timer not used */
#define TIMER_SNRP 25 /* timer not used */
#define TIMER_SNRD 26 /* timer not used */
#define TIMER_TNRD 27 /* timer not used */
#define TIMER_DBSV 31 /* timer is active */
#define TIMER_SNSD 33 /* timer is active */
#define TIMER_SNSP 34 /* timer is active */
#define TIMER_SNSM 35 /* timer not used */
#define TIMER_PROD 36 /* timer is active */
#define TIMER_COOL 37 /* timer is active */
#define TIMER_DELE 38 /* timer is active */
/* PL+ */
#define TIMER_APIS 39 /* timer is active */
/* PL- */
#define TIMER_PROC_1 40 /* timer is active */
#define TIMER_PROC_2 41 /* timer is active */
#define TIMER_SEND_BASE TIMER_SNSD /* basic timer-id for SRSX */
/* telegramm number definitions **********************************************/
/* telegrams used/received by: all processes */
#define TEL_STOP_REQUEST 1
#define TEL_READ_PARA 2
#define TEL_READ_VALUES 3
#define TEL_READ_TABLES 4
#define TEL_WRITE_TABLES 5
/* telegrams received by : SYFA */
#define TEL_ERR_MSG 9999
/* telegrams received by : DBSV */
#define TEL_DBA_UPD 9996
#define TEL_MSG_NULL 0 /* Not defined; only ext. messages */
/* telegrams received by: 01 MAFO */
#define TEL_EVENT_INCE_MAFO 101 /* write message */
#define TEL_VALUES_600_INAT_MAFO 102 /* message from INAT */
#define TEL_EVENT_COPT_MAFO 104 /* message from COPT */
#define TEL_TRANSPOINT_THEM_MAFO 106 /* transition point heat to heat */
#define TEL_TRANSEND_ATRA_MAFO 107 /* transition zone end */
#define TEL_NEW_HEAT_DATA_MAFO 108 /* New Heat data from HEDA/Dialog */
#define TEL_LDOP_FAIL_SIMULATED 109 /* missed LDOP sig. simulated by STEL*/
#define TEL_LDCL_FAIL_SIMULATED 110 /* missed LDCL sig. simulated by STEL*/
/* telegrams received by: 02 THEM */
#define TEL_LADLE_OPEN_MAFO_THEM 201 /* ladle open THEM */
#define TEL_NEW_VAL_INAV_THEM 202 /* changed values for them-calc. */
/* telegrams received by: 03 KOKI */
/* 21.01.97, ht */
#define TEL_INI_WIDTH_CHG_MAFO_KOKI 301 /* width change init */
#define TEL_INI_WIDTH_CHG_COPT_KOKI 301 /* width change init */
/* #define TEL_HEATTOHEAT_MAFO_KOKI 302 heat to heat with new */
/* #define TEL_LADLE_OPEN_MAFO_KOKI 303 ladle open KOKI */
#define TEL_CUT_MADE_MAFO_KOKI 304 /* cut made from BA */
#define TEL_CUT_MADE_COPT_KOKI 304 /* cut made from BA */
#define TEL_INI_WIDTH_DBAR_MAFO_KOKI 305 /* width change init */
/* telegrams received by: 04 COPT */
#define TEL_LADLE_CLSE_MAFO_COPT 401 /* process ladle close */
#define TEL_LADLE_OPEN_MAFO_COPT 402 /* ladle open */
#define TEL_CUT_MADE_MAFO_COPT 403 /* cut made from BA */
#define TEL_ST_CAST_MAFO_COPT 404 /* start of cast from MAFO */
#define TEL_TUND_CLOSE_MAFO_COPT 405 /* tundish close from MAFO */
#define TEL_OPER_CUT_DIAL_COPT 406 /* oper. modified from dial. */
#define TEL_CUT_MADE_STEL_COPT 413 /* cut made from STEL */
/* telegrams received by: 05 HPAC */
#define TEL_LADLE_CLSE_MAFO_HPAC 501 /* process ladle close */
#define TEL_LADLE_OPEN_MAFO_HPAC 502 /* ladle open HPAC */
/* telegrams received by: 06 QUIC */
#define TEL_CUT_MADE_MAFO_QUIC 601 /* cut made from BA */
/* telegrams received by: 07 INCE */
#define TEL_EVENTS_D_BA_INCE 701 /* process events SNRX BA_D */
/* #define TEL_EVENTS_M_BA_INCE 702 process events SNRX BA_M */
/* #define TEL_EVENTS_P_BA_INCE 703 process events SNRX BA_P */
#define TEL_EVENTS_OPER_INCE 704 /* operator events from BA_D
or INOE dialog */
/* telegrams received by: 08 INAV */
#define TEL_VALUES_HIGH_LEVEL_BA_INAV 801 /* high-level casting values */
#define TEL_VALUES_LOW_LEVEL_BA_INAV 802 /* low-level casting values */
#define TEL_VALUES_COOL_BA_INAV 803 /* cooling values */
/* telegrams received by: 09 INAT */
#define TEL_VALUES_600_MAFO_INAT 901 /* more crop */
#define TEL_VALUES_600_BA_INAT 902 /* crop cut ? */
/* telegramm-Ids for MCS-Communication */
#define TEL_ANA_DATA_MCS 241 /* Special val to ext. comm. old value 1000*/
#define TEL_SLAB_REPORT_MCS 242 /* Special val to ext. comm. old value 1001*/
/* telegramm-Ids for TFC-Communication */
#define TEL_SLAB_INF_TFC 1003
/* telegrams received by: 10 ASET */
#define TEL_MSG_400_SYFA_ASET 1005 /* receive message 400 alarms */
/* from SYFA */
#define TEL_MSG_500_MAFO_ASET 1006 /* send message 500 ref.val.caster */
#define TEL_MSG_501_MAFO_ASET 1007 /* send message 501 ref.val.caster */
#define TEL_MSG_502_MAFO_ASET 1008 /* send message 502 ref.val.caster */
#define TEL_MSG_700_MAFO_ASET 1009 /* send message 700 ref.cut/mould */
#define TEL_MSG_800_KOKI_ASET 1010 /* send message 800 ref.cut/mould */
#define TEL_MSG_HPAC_ASET 1011 /* new HPAC speed */
#define TEL_SETPOINTS_COOL_ASET 1012 /* new Setpoints from COOL */
#define TEL_SETPOINTS_DIAL_ASET 1013 /* new Setpoints from DIALOGS */
#define TEL_TWDS_START_MAFO_ASET 1015 /* Ladle close from MAFO */
#define TEL_TWDS_STOP_MAFO_ASET 1016 /* End of Cast/Ladle Close from MAFO */
/* PL+ APC */
#define TEL_SETP_APC_APIS_ASET 1017 /* Cast speed from APC */
/* PL- */
/* telegrams received by: 11 PROD */
/* here : via SQLnet transfertables
not used for ISPAT */
#define TEL_SCHEDULE_DNRP_PROD 1101 /* caster sequence schedule */
#define TEL_HREN_DNRP_PROD 1102 /* Heat-Rename */
/* telegrams received by: 12 HEDA */
#define TEL_HEAT_DATA_DNRS_HEDA 1201 /* heatdata */
#define TEL_ESTLFTIM_DNRS_HEDA 1202 /* estimated set in turret time */
#define TEL_ANAL_TUND_DNRS_HEDA 1203 /* tundish analysis */
/* telegrams received by: 13 WIGA */
#define TEL_FEED_BACK_DNRM_WIGA 1301 /* width gauge feedback */
/* telegrams received by: 14 SLAR */
#define TEL_CUT_MADE_MAFO_SLAR 1401 /* cut made from MAFO */
#define TEL_HEAT_END_MAFO_SLAR 1402 /* end of heat from MAFO */
/* telegrams received by: 15 KOKW */
#define TEL_ST_WATCH_KOKI_KOKW 1501 /* start to watch mould width */
/* telegrams received by: 16 QEVP */
#define TEL_CAST_EVENT_INCE_QEVP 1601 /* process events */
#define TEL_ACQUI_VAL_INAV_QEVP 1602 /* process events */
#define TEL_PROCESS_OPER_QEVP 1603 /* process events from operator */
#define TEL_CASTMODON_MAFO_QEVP 1604 /* process notification */
/* telegrams received by: 17 ELOG */
#define TEL_EVENT_INCE_ELOG 1701 /* write message all other */
#define TEL_EVENT_INAT_ELOG 1702 /* write message Cut is made */
/* telegrams received by: 18 PROC */
#define TEL_START_REC_MAFO_PROC 1801 /* start recording */
#define TEL_STOP_REC_MAFO_PROC 1802 /* end recording */
#define TEL_CUT_IS_MADE_SLAR_PROC 1803 /* cut is made */
#define TEL_CONF_CHANGE_PROD_PROC 1804 /* confirm order data */
#define TEL_LADLE_OPEN_MAFO_PROC 1805 /* ladle open new heat */
#define TEL_CAST_START_MAFO_PROC 1806 /* start of sequence */
#define TEL_ORG_WRAP_MAFO_PROC 1807 /* start of sequence */
#define TEL_CONF_GRADE_OPER_PROC 1808 /* confirm steelgrade */
/* telegrams received by: 19 COOL */
#define TEL_CAST_START_MAFO_COOL 1901 /* send message start */
#define TEL_STOP_MAFO_COOL 1902 /* send message start */
/* telegrams received by: 20 DELE */
#define TEL_MAFO_DELE 2001 /* write message */
/* telegrams received by: 21 DNSS */
#define TEL_SLB_PRE_INF_SLAR 2103 /* slab pre information */
#define TEL_SLB_POST_INF_SLAR 2104 /* slab post information */
#define TEL_SLB_REPORT_SLAR 2105 /* slab report */
#define TEL_ANA_DATA_SLAR 2106 /* chem. analysis data */
#define TEL_REQ_TIME_SMC 2110 /* required set in time to smc */
#define TEL_END_OF_CAST_SMC 2111 /* end of cast to smc */
#define TEL_HEAT_LOST_SMC 2112 /* heat lost to smc */
#define TEL_CASTER_STATUS_SMC 2113 /* caster status to smc */
/* telegrams received by: 22 ATRA */
#define TEL_LADLE_OPEN_MAFO_ATRA 2201 /* ladle open ATRA */
#define TEL_NEW_TA_HEDA_ATRA 2202 /* changed values for calc. */
#define TEL_CASTMODE_ON_MAFO_ATRA 2203 /* analyse values 1. ladle */
/* telegrams received by: 30 MNTN */
#define TEL_LADLE_OPEN_MAFO_MNTN 3001 /* ladle open MNTN */
#define TEL_CUT_MADE_MAFO_MNTN 3002 /* cut made to MNTN */
/* telegrams received by: 50 RCCR */
#define TEL_CAST_START_MAFO_RCCR 5001 /* cast start strand */
#define TEL_LADLE_OPEN_MAFO_RCCR 5002 /* ladle open */
#define TEL_LADLE_CLOSE_MAFO_RCCR 5003 /* ladle close */
#define TEL_END_WIDTH_CHANGE_KOKW_RCCR 5004 /* end width change */
#define TEL_START_WIDTH_CHANGE_KOKW_RCCR 5005 /* start width change*/
#define TEL_CUT_MADE_MAFO_RCCR 5006 /* cut made */
#define TEL_BREAK_MAFO_RCCR 5007 /* break cycle */
#define TEL_TUND_CLOSE_MAFO_RCCR 5008 /* tundish close */
#define TEL_TRANS_MAFO_RCCR 5009 /* transition Heat to Heat*/
#define TEL_HEAD_CUT_MAFO_RCCR 5010 /* Head cut made */
#define TEL_TUND_TEMP_MAFO_RCCR 5011 /* Tund. temp. measurement*/
#define TEL_TAIL_OUT_MAFO_RCCR 5012 /* Tail out begin */
#define TEL_CHANGE_SUBM_INAV_RCCR 5013 /* changed submergence */
#define TEL_CHANGE_SPEED_INAV_RCCR 5014 /* cast speed change > delta */
#define TEL_COOL_CURVE_MAFO_RCCR 5015 /* change cooling curve */
#define TEL_START_CHOPPING_INCE_RCCR 5016 /* start chopping */
#define TEL_END_CHOPPING_INCE_RCCR 5017 /* end chopping */
/* telegrams received by: 90 DIAL */
#define TEL_NORM 9001 /* process normal message */
#define TEL_SPEC 9002 /* process special message */
/* telegrams from BA via SINEC H1 */
/* telegrams received by: 200 TNRP */
/* telegrams received by: 201 TNRD */
/* telegrams received by: 202 TNRM */
/* telegrams to BA via SINEC H1 */
/* telegrams sends by: SNSX */
#define TEL_VAL_400_ASET_SNSX 2400 /* send alarm message to BA*/
#define TEL_VAL_500_ASET_SNSX 2401 /* refer. values plant and cooling mode 1*/
#define TEL_VAL_501_ASET_SNSX 2402 /* refer. values plant and cooling mode 2*/
#define TEL_VAL_502_ASET_SNSX 2403 /* refer. values plant and cooling mode 3*/
#define TEL_VAL_700_ASET_SNSX 2404 /* reference values cutting shear */
#define TEL_VAL_800_ASET_SNSX 2405 /* reference values mold */
#define TEL_CONN_BROK_SNRX_SNSX 2406 /* connection broken from receive task */
#define TEL_VAL_401_ASET_SNSX 2407 /* send status message to BA*/
/* PL+ */
#define TEL_VAL_801_ASET_SNSX 2408 /* reference value casting speed from APC*/
/* PL- */
/* internal message numbers for dialog updating functions (receive) */
#define TEL_MESS_NO_OPER_INAV 809 /* value changed fron operator*/
#define TEL_DBA_UPD_DIAL_DBSV 2708 /* value changed from dialog */
#define TEL_DBA_NEW_DIAL_DBSV 2709 /* new value from dialog */
/* internal message numbers for CPC-communication (send) DNSP */
#define TEL_SCHED_REQUEST 20100
#define TEL_SCHED_REPLY 20101
#define TEL_CUT_PIECE_DATA 20102
#define TEL_QUAL_INFL_LOG 20103
#define TEL_OBSERV_DATA 20104
#define TEL_FAST_CYC_PROC_DNSP 20105
#define TEL_SLOW_CYC_PROC_DNSP 20106
#define TEL_HEAT_PROD_DATA 20107
#define TEL_EVENT_TIM 20108
#define TEL_TIME_SYNC_REQ 20109
#define TEL_REQ_TIME_HPAC_DNSP 20110
/* ??? ***********************************************************************/
#define TELMIN_VALUES 0
#define TELMAX_VALUES 99
#define TELMAX_VALUES_100 20 /* telegr-group 1:number measured values */
#define TELMAX_VALUES_200 20 /* telegr-group 2:number measured values */
#define TELMAX_VALUES_300 50 /* telegr-group 3:number measured values */
#define TELMAX_VALUES_400 7
#define TELMAX_VALUES_401 20 /* status msg buffer total 20 charcters/2 vals.*/
#define TELMAX_VALUES_500 50
#define TELMAX_VALUES_600 7
#define TELMAX_VALUES_700 7
#define TELMAX_VALUES_800 7
#define TELMAX_INAV_QEVP 25
#define TEL_EVENTS_OFFS 0 /* offset casting events */
#define TEL_EVENTS_DIAL_OFFS 62 /* offset operator event */
#define TELMAX_EVENTS_D_BA 62 /* number of casting events */
#define TELMAX_EVENTS_DIAL 18 /* number of operator events */
/* tel_events_dial_offs change from 50 to 62, telmax_events_d_ba 40 to 62
and telmax_events_dial 30 to 18 0n 11-12-98 */
/* return codes for telegrams to MAFO ****************************************/
#define RET_MAFO_OK 0
#define RET_MAFO_COPT_ERR_VAL -1
#define RET_MAFO_COPT_IMP_DIST -2
#define RET_MAFO_COPT_NO_SLDA -3
#define RET_MAFO_COPT_NO_NORM -4
#define RET_MAFO_COPT_IMP_PROC -5
/* cut types for group 600 ***************************************************/
#define CUT_TYPE_LAST 0
#define CUT_TYPE_NORM 1
#define CUT_TYPE_SAMPLE 2
#define CUT_TYPE_HEAD 3
#define CUT_TYPE_CROP 4
#define CUT_TYPE_TAIL 5
struct str_header_add_cpc /* additional part of header in CPC-comm. */
{
char msg_id[LEN_MSG_ID];
int64 send_time_vms;
};
/* define DATA type for DECmessageQ target/source addresses ******************/
typedef union
{
long int all;
struct
{
short int queue;
short int group;
} au;
} Q_address;
struct str_err_msg /* Error message to SYFA */
{
char process[5]; /* process reporting the error */
short int err_code; /* error code */
long err_status; /* status code of error */
int location; /* location of error */
char err_text[LEN_ERR_TEXT+1];/* optional error text */
int msec; /* actual time milliseconds */
char time[LEN_TIME_DATE]; /* actual time */
};
struct str_err_msg_syfo /* Error message to SYFO */
{
char message[LEN_ERR_TEXT+1];
};
struct str_log_dev /* enable/disable log-device */
{
char device[16]; /* logging device */
int function; /* true = enable */
/* false = disable */
};
struct str_dba_upd /* update shared memory */
{
char table[5]; /* database table */
};
struct str_log_msg /* message to LOGG */
{
char process_f[5]; /* process sending the message */
char process_t[5]; /* process receiving the message */
short int priority; /* Message priority */
short int class; /* Message class code */
short int type; /* Message type code */
char message [400]; /* Message */
};
struct str_timer_expired
{
int32 timer_id;
char reserved[20];
};
/* DEFINE STRUCTURES FOR ISPAT MESSAGES **************************************/
/* vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/
struct str_event_ince_mafo
{
int event; /* event / measured value no */
int status; /* status or value */
};
struct str_values_600_mafo_inat /* message from mafo to inat */
{
int no_crop; /* number of crop-cuts */
int slab_no_next; /* thin slab number of next cut */
};
struct str_values_600_inat_mafo /* message from INAT */
{
int slab_pos_sequ; /* number of cut made */
int cut_length; /* actual cut length of thin slab */
int cut_type; /* type / ID of cut made */
int cut_mode; /* mode of cutting */
/* 07.01.97, ht */
int cast_len_ctr; /* cast length counter */
};
struct str_event_copt_mafo /* message from COPT */
{
int ret_code_copt; /* return code from COPT */
int sequ_id; /* caster sequence no */
int heat_pos; /* actual heat sequence no */
};
struct str_transpoint_them_mafo /* transition point heat to heat */
{
int cast_length;
};
struct str_transend_atra_mafo /* transition zone end */
{
int cast_length;
};
struct str_new_heat_data_mafo /* New heat data received/inserted */
{
char heat_id_smc[LEN_HEAT_ID];
};
struct str_mafo_dele /* begin delete of table */
{
int mode; /* 1 = Delete circulation buffer */
/* 2 = Rename Heat-ID and Slab-ID */
};
struct str_ladle_open_mafo_them /* ladle open THEM */
{
int code; /* message code */
};
struct str_new_val_inav_them /* ladle open THEM */
{
int mold_width; /* */
int cast_length; /* */
int casting_speed; /* */
int strip_thick;
};
struct str_analyse_atra /* */
{
char heat_id_smc[LEN_HEAT_ID];
char sample_code[LEN_SAMPLE_CODE];
float analys_val[MAX_ANALYS_VAL];
};
struct str_ladle_open_mafo_atra /* ladle open ATRA */
{
struct str_analyse_atra ana;
};
struct str_new_ta_heda_atra /* new tundish analyse ATRA */
{
struct str_analyse_atra ana;
};
/* not used 7.5.96 MR
struct str_dummy_bar_mafo_koki dummy bar insert mode
{
char sequ_id[LEN_SEQU_ID];
int heat_pos;
int slab_pos;
char slab_type[LEN_SLAB_TYPE];
};
struct str_heattoheat_mafo_koki heat to heat with new
{
char sequ_id[LEN_SEQU_ID];
int heat_pos;
int slab_pos;
char slab_type[LEN_SLAB_TYPE];
};
end not used */
struct str_ladle_open_mafo_koki /* ladle open first heat KOKI */
{
int sequ_id;
int heat_pos;
int slab_pos;
char slab_type[LEN_SLAB_TYPE];
};
struct str_cut_made_mafo_koki /* cut made from BA */
{
int cast_length_cut;
};
struct str_st_cast_mafo_copt /* ladle open first heat */
{
int sequ_id; /* caster sequence no */
int heat_pos; /* actual heat sequence no */
int mould_width; /* measured values at cut */
int ladle_weight;
int tund_weight;
int cast_length;
int withdrawal_length;
int was_error_read_val;
int sequ_id_last; /* caster sequence no */
int heat_pos_last; /* heat sequence no */
int slab_pos_last; /* last_ts_h_no; last used slab pos in heat */
int slab_pos_sequ_last; /* last_ts_s_pos; last used slab pos in seq. */
};
struct str_ladle_ch_mafo_copt /* ladle change */
{
int sequ_id; /* caster sequence no */
int heat_pos; /* actual heat sequence no */
int mould_width; /* measured values at cut */
int ladle_weight;
int tund_weight;
int cast_length;
int withdrawal_length;
int was_error_read_val;
int sequ_id_last; /* caster sequence no */
int heat_pos_last; /* heat sequence no */
int slab_pos_last; /* last_ts_h_no; last used slab pos in heat */
int slab_pos_sequ_last; /* last_ts_s_pos; last used slab pos in seq.*/
};
struct str_cut_made_mafo_copt /* cut made from BA */
{
int sequ_id; /* caster sequence no */
int heat_pos; /* actual heat sequence no */
int mould_width; /* measured values at cut */
int slab_length_act; /* actual length of slab cut */
int cast_length_cut;
int withdrawal_length;
int slab_pos_seq;
char slab_type[LEN_SLAB_TYPE]; /* slab type of cut slab */
};
struct str_oper_cut_dial_copt /* cut values modified by OPERATOR */
{
int sequ_id; /* caster sequence no */
int heat_pos; /* actual heat sequence no */
int slab_pos;
char slab_type; /* slab type of cut slab */
int slab_length_oper; /* operator length of slab to be cut */
char flag_sample; /* Y: make sample, N:donot make sample */
char flag_crop; /* Y: make crop, N:donot make crop */
};
struct str_ladle_clse_mafo_hpac /* process ladle close */
{
int dummy;
};
struct str_ladle_open_mafo_hpac /* ladle open HPAC */
{
int ladle_tare_weight; /* ladle weight */
int req_cast_temp; /* required temp. at caster */
int vttt_param;
};
struct str_cut_made_mafo_quic /* cut made from BA */
{
char slab_id[LEN_SLAB_ID];
char slab_type[LEN_SLAB_TYPE];
};
struct str_send_qual_quic_dnsp /* send quality data per slab to CPC */
{
char slab_id[LEN_SLAB_ID];
char slab_type[LEN_SLAB_TYPE];
};
struct str_events_d_ba_ince /* process events SNRX from BA_D */
{
int event_status[TELMAX_EVENTS_D_BA];
};
struct str_events_oper_ince /* operator events from BA_D or INOE dialog */
{
int event_status[TELMAX_EVENTS_DIAL];
};
struct str_values_100_ba_inav /* field */
{
int values[TELMAX_VALUES_100];
};
struct str_values_200_ba_inav /* field */
{
int values[TELMAX_VALUES_200];
};
struct str_values_300_ba_inav /* field */
{
int values[TELMAX_VALUES_300];
};
struct str_values_600_ba_inat /* more crop */
{
int slab_pos_sequ; /* number of cuts made */
int cut_length; /* actual cut length of thin slab */
int cut_type; /* type / ID of cut made */
int cut_mode; /* mode of cutting */
/* 07.01.97, ht */
int cast_len_ctr; /* cast length counter */
};
struct str_msg_400_syfa_aset /* receive message 400 alarms from SYFA */
{
int alarm;
};
struct str_msg_500_mafo_aset /* send at tranition point in mould and at
ladle open first heat in sequence */
{
int ladle_tare_weight; /* From HEDA */
int ladle_weight;
};
struct str_msg_hpac_aset /* send if req. heat-pacing speed changed */
{
int ret_code;
int speed_heat_pac_rec; /* recommended casting speed (heat pacing) */
};
struct str_msg_501_mafo_aset /* send when ladle tare weight changed */
{
int ladle_tare_weight; /* ladle tare weight */
};
struct str_msg_502_mafo_aset /* send when tundish temperature changed */
{
int tundish_temp;
};
/* PL+ extension for APC */
struct str_msg_setp_apc /* send when cast speed from APC changed */
{
short nCastSpeed; /* cast speed to be set cm/min */
short nCastSpeedValid; /* cast speed value valid = 1 */
int iTaperRight; /* taper left in mm/100 */
int iTaperLeft; /* taper right mm/100 */
short nTaperValid; /* taper values valid = 1 */
short nApcMode; /* autopilot computer mode :
0 = Standby
1 = Casting Active
2 = Taper Active
3 = Casting + Taper Active */
};
/* PL- */
struct str_msg_700_mafo_aset /* send message 700 ref.cut/mould */
{
int slab_no_next; /* thin slab number of next cut */
int set_new_cut; /* setpoint of new cut (cm) */
int sample_type; /* type of sample made */
/* 0 = last thin slab */
/* 1 = normal thin slab */
/* 2 = sample cut */
/* 4 = crop cut */
};
struct str_msg_800_koki_aset /* send message 800 ref.cut/mould */
{
int mould_width; /* setp. mould width at top*/
int mould_taper_right; /* setp. mould taper right*/
int mould_taper_left; /* setp. mould taper left*/
int width_change_grad; /* setp. width change gradient (mm/10m) */
int offset_cast_length; /* 0 for kind1; values kind 2 only (cm) */
};
/* first control loop in set_...[0] */
struct str_setpoints_cool_aset
{
int dsc_status;
int set_water_control_loop[20]; /* Set water [l/min] */
int set_valid[20]; /* Set validity bit 1 = On, 0 = off */
};
/* structures for caster sequence schedule */
struct str_ord_pic_id /* ord_cut_piece_id struct used in telegrams */
{
char ord_pic_id[LEN_ORD_CUT_PIECE_ID];
char dummy[1];
};
struct str_varchar_ord_pic_id /* ord_cut_piece_id struct used for VARCHARs */
{
unsigned short len;
unsigned char arr[LEN_ORD_CUT_PIECE_ID - 1];
};
struct str_steelgrade /* steelgrade struct used in telegrams */
{
char steelgrade[LEN_STEELGRADE];
char dummy[1];
};
struct str_varchar_steelgrade /* steelgrade struct used for VARCHARs */
{
unsigned short len;
unsigned char arr[LEN_STEELGRADE - 1];
};
struct str_ord_grp_id /* ord. group id struct used in telegrams */
{
char order_group_id[LEN_ORD_GRP_ID];
char dummy[1];
};
struct str_varchar_ord_grp_id /* ord. group id struct used for VARCHARs */
{
unsigned short len;
unsigned char arr[LEN_ORD_GRP_ID - 1];
};
struct str_ord_slb /* orderd cut piece data */
{
char ord_pic_id[LEN_ORD_CUT_PIECE_ID - 1];
char ord_grp_id[LEN_ORD_GRP_ID - 1];
char ord_grade[LEN_STEELGRADE - 1];
double cut_len_aim;
double cut_len_min;
double cut_len_max;
double aim_slab_width;
/* 12.12.96, ht */
int aim_slab_thick;
int tfc_exit_temp;
double roll_gauge_aim;
char sample_cut_flag;
double sample_cut_len;
char first_piece_of_seq;
};
struct str_schedule_dnrp_prod /* caster sequence schedule */
{
char msg_id[LEN_MSG_ID]; /* message id */
int64 dati_sent; /* date/time of sent message */
int no_pieces; /* number of pieces in telegram */
/* orderd cut piece data */
struct str_ord_slb ord_slb[MAX_NO_ORD_CUT_PIECES];
};
struct str_hren_dnrp_prod /* Order for Heat-Rename */
{
char msg_id[LEN_MSG_ID]; /* message id */
int64 dati_sent; /* date/time of sent message */
char heat_id_old[LEN_HEAT_ID-1]; /* Old Name for HEAT */
char heat_id_new[LEN_HEAT_ID-1]; /* New Name for HEAT */
};
/* structure definitions for HEDA-telegramms */
struct str_heat_id /* heat_id struct used in telegrams */
{
char heat_id[LEN_HEAT_ID];
char dummy[1];
};
struct str_varchar_heat_id /* heat_id struct used for VARCHARs */
{
unsigned short len;
unsigned char arr[LEN_HEAT_ID - 1];
};
struct str_off_grade /* off_grade_notif struct used in telegrams */
{
char off_grade_notif[LEN_OFF_GRADE];
char dummy[1];
};
struct str_varchar_off_grade /* off_grade_notif struct used for VARCHARs */
{
unsigned short len;
unsigned char arr[LEN_OFF_GRADE - 1];
};
struct str_analys_text /* analys_text struct used in telegrams */
{
char analys_text[LEN_ANA_TEXT];
char dummy[1];
};
struct str_varchar_analys_text /* analys_text struct used for VARCHARs */
{
unsigned short len;
unsigned char arr[LEN_ANA_TEXT - 1];
};
struct str_flag_ein /* Flag VARCHAR(1) struct used in telegrams */
{
char flag[1+1];
char dummy[1];
};
struct str_varchar_flag_ein /* Flag VARCHAR(1) struct used for VARCHARs */
{
unsigned short len;
unsigned char arr[1];
};
struct str_flag_4 /* Flag VARCHAR(1) struct used in telegrams */
{
char flag[4+1];
char dummy[1];
};
struct str_varchar_flag_4 /* Flag VARCHAR(1) struct used for VARCHARs */
{
unsigned short len;
unsigned char arr[4];
};
struct str_heat_data_dnrs_heda /* send msg. heatdata from SMC */
{
char dati_receive[LEN_TIME_DATE]; /* date in user defined format */
union
{
struct str_heat_id heat_id; /* struct used for telegrams */
struct str_varchar_heat_id vc_heat_id; /* struct used for VARCHARs */
} un_heat_id;
union
{
struct str_flag_ein retreatment; /* struct used for telegrams */
struct str_varchar_flag_ein vc_retreatment; /* struct used for VARCHARs */
} un_retreatment;
int sequ_id;
int heat_pos;
union
{
struct str_steelgrade steelgrade; /* struct used for telegrams */
struct str_varchar_steelgrade vc_steelgrade; /* struct used for VARCHARs */
} un_steelgrade;
union
{
struct str_ord_grp_id product_order_no; /* struct used for telegrams*/
struct str_varchar_ord_grp_id vc_product_order_no;/*struct used for VARCHARs*/
} un_product_order_no;
int lmtemp_eaf;
char dati_lmtemp_eaf[LEN_TIME_DATE]; /* date in user defined format*/
char dati_tapping[LEN_TIME_DATE]; /* date in user defined format */
int ladle_no;
int ladle_tare_weight;
int liquid_steel_weight;
int ladle_slag_weight;
int lmtemp_steel;
char dati_lmtemp_steel[LEN_TIME_DATE];/*date in user defined format*/
union
{
struct str_flag_ein data_origin_flag; /* struct used for telegrams */
struct str_varchar_flag_ein vc_data_origin_flag; /* struct used for VARCHARs*/
} un_data_origin_flag;
union
{
struct str_flag_ein data_change_flag; /* struct used for telegrams */
struct str_varchar_flag_ein vc_data_change_flag; /* struct used for VARCHARs*/
} un_data_change_flag;
char dati_last_update[LEN_TIME_DATE];
union
{
struct str_flag_4 heat_status; /* struct used for telegrams */
struct str_varchar_flag_4 vc_heat_status; /* struct used for VARCHARs */
} un_heat_status;
};
struct str_estlftim_dnrs_heda /* send msg. est. l. time from SMC */
{
char dati_receive[LEN_TIME_DATE];
int sequ_id;
int heat_pos;
union
{
struct str_heat_id heat_id; /* struct used for telegrams */
struct str_varchar_heat_id vc_heat_id; /* struct used for VARCHARs */
} un_heat_id;
union
{
struct str_flag_ein retreatment; /* struct used for telegrams */
struct str_varchar_flag_ein vc_retreatment; /* struct used for VARCHARs */
} un_retreatment;
char dati_est_lift_time[LEN_TIME_DATE];
};
struct str_sample_code /* sample_code struct used in telegrams */
{
char sample_code[LEN_SAMPLE_CODE];
char dummy[1];
};
struct str_varchar_sample_code /* sample_code struct used for VARCHARs */
{
unsigned short len;
unsigned char arr[LEN_SAMPLE_CODE - 1];
};
struct str_anal_text /* anal_text struct used in telegrams */
{
char anal_text[73];
char dummy[1];
};
struct str_varchar_anal_text /* anal_text struct used for VARCHARs */
{
unsigned short len;
unsigned char arr[72];
};
struct str_anal_tund_dnrs_heda /* send msg. anal/ tund from LAB */
{
char dati_receive[LEN_TIME_DATE];
union
{
struct str_heat_id heat_id; /* struct used for telegrams */
struct str_varchar_heat_id vc_heat_id; /* struct used for VARCHARs */
} un_heat_id;
union
{
struct str_flag_ein retreatment; /* struct used for telegrams */
struct str_varchar_flag_ein vc_retreatment; /* struct used for VARCHARs */
} un_retreatment;
int sequ_id;
int heat_pos;
union
{
struct str_steelgrade steelgrade; /* struct used for telegrams */
struct str_varchar_steelgrade vc_steelgrade; /* struct used for VARCHARs */
} un_steelgrade;
union
{
struct str_ord_grp_id product_order_no; /* struct used for telegrams*/
struct str_varchar_ord_grp_id vc_product_order_no;/*struct used for VARCHARs*/
} un_product_order_no;
union
{
struct str_flag_ein grade_flg; /* struct used for telegrams */
struct str_varchar_flag_ein vc_grade_flg; /* struct used for VARCHARs */
} un_grade_flg;
union
{
struct str_sample_code sample_code; /* struct used for telegrams */
struct str_varchar_sample_code vc_sample_code; /* struct used for VARCHARs */
} un_sample_code;
char dati_last_anal[LEN_TIME_DATE];
float analys_val_1;
float analys_val_2;
float analys_val_3;
float analys_val_4;
float analys_val_5;
float analys_val_6;
float analys_val_7;
float analys_val_8;
float analys_val_9;
float analys_val_10;
float analys_val_11;
float analys_val_12;
float analys_val_13;
float analys_val_14;
float analys_val_15;
float analys_val_16;
float analys_val_17;
float analys_val_18;
float analys_val_19;
float analys_val_20;
float analys_val_21;
float analys_val_22;
float analys_val_23;
float analys_val_24;
float analys_val_25;
float analys_val_26;
float analys_val_27;
float analys_val_28;
float analys_val_29;
float analys_val_30;
float analys_val_31;
float analys_val_32;
float analys_val_33;
float analys_val_34;
float analys_val_35;
float analys_val_36;
float analys_val_37;
float analys_val_38;
float analys_val_39;
float analys_val_40;
union
{
struct str_flag_ein data_origin_flag; /* struct used for telegrams */
struct str_varchar_flag_ein vc_data_origin_flag; /* struct used for VARCHARs*/
} un_data_origin_flag;
union
{
struct str_flag_ein data_change_flag; /* struct used for telegrams */
struct str_varchar_flag_ein vc_data_change_flag; /* struct used for VARCHARs*/
} un_data_change_flag;
char dati_last_update[LEN_TIME_DATE];
int liquidus_temperature;
};
/* structure definitions for WIGA-telegramms */
struct str_slab_id /* slab_id struct used in telegrams */
{
char slab_id[LEN_SLAB_ID];
/* char dummy[1]; ** 18-JUL-2003 SLAB_ID size changed to 11 char */
};
struct str_varchar_slab_id /* slab_id struct used for VARCHARs */
{
unsigned short len;
unsigned char arr[LEN_SLAB_ID - 1];
};
struct str_feed_back_dnrm_wiga /* width gauge feedback from MCS */
{
char dati_receive[LEN_TIME_DATE]; /* date in user defined format */
/* int msec; */ /* milliseconds of time */
union
{
struct str_slab_id slab_id_mcs; /* struct used for telegrams */
struct str_varchar_slab_id vc_slab_id_mcs; /* struct used for VARCHARs */
} un_slab_id_mcs;
/* char slab_type[LEN_SLAB_TYPE]; */
float slab_width_mcs;
float slab_thick_mcs;
float coil_weight;
char time_stamp_mcs[LEN_TIME_DATE]; /* date of mcs in user defined format */
};
/* structure definitions for DNSS-telegramms */
struct str_req_time_hpac_dnsp /* required set in turret time */
{
int casseq; /* caster seq no , next heat for cast */
short int hseqno; /* heat seq no , next heat for cast */
char nheat[LEN_HEAT_ID - 1]; /* heat no , next heat for casting */
char rtnheat; /* retreatment no for next heat */
char aheat[LEN_HEAT_ID - 1]; /* heat no , actual heat being cast */
char rtaheat; /* retreatment no for actual heat */
char endcast[LEN_TIME_DATE_NET]; /* day/time of end casting */
char rliftt[LEN_TIME_DATE_NET]; /* day /time of reqd set in turret time*/
int rtempc; /* required temperature at caster */
};
struct str_slb_pre_inf_dnss /* slab pre information */
{
char slab_id[LEN_SLAB_ID - 1];
char dummy1[1]; /* dummy1[2]; 18-JUL-2003 SLAB_ID size changed to 11 char*/
char caster_id;
/*
char slab_type;
*/
char width_chg_flag;
int tfc_exit_temp;
int slab_len_aim;
int slab_len_act;
int slab_pos_width_chg;
int ini_slab_width;
int fin_slab_width;
int slab_thick;
int slab_weight;
char trans_bar;
char free1;
/*float roll_gauge_aim; /* not used spare*/
char steelgrade[LEN_STEELGRADE - 1];
};
struct str_slb_post_inf_dnss /* slab post information */
{
char slab_id[LEN_SLAB_ID - 1];
char dummy1[1]; /*dummy1[2]; 18-JUL-2003 SLAB_ID size changed to 11 char*/
char caster_id;
/*
char slab_type;
*/
char width_chg_flag;
int tfc_exit_temp;
int slab_len_aim;
int slab_len_act;
int slab_pos_width_chg;
int ini_slab_width;
int fin_slab_width;
int slab_thick;
int slab_weight;
char trans_bar;
char free1;
/*float roll_gauge_aim; /* not used spare*/
char steelgrade[LEN_STEELGRADE - 1];
};
struct str_slb_report_dnss /* slab report */
{
char slab_id[LEN_SLAB_ID - 1];
char blank1;
/* char blank2; 18-JUL-2003 SLAB_ID size changed to 11 char */
char slab_type;
char steelgrade[LEN_STEELGRADE - 1];
float slab_weight;
float slab_width_ini;
float slab_width_fin;
/* float length_of_taper; */
char width_chg_flag;
float slab_len;
float slab_thick;
/* short slab_pos_id; */
float next_slab_len;
char next_heat_id[LEN_HEAT_ID - 1];
float cast_speed;
};
struct str_anlys_data_dnss /* analysis data */
{
char slab_id[LEN_SLAB_ID - 1];
/* char slab_type; */
char blank1; /* to match with mill computer struct*/
/* char blank2; /* to match with mill computer struct*/
float analys_val_1;
float analys_val_2;
float analys_val_3;
float analys_val_4;
float analys_val_5;
float analys_val_6;
float analys_val_7;
float analys_val_8;
float analys_val_9;
float analys_val_10;
float analys_val_11;
float analys_val_12;
float analys_val_13;
float analys_val_14;
float analys_val_15;
float analys_val_16;
float analys_val_17;
float analys_val_18;
float analys_val_19;
float analys_val_20;
float analys_val_21;
float analys_val_22;
float analys_val_23;
float analys_val_24;
float analys_val_25;
float analys_val_26;
float analys_val_27;
float analys_val_28;
float analys_val_29;
float analys_val_30;
float analys_val_31;
float analys_val_32;
float analys_val_33;
float analys_val_34;
float analys_val_35;
float analys_val_36;
float analys_val_37;
float analys_val_38;
float analys_val_39;
float analys_val_40;
};
struct str_cut_made_mafo_slar /* cut made from MAFO */
{
char slab_id[LEN_SLAB_ID];
int sequ_id;
int heat_pos;
int slab_pos;
int slab_per_heat_seq;
char slab_id_act[LEN_SLAB_ID];
char slab_type[LEN_SLAB_TYPE];
/* char ord_cut_pic_id[LEN_ORD_CUT_PIECE_ID]; */
char major_heat_id[LEN_HEAT_ID];
char minor_heat_id[LEN_HEAT_ID];
int major_heat_percent;
char steelgrade[LEN_STEELGRADE];
char dati_slab_cut[LEN_TIME_DATE];
double aim_slab_len;
int cast_len_head;
int cast_len_end;
int ini_slab_thick;
int fin_slab_thick;
int slab_weight;
double roll_gauge_aim; /* not used spare*/
char trans_code[LEN_CHAR_FLAG];
int slab_width_ini;
int slab_width_fin;
int dist_head_width_chg;
int dist_end_width_chg;
int dist_head_trans_point;
int dist_head_trans_zone;
int dist_head_end_trans_zone;
int sample_cut_no;
char shear_mode[LEN_CHAR_FLAG];
int tfc_exit_temp;
char crew_id[LEN_CHAR_FLAG];
char trans_bar[LEN_CHAR_FLAG];
};
struct str_heat_end_mafo_slar /* end of heat from MAFO */
{
char heat_id[LEN_HEAT_ID];
char flag_last_heat[LEN_CHAR_FLAG];
};
struct str_st_watch_koki_kokw /* start to watch mould width */
{
int cast_length_beg; /* casting length begin to watch */
int cast_length; /* casting length to watch */
int mould_width; /* mould width to watch */
};
struct str_cast_event_ince_qevp /* process events */
{
int event; /* casting or operator event number */
int status; /* actual status of event */
int posino; /* number of position list material tracking */
int cast_length; /* actual cast length counter */
};
struct str_measured_val_qevp /* measured values */
{
int messno; /* measured value number */
int value; /* actual measured value */
int posino; /* number of position list material tracking */
int cast_length; /* actual cast length counter */
};
struct str_acqui_val_inav_qevp /* measured values from INAV */
{
int mess_val_cnt; /* count of measured values in this telegram */
struct str_measured_val_qevp mess_val[TELMAX_INAV_QEVP];
};
struct str_process_oper_qevp /* process events from operator */
{
int not_used;
};
struct str_castmodon_mafo_qevp /* process notification */
{
int event; /* casting event number EVE_CAMO*/
int status; /* actual status of event */
};
struct str_event_ince_elog /* write message */
{
int event;
int status;
};
struct str_event_inat_elog /* write message Cut is Made */
{
int event;
int status;
};
struct str_cast_start_mafo_cool /* send message start */
{
int dummy;
};
struct str_stop_mafo_cool /* send message start */
{
int dummy;
};
struct str_ladle_open_mafo_mntn /* send message L.O. */
{
float weight;
float length;
};
struct str_cut_made_mafo_mntn
{
float weight;
float length;
};
struct str_cast_start_mafo_rccr /* */
{
int dummy;
};
struct str_ladle_open_mafo_rccr /* */
{
int vttt_param;
int tlad_no;
};
struct str_ladle_close_mafo_rccr /* */
{
int dummy;
};
struct str_end_width_change_kokw_rccr /* */
{
int dummy;
};
struct str_start_width_change_kokw_rccr /* */
{
int dummy;
};
struct str_cut_made_mafo_rccr /* */
{
int cast_length;
int cut_length;
int cut_no;
int type_count; /* For Crop cut(Head) registration */
};
struct str_break_mafo_rccr /* */
{
int dummy;
};
struct str_tund_close_mafo_rccr /* */
{
int dummy;
};
struct str_trans_mafo_rccr /* 1.5.97 MR */
{
int cast_len;
};
struct str_val_aset_snsx /* Telegram, reference values from CCC */
{ /* ___________________________________ */
int setpoint[TELMAX_VALUES_500];
};
struct str_status_val_aset_snsx /* Telegram, status values from CCC */
{ /* ___________________________________ */
char heat_id_smc[LEN_HEAT_ID - 1];
char steelgrade[LEN_STEELGRADE - 1];
};
struct str_conn_broken_snrx_snsx /* Telegram connection broken receive */
{ /* _________________________________ */
int plc_no;
};
/*****************************************************************************/
/* internal messages for dialog updating functions (receive) */
struct str_mess_no_oper_inav /* mess_no changed by operator */
{
double mess_no; /* mess_no*/
double mess_value;
};
struct str_dba_upd_dial_dbsv /* update shared memory */
{
char dialog[20]; /* name of menu called from */
char table[20]; /* database table name */
} ;
struct str_dba_new_dial_dbsv /* update shared memory */
{
char dialog[20]; /* name of menu called from */
char table[20]; /* database table name */
} ;
/*****************************************************************************/
struct str_sched_req_cpc /* structure for Caster Sequence Schedule Request */
{
struct str_header_add_cpc add_head;
char station_id[LEN_STATION_ID];
};
/*****************************************************************************/
struct str_cut_pic_data_cpc /* structure for Caster Cut Piece Data */
{
struct str_header_add_cpc add_head;
char station_id[LEN_STATION_ID];
int cast_seq_id;
int heat_pos;
int slab_pos;
char heat_id_act[LEN_HEAT_ID - 1];
int sequ_id_plan;
int heat_pos_plan;
int slab_pos_plan;
char l3_heat_id[LEN_HEAT_ID - 1];
int slab_pos_sequ_act;
char slab_id[LEN_SLAB_ID - 1];
char slab_type[LEN_SLAB_TYPE - 1];
int slab_type_count;
char l3_slab_id[LEN_SLAB_ID - 1];
char crew_id[LEN_CHAR_FLAG];
char grade_id[LEN_STEELGRADE - 1];
int grade_version;
char major_heat_id[LEN_HEAT_ID - 1];
int major_heat_percent;
char minor_heat_id[LEN_HEAT_ID - 1];
char dati_slab_cut[LEN_TIME_DATE];
char shear_cut_mode[LEN_CHAR_FLAG];
char transition_code[LEN_CHAR_FLAG];
int slab_weight;
int slab_width_ini;
int slab_width_fin;
int slab_thick;
int slab_length;
int dist_head_trans_point;
int dist_head_trans_zone;
int dist_head_end_trans_zone;
int dist_head_width_chg;
int dist_end_width_chg;
int cast_len_head;
char last_slab_of_seq[LEN_CHAR_FLAG];
};
/*****************************************************************************/
struct str_obs_data_cpc /* structure for Observation Data */
{
struct str_header_add_cpc add_head;
char heat_id[LEN_HEAT_ID - 1];
int no_lines;
char heat_obsrv_txt[LEN_OBSRV_TEXT][MAX_NO_OBSRV_LINES];
};
/*****************************************************************************/
struct str_segment_data
{
int segm_wght_acc;
int segm_min;
int segm_heat;
};
struct str_heat_prd_event
{
int64 event_time;
char event_code_id[LEN_EVENT_CODE - 1];
char event_text[LEN_EVENT_TEXT - 1];
};
struct str_heat_prd_dat_shrt /* structure for Caster Heat Production Data */
{
struct str_header_add_cpc add_head;
char station_id[LEN_STATION_ID];
int sequ_id;
int heat_pos;
char heat_id_act[LEN_HEAT_ID - 1];
int sequ_id_plan;
int heat_pos_plan;
char l3_heat_id[LEN_HEAT_ID - 1];
char crew_id[LEN_CHAR_FLAG];
char grade_id[LEN_STEELGRADE - 1];
int grade_version;
char ladle_open_time[LEN_TIME_DATE];
char ladle_close_time[LEN_TIME_DATE];
int ladle_no;
int ladle_turret_arm_no;
char ladle_shroud_type[LEN_LADDLE_SHROUD];
char ladle_shroud_gasket_type[LEN_SHROUD_GASKET];
int tundish_car_no;
char tundish_flux_type[LEN_TUND_FLUX];
char sen_type[LEN_SEN_TYPE];
char mld_powder_type[LEN_MLD_PWDR_TYPE];
int net_steel_wght_ldl_ldl_op;
int net_steel_wght_ldl_ldl_cls;
int net_steel_wght_tund_ldl_op;
int net_steel_wght_tund_ldl_cls;
/* yield data */
int wght_lss_fr_head_crops;
int wght_lss_fr_tail_crops;
int wght_lss_fr_samples;
int wght_lss_fr_cropping;
int wght_lss_fr_tund_skull;
int total_cast_time_heat;
#if 0
/* NOT USED FOR ISPAT ++++++++++++++++++++++++++++++++++
char tundish_id[LEN_TUND_ID];
int tund_acc_wght;
int tund_min;
int tund_heat;
char stopper_rod_id[LEN_STOPPER_ROD];
char mld_fix_side_id[LEN_SIDE_ID];
char mld_loose_side_id[LEN_SIDE_ID];
double mld_fix_side_thick;
double mld_loose_side_thick;
double mld_fix_side_coat_thick;
double mld_loose_side_coat_thick;
int mld_fix_side_acc_wght;
int mld_fix_side_min;
int mld_fix_side_heat;
int mld_loose_side_acc_wght;
int mld_loose_side_min;
int mld_loose_side_heat;
char mld_left_id[LEN_SIDE_ID];
char mld_right_id[LEN_SIDE_ID];
double mld_left_thick;
double mld_right_thick;
double mld_left_side_coat_thick;
double mld_right_side_coat_thick;
int mld_left_acc_wght;
int mld_left_min;
int mld_left_heat;
int mld_right_acc_wght;
int mld_right_min;
int mld_right_heat;
int64 ladle_open_time;
int64 ladle_close_time;
char heat_grade[LEN_STEELGRADE - 1];
int ldl_temp_at_lmf_exit;
int64 time_of_temp_taken;
int no_thin_slabs;
segment data
int no_segment;
struct str_segment_data segment_data[MAX_NO_SEGMENT];
/* heat production events */
int no_events;
struct str_heat_prd_event heat_prd_event_1[1];
/* crew data */
char shift_id;
int64 start_shift_time;
#endif
};
/*****************************************************************************/
struct str_event_timing_cpc /* structure for Caster Event and Timing */
{
struct str_header_add_cpc add_head;
char event_code[LEN_EVENT_CODE - 1];
int64 est_ladle_end_time;
char station_id[LEN_STATION_ID];
char heat_id[LEN_HEAT_ID - 1];
/* 18.12.96, ht */
char steelgrade[LEN_STEELGRADE - 1];
int net_steel_weight_ladle;
int net_steel_weight_tund;
int ladle_no;
int64 dati_event;
};
/*****************************************************************************/
struct str_start_rec_mafo_proc
{
int dummy;
};
struct str_end_rec_mafo_proc
{
int dummy;
};
struct str_cut_made_mafo_proc
{
int sequ_id;
char heat_id_smc[LEN_HEAT_ID - 1];
int slab_pos;
int slab_beg_cast_cntr;
int slab_end_cast_cntr;
/* 09.12.96 ht added by GS */
/* char slab_id[LEN_SLAB_ID];*/
char slab_id[LEN_SLAB_ID];
char slab_type[LEN_SLAB_TYPE];
};
struct str_conf_change_prod_proc /* confirmation of order data */
{
char dati_schedule[LEN_TIME_DATE];
char station_id[LEN_STATION_ID];
char heat_id_plan[LEN_L3_HEAT_ID];
char flag_accept[LEN_FLAG_ACCEPT];
double heat_lock_code;
double slab_lock_code;
};
/*****************************************************************************/
struct str_fast_cyc_proc_dnsp
{
int fast_cyc_slab_beg_idx;
int sequ_id;
char heat_id_smc[LEN_HEAT_ID - 1];
int slab_pos;
int slab_beg_cast_cntr;
int slab_end_cast_cntr;
/* 09.12.96 ht */
/* char slab_id[LEN_SLAB_ID]; */
char slab_type[LEN_SLAB_TYPE];
};
/*****************************************************************************/
struct str_slow_cyc_proc_dnsp
{
int slow_cyc_slab_beg_idx;
int sequ_id;
char heat_id_smc[LEN_HEAT_ID - 1];
int slab_pos;
int slab_beg_cast_cntr;
int slab_end_cast_cntr;
/* 09.12.96 ht */
/* char slab_id[LEN_SLAB_ID];*/
char slab_type[LEN_SLAB_TYPE];
};
struct str_end_of_cast_dnsp /* struct for end of cast to SMC thro dnsp */
{
char heatno[LEN_HEAT_ID - 1]; /* heat id - actual heat */
char retrno; /* retreatment no - actual heat */
int casseq; /* caster sequence no - next heat */
short int hseqno; /* heat sequence(position) no- next */
char stgrad[LEN_STEELGRADE - 1]; /* steel grade */
char endcast[LEN_TIME_DATE_NET];/* end of casting */
float remw; /* remaining weight in ladle */
};
struct str_heat_lost_dnsp /* struct for heat lost to SMC thro dnsp */
{
char heatno[LEN_HEAT_ID - 1]; /* heat id - actual heat */
char retrno; /* retreatment no - actual heat */
int casseq; /* caster sequence no - next heat */
short int hseqno; /* heat sequence(position) no- next */
char stgrad[LEN_STEELGRADE - 1]; /* steel grade */
};
struct str_caster_status_dnss /* struct for caster status to SMC */
{
short int status; /* caster status */
char oper_begin[LEN_TIME_DATE_NET];/* casting operation begin*/
char oper_end[LEN_TIME_DATE_NET];/* casting operation end*/
};
/* vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/
/* END OF STRUCTURES FOR ISPAT MESSAGES **************************************/
/* define INTERNAL message-queue descriptor **********************************/
struct msg_buf
{
Q_address queue_number; /* Actual queue number */
int32 queue_type; /* Queue type for PAMS_ATTACH_Q */
char queue_name[MBX_NAME_LEN]; /* Queue name for PAMS_ATTACH_Q */
int32 queue_name_length; /* Length of queue name */
short int buf_size; /* Message size */
char priority; /* Message priority */
short int class; /* Message class code */
short int type; /* Message type code */
char delivery; /* Delivery mode */
char uma; /* Undeliverable msg action */
q_address resp_q; /* Response queue */
int32 select; /* Message selection mask */
int32 timeout; /* Time to wait for message */
Q_address address; /* Queue address */
int32 attach_mode; /* Attach mode for PAMS_ATTACH_Q */
int32 del_psb_status;
uint32 seq_number[2];
short int confirmed; /* Confirmation flag */
union
{
char all[MBXBUF_LEN]; /* Message buffer */
double val[TELMAX_VALUES + 1];
int int_val[TELMAX_VALUES + 1];
struct str_timer_expired timer_msg;
struct str_err_msg err_msg; /* Error message */
struct str_err_msg_syfo err_msg_syfo; /* Error message box */
struct str_log_msg log_msg; /* Message logging */
struct str_log_dev log_dev; /* Logging device */
sh_datim send_date; /* date as short int */
/* ------ MESSAGE DEFINITIONS FOR ISPAT ---------------------------------- */
/* vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv */
struct str_event_ince_mafo event_ince_mafo; /* write message */
struct str_values_600_inat_mafo values_600_inat_mafo; /* message from INAT */
struct str_values_600_mafo_inat values_600_mafo_inat; /* message from MAFO */
struct str_event_copt_mafo event_copt_mafo; /* message from COPT */
struct str_transpoint_them_mafo transpoint_them_mafo; /* transition point heat to heat */
struct str_transend_atra_mafo transend_atra_mafo; /* transition zone heat to heat */
struct str_new_heat_data_mafo new_heat_data_mafo; /* new heat data */
struct str_ladle_open_mafo_them ladle_open_mafo_them; /* ladle open THEM */
struct str_new_val_inav_them new_val_inav_them; /* new val to calc. */
struct str_ladle_open_mafo_atra ladle_open_mafo_atra; /* ladle open ATRA */
struct str_new_ta_heda_atra new_ta_heda_atra; /* new val to calc. */
struct str_mafo_dele mafo_dele; /* */
struct str_slb_pre_inf_dnss slb_pre_inf_dnss; /* slab pre inform. */
struct str_slb_post_inf_dnss slb_post_inf_dnss; /* slab post inform. */
struct str_slb_report_dnss slb_report_dnss; /* slab report */
struct str_anlys_data_dnss analys_data_dnss; /* analysis data */
struct str_ladle_open_mafo_koki ladle_open_mafo_koki; /* */
struct str_cut_made_mafo_koki cut_made_mafo_koki; /* cut made from BA */
struct str_cut_made_mafo_proc cut_made_mafo_proc; /* cut made from mafo*/
struct str_start_rec_mafo_proc start_rec_mafo_proc; /* start recording */
struct str_end_rec_mafo_proc end_rec_mafo_proc; /* end recording */
struct str_conf_change_prod_proc conf_change_prod_proc; /* confirmation of order data */
struct str_st_cast_mafo_copt st_cast_mafo_copt; /* ladle open first heat */
struct str_ladle_ch_mafo_copt ladle_ch_mafo_copt; /* ladle change */
struct str_cut_made_mafo_copt cut_made_mafo_copt; /* cut made from BA */
struct str_oper_cut_dial_copt oper_cut_dial_copt; /* oper modified len. from dial.*/
struct str_ladle_clse_mafo_hpac ladle_clse_mafo_hpac; /* process ladle close */
struct str_ladle_open_mafo_hpac ladle_open_mafo_hpac; /* ladle open HPAC */
struct str_cut_made_mafo_quic cut_made_mafo_quic; /* cut made from BA */
struct str_send_qual_quic_dnsp send_qual_quic_dnsp; /* send quality data */
/* to CPC */
struct str_events_d_ba_ince events_d_ba_ince; /* process events SNRX BA_D */
struct str_events_oper_ince events_oper_ince; /* process events INOE dialog */
struct str_values_100_ba_inav values_100_ba_inav; /* high level casting values */
struct str_values_200_ba_inav values_200_ba_inav; /* low level casting values */
struct str_values_300_ba_inav values_300_ba_inav; /* cooling casting values */
struct str_values_600_ba_inat values_600_ba_inat; /* more crop, cut made */
struct str_msg_400_syfa_aset msg_400_syfa_aset; /* send message 400 */
/* alarms from SYFA */
struct str_msg_hpac_aset msg_hpac_aset; /* send rec. speed */
struct str_msg_500_mafo_aset msg_500_mafo_aset; /* send message 500 ref.val.caster */
struct str_msg_501_mafo_aset msg_501_mafo_aset; /* send message 501 ref.val.caster */
struct str_msg_502_mafo_aset msg_502_mafo_aset; /* send message 502 ref.val.caster */
/* PL+ APC */
struct str_msg_setp_apc msg_setp_apc; /* send msg. setpoints from apc */
/* PL- */
struct str_msg_700_mafo_aset msg_700_mafo_aset; /* send message 700 ref.cut/mould */
struct str_msg_800_koki_aset msg_800_koki_aset; /* send message 800 ref.cut/mould */
struct str_setpoints_cool_aset setpoints_cool_aset; /* send new setpoints to ASET */
struct str_heat_data_dnrs_heda heat_data_dnrs_heda; /* send msg. heatdata from SMC */
struct str_estlftim_dnrs_heda estlftim_dnrs_heda; /* send msg. est. l. time from SMC */
struct str_anal_tund_dnrs_heda anal_tund_dnrs_heda; /* send msg. anal/ tund from LAB */
struct str_feed_back_dnrm_wiga feed_back_dnrm_wiga; /* write message in DB */
struct str_cut_made_mafo_slar cut_made_mafo_slar; /* cut made from MAFO */
struct str_heat_end_mafo_slar heat_end_mafo_slar; /* heat end from MAFO */
struct str_st_watch_koki_kokw st_watch_koki_kokw; /* start to watch mould width */
struct str_cast_event_ince_qevp cast_event_ince_qevp; /* process events */
struct str_acqui_val_inav_qevp acqui_val_inav_qevp; /* process events */
struct str_process_oper_qevp process_oper_qevp; /* process events from operator */
struct str_castmodon_mafo_qevp castmodon_mafo_qevp; /* process notification */
struct str_event_ince_elog event_ince_elog; /* write message */
struct str_event_inat_elog event_inat_elog; /* write message */
/*struct str_cast_start_mafo_cool cast_start_mafo_cool; /* send message start */
/*struct str_stop_mafo_cool stop_mafo_cool; /* send message stop */
struct str_ladle_open_mafo_mntn ladle_open_mafo_mntn; /* send msg MNTN */
struct str_cut_made_mafo_mntn cut_made_mafo_mntn; /* send msg MNTN */
struct str_cast_start_mafo_rccr cast_start_mafo_rccr;
struct str_ladle_open_mafo_rccr ladle_open_mafo_rccr;
struct str_ladle_close_mafo_rccr ladle_close_mafo_rccr;
struct str_end_width_change_kokw_rccr end_width_change_kokw_rccr;
struct str_start_width_change_kokw_rccr start_width_change_kokw_rccr;
struct str_cut_made_mafo_rccr cut_made_mafo_rccr;
struct str_break_mafo_rccr break_mafo_rccr;
struct str_tund_close_mafo_rccr tund_close_mafo_rccr;
struct str_trans_mafo_rccr trans_mafo_rccr;
struct str_val_aset_snsx setpoint_dialog_aset; /* telegr. to H1-Handler */
struct str_val_aset_snsx val_aset_snsx; /* telegr. to H1-Handler */
struct str_status_val_aset_snsx status_val_aset_snsx; /* telegr. to H1-Handler */
struct str_conn_broken_snrx_snsx conn_broken; /* connection broken receive task */
struct str_sched_req_cpc sched_request; /* schedule request */
struct str_cut_pic_data_cpc cut_pic_data; /* cut piece data */
struct str_obs_data_cpc obs_data; /* observation data */
struct str_fast_cyc_proc_dnsp fast_cyc_proc_dnsp;
struct str_slow_cyc_proc_dnsp slow_cyc_proc_dnsp;
struct str_heat_prd_dat_shrt heat_prd_data; /* heat production data */
struct str_event_timing_cpc event_timing; /* caster event and timing */
struct str_req_time_hpac_dnsp req_time_hpac_dnsp; /* data from HPAC to DNSS */
struct str_end_of_cast_dnsp end_of_cast_dnss; /* data to DNSS */
struct str_heat_lost_dnsp heat_lost_dnss; /* data to DNSS */
struct str_caster_status_dnss caster_status_dnss; /* data to DNSS */
/* dialog mbx-structures */
struct str_mess_no_oper_inav mess_no_oper_inav; /* mess_no changed */
struct str_dba_upd_dial_dbsv dba_upd_dial_dbsv; /* update shared mem */
} buf;
};
/* vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/
/* END DEFINITIONS FOR ISPAT ************************************************/
/* prototypes for mailbox functions ******************************************/
int assign_mailbox ( struct msg_buf *msg_q, char *mbx_name );
void dassign_mailbox ( void );
int wait_for_telegram ( struct msg_buf *msg_q );
int read_telegram ( struct msg_buf *msg_q );
int locate_mailbox ( struct msg_buf *msg_q, char *mbx_name );
int send_telegram ( struct msg_buf *msg_q );
int send_telegram_wom ( struct msg_buf *msg_q );
int confirm_telegram ( void );
void attach_own_mailbox ( char *prc_name );
int attach_tmp_mailbox ( void );
int attach_other_mailbox ( struct msg_buf *msg_qs, char *prog_name );
int set_timer ( int num_seconds, int32 timer_id );
int stop_timer ( int32 timer_id );
int send_msg ( short int err_code, long err_status,
int location, char *syfa_msg );
int f_send_msg_to_syfa ( short int err_code, long err_status,
int location, char *syfa_msg );
void f_print_err_msg ( struct str_err_msg *err_msg );
#endif
/******************************************************************************
S M S
-----
project : Caster Computer
filename : __prj[.SOURCE.UTIL]UTIL.H
version : 0.0
description : include file for utilities
author : ht
creation : 06-MAR-1996
update : 15-MAY-1996, ht
******************************************************************************/
/* header file define-constant ***********************************************/
#ifndef UTIL_H
#define UTIL_H
/* standard includes ********************************************************/
#include <timeb.h> /* extended time functions */
/* macro defines *************************************************************/
#define M_PRINTLOG(p1,p2,p3,p4,p5) \
sprintf ( log_msg_buf, p2, p3, p4, p5 ); \
printlog ( p1, log_msg_buf );
/* typedefs ******************************************************************/
/* typedef for VARCHAR-structures in C-files */
/* (only for compatibility purposes) */
typedef struct
{
unsigned short len; /* length of character array */
unsigned char arr[1]; /* character array */
} __var_char;
/* global variables **********************************************************/
/* global buffer for creating logging messages */
EXTERN char log_msg_buf[512];
EXTERN struct msg_buf msg_qs_qevp; /* send buffer for ... */
EXTERN struct msg_buf msg_qs_mafo; /* send buffer for ... */
/* item list structures ******************************************************/
/* item list type 3 */
typedef struct
{
unsigned short buf_len; /* buffer length */
unsigned short itmcod; /* item code */
char *bufadr; /* buffer adress */
int *ret_len_adr; /* return length adress */
} item_list_t3;
typedef union
{
item_list_t3 item; /* item list */
int endlist; /* end of item list */
} item_list3;
/* IO-STATUS BLOCK structure *************************************************/
typedef struct
{
unsigned short iostat; /* status */
unsigned short msg_len; /* count of received bytes */
int pid; /* device information */
} iosb;
/* IO-STATUS BLOCK structure *************************************************/
typedef struct
{
__int64 iostat; /* status */
} iosb3;
/* prototypes ****************************************************************/
/* utility functions */
void printlog ( int debug_level, char *msg );
int f_print_error ( int err_level );
void f_set_vms_sys_tim ( int64 *vms_sys_tim );
void f_get_vms_sys_tim ( int64 *cur_time_date );
void f_get_asc_ms_time_date ( char *cur_time_date, int *msec );
void f_get_asc_date_time ( char *asc_date,
char *asc_time );
void convert_vms_time_to_asc ( int64 vms_time, char *cur_time_date,
int *msec );
void convert_asc_time_to_vms ( char *cur_time_date, int64 *vms_time,
int msec );
void f_get_short_date_time ( sh_datim short_datim );
void del_trail_char ( char *in_string, char del_char );
void del_leading_char ( char *in_string, char del_char );
void str_tolower ( char *string );
void str_toupper ( char *string );
void expand_string ( char *string, int len );
void strncpb ( char *out, int len_max, char *in, int len_str );
void c2db ( char *c_string, __var_char *db_varchar,
size_t max_char );
void db2c ( __var_char *db_varchar, char *c_string );
int copy_db ( __var_char *db_dat1, __var_char *db_dat2);
void flag_not_null (char *flag);
int mult_weight ( int len, int width, int thickness,
int spec_weight );
void generate_cast_seq_id ( int cast_seq, char *cast_seq_id);
void convert_double_GTOIEEE ( double *value );
void convert_float_GTOIEEE ( float *value );
void convert_double_IEEETOG ( double *value );
void convert_float_IEEETOG ( float *value );
int get_process_name ( unsigned short buflen, char *process_name );
int control_aval_values ( struct control_aval *value_ptr );
/* dba functions */
int connect_to_dba ( void );
void disconnect_dba ( void );
void sql_error ( short int err_code, int location, char *syfa_msg,
char *msg );
int read_ora_pipe (char *pipe_name,char *receive_message ,int time_out);
int sys$getjpiw ( unsigned long efl,
unsigned long *pid_adr,
char *prc_name,
unsigned long *item_list,
__int64 *iosb,
int *ast_adr,
unsigned long ast_parm );
#endif
--- End Message ---