Initialize PA10, STUB Functions
++ PA10 Files ++ Makefile for PA10
This commit is contained in:
parent
d9e90f6501
commit
91ce50b189
17 changed files with 4154 additions and 0 deletions
74
PA10-1115/StateDataUtility.h
Normal file
74
PA10-1115/StateDataUtility.h
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
#ifndef DATA_UTILITIES_H
|
||||
#define DATA_UTILITIES_H
|
||||
|
||||
// header files
|
||||
#include "StandardConstants.h"
|
||||
|
||||
// data structures
|
||||
typedef struct StateStruct
|
||||
{
|
||||
char name[ STD_STR_LEN ];
|
||||
|
||||
double averageTemp, lowestTemp, highestTemp;
|
||||
|
||||
bool inUse;
|
||||
} StateDataType;
|
||||
|
||||
/*
|
||||
Name: setDataNodeFromData
|
||||
Process: sets given values into a given StateDataType struct,
|
||||
using individual struct data
|
||||
Function input/parameters: provided name (const char *),
|
||||
average, lowest, and highest temperatures (double),
|
||||
and node in use state
|
||||
Function output/parameters: updated state data pointer (StateDataType *)
|
||||
Function output/returned: none
|
||||
Device input/---: none
|
||||
Device output/---: none
|
||||
Dependencies: privateCopyString
|
||||
*/
|
||||
void setDataNodeFromData( StateDataType *nodePtr, const char *name,
|
||||
double avgTemp, double lowTemp, double highTemp, bool nodeState );
|
||||
|
||||
/*
|
||||
Name: setDataNodeFromStruct
|
||||
Process: sets given values into a given StateDataType struct,
|
||||
using another data struct
|
||||
Function input/parameters: provided state data source struct
|
||||
(const StateDataType)
|
||||
Function output/parameters: updated state data pointer (StateDataType *)
|
||||
Function output/returned: none
|
||||
Device input/---: none
|
||||
Device output/---: none
|
||||
Dependencies: setDataNodeFromData
|
||||
*/
|
||||
void setDataNodeFromStruct( StateDataType *nodePtr,
|
||||
const StateDataType source );
|
||||
|
||||
/*
|
||||
Name: stateDataToString
|
||||
Process: creates string from StateDataType data
|
||||
Function input/parameters: provided state data (const StateDataType)
|
||||
Function output/parameters: output string (char *)
|
||||
Function output/returned: none
|
||||
Device input/---: none
|
||||
Device output/---: none
|
||||
Dependencies: sprintf, or other options
|
||||
*/
|
||||
void stateDataToString( char *outStr, const StateDataType state );
|
||||
|
||||
/*
|
||||
Name: setEmptyDataNode
|
||||
Process: sets given node values to string "---", zero values,
|
||||
and Boolean in use variable to false
|
||||
Function input/parameters: state data struct (StateDataType *)
|
||||
Function output/parameters: updated state data struct (StateDataType *)
|
||||
Function output/returned: none
|
||||
Device input/---: none
|
||||
Device output/---: none
|
||||
Dependencies: privateCopyString
|
||||
*/
|
||||
void setEmptyDataNode( StateDataType *node );
|
||||
|
||||
|
||||
#endif // DATA_UTILITIES_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue