The following source file, led by a gray banner, contains all the class functions needed for Project MatPlot. The sections highlighted by a yellow background Color are manually entered. Code sections with white background color are generated by the SansGUI Source Code Framework. The source file is compiled into a dynamic linked library to be invoked by SansGUI during simulation runs.
Functions in Class Matrix.MyMatrix
For more details about this example, please read A Tour of SansGUI Examples in the SansGUI Getting Started Guide.
Functions in Class Matrix.MyMatrix [Go To Top] |
/*
Matrix_MyMatrix.c #include <stdio.h> |
#include <string.h> |
#include "SGdll.h" #ifdef
__cplusplus SG_EXPORT
SG_SIM_FUNC SG_xEndEdit_Matrix_MyMatrix; #ifdef
__cplusplus /*
Macros for attribute indices in class version [1.0.alpha.3] */ |
#define
SG_NDX_NCYCLE 3 /* from SimCtrl.Cycle.MatPlot class */ |
/*
============================================================
if (!SG_IsSchemaOK(self->nSGobjSchema)) /* TODO: put your simulator code here */ |
self->zValues[SG_NDX_ICOLS].iData[0] = 2; |
return SG_R_OK; /*
============================================================ |
FLOAT fRadians; |
if (!SG_IsSchemaOK(self->nSGobjSchema)) /* TODO: put your simulator code here */ |
if (iCols < 2)
for (i = 0; i < iRows; i++) |
return SG_R_OK; /*
============================================================ |
const INT nCycle = simCtrl->zValues[SG_NDX_NCYCLE].iData[0]; |
if (!SG_IsSchemaOK(self->nSGobjSchema)) /* TODO: put your simulator code here */ |
if (iCols < 2)
if (iRows < 1)
/* look up value from matrix */
/* calculate sum of data */ |
return SG_R_OK; |
SansGUI Modeling and Simulation Environment version 1.2
Copyright © 2000-2003 ProtoDesign, Inc. All rights reserved.