Completed Sim01 afaik

+- configops.c/h
+- metadataops.c/h
+- StandardConstants.h
This commit is contained in:
Charles Descamps 2024-01-31 02:33:40 -07:00
parent e19542c060
commit 7b837ddf86
5 changed files with 723 additions and 87 deletions

View file

@ -34,7 +34,16 @@ typedef enum {CPU_SCHED_SJF_N_CODE,
typedef struct ConfigDataTypeStruct
{
double version;
char metaDataFileName[STD_STR_LEN];
int cpuSchedCode; // will need to be changed?
int quantumCycles;
bool memDisplay; // will need to be changed?
int memAvailable;
int procCycleRate;
int ioCycleRate;
int logToCode; // will need to be changed?
char logToFileName[STD_STR_LEN]; // will need to be changed?
} ConfigDataType;
/*
@ -90,6 +99,18 @@ Dependencies: copyString, fopen, getStringToDelimiter, compareString, fclose,
bool getConfigData(const char *fileName,
ConfigDataType **configData, char *endStateMsg);
/*
Name: getCpuSchedCode
Process: converts cpu schedule string to code (all scheduling possibilities)
Function Input/Parameters: lower case code string (const char *)
Function Output/Parameters: none
Function Output/Returned: cpu schedule code (ConfigDataCodes)
Device Input/Device: none
Device Output/Device: none
Dependencies: compareString
*/
ConfigDataCodes getCpuSchedCode(const char *lowerCaseCodeStr);
/*
Name: getDataLineCode
Process: converts leader line string to configuration code value
@ -105,13 +126,14 @@ ConfigCodeMessages getDataLineCode(const char *dataBuffer);
/*
Name: getLogToCode
Process: ???
Function Input/Parameters: none
Process: converts "log to" text to
configuration data code (three log to strings)
Function Input/Parameters: lower case log to string (const char *)
Function Output/Parameters: none
Function Output/Returned: none
Function Output/Returned: configuration data code value
Device Input/Device: none
Device Output/Device: none
Dependencies: ???
Dependencies: compareString
*/
ConfigDataCodes getLogToCode(const char *lowerCaseLogToStr);