Object Data Representation


In the Simulation Run Time, the Object Data are passed around within SansGUI, within the simulator, and in-between SansGUI and the simulator. SansGUI uses Object Data Types to store model data.

Arrays of Data

All SansGUI object data are stored as arrays. Even when there is only an atomic value, it is in an array of one element with the offset 0. Please pay special attention to whether your programming environment supports 0-based (C) or 1-based (Fortran) array indices.

Object Data Types

 

Offset

Field

Value

0

day

1 - 31, depending on the month

1

month

1 - 12, from January to December

2

year

100 - 9999 representing the year

3

day of week

0 - 6 for Sunday through Saturday

4

day of year

1 - 365, or 366 if leap year

 

 

Offset

Field

Value

0

Hour

0 - 23, in 24 hour format

1

Minute

0 - 59

2

Second

0 - 59

 

R = Q / 65536

C = (Q % 65536) / 1000.0      where % is the modulo operation.

 

Offset

Field

Description

0

Direction

The direction of the link, from the self part point of view

1

Local Port

The port number used for the link in the self part

2

Remote Port

The port number used for the link in the adjacent part

3

Adjacent Part

The index of the linked adjacent part in the entire adjacent parts array

 

The SansGUI predefined macros for the first integer Direction field are:

 

Macro

Description

SG_LINK_ERR

The values in the link information array are invalid

SG_LINK_NO

No direction is indicated

SG_LINK_IN

The link goes into the self part, an input connection

SG_LINK_OUT

The link goes out of the self part, an output connection

 

Because the self part can be from either of the two end parts at different times during a simulation run, the link information in a link may be changed accordingly. These values are assigned by SansGUI automatically and shall be treated as constants by all the simulator and user overriding functions.

 



C:\FH_Suite\htmlgifs\home.gif GUI Control Data Representation SansGUI Data Type Funneling

SansGUI Modeling and Simulation Environment Version 1.2

Copyright © 2000-2003 ProtoDesign, Inc. All rights reserved.

http://protodesign-inc.com