Working on changes, maybe working?
This commit is contained in:
parent
7b837ddf86
commit
3af7742043
8 changed files with 127 additions and 74 deletions
|
|
@ -227,9 +227,9 @@ bool getStringConstrained(FILE *inStream, bool clearLeadingNonPrintable,
|
|||
// capture first value in stream using fgetc
|
||||
intChar = fgetc(inStream);
|
||||
// loop to clear non-printable or space if indicated
|
||||
while((((intChar != EOF) &&
|
||||
(clearLeadingNonPrintable && (intChar < (int)SPACE)))
|
||||
|| (clearLeadingSpace && (intChar == (int)SPACE))))
|
||||
while((intChar != EOF) &&
|
||||
((clearLeadingNonPrintable && intChar < (int)SPACE)
|
||||
|| (clearLeadingSpace && intChar == (int)SPACE)))
|
||||
{
|
||||
// get next character in stream using fgetc
|
||||
intChar = fgetc(inStream);
|
||||
|
|
@ -242,9 +242,9 @@ bool getStringConstrained(FILE *inStream, bool clearLeadingNonPrintable,
|
|||
return false;
|
||||
}
|
||||
// loop to get input from file stream
|
||||
while(((intChar != EOF && index < MAX_STR_LEN - 1) &&
|
||||
(stopAtNonPrintable && intChar >= (int)SPACE))
|
||||
|| ((!stopAtNonPrintable) && (intChar != (char)delimiter)))
|
||||
while((intChar != EOF && index < MAX_STR_LEN - 1) &&
|
||||
((stopAtNonPrintable && intChar >= (int)SPACE) || (!stopAtNonPrintable)) &&
|
||||
(intChar != (char)delimiter))
|
||||
{
|
||||
// [continues if not at end of file and max string len not reached ]
|
||||
// [AND continues if not printable flag set and characters printable ]
|
||||
|
|
|
|||
|
|
@ -35,15 +35,15 @@ typedef enum {CPU_SCHED_SJF_N_CODE,
|
|||
typedef struct ConfigDataTypeStruct
|
||||
{
|
||||
double version;
|
||||
char metaDataFileName[STD_STR_LEN];
|
||||
int cpuSchedCode; // will need to be changed?
|
||||
char metaDataFileName[MAX_STR_LEN];
|
||||
int cpuSchedCode;
|
||||
int quantumCycles;
|
||||
bool memDisplay; // will need to be changed?
|
||||
bool memDisplay;
|
||||
int memAvailable;
|
||||
int procCycleRate;
|
||||
int ioCycleRate;
|
||||
int logToCode; // will need to be changed?
|
||||
char logToFileName[STD_STR_LEN]; // will need to be changed?
|
||||
int logToCode;
|
||||
char logToFileName[MAX_STR_LEN];
|
||||
} ConfigDataType;
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ typedef struct OpCodeTypeStruct
|
|||
char strArg1[MAX_STR_LEN];
|
||||
int intArg2;
|
||||
int intArg3;
|
||||
int opEndTime;
|
||||
double opEndTime;
|
||||
struct OpCodeTypeStruct *nextNode;
|
||||
} OpCodeType;
|
||||
|
||||
|
|
|
|||
|
|
@ -15,5 +15,6 @@ Dependencies: ???
|
|||
*/
|
||||
void runSim(ConfigDataType *configPtr, OpCodeType *metaDataMstrPtr)
|
||||
{
|
||||
printf("runSim called here");
|
||||
// void function, no return.
|
||||
}
|
||||
12
Sim01/testfile.cnf
Normal file
12
Sim01/testfile.cnf
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
Start Simulator Configuration File:
|
||||
Version/Phase : 1.00
|
||||
File Path : testfile.mdf
|
||||
CPU Scheduling Code : FCFS-N
|
||||
Quantum Time (cycles) : 55
|
||||
Memory Available (KB) : 12000
|
||||
Memory Display (On/Off) : On
|
||||
Processor Cycle Time (msec) : 10
|
||||
I/O Cycle Time (msec) : 20
|
||||
Log To : Monitor
|
||||
Log File Path : logfile_1.lgf
|
||||
End Simulator Configuration File.
|
||||
40
Sim01/testfile.mdf
Normal file
40
Sim01/testfile.mdf
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
Start Program Meta-Data Code:
|
||||
sys start
|
||||
app start, 0
|
||||
dev in, hard drive, 18
|
||||
cpu process, 9
|
||||
cpu process, 9
|
||||
cpu process, 9
|
||||
dev out, monitor, 60
|
||||
app end
|
||||
app start, 0
|
||||
dev in, sound signal, 40
|
||||
dev in, hard drive, 30
|
||||
dev in, sound signal, 25
|
||||
cpu process, 6
|
||||
dev out, usb, 10
|
||||
app end
|
||||
app start, 0
|
||||
dev in, video signal, 70
|
||||
cpu process, 10
|
||||
dev out, monitor, 70
|
||||
dev in, hard drive, 18
|
||||
cpu process, 9
|
||||
app end
|
||||
app start, 0
|
||||
dev in, sound signal, 35
|
||||
dev out, monitor, 100
|
||||
dev in, keyboard, 50
|
||||
cpu process, 9
|
||||
dev out, video signal, 49
|
||||
app end
|
||||
app start, 0
|
||||
dev in, keyboard, 90
|
||||
dev out, sound signal, 40
|
||||
dev out, serial, 32
|
||||
cpu process, 10
|
||||
dev in, hard drive, 15
|
||||
app end
|
||||
sys end
|
||||
End Program Meta-Data Code.
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue