VR-Forces 4.0.4 Class Documentation
include/vrfGuiCore/DtVrfSensorInfoManager.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2008 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 /******************************************************************************
00006 ** $RCSfile: DtVrfSensorInfoManager.h,v $ $Revision: 1.1 $ $State: Exp $
00007 ******************************************************************************/
00008 
00011 
00013 
00014 #pragma once
00015 
00016 #include <vrfGuiCore/vrfGuiCore.h>
00017 
00018 #include <vrvUtil/DtVirtualBaseClass.h>
00019 #include <vlpi/entityType.h>
00020 #include <boost/signal.hpp>
00021 
00022 namespace makVrv
00023 {
00024    class DtDe;
00025    class DtSimObjectEntry;
00026 }
00027 
00028 class DtSimMessage;
00029 class DtIfSensorData;
00030 
00031 namespace makVrf
00032 {
00033    typedef struct _DtSensorContactInformation
00034    {
00035       std::string    myMarkingText;
00036       DtEntityType   myType;
00037       int            myForce;
00038       int            myCid;
00039    } DtSensorContactInformation;
00040 
00041    typedef struct _DtSensorInformation
00042    {
00043       std::string                               mySensorName;
00044       int                                       mySensorType;
00045       std::vector<DtSensorContactInformation>   mySensorContacts;
00046    } DtSensorInformation;
00047 
00048    class DT_DLL_VRFGUICORE DtVrfSensorInfoManager : public makVrv::DtVirtualBaseClass
00049    {
00050    public:
00051       typedef std::map<std::string, DtSensorInformation> DtSensorInformationMap;
00052 
00053    public:
00054       DtVrfSensorInfoManager(makVrv::DtDe&);
00055       virtual ~DtVrfSensorInfoManager();
00056 
00058       static DtVrfSensorInfoManager& instance(makVrv::DtDe& de);
00059 
00060    public:
00062       virtual DtSensorInformationMap startMonitoring(const std::string&);
00063 
00066       virtual bool stopMonitoring(const std::string&);
00067 
00069       bool monitoring(const std::string& n) const
00070       {
00071          return (myMonitoring.find(n) != myMonitoring.end());
00072       }
00073 
00074       boost::signal<void (std::string, const DtSensorInformationMap&)> signal_contactInfoReceived;
00075 
00076       virtual std::string cidLevel(int level) const;
00077 
00078       virtual void addCidLevel(int l, const std::string& i);
00079 
00080       virtual DtSensorInformationMap sensorInfoFor(const std::string&) const;
00081 
00082    protected:
00083       virtual void processSensorData(DtSimMessage*);
00084 
00085       virtual void slot_simObjectEntryAboutToBeRemoved(makVrv::DtSimObjectEntry& entry);
00086 
00087    protected:
00088       makVrv::DtDe&                       myDe;
00089 
00090       typedef std::map<std::string, int>  DtMonitoringMap;
00091       DtMonitoringMap                     myMonitoring;
00092 
00093       std::map<int, std::string>          myCidLevels;
00094 
00095       typedef std::map<std::string, DtSensorInformationMap> DtEntitySensorMonitorMap;
00096       DtEntitySensorMonitorMap                              myEntityToSensorMap;
00097    };
00098 }

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)