27 aug 2009 12:27
27 aug 2009 12:33
27 aug 2009 13:20
wolf schreef:wil een back up maken op een externe harde schijf via time machine, maar hij kan de externe harde schijf niet vinden, iemand?
overigens ben ik van meninig dat de oude porsches de besten zijn
27 aug 2009 13:51
27 aug 2009 14:14
27 aug 2009 15:41
wolf schreef:overigens ben ik van meninig dat de oude porsches de besten zijn
27 aug 2009 15:53
27 aug 2009 16:28
27 aug 2009 16:49
27 aug 2009 16:57
27 aug 2009 17:10
27 aug 2009 17:12
27 aug 2009 17:23
27 aug 2009 17:24
27 aug 2009 17:26
27 aug 2009 17:29
wolf schreef:@ marco > que?
/* Base_Constant.c
* - DLL routines for class <Component>Base.Constant
* DATE: Sunday, April 21, 2002 TIME: 11:47:43 AM
* The skeleton of this file is generated by SansGUI(tm)
*/
#include <stdio.h>
#include "SGdll.h"
#include "../Calc_1_1/Calc.h"
#ifdef __cplusplus
extern "C"
{
#endif
SG_EXPORT SG_SIM_FUNC SG_xBgnRun_Base_Constant;
#ifdef __cplusplus
}
#endif
/* Macros for attribute indices in class version [1.1.0.0] */
#define SG_NDX_FVALUE 0 /* fValue - Value */
/* ============================================================
* SG_xBgnRun - Begin Run
* ------------------------------------------------------------
*/
SG_RET_CODE SG_xBgnRun_Base_Constant(SG_OBJ *const self,
SG_OBJ *const simCtrl, SG_OBJ *const chgChild,
SG_OBJ *const refObjs[], const INT *const piRefObjs,
SG_OBJ *const adjObjs[], const INT *const piAdjObjs,
SG_OBJ *const lnkObjs[], const INT *const piLnkObjs,
TCHAR *const cMessage, const INT iMsgLen,
TCHAR *const cCommand, const INT iCmdLen,
SG_FILE *const pOutFile )
{
/* TODO: declare your local variables here */
INT i;
FLOAT *pfValue = &self->zValues[SG_NDX_FVALUE].fData[0];
if (!SG_IsSchemaOK(self->nSGobjSchema))
return SG_R_SCHM;
/* TODO: put your simulator code here */
/* Deposit the constant value to all the output links, if any */
for (i = 0; i < *piLnkObjs; i++)
{
if (lnkObjs[i]->zValues[SG_NDX_LNK_IINFO].iData[0] == SG_LINK_OUT)
lnkObjs[i]->zValues[SG_NDX_LNK_FVALUE].fData[0] = *pfValue;
}
return SG_R_OK;
}
Functions in Class Base.Variable [Go To Top]
/* Base_Variable.c
* - DLL routines for class <Component>Base.Variable
* DATE: Sunday, April 21, 2002 TIME: 11:47:43 AM
* The skeleton of this file is generated by SansGUI(tm)
*/
#include <stdio.h>
#include "SGdll.h"
#include "../Calc_1_1/Calc.h"
#ifdef __cplusplus
extern "C"
{
#endif
SG_EXPORT SG_SIM_FUNC SG_xInit_Base_Variable;
SG_EXPORT SG_SIM_FUNC SG_xEval_Base_Variable;
#ifdef __cplusplus
}
#endif
/* Macros for attribute indices in class version [1.0.0.0] */
#define SG_NDX_FVALUE 0 /* fValue - Variable Value */
/* ============================================================
* SG_xInit - Initialization
* ------------------------------------------------------------
*/
SG_RET_CODE SG_xInit_Base_Variable(SG_OBJ *const self,
SG_OBJ *const simCtrl, SG_OBJ *const chgChild,
SG_OBJ *const refObjs[], const INT *const piRefObjs,
SG_OBJ *const adjObjs[], const INT *const piAdjObjs,
SG_OBJ *const lnkObjs[], const INT *const piLnkObjs,
TCHAR *const cMessage, const INT iMsgLen,
TCHAR *const cCommand, const INT iCmdLen,
SG_FILE *const pOutFile )
{
/* TODO: declare your local variables here */
INT i;
FLOAT *pfValue = &self->zValues[SG_NDX_FVALUE].fData[0];
if (!SG_IsSchemaOK(self->nSGobjSchema))
return SG_R_SCHM;
/* TODO: put your simulator code here */
/* Deposit the current value to all input link, if exists */
/* This is to avoid the initial value from being wiped off */
for (i = 0; i < *piLnkObjs; i++)
{
if (lnkObjs[i]->zValues[SG_NDX_LNK_IINFO].iData[0] == SG_LINK_IN)
{
lnkObjs[i]->zValues[SG_NDX_LNK_FVALUE].fData[0] = *pfValue;
break; /* there should only be one input link */
}
}
return SG_R_OK;
}
/* ============================================================
* SG_xEval - Evaluation
* ------------------------------------------------------------
*/
SG_RET_CODE SG_xEval_Base_Variable(SG_OBJ *const self,
SG_OBJ *const simCtrl, SG_OBJ *const chgChild,
SG_OBJ *const refObjs[], const INT *const piRefObjs,
SG_OBJ *const adjObjs[], const INT *const piAdjObjs,
SG_OBJ *const lnkObjs[], const INT *const piLnkObjs,
TCHAR *const cMessage, const INT iMsgLen,
TCHAR *const cCommand, const INT iCmdLen,
SG_FILE *const pOutFile )
{
/* TODO: declare your local variables here */
INT i;
FLOAT *pfValue = &self->zValues[SG_NDX_FVALUE].fData[0];
if (!SG_IsSchemaOK(self->nSGobjSchema))
return SG_R_SCHM;
/* TODO: put your simulator code here */
/* take input value, should have at most one link */
for (i = 0; i < *piLnkObjs; i++)
{
if (lnkObjs[i]->zValues[SG_NDX_LNK_IINFO].iData[0] == SG_LINK_IN)
{
*pfValue = lnkObjs[i]->zValues[SG_NDX_LNK_FVALUE].fData[0];
break; /* Connectivity rule limits to one input link */
}
}
/* Deposit the resulting value to all the output links, if any */
for (i = 0; i < *piLnkObjs; i++)
{
if (lnkObjs[i]->zValues[SG_NDX_LNK_IINFO].iData[0] == SG_LINK_OUT)
lnkObjs[i]->zValues[SG_NDX_LNK_FVALUE].fData[0] = *pfValue;
}
return SG_R_OK;
27 aug 2009 18:00
27 aug 2009 18:45
27 aug 2009 18:56
27 aug 2009 19:23
27 aug 2009 19:25
27 aug 2009 19:50
31 aug 2009 20:43
02 sep 2009 3:04
02 sep 2009 6:38