VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
activeSonarSensor.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2024 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
11 
12 #pragma once
13 
15 
18 class DtSimMessage;
19 class DtVrfObjectMessage;
22 class DtUUID;
23 
25 
27 {
28 private:
31 
34  orig);
35 
37  const DtActiveSonarSensor & operator=(const
38  DtActiveSonarSensor & orig);
39 
40 public:
41 
44  DtActiveSonarSensor(const DtString& name,
45  DtLocalObject* owner,
46  DtSimulationServices* simManager,
47  DtComponentDescriptor* desc = 0,
48  DtReaderWriterRegistry* parentRegistry = 0);
49 
51  virtual ~DtActiveSonarSensor() override;
52 
53  virtual bool init() override;
54 
57  virtual const char* type() const override;
58 
60  virtual int sensorType() const override;
61 
62  virtual void tick() override;
63 
67  static DtSimComponent * creator(const DtString& name,
68  DtLocalObject* owner,
69  DtSimulationServices* simManager,
70  DtComponentDescriptor* desc = 0,
71  DtReaderWriterRegistry* parentRegistry = 0);
72 
74  virtual void setSensorEnabled(bool) override;
75 
76 protected:
81  virtual bool detectObject(DtSimObjectReference object, DtRwSensorContactInfo* contactInfo) override;
82 
88  DtRwSensorContactInfo* contactInfo,
89  bool& contactInfoModified) override;
90 
92  virtual const char* defaultPSRType() const override;
93 
97  virtual void createAndInitActiveSonarSystem();
98 
100  virtual void destroyActiveSonarSystem();
101 
104  static void setActiveSonarModeCallback(DtSimMessage *msg, void * usrData);
105 
108  virtual void processSetActiveSonarMode(DtSimMessage *msg);
109 
110  static void requestActiveSonarModesCallback(const DtVrfObjectMessage* msg, void* usr);
111  virtual void processRequestActiveSonarModes(const DtUUID& receiver,
112  const DtUUID& sender,
113  const DtVrfObjectMessage* msg);
114 
123  virtual void updateActiveSonarMode(const DtString modeToUse = "");
124 
125  virtual void preFirstTickInit() override;
126 
127 protected:
128 
131 
135 
137 
141 };
UUID is a unique ID wrapper class.
Definition: uuid.h:59
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtActiveSonarSensorPSR * myActiveSonarSensorPSR
DtObjectSensor's myProcessState cast to our PSR type. This class will not new or delete this object...
Definition: activeSonarSensor.h:134
DtActiveSonarSensorDescriptor; descriptor for the DtActiveSonarSensor component.
Definition: activeSonarSensorDescriptor.h:22
virtual bool init() override
Calls createPSR(), createDetectableObjectList(), createAndInitSensorMonitor() and initSensorGeometry(...
int myActiveSonarSystemId
Definition: activeSonarSensor.h:140
DtActiveSonarSensorDescriptor * myDescriptor
Definition: activeSonarSensor.h:136
bool myInitializeSonar
Definition: activeSonarSensor.h:138
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
Definition: readerWriterRegistry.h:39
virtual ContinueDetectingResult continueDetectingObject(DtSimObjectReference object, DtRwSensorContactInfo *contactInfo, bool &contactInfoModified) override
Overridden from DtSignatureObjectSensor to check if the current speed is greater than the maximum eff...
DtVrfActiveSonarSystem * myActiveSonarSystem
Contains the active sonar system publisher.
Definition: activeSonarSensor.h:130
virtual void setSensorEnabled(bool enabled) override
Enables or disables this sensor.
This class represents the data gathered by a sensor about a particular single sensor contact...
Definition: rwSensorContactInfo.h:68
virtual void tick() override
Overridden from base class to update myLocalSensorPosition (using localSensorPosition()) at the start...
virtual bool detectObject(DtSimObjectReference object, DtRwSensorContactInfo *contactInfo) override
Overridden from DtSignatureObjectSensor to check if the current speed is greater than the maximum eff...
static DtSimComponent * creator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
const DtPassiveSonarSensor & operator=(const DtPassiveSonarSensor &orig)
assignment operator; not implemented
bool mySkipFirstTick
Definition: activeSonarSensor.h:139
Definition: activeSonarSensor.h:26
virtual int sensorType() const override
Returns DtSensorTypeRadar.
File: simMsg.h.
Definition: simMessage.h:35
The base class for all messages to/from a specific DtVrfObject. Various subclasses of this class will...
Definition: vrfObjectMessage.h:30
ContinueDetectingResult
Definition: objectSensor.h:69
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:96
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:89
The central class of a DtLocalObject for all communications to and from the object. This class manages all communications on a specific DtLocalObject, though both simulation internal communication, and communication though the simulated radios of the object. All communication is done though the use of the DtVrfObjectMessage class and its subclasses. Callbacks can be registered on this interface which will be called on receipt of a message by this entity. Messages can be sent from this entity by using the message sending functions. These messages may be sent though the SimInternal message mechanism, or the radio message system. Radios will not exist until createRadiosFromDescriptorList() or createRadiosFromDescriptorList(const DtRadioDescriptorList& descList) is called.
Definition: vrfObjectCommunicationInterface.h:40
virtual void preFirstTickInit() override
Initializes the component before it is ticked for the first time. It is called by timedTick if myFirs...
virtual const char * type() const override
Returns a string identifies the class type of component. Type values are defined in compTypes...
DtVrfActiveSonarSystem manages a VR-Link active sonar system publisher, and sets all the values assoc...
Definition: vrfActiveSonarSystem.h:33
Process State Repository for the DtActiveSonarSensor component.
Definition: activeSonarSensorPSR.h:21
DtPassiveSonarSensor.
Definition: passiveSonarSensor.h:31
virtual const char * defaultPSRType() const override
A locally simulated VRF object.
Definition: localObject.h:98

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)