31 #ifdef ERROR // A workaround for wingdi.h
44 template<
typename S,
typename T>
class FastMap;
221 template<
typename T>
static bool ReadOnce(
const unsigned short & uriCode,
229 template<
typename T>
static bool WriteOnce(
const Str& uriPart,
233 template<
typename T>
static bool WriteOnce(
const unsigned short & uriCode,
279 LogWriter* rewriteTo = NULL,
bool forceWrite =
false );
281 LogWriter* rewriteTo = NULL,
bool forceWrite =
false );
283 bool forceWrite =
false );
Client-side interface for injecting log data into the log queue.
Definition: Logger.h:30
static bool WriteOnce(const Str &uriPart, Component *owner, const Unit &unit, const T &writeThis)
If the value is only going to be written once, it's probably not worth providing a DataWriter...
Definition: Slate.cpp:739
FlexArray< CodedStr * > NameArray
Definition: Slate.h:62
Simple class for providing key-pointer mappings.
Definition: Slate.h:44
Serializable representation of DataAccessor object.
Definition: DataAccess.h:30
FastMap< const ElementURI, UniversalDataElement * > UniversalMap
Definition: Slate.h:48
FastMap< const Str, ElementURI * > ElementURIMap
Definition: Slate.h:52
BinaryDataType
These are binary type identifiers for serializing and unserializing The syntax below handles up to 16...
Definition: BinaryDataType.h:39
static bool IsDirectoryRead()
Definition: Slate.h:244
static Mutex ElementMutex_
Definition: Slate.h:304
A DataAccessor that reads values from the Slate Contains a default dataValue that must not be NULL...
Definition: UniversalDataReader.h:26
Implementation of a DataElement as a "UniversalDataElement".
Definition: UniversalDataElement.h:29
static void WriteNameEntry(CodedStr *codeName, LogWriter *rewriteTo=NULL, bool forceWrite=false)
Definition: Slate.cpp:1289
FlexArray< ElementURI * > ElementURIList
Definition: Slate.h:61
FlexArray< DataAccess * > DataAccessArray
Arrays for attaching codes to names.
Definition: Slate.h:55
static void MapDataElement(ElementURI *elementURI, DataElement *dataElement)
Maps the supplied DataElement to the suplied Uri.
Definition: Slate.cpp:436
FastMap< const ElementURI, DataElement * > DataElementMap
Maps for keeping track of actual data elements.
Definition: Slate.h:44
Base class for a generalized set of "log data destinations," including to files (text or binary)...
Definition: LogWriter.h:25
static bool DirectoryWritesEnabled_
Definition: Slate.h:284
static void WriteElementURIEntry(ElementURI *elementURI, LogWriter *rewriteTo=NULL, bool forceWrite=false)
Definition: Slate.cpp:1271
A DataAccessor that reads values from the Slate Contains a default dataValue that must not be NULL...
Definition: DataReader.h:30
static UniversalDataWriter * NewUniversalWriter(const UniversalURI &universalURI, Component *owner, DataValue *initialValue, const float accuracy=DataElement::NO_ACCURACY)
Definition: Slate.cpp:556
static bool DirectoryWritesSimulated_
Definition: Slate.h:285
A DataAccessor that writes values to the Slate via its associated DataElement.
Definition: UniversalDataWriter.h:24
static void CodifyElementURI(ElementURI &elementURI)
Adds a unique code to the elementURI.
Definition: Slate.cpp:258
virtual ~StaticDestructor()
static Destructor
Definition: Slate.cpp:105
static int ElementURICount_
Definition: Slate.h:300
static unsigned int GetElementURICount()
Returns the number of registered ElementURIs.
Definition: Slate.cpp:250
static Mutex DataAccessMutex_
Definition: Slate.h:303
Contains the DataAccess class definition.
Contains the Component class definition.
static void WriteDirectory(LogWriter *rewriteTo=NULL, bool forceLog=false)
Definition: Slate.cpp:1175
static CodedStr * RegisterCodedName(CodedStr *name)
Adds the supplied CodedStr to the registries.
Definition: Slate.cpp:407
A simple pthread Mutex abstraction.
Definition: Mutex.h:20
Contains the UniversalURI class definition.
static ElementURIArray * ElementURIArray_
Definition: Slate.h:298
static NameArray * NameArray_
Definition: Slate.h:301
FlexArray< CodedStr * > NameList
Definition: Slate.h:63
static StaticDestructor StaticDestructor_
Static instance of StaticDestructor.
Definition: Slate.h:313
FastMap< const Str, DataAccess * > DataAccessMap
Maps for keeping track of names only.
Definition: Slate.h:51
static DataReader * NewReader(const Str &componentName, const Str &uriPart, Component *owner, const DataValue *defaultValue, bool deleteDefaultValue=true)
Definition: Slate.cpp:507
static UniversalDataElement * NewUniversalElement(const UniversalURI &universalURI, Component *owner, const Unit &unit, BinaryDataType binaryType)
Definition: Slate.cpp:923
A DataValue is an abstract base class for a data value and associated engineering units of the value...
Definition: DataValue.h:35
static CodedStr * FindCodedName(const Str &name)
Returns the CodedStr like the supplied string.
Definition: Slate.cpp:367
static const unsigned short NO_LOG_FORMAT
Definition: Slate.h:257
static DataWriter * NewOutputWriter(const Str &uriPart, Component *owner, DataValue *initialValue)
Definition: Slate.cpp:482
A DataAccessor that writes values to the Slate via its associated DataElement.
Definition: DataWriter.h:27
static ElementURI * FindElementURI(const Str &str)
Returns a ElementURI that matches the supplied str.
Definition: Slate.cpp:336
Code unit that represents a unique name for a measured quantity.
Definition: UniversalURI.h:29
This is a very abstract class that can be implemented by classes that want to receive stream input...
Definition: InStream.h:29
Extends the Str class, adding an unsigned short code (actually, the codes are limited to 14 bits...
Definition: CodedStr.h:23
static void WriteDataAccessEntry(DataAccess *dataAccess, LogWriter *rewriteTo=NULL, bool forceWrite=false)
Helper functions that write directory information.
Definition: Slate.cpp:1253
static unsigned short GetDataAccessCount()
Returns the number of DataAccess element currently registered.
Definition: Slate.h:88
static DataAccess * GetDataAccess(const unsigned short &code)
Returns the DataAccess with the code, or NULL if none.
Definition: Slate.cpp:140
static bool DirectoryRead_
Definition: Slate.h:289
static bool ReadHeader(InStream &inStream)
Read and process a header frame.
static unsigned short NextDataAccessCode_
Definition: Slate.h:286
static void ConfigureNewDataElement(Component *owner, const ElementURI &elementURI, DataElement *&dataElement)
Definition: Slate.cpp:942
static void SimulateDirectoryWrites()
Definition: Slate.cpp:893
static DataElement * NewDataElement(const ElementURI &elementURI, Component *owner, const Unit &unit, BinaryDataType binaryType, const float accuracy=DataElement::NO_ACCURACY)
Definition: Slate.cpp:904
static UniversalMap * UniversalMap_
Definition: Slate.h:292
static void ClearDirectory()
Definition: Slate.cpp:1094
FlexArray< DataAccess * > DataAccessList
Definition: Slate.h:59
static void Construct()
static Constructor
Definition: Slate.cpp:73
Abstact base class of all elements which can write to, or read from the slate.
Definition: DataAccessor.h:29
Replacement for standard template class string.
Definition: Str.h:12
static DataAccessMap * DataAccessMap_
Definition: Slate.h:293
Definition: unserialize.cpp:77
Abstract Base class for software components.
Definition: Component.h:53
static void DeRegisterElementURI(ElementURI *elementURI)
Removes the supplied ElementURI to the registries.
Definition: Slate.cpp:314
Contains the ElementURI class definition.
static ElementURI * GetElementURI(const unsigned short &code)
Returns the ElementURI with the code, or NULL if none.
Definition: Slate.cpp:234
FastMap< const Str, CodedStr * > NameMap
Definition: Slate.h:53
Contains the DataAccessor class definition.
Slate()
Private Constructor for static class.
Definition: Slate.h:261
Contains the Mutex, ThreadCondition, and MutexLocker class declarations.
static CodedStr * GetName(const unsigned short &code)
Returns the CodedStr with the code, or NULL if none.
Definition: Slate.cpp:358
static Mutex NameMutex_
Definition: Slate.h:305
static ElementURIList * ElementURIList_
Definition: Slate.h:299
Contains the Logger class definition.
static bool ReadOnce(const Str &componentName, const Str &uriPart, const Unit &unit, T &readTo, Logger &logger, Syslog::Severity severity=Syslog::CRITICAL)
If the value is only going to be read once, it's probably not worth providing a DataReader.
Definition: Slate.h:200
Code unit that represents the slate.
Definition: Slate.h:73
static Logger * Logger_
Definition: Slate.h:290
A "Simple" DataElement.
Definition: SimpleDataElement.h:24
static NameMap * NameMap_
Definition: Slate.h:295
static unsigned short NextNameCode_
Definition: Slate.h:288
Contains the DataValue class definition.
Simple class providing a flexible size array of pointers.
Definition: DataReader.h:19
static DataElementMap * DataElementMap_
Definition: Slate.h:291
Severity
An attempt to define different levels of syslog severity.
Definition: Syslog.h:28
Code unit that represents a unique name for a DataElement.
Definition: ElementURI.h:27
static DataAccess * RegisterDataAccess(DataAccess *dataAccess)
Adds the supplied DataAccess to the registries.
Definition: Slate.cpp:178
The supervisor is the "main" component in the vehicle software.
Definition: Supervisor.h:65
static unsigned short NextElementURICode_
Definition: Slate.h:287
static DataWriter * NewWriter(const Str &componentName, const Str &uriPart, Component *owner)
Definition: Slate.cpp:590
static void Uninitialize()
Definition: Slate.cpp:1135
FlexArray< ElementURI * > ElementURIArray
Definition: Slate.h:60
static unsigned short GetElementURICode(const char *chars)
Returns a ElementURI code for the ElementURI that matches the supplied chars.
Definition: Slate.cpp:345
Code that represents an engineering unit.
Definition: Unit.h:24
static DataAccessArray * DataAccessList_
Definition: Slate.h:297
Contains the SimpleDataElement class definition.
static ElementURIMap * ElementURIMap_
Definition: Slate.h:294
static DataAccessArray * DataAccessArray_
Definition: Slate.h:296
static UniversalDataReader * NewUniversalReader(const UniversalURI &universalURI, Component *owner, const DataValue *defaultValue, bool deleteDefaultValue=true)
Definition: Slate.cpp:540
static void EnableDirectoryWrites()
Definition: Slate.cpp:878
static DataElement * GetElement(const unsigned short &uriCode)
Returns the DataElement of the uriCode, or NULL.
Definition: Slate.cpp:208
static bool ReadOnce(const Str &componentName, const Str &uriPart, DataValue &readTo, Logger &logger, Syslog::Severity severity=Syslog::CRITICAL)
Definition: Slate.h:211
static CodedStr & GetCodedName(const Str &name)
Returns the CodedStr like the supplied string.
Definition: Slate.cpp:381
static const float NO_ACCURACY
Defines an accuracy quantity which means "no accuracy specified" typically means "don't use" i...
Definition: DataElement.h:73
Makes sure that static objects are deleted on shutdown.
Definition: Slate.h:307
static void ReadDirectory(const Str &dirFilename)
Definition: Slate.cpp:1083
Abstact base class for one "element" of the Slate.
Definition: DataElement.h:37
static NameList * NameList_
Definition: Slate.h:302
static DataReader * NewInputReader(const Str &uriPart, Component *owner, const DataValue *defaultValue, bool deleteDefaultValue=true)
Creates a reader for this component's input (and a dataElement) Doesn't take a ComponentName, assumes it's being created in the owner's namespace.
Definition: Slate.cpp:452
static ElementURI * RegisterElementURI(ElementURI *elementURI)
Adds the supplied ElementURI to the registries.
Definition: Slate.cpp:285