VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
radioNetInterface.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2016 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
6 #pragma once
7 
8 #include <makRadioNet/export.h>
9 #include <makRadio/radio.h>
10 #include <vrfutil/rwUUID.h>
11 
12 #include <map>
13 #include <vector>
14 #include <string>
15 
16 namespace makVrf
17 {
18  class DtRadioTransmitterStateComponent;
19  class DtRadioReceiverStateComponent;
20  class DtStateData;
21 }
22 
23 namespace makVrfEvents
24 {
25  class DtRawSignalEvent;
26 }
27 
28 class DtEntityIdentifier;
30 class DtUUID;
31 
32 namespace makRadio
33 {
34  class StreamAudioMessage;
35  class ConfigureRadioMessage;
36 
38  {
39  public:
40  DtRadioNetInterface(DtCommunicationManager* reflectedEntityList, const DtUUID& entityId, unsigned long long radioId);
41  virtual ~DtRadioNetInterface();
42 
43  virtual void tick();
44 
45  virtual void configure(ConfigureRadioMessage* msg);
46  virtual void sendSignal(StreamAudioMessage* msg);
47 
48  virtual StreamAudioMessage* receiveSignal(const makVrfEvents::DtRawSignalEvent& sig);
49 
51  {
52  return myTxPub;
53  }
54 
56  {
57  return myRxPub;
58  }
59 
60  protected:
61  virtual void adminStateDataDeleted();
62  virtual StreamAudioMessage* extractAudio(const makVrfEvents::DtRawSignalEvent& sig, const DtEntityIdentifier& entityId, const DtUUID& uuid, DtRadioID streamTag) const;
63 
64  virtual void findEntityAndRadioIds(const makVrfEvents::DtRawSignalEvent& sig, DtEntityIdentifier& entityId, DtUUID& uuid, int& radioId) const;
65  virtual bool findReflectedRadio(const makVrfEvents::DtRawSignalEvent& sig, const makVrf::DtRadioTransmitterStateComponent*& radio) const;
66  virtual bool checkIdsShouldCommunicate(const makVrfEvents::DtRawSignalEvent& sig) const;
67  virtual bool checkFrequenciesMatch(const makVrf::DtRadioTransmitterStateComponent* radio) const;
68  virtual bool checkCryptoStatesMatch(const makVrf::DtRadioTransmitterStateComponent* radio) const;
69  virtual bool checkModulationTypesMatch(const makVrf::DtRadioTransmitterStateComponent* radio) const;
70  virtual bool checkHoppingAndNoiseMatch(const makVrf::DtRadioTransmitterStateComponent* radio) const;
71  virtual bool initializeAdminEntity(makVrf::DtStateData*, DtUUID u);
72  virtual void createAndInitializeAdminStateData(const DtUUID&);
73 
74  protected:
76  unsigned long long myRadioId;
78  double myTimeLastTransmit = 0.;
79  double myTimeLastReceive = 0.;
80  double myTimeToKeepTransmitterOn = 0.;
81 
85 
87 
88  boost::signals2::scoped_connection myStateDataDeletedConnection;
90  };
91 }
UUID is a unique ID wrapper class.
Definition: rwUUID.h:229
makVrf::DtRadioTransmitterStateComponent * txPub() const
Definition: radioNetInterface.h:50
Definition: rawSignalEvent.h:16
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: radioTransmitterStateComponent.h:139
Definition: configureRadio.h:13
boost::signals2::scoped_connection myStateDataDeletedConnection
Definition: radioNetInterface.h:88
Contains the DtUUID class declaration.
#define DT_DLL_MAKRADIOPLUGIN
Get proper local export symbol.
Definition: export.h:20
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:336
int myIntercomStreamId
Definition: radioNetInterface.h:77
The DtCommunicationManager class is a convenience class that will create both the DtNetworkInterfaceM...
Definition: communicationManager.h:51
DtUUID myEntityId
Definition: radioNetInterface.h:75
makVrf::DtRadioReceiverStateComponent * rxPub() const
Definition: radioNetInterface.h:55
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: radioReceiverStateComponent.h:64
makVrf::DtStateData * myStateData
Definition: radioNetInterface.h:86
Definition: radioNetInterface.h:37
unsigned long long myRadioId
Definition: radioNetInterface.h:76
makVrf::DtRadioTransmitterStateComponent * myTxPub
Definition: radioNetInterface.h:83
DtCommunicationManager * myExConn
Definition: radioNetInterface.h:82
makVrf::DtRadioReceiverStateComponent * myRxPub
Definition: radioNetInterface.h:84
Definition: streamAudio.h:16
DtUUID myAdminUUID
Definition: radioNetInterface.h:89

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)