DataDirector API
UnknownAsset.h
1 #ifndef _UNKNOWN_ASSET
2 #define _UNKNOWN_ASSET
3 
4 #include "GlsDDAssetBase.h"
5 #include <string>
6 
7 
8 namespace disti
9 {
10 
11 // Tomb of the Unknown Asset
12 // used as a "placeholder" asset by Producer
13 class UnknownAsset : public GlsDDAssetBase
14 {
15 public:
16  UnknownAsset();
17  ~UnknownAsset();
18 
19  // Describes the Asset (for UI)
20  virtual const char *Description();
21  // Is this asset currently running?
22  virtual bool Live();
23  // Send data to asset
24  virtual bool WriteDataToDictionary();
25  // Get data from asset
26  virtual bool ReadDataFromDictionary();
27  // initialization parameters, encoded into a single string
28  virtual bool Init(const char *params);
29  // Poll asset, put all "discovered" assets into attribute list - optional, but very useful for the GUI
30  virtual bool PopulateAttributeList();
31  // Returns asset type (class) name
32  virtual const char* ClassName();
33  // Try to add a given attribute to asset's RTDB
34  virtual GlsDDAttributeBase* AddAttributeToDictionary(const std::string& attributeName, GlsDDAttributeBase::DataType type);
35 
36  // Start asset (connect)
37  virtual bool Start(const char *params);
38  // Stop asset (disconnect)
39  virtual bool Stop();
40 
41  void SetClass(const std::string& className);
42  void SetInstance(const std::string& instanceName);
43  void SetDescription(const std::string& description);
44 
45 protected:
46  virtual GlsDDAttributeBase* GetDictionaryAttribute(const std::string& attributeName);
47 
48 private:
49  std::string _assetClass;
50  std::string _description;
51  std::string _params;
52 };
53 
54 } // end namespace disti
55 
56 #endif
57 
Definition: UnknownAsset.h:13
Definition: AttributeChangedEmitter.h:46