VR-Forces 4.3.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
vrfSensorInfoManager.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
10 
11 #pragma once
12 
13 #include <vrfGuiCore/vrfGuiCore.h>
14 
15 #include <vrvCore/DtUniqueID.h>
17 #include <vlpi/entityType.h>
18 #include <boost/signal.hpp>
19 
20 namespace makVrv
21 {
22  class DtDe;
23  class DtSimObjectEntry;
24 }
25 
26 class DtSimMessage;
27 class DtIfSensorData;
28 
29 namespace makVrf
30 {
32  {
33  std::string myMarkingText;
34  DtEntityType myType;
35  int myForce;
36  int myCid;
38 
39  typedef struct _DtSensorInformation
40  {
41  std::string mySensorName;
43  std::vector<DtSensorContactInformation> mySensorContacts;
45 
47  {
48  public:
49  typedef std::map<std::string, DtSensorInformation> DtSensorInformationMap;
50 
51  public:
53  virtual ~DtVrfSensorInfoManager();
54 
56  static DtVrfSensorInfoManager& instance(makVrv::DtDe& de);
57 
58  public:
60  virtual DtSensorInformationMap startMonitoring(const std::string&);
61 
64  virtual bool stopMonitoring(const std::string&);
65 
67  bool monitoring(const std::string& n) const
68  {
69  return (myMonitoring.find(n) != myMonitoring.end());
70  }
71 
72  boost::signal<void (std::string, const DtSensorInformationMap&)> signal_contactInfoReceived;
73 
74  virtual std::string cidLevel(int level) const;
75 
76  virtual void addCidLevel(int l, const std::string& i);
77 
78  virtual DtSensorInformationMap sensorInfoFor(const std::string&) const;
79 
80  protected:
81  virtual void processSensorData(DtSimMessage*);
82 
83  virtual void slot_simObjectEntryAboutToBeRemoved(makVrv::DtSimObjectEntry& entry);
84 
85  protected:
87 
88  typedef std::map<std::string, int> DtMonitoringMap;
90 
91  std::map<int, std::string> myCidLevels;
92 
93  typedef std::map<std::string, DtSensorInformationMap> DtEntitySensorMonitorMap;
95 
96  typedef std::map<makVrv::DtUniqueID, std::string> MonitoringById;
98  };
99 }

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)