Author Topic: ccp excample source code  (Read 21054 times)

Quax76

  • Guest
ccp excample source code
« on: January 20, 2011, 12:17:02 PM »
Conversion.idl

CCP_TI_v525 Conversion 002A
{
   #xclass Conversion
   {
      S32 Celsius(S32 fahrenheit)
      {
      }
   }
}

Quax76

  • Guest
Re: ccp excample source code
« Reply #1 on: January 20, 2011, 12:17:34 PM »
Conversion.c

//FILE: Conversion.c
//IDL Type: CCP_TI_v525
//IDL Name: Conversion
//IDL Version: 002A
//IDL CheckSum: 1C5B
//This file is automatically generated by RatatoskT3,
//so change it only if you know what you are doing...
#include "./CCP_TI_v525.h"
#include "./Conversion.h"

//XCLASS methods:

//XCLASS Conversion

//shared data (Do not use directly, use "SELF->SHARED" instead):
Conversion_1C5B_SHARED_TYPE Conversion_1C5B_SHARED_INSTANCE;

S32 Conversion_Celsius(Conversion * SELF, S32 fahrenheit)
{
   return (fahrenheit - 32) * 5 / 9;}


//Variables:

//Functions:

Quax76

  • Guest
Re: ccp excample source code
« Reply #2 on: January 20, 2011, 12:18:13 PM »
CCP_TI_v525.h


#ifndef CCP_TI_v525_H
#define CCP_TI_v525_H
   #ifdef CCP_TI_v525
      typedef unsigned char   BOOL;
      typedef unsigned char   U8;
      typedef signed char      S8;
      typedef unsigned int   U16;
      typedef signed int      S16;
      typedef unsigned long   U32;
      typedef signed long      S32;
   #endif
#endif

Quax76

  • Guest
Re: ccp excample source code
« Reply #3 on: January 20, 2011, 12:18:50 PM »
Conversion.h

//FILE: Conversion.h
//IDL Type: CCP_TI_v525
//IDL Name: Conversion
//IDL Version: 002A
//IDL CheckSum: 1C5B
//This file is automatically generated by RatatoskT3,
//so change it only if you know what you are doing...

#ifndef _CONVERSION_H
#define _CONVERSION_H



//XCLASS structs:

//XCLASS Conversion
//Shared class data:
typedef struct
{
   U32 INITFLAG; //do not write to this field!
} Conversion_1C5B_SHARED_TYPE;
extern Conversion_1C5B_SHARED_TYPE Conversion_1C5B_SHARED_INSTANCE;
typedef struct
{
   U32 RESERVED; //do not write to this field!
   Conversion_1C5B_SHARED_TYPE *  SHARED; //do not write to this field!
} Conversion;

//XCLASS headers:

//XCLASS Conversion
extern S32 Conversion_Celsius(Conversion * SELF, S32 fahrenheit);


//XCLASS macros (only used by PLUS+1 GUIDE):

//XCLASS Conversion
#define _CALL_Conversion_INIT(SELF)\
   if(!Conversion_1C5B_SHARED_INSTANCE.INITFLAG)\
   {\
      Conversion_1C5B_SHARED_INSTANCE.INITFLAG = 1;\
   }\
   SELF.SHARED = &Conversion_1C5B_SHARED_INSTANCE;

//Conversion does not have a process function, empty macro:
#define _CALL_Conversion_PROCESS(SELF)

//GUIDE wrapper for method: Conversion.Celsius
#define _CALL_Conversion_Celsius(SELF, CONDITION, FAHRENHEIT_MACRO, CELSIUS_MACRO)\
   if(CONDITION)\
   {\
      CELSIUS_MACRO = Conversion_Celsius(&SELF, FAHRENHEIT_MACRO);\
   }



//Externals:

#endif

Quax76

  • Guest
Re: ccp excample source code
« Reply #4 on: January 20, 2011, 12:22:01 PM »
command lines:

cl2000 Conversion.c -d "CCP_TI_v525" -pm -me -o3 -q -g -pdr -pdv -pden -pdse225 -pds303 -d "LARGE_MODEL" -ml -v28
ar2000 -r Conversion.lib Conversion.obj

radioact

  • Guest
Re: ccp excample source code
« Reply #5 on: January 28, 2011, 07:02:02 PM »
Perfect Thanks,

Tyler