/*-------------------------------------------------------------------------
 * Name: adaptor.h
 * Author: ITEX C Code Generator
 *
 * Copyright 1991-98 Telelogic AB, All rights reserved.
 * 
 * This Program is owned by Telelogic and is protected by national
 * copyright laws and international copyright treaties. Telelogic
 * grants you the right to use this Program on one computer or in one
 * local computer network at any one time.  Under this License you may
 * only modify the source code for the purpose of adapting it to your
 * environment. You must reproduce and include any copyright and
 * trademark notices on all copies of the source code.  You may not
 * use, copy, merge, modify or transfer the Program except as provided
 * in this License.  Telelogic does not warrant that the Program will
 * meet your requirements or that the operation of the Program will be
 * uninterrupted and error free. You are solely responsible that the
 * selection of the Program and the modification of the source code
 * will achieve your intended results and that the results are
 * actually obtained.
 *
 * Description:
 *  This header file is a template file generated by the ITEX C Code
 *  Generator to provide the user with a quick way to get started with
 *  the adaptation process.
 */

#ifndef ADAPTOR_H
#define ADAPTOR_H

#include <stdio.h>

/*-------------------------------------------------------------------------
 * These are the functions of the GCI operational interface. The adaptation
 * process is the process of implementing these functions to allow the
 * generated code to communicate with the system to be tested. Here is a 
 * short description of what the functions must do:
 *
 * GciSend          - Send something to the IUT through a PCO
 * GciImplicitSend  - Send something to the IUT, not through a PCO (but for
 *                    example to the test operator) to affect the current
 *                    status of the IUT
 * GciStartTimer    - Start a given timer
 * GciCancelTimer   - Cancel a given timer
 * GciReadTimer     - Read the value of a given timer
 * GciSnapshot      - Check the status of the receive channels, timers and
 *                    possibly test components (concurrent TTCN)
 * GciLog           - Function used for logging
 * GciConfig        - Create configuration (concurrent TTCN)
 * GciCreate        - Create test component (concurrent TTCN)
 */

GciStatus GciSend( int pco, GciValue* object );
GciStatus GciImplicitSend( GciValue* object );
GciStatus GciStartTimer( GciTimerID timer, long value, int unit );
GciStatus GciCancelTimer( GciTimerID timer );
long GciReadTimer( GciTimerID timer );
GciStatus GciSnapshot( );
GciStatus GciConfig( GciConf conf );
GciStatus GciCreate( int comp, char* tree, GciValue* args );
GciStatus GciLog( int logId, const char* logString );
void GciLogPrint( const char* string, const char* logString, int isRow );

extern GciValue* GciReadTSPar( char* par, char* pRef );

/*------------------------------------------------------------------------
 * Global definition of the Log Stream used by the GciLog function, might
 * be used by other user written code in order to have a conformant logging.
 */

extern FILE * logStream;

#endif /* ADAPTOR_H */
